Question?

Subscribe to Question? 3 posts

avatar for oatlol oatlol 443 posts
Flag Post

Is there a method to know when an animation has finished and reached it’s last frame and then null it or gotoAndStop(2)? Won’t be able to respond for the helpful things that people post, because I am going to bed now :)

 
avatar for AMD_Paulius_J AMD_Paulius_J 110 posts
Flag Post

Why don’t you add gotoAndStop(2) or

stop();
MovieClip(parent).removeChild(this)

on the last frame of your object?

 
avatar for stage_phrite stage_phrite 42 posts
Flag Post

alternatively there are currentFrame and totalFrames variables(with underscores if using as2)

so something along the lines of

if(this.currentFrame == this.totalFrames)
{
    //do something
}

in an enter frame event function would work.