logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-04-2010, 09:43 AM   #1
spazzer
spazzer's Avatar
 
Join Date: Jun 2009
Posts: 275
Smile Buttons not working in Opera !

Hi All,
I have used this javascript to make a very simple play and stop button for a music player, it all works fine in IE and Firefox but when I open the page in Opera the music plays and there is no control with the buttons can anyone help !
Here is a URL to my page in question:

http://www.eustonfishingclub.com/Gallery/index.html

THIS IS THE JAVASCRIPT THAT I HAVE COPIED


Code for Music Player:

<!-- Functions Code Block Start-->
<script>
/* Here we are creating two functions. The first to start a sound object playing and the second to stop a sound object from playing. */
//
// This function, when called will play the sound object
function EvalSoundPlay(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
// This function, when called will stop the sound object
function EvalSoundStop(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Stop();
}
</script>
<!-- Functions Code Block End-->

<!-- Here we are embedding the sound file/s. We give each embedded sound a 'name' that we can refer to in a JavaScript event call.
-----
// Note: You can have multiple sounds embedded but remember that each sound requires a different 'name' and each would require its own set of play/pause buttons. -->




<embed src="smooth_bgd.wav" autostart="false" width=0 height=0 name="sound1" repeat="true" loop="true" enablejavascript="true" />


THIS IS MY HTML:

<div class="musicPlayer"><img src="../Assets/Images/Global/play-button.png" alt="music play button" width="40" height="40" onClick="EvalSoundPlay('sound1')"/><img src="../Assets/Images/Global/stop_button.png" alt="music stop button" width="40" height="40" onClick="EvalSoundStop('sound1')"/></div><!-- End .musicPlayer -->
spazzer is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 10:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com