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:[EMAIL PROTECTED] On
Behalf Of Guillermo Villasana
Sent: Friday, April 20, 2007 8:39 AM
To: flexcoders@yahoogroups.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



 

Reply via email to