[flexcoders] Passing flash variables to an embedded SWF
I'm embedding a swf file in an AS class and I would need to pass to this file some FlashVars, however I'm not sure how to do it or if it's possible at all. So far I tried this approach, but I get a compiler error: [Embed(source=MyFile.swf?myFlashVar=abcd)] protected var MyClass:Class; This gives me this error: MyFile.swf?myFlashVar=abcd does not have a recognized extension Is there any way to do what I'm trying to do? Thanks, Laurent
RE: [flexcoders] Passing flash variables to an embedded SWF
Not sure you can do that. You'll have to implement some communication between the two swfs. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Sent: Wednesday, July 30, 2008 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing flash variables to an embedded SWF I'm embedding a swf file in an AS class and I would need to pass to this file some FlashVars, however I'm not sure how to do it or if it's possible at all. So far I tried this approach, but I get a compiler error: [Embed(source=MyFile.swf?myFlashVar=abcd)] protected var MyClass:Class; This gives me this error: MyFile.swf?myFlashVar=abcd does not have a recognized extension Is there any way to do what I'm trying to do? Thanks, Laurent
RE: [flexcoders] Passing flash variables to an embedded SWF
Yeah, are you committed to embedding the swf? This is easy with SWFLoader and run-time loading. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Wednesday, July 30, 2008 4:18 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Passing flash variables to an embedded SWF Not sure you can do that. You'll have to implement some communication between the two swfs. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Sent: Wednesday, July 30, 2008 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing flash variables to an embedded SWF I'm embedding a swf file in an AS class and I would need to pass to this file some FlashVars, however I'm not sure how to do it or if it's possible at all. So far I tried this approach, but I get a compiler error: [Embed(source=MyFile.swf?myFlashVar=abcd)] protected var MyClass:Class; This gives me this error: MyFile.swf?myFlashVar=abcd does not have a recognized extension Is there any way to do what I'm trying to do? Thanks, Laurent