Flashvars are passed to the swf once at creation time and cannot be changed
directly. Likewise, you cannot access the flashvars of the object
like f.flashvars, as flashvars is not a property of the swf.

If you want to send new information to a swf AFTER is has been created, you
will beed to use something like ExternalInterface and expose a function in
the swf which can be called from your page/js. Likewise, if you need to get
values fro the swf, then another function can be exposed through EI to pass
the info back to the page.

There are plenty of tutorials on ExternalInterface to follow - Google is
your friend here...


Aran

On Sun, Apr 24, 2011 at 3:28 AM, benyu <[email protected]> wrote:

> Hi all
>
> I wanna to change the flashvars from javascript function after  had
> embed swf.
>
> The following code does not work, so what should be right ?
>
> function override(){
>       var f = getFlash('flashid'); // here is right
>
>       alert(f.flashvars); //undefined   ????  fail to access an
> undefined vars.
>
>       f.flashvars = 'new string'; // of course take no effect
> }
>
> Thanks
>
> --
> 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.
>
>

-- 
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