I’ve just started AS3 with no AS experience. I have an attack button to allow my character to run across the stage. The problem is it keeps looping after the tween finishes playing. I want to be able to stop and put my character back to frame 1 which is just a frame of the character standing there.
I’ve tried the following and still can’t get it to work…
Failed…
Trying to add a stop(); to various frames. It’ll just stop the entire mc.
Semi worked…
Tried a collision detection but the box just doesn’t make it look good.
Tried setting a timer, but don’t think that’s what I want.
Having a stop button works, but not what I want.
I’ve ran out of ideas. Any help is appreciated. Thanks. I uploaded the file since I’m over the limit here.
http://www.mediafire.com/?444p7phyg08a8d4
function onButtonAttackClick(event:MouseEvent):void
{
if (playerTurn == true)
{
player.gotoAndStop("playerAttack2_mc");
//playerAttack = false;
//playerTurn = false;
//trace("is now false");
}
}