Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get object's parameter

Status
Not open for further replies.

rlinsurf

IS-IT--Management
Jun 23, 2008
4
0
0
US
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:

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.
 
Where is the API documentation for this player? Does it actually accept those params, or are you 'poking and hoping'?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
It actually does. However, there's other stuff I need to do, and I can't find any API for it. What I did find was the actual source for the player which is xml.

I actually need to hire a js/flash guy to help me with this. This is definitely out of my league.

Know anyone interested in an afternoon's worth...?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top