I’m looking for the best way to tell if an <mx:Image> has already fired the ‘Event.COMPLETE’ event. I want to do something if it has shown, or attach an event handler if it hasnt yet.
something like :
if (newBackground.percentLoaded < 100)
or
if (newBackground.content != null)
i was originally doing newBackground.content != null, but that had some cross domain issues because the sandbox wont let me access content apparently!
i’m even a little weary of using percentLoaded < 100 in case of possible race conditions.
yes i am familiar with showEffect, but that not what I want for this.
I’m assuming you for some reason can’t attach an
Event.COMPLETEevent listener to the Image before it starts loading. If this is the case, you could always subclassmx.controls.Imageand add your own property'loadingCompleted'or'complete'that is initiallyfalsebut gets set totruewhen theEvent.COMPLETEevent fires the first time.