mouseover image and object sound and preset volume level?

  • Thread starter murrayatuptowngallery
  • Start date
M

murrayatuptowngallery

I have looked at some mouseover/ sound object scripts and can't get
them to work. Most were more complex than needed and introduced several
new parameters for me.

I found a simple pair of html code segments that accomplish display of
an image and automatic 'display' (playback) of a .wav file, and
apparently are usable for both IE and NS,

"
<object height="100%" width="100%"
type="image/jpeg" data="picture.jpeg">
</object>
"
Displays an image.


"
<object
height="50%"
width="50%"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="AutoStart" value="1" />
<param name="FileName" value="sound.wav" />
</object>
"
Plays the sound without needing click on a player button.

Some questions:

1) What does the clsid: part refer to ? It doesn't work if that line is
removed.

2) What is the simplest way to play the sound with a mouseover the
image?

3) Is is possible to preset the playback volume with the 'object'
method? The default seemed obnoxiously loud to me.

Thank you

murray
 
T

Thomas 'PointedEars' Lahn

murrayatuptowngallery said:
<object
height="50%"
width="50%"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="AutoStart" value="1" />
<param name="FileName" value="sound.wav" />
</object>
"
Plays the sound without needing click on a player button.

Provided that there is a player plugin set up for the used user agent.
[...]
1) What does the clsid: part refer to ?

The CLSID (class ID) of the respective ActiveX control/COM class object.
You can find out which CLSID refers to which object by having a look into
the `HKCR\CLSID' or `HKLM\Software\Classes\CLSID' Windows Registry
subtrees.

It doesn't work if that line is removed.

It probably does not work _in IE for Windows_ if the `clsid' attribute is
removed, since IE probably requires the signature of a control, depending
on the Security Level set for it.

This was not a JS question.
2) What is the simplest way to play the sound with a mouseover the
image?

<img ... onmouseover="referenceToPlayMethod(...)"

See e.g. MSDN Library for details.
3) Is is possible to preset the playback volume with the 'object'
method? The default seemed obnoxiously loud to me.

Probably, but since there is no standardized plugin interface yet, it will
not work cross-browser and therefore has to be feature-tested before used.
See MSDN Library for that, too. Google is your friend. [psf 6.1]


PointedEars
 
V

VK

murrayatuptowngallery said:
<object height="100%" width="100%"
type="image/jpeg" data="picture.jpeg">
</object>

<object
height="50%"
width="50%"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="AutoStart" value="1" />
<param name="FileName" value="sound.wav" />
</object>
"
Plays the sound without needing click on a player button.

Some questions:

1) What does the clsid: part refer to ? It doesn't work if that line is
removed.

You're inserting Windows Media Player control onto your page. The line
of question refers to the Clacc ID under which Windows Media Player
ActiveX control is registred on the client machine.
Wrom here you may guess that:
1) User system has to be Windows 98 or higher
2) Windows Media Player v.7.x has to be installed (lower and higher
versions are using sometimes different CLASSID's for registration; so
user may be asked to download ActiveX control despite she already has
Windows Media Player installed).
2) What is the simplest way to play the sound with a mouseover the
image?

Use Macromedia Flash. It's also the only one reliable way to cover
other systems besides Windows.
3) Is is possible to preset the playback volume with the 'object'
method? The default seemed obnoxiously loud to me.

The volume depends on system volume settings. You can set volume
programmatically within the provided system range (other words you
cannot programmatically turn the volume regulator on user's
loudspeakers ;-)

Use Macromedia Flash instead. If you don't want it, don't bother with
<object> as it stays Windows-exclusive anyway. It is much simplier then
to manupulate <bgsound> object (and it doesn't require Media Player
installed).
 
M

murrayatuptowngallery

Thanks, P-E.

I thought the conglomerate mess fell under JS because of the mouseover.
My error.

I did get the hypergurl mouseover play script to work. I somehow
eliminated whatever problem I had initially had.

I DO try to search first. Sometimes the answer is tougher for me than
the question!

I guess regarding the volume, people will have their volume set to
wherever THEY are comfortable.


Thanks.

Murray
 
T

Thomas 'PointedEars' Lahn

murrayatuptowngallery said:
I DO try to search first. Sometimes the answer is tougher for me than
the question!
ACK

I guess regarding the volume, people will have their volume set to
wherever THEY are comfortable.

I rather think that people will be most comfortable if you do not force
another sound upon them. They may have their MP3 player application
running in the background and your additional sound interferes. So
unless you deem it absolutely necessary (for example do to the nature
of the provided content), you should refrain from doing so.

You're welcome.

And please read <http://jibbering.com/faq/> on quoting.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top