Detect End of External Swf - Button Restrictions

Hello!

I’m hoping someone can possibly help me here or point me in the right direction…

I’m newly transitioning from AS2 to AS3, and trying to figure out the proper way to detect the end of an external swf, or, essentially put “restrictions” on next buttons for a flash site.

Basically, I have a training course where the user watches a little demo then clicks “next” to proceed to the next slide. This works wonderfully so far; however, I need to restrict the next button from being active until the demo has finished playing (so they can’t skip ahead).

The way this is structurally set up is I have a main container (mainContainer.swf) that loads in external content through an empty MC (contentMC) and cycles through an array (content1.swf, content2.swf, content3.swf) and so on…

I have tried comparing the currentFrame to totalFrames of the external swf before activating the next button, but with no luck. Again, new to AS3 so probably have the syntax wrong…

if (contentMC.currentFrame == contentMC.totalFrames) {
trace(“end of external swf”);
//next button code here…continue cycling through array…
}

Anyway, if somebody could please point me in the right direction, it would be greatly appreciated! Thanks much! (-: