Here's my swf loading code:
function loadBall(e:MouseEvent):void{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("ball.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event){
currentMovie = MovieClip(loadEvent.currentTarget.content)
addChild(currentMovie);
trace(loadEvent);
}
function onProgressHandler(mProgress:ProgressEvent){
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
I wish to detect if ball.swf has reached frame 244 and then unload it. Is there a way to do this without downloading additional classes?
Cheers