I hope I explain this well. But in my game I have 3 keyframes for my bullet Movieclip. 1 to display its normal state. 2 to show it Blown Up, and 3 to remove it from the stage. A total of 3 frames. When the bullet hits an object, I go to and play the 2nd frame. then when frame 3 hits, I remove it. Here is my code
private function blowUp():void
{
if(dead)
{
gotoAndPlay(2);
if(currentFrame == 3)
{
garbage = true;
}
}
}
My problem is it goes to frame 2 but never reaches frame three. so frame 3 can not garbage collect the bullet. If I use Play() instead then it works, but gotoAndPlay doesnt
I even tried to remove the keyframe from frame 3(it is still a frame). (Hoping it would play through) but it doesn't. I know my problem is dumb, so if anyone can help , that would be great. thanks