Restarting the main timeline from a movie clip

I have a movie clip that generates random numbers until the numbers I specify come up. The movie clip takes a random amount of time to cycle through. It only plays once.

Basically, I want the main timeline of the movie to pause until the movie clip finishes, then continue on (to a new scene, or current scene if this is easier).

I got the main timeline to stop and wait for the MC to play, however, when I add the _root.play() to the end of the MC script, it plays the main timeline right away, over the main timeline, rather than waiting for itself to finish.

HELP

Often if you attach your fla it can be easier to get help. Basically it sounds like flash is running all of your actionscript immediately, which is what would happen if the code were all inside the first frame of the movie clip. If you put _root.play() inside a function that only runs when the random part is finished, it wont go on until then. Or instead, since you said the MC plays through once, why not put the _root.play() code inside the movie clip on the last frame. It should only execute when it gets there.