OK, this is what I've found out on this problem. Not sure if it represents a 
bug in SWFObject (but I'm leaning toward saying it is), but at the very least 
it is definitely a curious and frustrating behavioral difference between the 
two browsers with respect to how swfobject adds the flashvar param to the DOM 
object.

Basically, what I've discovered is that as you pass in the " throughout 
all your data value, when the param object is added to the DOM, IE gets a 
literal " for these values. An auto-translation from " has occurred, and 
thus flash gets the literal " characters passed in.

But in FF, that auto-translation is not done, and so FF gets the " and is 
thus what it passes into the flash.

Obviously, the flash only works if it gets literal " characters, which is why 
IE works and FF doesn't.

Now, if you instead change your original data to have literal " characters in 
it from the beginning, FF works fine, but then IE chokes, because as it 
compiles the param object string, the presence of the literal " causes the 
flashvars value attribute to be interpreted as broken up strings in the element.

I tried various ways of escaping the literal " in the original data value 
passed into swfobject api (with \, \\, \\\, and \\\\ style backslashing, even 
encodeURIComponent(), etc) and was not able to get any way of that data 
formatted/escaped that allows it to work the same in both browsers.

The problem, IMHO, stems from the different way in which SWFObject must (by 
virtue of core functionality and browser differences) add the objects and 
parameters to the DOM. For IE, it does string building, but for FF it does 
literal object creation. I believe this is the heart of why in one browser this 
auto-translating of characters happens (IE) back to what the flash is 
expecting, whereas in FF it does not.

I'm going to have a discussion with the other SWFObject devs about this and 
we'll decide how we're going to classify this issue and what should be done 
about it.

As for a short-term solution for you, for the time being, the only thing I can 
rightly suggest (beyond hacking swfobject yourself) would be to browser detect 
yourself, and feed a different formatting of the data string for FF (with 
literal " characters) than for IE (with " style data). Ugly, but it's all 
I've got for you at the immediate moment.


--Kyle






From: Anton Hughes 
Sent: Tuesday, June 09, 2009 8:29 AM
To: [email protected] 
Subject: Re: flashvars data not working in Firefox


Hi Kyle

It is a confidential and secured site so unfortunately I can give access, 
however I have made a basic HTML page which shows the problem. I have attached 
this and the .swf in a zip file.

Thank you very much for your help.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to