# Running loop broken

**URL:** https://forum.kirupa.com/t/running-loop-broken/177722
**Category:** programming
**Created:** [February 4, 2006, 4:35pm UTC](https://forum.kirupa.com/t/running-loop-broken/177722 "2006-02-04T16:35:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mr\_Pancake](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mr\_Pancake](https://forum.kirupa.com/u/Mr_Pancake)
#### Post date: [February 4, 2006, 4:35pm UTC](https://forum.kirupa.com/t/running-loop-broken/177722/1 "2006-02-04T16:35:05Z")

</div>

ok i have a man mc with:

first frame “idle”: normal standing mc  
second frame “run” : man running mc

now this is the code on the man mc:

```php
onClipEvent(load){ speed = 5 } onClipEvent(enterFrame){ if(Key.isDown(Key.RIGHT)) this.gotoAndStop("run") onKeyUp = function() { this.gotoAndStop("idle") } } onClipEvent(enterFrame){ if(Key.isDown(Key.RIGHT)) _x+=5; }   

```

the problem is that if i press RIGHT the man is walking right and you see him running, but if i release RIGHT the animation of the man running keeps looping. does anyone know the solution?

ps: long time no see.
