Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Flashvars problems - escaping ampersand


on the page EMBEDDING FLASH
is written "& ? %26"

this does not work
I tried
a) player.swf?file=Test5.mp4%26image=preview.jpg
b) <embed src="player.swf" type="application/x-shockwave-flash" wmode="transparent" width="470" height="440" flashvars="file=test5.mp4%26image=preview.jpg"></embed>

9 Community Answers

JW Player

User  
0 rated :

You do not urlencode the concatenation operator "&".

You DO urlencode any of the "special" characters ( & = ? ) that appear within a URL.

Example:bc.. flashvars="file=test5.mp4&image=preview.jpg"



Example with "special" characters in the file URL:bc.. test.mp4?id=3&load=A6FG33



Would be urlencoded as:bc.. flashvars="file=test.mp4%3Fid%3D3%26load%3DA6FG33&image=preview.jpg"



JW Player

User  
0 rated :

Hello!

1. How can I post my own Question?!

2. Added here because of not knowing 1 :-)


QUESTION:
I have problems with encoding, too.

*My mp3-file can be found here:*
bc.. <http://campusib.fh-burgenland.at/fsDownload/Cannabis.mp3?forumid=1130&v=1&id=2289564



I*f i want to use it as flashvar I have to encode it and now the flashvars should look like this, schouldnt it?*

bc.. flashvars="file=http://campusib.fh-burgenland.at/fsDownload/Cannabis.mp3%3Fforumid%3D1130%26v%3D1%26id%3D2289564"


But it doesn't work!!!

Can anyone assist me, please

Mny tnx
werner

JW Player

User  
0 rated :

@kLink

you made my day!
mny tnx!

Werner

JW Player

User  
0 rated :

@Werner,

Glad to hear that. Good Luck!

:D

JW Player

User  
0 rated :

for me, still no solution
embed does not work
<embed src="player.swf" type="application/x-shockwave-flash" wmode="transparent" width="470" height="440" flashvars="file=Test5.mp4%3Fimage%3Dpreview.jpg"></embed>

nor url get command.
http://www.xxx.com/player.swf?file=Test5.mp4%26image%3Dpreview.jpg

I wourd be interested to escape the ampersand in the url to display the preview image.

JW Player

User  
0 rated :

%26 for '&' is great solution. Thanks for saving my time.

JW Player

User  
0 rated :

hello!
how can i get flashvar, and url in as3???
ex:<embed src="player.swf" type="application/x-shockwave-flash" wmode="transparent" width="470" height="440" flashvars="file=test5.mp4&image=preview.jpg"></embed>

or : player.swf?file=Test5.mp4&image=preview.jpg

i want get it.

tks

JW Player

User  
0 rated :

bc.. flashvars="file=http://campusib.fh-burgenland.at/fsDownload/Cannabis.mp3%3Fforumid%3D1130%26v%3D1%26id%3D2289564*&type=sound*"



JW Player

User  
0 rated :

%26 for '&' is the greatest solution :). Everything worked for me!
Thanx a lot.

This question has received the maximum number of answers.