Hello Flexers,
I have what seems a straighfoward situation:
I update the source property of an image, when the image is loaded i want to redraw the border skin to fit the new size of the image.
newImgEdit.addEventListener(Event.COMPLETE, loadImgComplete);
newImgEdit.source = myurl_ressource;
private function loadImgComplete(evt:Event):void {
trace("redraw !!");
//invalidateDisplayList();
this.setStyle("borderSkin", ShapeContainerBorderOn);
var img:Image = evt.currentTarget as Image;
img.removeEventListener(Event.COMPLETE, loadImgComplete);
}
The "trace redraw" seems to happen once the image is loaded but the border still do not get redrawn with the good height and width.
Do i need to remove the listerner or it will be garbage collected later ? Any clues ?