Serious (and seriously obscure) bug with flash embed code redirects and variables in IE

Thursday, July 24th, 2008 | Uncategorized

Haven’t been posting too frequently, been pretty busy at KickApps working on the Widget Studio. I’d like to write about it in another entry at another time but for now I’d like to help expose a pretty vicious bug we’ve encountered during the course of developing this app.

The Widget Studio is a Flex based WYSIWYG widget generator who’s end product is embed code for widgets. The embed src points to a server side redirect that returns our main SWF file with some variables appended to it. These variables have to be dynamic to pass things like the build version number (cache control) and refferal url to the swf. After much debugging we realized if querystring variables are appended to the redirect in <embed src=”"/> then variables attached to the swf from inside the redirect do not get passed to the SWF in IE.  After much googling, these are the only 2 entries we could find on the matter:

MSDN forum post
JW Player (?) forum post

If both appended-to-redirect and inside-redirect variables are neccessary, the only viable answer is a rest style architecture to pass variables to your SWF (assuming, like in our case, the appended-to-redirect variables can’t be moved to flashVars as they are used by the redirect script itself)

4 Comments to Serious (and seriously obscure) bug with flash embed code redirects and variables in IE

John Dowdell
July 24, 2008

I may have pulled out the wrong part from the description, but you’re aware that the only reason we have an OBJECT tag is because that’s what Microsoft decided to use years ago, and later pushed through the W3C, right?

I know for awhile IE/Mac used to read the EMBED, and there’s been some confusing talk about “embed” after Silverlight builds started appearing, but if it’s actually in the EMBED, then have you tried putting that data in the OBJECT tag too…?

jd/adobe

markledford
July 24, 2008

Yes indeed though I didn’t mention it above, we’ve been using both object and embed tags, the setup is identical in both regarding parameters being passed.

Rich Rodecker
July 24, 2008

yeah, i just posted about that recently: http://www.visible-form.com/blog/ie-doesnt-pass-query-parameters-properly-on-file-redirects . Note that this is an issue with IE, not Flash Player.

Luckily we were in a position where we only needed one particular variable in the redirect, so we wound up duplicating the same file with a different name, and using the loaded file name to determine what to do. Other than that, you’re right, you need to build a rest-style url you can parse out to get your vars. At least that’s the only way I know of.

markledford
July 24, 2008

Thanks for the confirmation Rich. If only I had stumbled on your entry earlier it would have saved me some headache. Added your blog to my google reader :)

Leave a comment

Meta

Search