PDA

View Full Version : Listener for end of movie clip


simon315
01-17-2006, 05:45 AM
Hi. I've got a pretty simple question, well hopefully simple for everyone else, but unfortunately not for me. I've got a FLA where I'm trying to have my main timeline play a movie clip in a frame and wait until that movie clip finishes before it moves on to the next frame. I'm totally lost with this. I've tried to play around with eventlisteners but I'm a complete idiot when it come to actionscriptiong. Can someone please help? How should I handle the movieclip and it's timeline and the main timeline of my movie? Thanks!

oldnewbie
01-17-2006, 06:24 AM
On the frame the main movie is stopped and my_clip (instance name on stage) is present...


stop();
this.onEnterFrame = function(){
if(my_clip._currentframe == my_clip._totalframes){
//_root.whatever_action here...
delete this.onEnterFrame;
}
};