EventListener for frame number?

I am making a website, I have a loaded swf that I want to animate off screen AND THEN unload on a button click, the home button in this case. I have had a shot at making this happen but to no avail…

This is the code I have, which currently doesn’t work. The function ‘frame30’ does not fire. I have annotated it so you can see what works and what doesnt.

function mouseclickhome(event:MouseEvent):void{
homebtn.gotoAndPlay(3); //button animation

var loadedswf:Object=loader.content;
loadedswf.gotoAndPlay(16); //the loaded swf animates offscreen fine with this command

loadedswf.addEventListener(Event, frame30); //This is where it stops working, I’m pretty sure this is not correct

function frame30(e:Event):void //this function is not fired, trace is never returned
{
trace(“function fired”);
if (loadedswf.currentFrame == 30) //once the loaded swf has reached frame 30 the animation is complete and the loader can be unloaded
{
loader.unload();
gotoAndStop(2); //website background change
}
}

}

Many thanks in advance

Duncan