Hi All,
So I have a preloader based on great help provided in this forum. When everything is loaded it moves to the frame (3) with content (movieclip) on it and then it refuses to play the movieclip. I suspect something in the code needs to be removed or edited.
I can target the movieclip and get it to stop on any frame I want, but it won’t play through like it should.
So here’s all the preloader code:
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, updateProgressBar)
this.loaderInfo.addEventListener(Event.COMPLETE, progressBarComplete);
function updateProgressBar(e:ProgressEvent):void
{
var loaded:Number = e.target.bytesLoaded;
var total:Number = e.target.bytesTotal;
var percentageLoaded:Number = loaded/total;
var currentFrameFromPercentage = Math.floor(percentageLoaded*10);
if (this.currentFrame < currentFrameFromPercentage) gotoAndStop(currentFrameFromPercentage);
}
function progressBarComplete(e:Event):void
{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, updateProgressBar);
this.loaderInfo.removeEventListener(Event.COMPLETE, progressBarComplete);
this.play();
}
loaderBar.addEventListener(Event.ENTER_FRAME, keepGoing);
function keepGoing(event:Event):void
{
if(event.target.currentLabel == “barEnd”)
gotoAndPlay(3);
}
I’ve tried nextFrame, putting code on the nested movieclip (like play() and just cant think of any reason why this won’t play a simple movieclip.
Any help?