Here's the situation..
I've created a website that has multiple .swf files as the pages since one single file would be waaaay too large. I'd like to create preloaders for each page to load in when its navigation button is clicked. I've been through a few tutorials but none are quite what i'm looking for. They either talk about loading multiple swf's onto the stage all at once or are for one individual file.
The file should start the preloader (kicking everything off the stage) and load the new swf and then leave the sage. I've found one preloader that works but it likes to load in on top of everything else.
Any suggestions?? Maybe I'm not doing this right.. I'm a designer dipping a toe into code and FREQUENTLY confused with it.
Thanks in advance!
Here is the code I have currently. I'm totally open to suggestions and changes. Thanks guys!
Actionscript Code:
import flash.display.*;
this.stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";
if (pcent==100) {
this.gotoAndStop(2);
}
}
function loadComplete(event:Event):void {
addChild(myLoader);
removeChild(lbar);
removeChild(lpc);
}