# Hiya! Very Simple Help Needed For Actionscripting! (It's holding me back! =\>\_\<=)

**URL:** https://forum.kirupa.com/t/hiya-very-simple-help-needed-for-actionscripting-its-holding-me-back--/125443
**Category:** Uncategorized
**Created:** [October 13, 2004, 4:14pm UTC](https://forum.kirupa.com/t/hiya-very-simple-help-needed-for-actionscripting-its-holding-me-back--/125443 "2004-10-13T16:14:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Drexegar](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Drexegar](https://forum.kirupa.com/u/Drexegar)
#### Post date: [October 13, 2004, 4:14pm UTC](https://forum.kirupa.com/t/hiya-very-simple-help-needed-for-actionscripting-its-holding-me-back--/125443/1 "2004-10-13T16:14:05Z")

</div>

Hiya Im making a game in flash. I produce a lot games in the past but never messed with a java-like script in flash. My problem is Im making my character walk but the problem is when he runs while your press the arrow key I don’t know how to change the animation sequence when your **not** pressing the arrow key. So what im asking is I need to find a negate script (something that tells flash when this is not happenning is to do this) so I cant have my character go back to his netrual animation while he is not moving.

Here’s my code:

[color=blue]onClipEvent(load){[/color]  
[color=blue]moveSpeed=10;[/color]  
[color=blue]}[/color]  
[color=blue]onClipEvent (enterFrame) {[/color]  
[color=blue] [color=red]if (Key.isDown(Key.RIGHT)) {  
this.\_x+=moveSpeed;this.gotoAndStop(3);[/color]  
} else if (Key.isDown(Key.LEFT)) {  
this.\_x-=moveSpeed;this.gotoAndStop(4);  
}  
}[/color]  
[color=#0000ff][/color]  
[color=black]first the character is a movie clip inside this movie clip are 4 frames one with a movie clip in each some the first two frames are netruel position and the next 2 frames are running positions so ok just look at the code in red. I put when key is down “right”, Make character move and go to frame 3. the problem is now I dont have an script to negat the action so for flash to check when key is not pressed to go back to frame one.[/color]

This should be very easy to answer if anybody can help me to solve this all i can do is animation im not a very good proggammer but pretty much know how to make a game though. Thanx for your time for reading.
