Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > mouseover image and object sound and preset volume level?

Reply
Thread Tools

mouseover image and object sound and preset volume level?

 
 
murrayatuptowngallery
Guest
Posts: n/a
 
      11-01-2005
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

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-01-2005
murrayatuptowngallery wrote:

> <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.

<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/hkey_classes_root_key.asp>

> 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
 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      11-01-2005

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


Old good <img src="myImage.gif" name="Image01"> would be better.


> <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).

 
Reply With Quote
 
murrayatuptowngallery
Guest
Posts: n/a
 
      11-01-2005
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

 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-01-2005
murrayatuptowngallery wrote:

> 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.

> Thanks.


You're welcome.

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


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about preset zoom on TVs and DVD players. Peter Jason DVD Video 0 07-08-2006 12:48 AM
switching tgo a preset ip address Jeff Wireless Networking 1 12-31-2005 09:59 PM
Any software that will shut down computer at preset time? John Computer Support 5 06-23-2004 02:22 PM
What are the WB setting in Landscape preset - OLY 740 Michael Badt Digital Photography 2 05-09-2004 04:33 PM
Open standard e-mail app with subject and body preset Peter Amberg Javascript 13 04-05-2004 04:37 PM



Advertisments