Jump to content

Music Switcher


Twango

Recommended Posts

I want to have 2 buttons (One would be better, truthfully)One that turns on song 1, the other song 2. The code I have now:

<embed id="musics" src="music.swf?auid=2" width="0px" height="0px"/><script type="text/javascript">function chagemusic(){document.getElementById('musics').src="music.swf?auid=2";}function chagemusic2(){document.getElementById('musics').src="music.swf?auid=3";}</script> <input type="button" value="Song 1" onclick="changemusic()"/><input type="button" value="Song 2" onclick="changemusic2()"/>

It's not the swf, that's working fine.

Link to comment
Share on other sites

so what's the problem? Are you checking for errors? The first thing that you would see is that your function names don't match those in your event handlers (or vice versa).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...