@Bertrand
Try using the code generator, as it will construct everything for you in the
correct manner:
http://www.bobbyvandersluis.com/swfobject/generator/index.html
You shouldn't need to wrap the var names in quotes, and you cannot send
complex nested objects through either. So your flashvars would need to be
something like
var flashvars = {key1 : "value1", key2prop1 : 'val1', key2prop2 : 'val2'};
If you want to send complex objects to/from Flash, then you should look at
using ExternInterface, JSON, or Flash remoting (AMF) for your
communications.
Aran
On Wed, Jul 8, 2009 at 3:25 AM, Getify Solutions, Inc. <[email protected]>wrote:
>
> You need to make sure you run encodeURIComponent() on your flashvars to
> properly escape it.
>
> --Kyle
>
>
>
>
> --------------------------------------------------
> From: "Bertrand" <[email protected]>
> Sent: Tuesday, July 07, 2009 12:06 PM
> To: "SWFObject" <[email protected]>
> Subject: Passing object in the flashvars
>
> >
> > Hi,
> >
> > Earlier today, I tried to pass an object in the flashvars (something
> > like var flashvars = {'key1':'value1', 'key2':{'prop1':'val1',
> > 'prop2':'val2'}};) but my coworker (which works on the ActionScript
> > side) wasn't able to access the properties of that object (he was
> > getting an error #1069).
> >
> > Is there a way to pass objects to ActionScript/Flash through SWFObject
> > flashvars?
> >
> > Thanks and feel free to disregard that post if you deem it off-topic.
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---