First, you will need to listen for when your content has completed it's load - as you won't know how many frames the content has until then.
Then, you need to figure out when the timeline of that loaded content has finished playing.
Here is a code example with comments explaining what's going on.
stop();
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("jenissendi.swf");
//before you load, listen for the complete event on the contentLoaderInfo object of your loader
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded, false, 0, true);
myLoader.load(url);
addChild(myLoader);
//this function runs when the content is fully loaded
function contentLoaded(e:Event):void {
var loadedSwf:MovieClip = myLoader.content as MovieClip; //this is the main timeline of the loaded content
loadedSwf.addFrameScript(loadedSwf.totalFrames - 1, contentFinished);
//the line above tells the movie clip to run the function 'contentFinished' when it reaches the last frame.
}
//this function runs when the loaded content reaches it's last frame
function contentFinished():void {
//clean up to avoid memory leaks
removeChild(myLoader);
loadedSwf.addFrameScript(loadedSwf.totalFrames - 1, null);
nextScene();
}
addFrameScript has a few nuances. First, is that it reads frame numbers as 0 based. So that means the first frame is frame 0. That's why you subtract 1 from the totalframes to get the last frame. Second, addFrameScript is an undocumented feature - which means it may on some future flash player/AIR release not work anymore - though that's very unlikely at this point.
It's also very important to remove your frame scripts (by passing null as the function) to prevent memory leaks.