Targeting a label, how?

ok so im trying to create a sort of SMOOTH transition between swfs.

the problem im having is, targeting a specific label when i need it.

what i mean is, i can target it fine by tpecasting my external as a MC, but…it doesnt give me the desired effect.

for example, i want it so that when a button is pressed, go and play the “outro” frame inside the external swf, at the end of that same external swf, theres an " end" label, when that label is reached. something happens etc.

my problem is that when i hit the button, at the time of that event firing, the “end” is null or rather undefined because it hasnt reached there yet and i get an error or if i do a if/else statement, then i get the else part firing off since again, “end” isnt reached yet when the button is pressed.

i dont know how to make it fire when the “end” label is reached.

i tried while loops but…no good lol. thing froze flash for a bit until it did fire, by then it was a mess lol.

heres my code:

stop();



var loader:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("indexCoontentLoad.swf");

loader.load(urlReq);



loader.contentLoaderInfo.addEventListener(Event.INIT, loadedHandler);

function loadedHandler(event:Event){//open main func ------------

    var myLoadedSwf:MovieClip = event.target.content;
    addChild(myLoadedSwf);
    trace("loaded");


    //Listeners
    load3.addEventListener(MouseEvent.CLICK,btn4loaded);

    //functions for btn listeners
    function btn4loaded(event:MouseEvent):void{
        if (loader){
            myLoadedSwf.gotoAndPlay("outro");
        }
    }
        ///here i get lost!!! \\\
loader.contentLoaderInfo.addEventListener(event.currentLabel, currFrame);

function currFrame(event:Event):void{
    if (myLoadedSwf.currentLabel == "end"){
    trace("working");
    }
}

ive added a " here i get lost" comment to indicate the part im lost in/cant figure out how to write.

overall, what i hope to achieve is that when the “end” label is reached, something happens. else, just keep playing until it is reached.

any ideas/tips etc on how to make this happen i gladly appreciate.?

thanks in advance.