I'm trying to set the value of an object's parameter, so that it will change based on a link the user clicks, which gives the url for a .mp3. So far, I've tried this:
With this as the object:
When the alert comes up, it gives the correct string, and the flash-mp3-player thingie gets the very first file, and can play it. However, all the parameters for the colors, etc., aren't there, and it will only play the first .mp3, no others, and doesn't change. So something is wrong.
Code:
function doButtons(mp3file) {
var flashPlaySrc = 'mp3=';
var flashPlayParam = '&height=55&bgcolor1=9f0007&slidercolor2=440c0f&buttoncolor=440c0f';
document.getElementById('mp3Player').style.display = "inline-block";
document.getElementById('FlashVars').value = flashPlaySrc + mp3file + flashPlayParam;
alert(flashPlaySrc + mp3file + flashPlayParam);
}
With this as the object:
Code:
<object name="mp3Player" id="mp3Player" type="application/x-shockwave-flash" data="[URL unfurl="true"]http://flash-mp3-player.net/medias/player_mp3_multi.swf"[/URL] width="200" height="55">
<param name="movie" value="[URL unfurl="true"]http://flash-mp3-player.net/medias/player_mp3_multi.swf"[/URL] />
<param name="bgcolor" value="#710305" />
<param id="FlashVars" name="FlashVars" value="" />
</object>
When the alert comes up, it gives the correct string, and the flash-mp3-player thingie gets the very first file, and can play it. However, all the parameters for the colors, etc., aren't there, and it will only play the first .mp3, no others, and doesn't change. So something is wrong.