PDA

View Full Version : how to make sure bitmaps are ready before displaying frame


katya
02-10-2011, 07:36 PM
Is there a event I can use to check that all bitmaps are loaded before I try to display a frame? i.e.,

class myApplet extends MovieClip {

public function MyApplet() {
addEventListener(someEvent, load);
} //this event would be dispatched by frame 3

function load(ev:Event) {
gotoAndPlay(3);
}
}

The problem I have is that the frame displays before the bitmaps are done loading, so they don't show up -- although if I have a button to reload the frame, and wait even a tiny bit before I click the button, then the bitmaps show up perfectly.

Or is there some other solution? My bitmaps are only about 300x300, so well below the size limit.

Thank you!!