Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Flash] Params not working in all browsers

Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
Hey, I did an update on my Music Player. I made it so users can upload their own music to their media folder. To associate that with the music player, I made it so the code that the user pastes has a parameter with their username. Here's the code I would get:
Code:
<object width="300" height="150" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" title="AVsBest.com Music">
<param name="movie" value="http://www.avsbest.com/music/player3.swf" />
<param name="FlashVars" value="user=Spence" />
<param name="quality" value="high" /><embed width="300" height="150" flashvars="[user,Spence]" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.avsbest.com/music/player3.swf" type="application/x-shockwave-flash"></embed></object>
In Internet Explorer, it will put the variable: _root.user="Spence";
In FireFox and Safari, it doesn't parse these. It just says _root.user=undefined.

I put a patch in my flash file to turn undefined into whitespace. If I do that, then my XML file will see it as no user entered, and displays the default.

So in Firefox and Safari, everyone's music player displays the same default playlist, and in IE they can see their own personal playlist.

The problem is that only IE supports the external parameters.
Any suggestions?

Edit:
I fixed it guys.. The way to get it working in all browsers is to use a link query as well as parameters.
The new code I have to make looks like this:
Code:
<object width="300" height="150" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" title="AVsBest.com Music">
<param name="movie" value="http://www.avsbest.com/music/player3.swf?user=Spence" />
<param name="FlashVars" value="user=Spence" />
<param name="quality" value="high" /><embed width="300" height="150" flashvars="[user,Spence]" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.avsbest.com/music/player3.swf?user=Spence" type="application/x-shockwave-flash"></embed></object>
Notice a made a query in the link to the music player. (?user=Spence). That's the key to all browsers right there.. haha.....
 
Last edited:
Back
Top