View Full Version : Switching objects

07-26-2009, 01:24 AM
This is my page:


Because of an issue I seem to be having with Google Reader mp3 player in Safari, I decided I needed to try another player.

So here goes. This is my current object:

<object style="border: 0pt none ; float:left;margin-left:215px;display: none; width: 400px; height: 27px;" id="mp3Holder" data="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://cha rlesnewmanpubl.com/audio/mp3s/cd1/Sweethearts_On_Parade_LA1.mp3&amp;autoPlay=tru e"></object>

This is the new object:

<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_multi.swf" width="250" height="55">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_multi.swf" />
<param name="bgcolor" value="#710305" />
<param name="FlashVars" value="mp3=http%3A//flash-mp3-player.net/medias/another_world.mp3&amp;width=250&amp;he ight=55&amp;showvolume=1" />

And this is my js:

function doButtons(picimage, mp3file, dlURL) {
var playerSrc = 'http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=';
var autoPlaySrc = '&autoPlay=true';
document.getElementById('mp3Holder').style.display = "inline-block";
document.getElementById('mp3Holder').data = playerSrc + mp3file + autoPlaySrc;

Can someone tell me how to adjust this to work with the new object?


07-26-2009, 03:26 AM
I can see that I need to have this filled with the var:

param name="FlashVars" value=

I just don't know how. I can do a

document.getElementById('mp3Holder').value = playerSrc + mp3file + autoPlaySrc;

But how do I specify the value for that param?