473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

mouseover image and object sound and preset volume level?

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

Nov 1 '05 #1
4 2971
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
Nov 1 '05 #2
VK

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

Nov 1 '05 #3
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

Nov 1 '05 #4
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
Nov 1 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
2
by: arkam | last post by:
Here is the code : public class AudioMixerHelper { public const int MMSYSERR_NOERROR = 0; public const int MAXPNAMELEN = 32; public const int MIXER_LONG_NAME_CHARS = 64; public const int...
4
by: Robert Gravereaux | last post by:
I'm putting together a C# .Net forms project on win2k. The application requires some sort of horn sound. I've never implemented any audio in .Net, so I'm not sure how best to accomplish this. ...
3
by: Andreas Hecker | last post by:
Hello, when i play a sound file like mp3 or wav with MediaPlayer or anything like this, i would like to get the volume level of the sound card in real time. The data is then sent to the serial...
3
by: Annette Acquaire | last post by:
I have and image map with a dozen hotspot links on it that I'm trying to get to open a new image over existing one on mouseover of each COORD. The only thing I was able to do was swap image on...
3
by: Memozio | last post by:
Is there a library in python that has methods applicable to volume(in terms of sound) of a given file? For example if it can check if the sound volume of a file is on the same level for the entire...
4
by: kid joe | last post by:
Hello I've got interested in learning some basic sound programming bits in C... mainly I want to know how to go about accessing the sound devices - reading from them mainly - in windows and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.