Yes it has to be embedded. Well, I ended up embedding 5 different swf files with the FlashVars hardcoded into the swf.
Good enough for what I needed, but that would be nice to have some proper way to pass variable to an embedded swf. Laurent --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > 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 >