Guest lazyFlakes Posted January 8, 2010 Report Share Posted January 8, 2010 (edited) Hi all I'm hoping someone can help me with my little script. All I want is to play a small mp3 track when a single button is clicked/toggled. I know this is probably really basic stuff but I just can't get it to work in Firefox (3.5.7). Works in IE though. I have installed the WMP pluggin for FF now it' saying "music.Play is not a function". [edit]Never mind. I figured it out. I just need to use the control object in FF. The code below now works var sounds=0; function musicPlayer () { var music=document.getElementById ("player"); if (sounds==1) { if (music.controls) music.controls.stop (); else music.Stop (); sounds=0; } else { if (music.controls) music.controls.play (); else music.Play (); sounds=1; } } Edited January 9, 2010 by lazyFlakes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.