Retro-fitting a preloader... little help here!
Hi everyone, I know preloader questions abound in this forum, and I am sorry to add to them! I am just having a bit of trouble retro-fitting my preloader into this code.
The code below shows the launch button click function... which calls up an external swf. I just want it to preload this work, just for some reason having a hard time understanding how to make that happen. I have a preloader at the front of my site working with no problem, just having trouble figuring out how to add to this code... sorry in advance, but thanks.
stop();
next_btn.addEventListener(MouseEvent.CLICK, NextFrame);
function NextFrame (e:MouseEvent):void{
this.nextFrame();
}
btn_close.addEventListener(MouseEvent.CLICK, closeClick);
function closeClick (e:MouseEvent):void{
parent.removeChild(this);
}
launch_btn.addEventListener (MouseEvent.CLICK, launchClick);
function launchClick (e:MouseEvent):void{
var request:URLRequest = new URLRequest("tw_csr.swf");
var loader:Loader = new Loader()
loader.load(request);
addChild(loader);
loader.x = -480;
loader.y = -285;
closeBook.addEventListener (MouseEvent.CLICK, closeWindow);
addChild (closeBook);
closeBook.x = 405;
closeBook.y = 221.8;
function closeWindow (e:MouseEvent):void{
removeChild (closeBook);
removeChild(loader);
}
}
var closeBook:close_btn = new close_btn();