Stop and play nested MovieClip problem
I'm trying to make a falling bomb and explosion effect. I created bomb1 with a nested motion tween and then I created bomb2 with the explosion effect nested another level deep inside bomb1. My hope was that when the bomb hit the target the motion downward will stop and at the same time there will be an explosion. The problem is that I can't make both action happened at the same time, it either stops the motion completely or having the explosion while the bomb continue going downward. I can't make both action happened at the same time. bomb1.stop(); should stop the motion down and bomb1.bomb2.gotoAndPlay(31); should make the explosion effect. Any Idea?
import flash.events.Event;
var bombPlaying: Boolean = true;
this.addEventListener(Event.ENTER_FRAME, handleCollision);
function handleCollision(evt: Event): void {
if (bomb1.hitTestObject(gLine1)) {
bomb1.stop();
bomb1.bomb2.gotoAndPlay(31);
}
}
