# Stop animation

**URL:** <https://forum.kirupa.com/t/stop-animation/83791>\
**Category:** Uncategorized\
**Created:** [March 22, 2005, 6:15am UTC](https://forum.kirupa.com/t/stop-animation/83791 "2005-03-22T06:15:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![meisme](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@meisme](https://forum.kirupa.com/u/meisme)\
**Post date:** [March 22, 2005, 6:15am UTC](https://forum.kirupa.com/t/stop-animation/83791/1 "2005-03-22T06:15:25Z")

</div>

anyone can tell me how to stop the animation when i am not pressing the up key?

i tried using -\> if(\_root.player.walk == false) then i stop();

but end up the character cant move even when i press the up key. =(

Anyone can help ?

Note\*  
i can’t take out this portion of code from the character movie clip in frame 1:

trace(“execute 1”);  
\_root.player.\_y-=2;

```
 onEnterframe = function() {
   _root.player._y-=1;
   trace("execute 2");
 }

```

and i can’t take out this portion of code from the character movie clip in frame 10:

\_root.player.\_y-=2;

Because my teacher told me not to remove it … sigh~
