Jump to content
Sign in to follow this  
Twango

Music Switcher

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.

Edited by Twango

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...