views:

614

answers:

3

Argghh. I have a site that offers audio previews of songs hosted elsewhere. Some file names have an ampersand in them - see below where it passes "soundFile." Anytime there's an ampersand, Flash can't get the file - I think it drops the filename after the ampersand. It doesn't matter if I pass it as an "&" or an HTML entity ("& a m p ;") Any help out there? Thanks in advance!

<object type="application/x-shockwave-flash" data="includes/player.swf" id="audioplayer" height="24" width="290">
<param name="movie" value="includes/player.swf"><param name="FlashVars" value="playerID=1&amp;soundFile=http://www.divideandkreate.com/mp3/Divide_&amp;_Kreate_-_Party_Kisser.mp3"&gt;
<param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent">
</object>
A: 

Please note: My code samples aren't coming through.

Rod Edwards
no samples, no help :( BTW, you can edit your posts, so try again please
Stu Thompson
Cheers Stu - figuring things out here!
Rod Edwards
+5  A: 

Sounds like you might have to URL-encode it, rather than HTML-encode it. Not sure without the code sample though. The URL-encoded code for ampersand is '%26'.

A: 

With that one simple answer, you made my night. Thank-you from a non-professional that often misses the obvious!

Rod Edwards