I have created a very simple preloader, no percent or anything like that. Just a simple animation that runs while the movie loads. I have my loader on scene1 and my main movie on scene 2. Problem is is just keeps flashing back and forth from scene 1 & 2 and won’t stop. Also, it flashes pretty fast, but I don’t think I even see the myLoader object playing at all. What have I done wrong here?
stop();
addEventListener(Event.ENTER_FRAME, loading);
function loading(event:Event)
{
var bytestotal = stage.loaderInfo.bytesTotal;
var bytesloaded = stage.loaderInfo.bytesLoaded;
var myLoader:MovieClip = new loader();
myLoader.play();
if (bytesloaded >= bytestotal)
{
removeEventListener(Event.ENTER_FRAME, loading);
gotoAndStop(1, "main");
}
}