[Flashcoders] can't get swfObject flashvars to work

2010-04-23 Thread Mendelsohn, Michael
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


RE: [Flashcoders] can't get swfObject flashvars to work

2010-04-23 Thread Merrill, Jason
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


Re: [Flashcoders] can't get swfObject flashvars to work

2010-04-23 Thread Jared

 try root.loaderinfo.parameters

Sent from my iPhone

On Apr 23, 2010, at 11:37 AM, Mendelsohn, Michael michael.mendels...@fmglobal.com 
 wrote:



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