What doc was this in? It won't work if 'this' is a Flex Container,
because a Container expects that its children are IUIComponents.
 
If you're putting an image into a Flex Container, you should be using a
Flex Image control, not a low-level Flash Loader.
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of ronnlixx
Sent: Monday, April 09, 2007 3:11 PM
To: [email protected]
Subject: [flexcoders] loading image with AS and Loader



I'm trying this example from the documentation:

var pictLdr:Loader = new Loader();
var pictURL:String = "banana.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
this.addChild(pictLdr);

I'm trying it in my creationComplete callback and get this error:

cannot coerce the Loader into an IUIComponent.

What am I doing wrong here?



 

Reply via email to