My app works but when it gets to the last part where i want to show the addChild Attack and then when it is complete gotoAndPlay(2) it skips out the addChild Attack and moves onto the next frame..
How do i time it so the object movieclip will play and then move onto the next frame..
in my movieclip Attack ii just have the coding stop();
in the frame 1
objectMove.addEventListener(Event.ENTER_FRAME, testHit);
function testHit(event:Event):void
{
var Attack:AttackMC = new AttackMC();
if (objectMove.hitTestObject(objectWall))
{
objectMove.removeEventListener(Event.ENTER_FRAME, testHit);
addChild(Attack);
gotoAndPlay(currentFrame+1);
}
}
thanks.
objectMove.addEventListener(Event.ENTER_FRAME, testHit);
function testHit(event:Event):void
{
var Attack:AttackMC = new AttackMC();
if (objectMove.hitTestObject(objectWall))
{
objectMove.removeEventListener(Event.ENTER_FRAME, testHit);
addChild(Attack);
Attack.play();
gotoAndPlay(currentFrame+1);
}
}
ii put that in instead and it still misses the attack object movieclip out and just continues to the next frame.
North America
Europe, Middle East and Africa
Asia Pacific