FlashVars should be available immediately when your .swf runs.  AFAIK,
you don't call them via ExternalInterface - which is more for calling
Javascript.


Jason Merrill 

Bank of  America  Global Learning 
Learning & Performance Solutions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)






-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
Mendelsohn, Michael
Sent: Friday, April 23, 2010 2:38 PM
To: Flash Coders List
Subject: [Flashcoders] can't get swfObject flashvars to work

Hi list...

I'm trying to pass along navigator.userAgent to flahsvars through
swfObject and I can't get it to work.  Here's what I have:

<script type="text/javascript">
        var flashvars = {};
        flashvars.navUA = navigator.userAgent;
        var params = {};
        params.allowScriptAccess = "true";
        swfobject.embedSWF("mySWF.swf", "myswf", "660", "510", "9.0.28",
false, flashvars, params, {}); </script>

In the document class in the swf, I have this line:
ExternalInterface.call("getVar", root["navUA"]);

I'm getting nothing.  Anyone know of a working technique?

Thanks!
- Michael M.


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to