Highlighted

set dynamic path at runtime

tchnos

03-07-2008

Hi All,





I am trying embed different images to [embed] property...

here is my code



public var imageUrl:String = "defaultLogo.png";

[Embed(source="../companyLogos/"+imageUrl)]





please tell me how can we add images at runtime to "embed
source".



thanks in advance

uday

Replies

Highlighted

SujitG

08-07-2008

Hi,



You meant compile time right? Embed is the tag which will
embed the resources in the SWF at compile time.

I don't think what ever you are trying to do is possible
because "+" is an operator and is executed during run time, where
as the Embed is a meta tag which is executed at compile time.



Just my thought 🙂



Hope this helps.