Couldn’t you just do this in an Assets object?

 

class Assets

{

  [Embed(…)]

  public var blank:String;

   

  …

}

 

var images:Assets = new Assets();

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Raymond
Sent: Thursday, October 20, 2005 11:18 AM
To: [email protected]
Subject: [flexcoders] Creating an array of images (Using @embed in acrionscript?)

 

We're trying to create an (associative) array of images in
actionscript.  Is there a way to embed an image using an "inline
syntax"?  The best I've been able to do is this which is a bit cumbersome.

[Embed(source="assets/blank.gif")]
static var blank:String;

...


images["blank"] = blank; 



This would be easier if we could use the @embed syntax, but as far as
I understand it, this only works in mxml, and not in actionscript.

I'd love to do just this:

images["blank"] =  @embed('assets/blank.gif');







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to