I'm fairly new to actionscript. I'm just learning it and I need to load external swf's into a gallery. But for some reason I can't picture how to set it up on the timeline. This is for college homework.

I have the entire gallery set up and working but I just don't have the preloader for the three external images. However, I do have a preloader working fine for the site itself.

Why not ask the teacher for help? Cause I can't get a hold of him!!


Can anyone tell me how I set it up?

Here's the code for the external swf's:

Actionscript Code:
loader.load(new URLRequest("1.swf"));
var movieName:String;
function movieLoad(event:MouseEvent):void {
    switch(event.currentTarget){
        case thumb1_btn:
            movieName="1.swf";
            break;
        case thumb2_btn:
            movieName="2.swf";
            break;
        case thumb3_btn:
            movieName="3.swf";
            break;
    }
    loader.load(new URLRequest(movieName));
}

thumb1_btn.addEventListener(MouseEvent.CLICK, movieLoad);
thumb2_btn.addEventListener(MouseEvent.CLICK, movieLoad);
thumb3_btn.addEventListener(MouseEvent.CLICK, movieLoad);


Here's the code for the main preloader:
Actionscript Code:
stop();

loader_mc.bar_mc.scaleX=0;

function onLoadingProgress(event:ProgressEvent):void {
    var total=event.bytesTotal;
        var loaded=event.bytesLoaded;
        var percent = Math.floor((loaded/total)*100);

        loader_mc.loadertxt.text=percent;
        loader_mc.bar_mc.scaleX=percent/100;
}

function onLoadingComplete(event:Event):void {
    gotoAndPlay("main");
}

loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadingProgress);
loaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete);