Twango Posted November 29, 2011 Share Posted November 29, 2011 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 More sharing options...
thescientist Posted November 29, 2011 Share Posted November 29, 2011 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 More sharing options...
Twango Posted November 30, 2011 Author Share Posted November 30, 2011 Gah, I hate typos... sorry to bother you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.