I'd just load the which ever SWF you want via SWFLoader. ________________________________
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of scalenine Sent: Friday, April 20, 2007 1:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Embeding an SWF I think you'd need to embed both and call either SWF when it's needed. It's similar to what I had to do to swap SWF assets to get themes to switch in an app. Like this: http://www.scalenine.com/samples/themeSwapper/themeSwap.html <http://www.scalenine.com/samples/themeSwapper/themeSwap.html> Click on the buttons next to "Choose a theme". Juan --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Guillermo Villasana <[EMAIL PROTECTED]> wrote: > > Thanks alex, The reason I wanted to do this is because I wanted to able > to load two different swf's (that have skins in it) and load one or the > other, when I press a button. Is this possible? > > Alex Harui wrote: > > > > embed means embedded at compile time, so no, you can't embed something > > at runtime. You have to load it useing SWFLoader > > > > ---------------------------------------------------------- > > *From:* flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] > > *On Behalf Of *Guillermo Villasana > > *Sent:* Friday, April 20, 2007 8:39 AM > > *To:* flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > *Subject:* [flexcoders] Embeding an SWF > > > > I know that to embed an swf you can do this: > > > > [Embed(source="/assets/myswf.swf")] > > public var swf_embeded_flex:Class; > > > > My question is the following: > > > > Is it possible to make "/assets/mysqf.swf" to be a variable? > > > > So I could have: > > > > var asset:String="/assets/myswf.swf"; > > [Embed(source={asset})] > > public var swf_embeded_flex:Class; > > > > I know that the previous is incorrect and does not work, but is there a > > way to make it work? What would be the correct syntax. > > > > Thanks > > Terius > > > > >