I'm experimenting with a UIComponent to display some images:
private var spriteBg:UIComponent=new UIComponent
I can use pictLdr
private var pictLdr:Loader = new Loader();
or draw with 'graphics' to display the images, but I cannot use myImage
private var myImage:Image
Is this because myImage has not loaded or that I cannot load myImage into the UIComponent?
Here's what I'm doing:
pictLdr = new Loader();
var pictURL:String = "pics/checkmark_green.png"
var pictURLReq:URLRequest = new URLRequest(pictURL);
//Will not work
What do you mean by "will not work"? Runtime errors, compile-time errors, runs but doesn't do anything?
Runs without errors, but the imag fails to appear.
Ok, the embed syntax you are using will only work in MXML. In ActionScript you will need something like:
public var asset:Class;
More info here: