# Need help with stopping a tween from looping after it is done playing

**URL:** <https://forum.kirupa.com/t/need-help-with-stopping-a-tween-from-looping-after-it-is-done-playing/319830>\
**Category:** Uncategorized\
**Created:** [March 5, 2011, 9:16pm UTC](https://forum.kirupa.com/t/need-help-with-stopping-a-tween-from-looping-after-it-is-done-playing/319830 "2011-03-05T21:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pneudralics](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@pneudralics](https://forum.kirupa.com/u/pneudralics)\
**Post date:** [March 5, 2011, 9:16pm UTC](https://forum.kirupa.com/t/need-help-with-stopping-a-tween-from-looping-after-it-is-done-playing/319830/1 "2011-03-05T21:16:25Z")

</div>

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](http://www.mediafire.com/?444p7phyg08a8d4)

```auto

function onButtonAttackClick(event:MouseEvent):void
{
    if (playerTurn == true)
    {
        player.gotoAndStop("playerAttack2_mc");
        //playerAttack = false;
        //playerTurn = false;
        //trace("is now false");
    }
    
}

```
