I encounter two questions when using image component and can't solve it myself after reading online document.
1. How can I get image source at runtime? I find image.source return an Object class, but not the source image path.
2. How to ensure image loading image correctly? In my itemRenderer, I set image source with this
I am sure there's no problem with the path, but it shows a broken image. What's the right way?
You can use myImage.source.toString();
The mx:Image is extends the SWFLoader, so you can add a complete event to it to catch when an image finishes loading or an ioError to catch an error
Try adding the images to the container dynamically
var img : Image = new Image();
private function imageLoaded(event:Event):void
var img : Image = event.currentTarget as Image;
// now add the img to the container