Hello.  Can anybody tell me either how to use an image as an icon, or
convert an image to a class for use as an icon (in components, the
icon is of type Class)?  Or better yet is it possible for
me to dynamically embed an image via a variable?

Sure the usual embed assertion works:
[Embed('image.jpg')]
[Bindable] var img:Class;
...
<mx:Button label="button" icon="{img} />

But what I want to do is embed the image via a variable such as:
var image:String = "image.jpg";
[Embed(image)]
var img:Class;

What I'm trying to do is a bit more complex, but help with this simple
example should get me going.  Any help would be appreciated.  Thanks.

Evan

Reply via email to