# A little help with action script please

**URL:** <https://forum.kirupa.com/t/a-little-help-with-action-script-please/197876>\
**Category:** Uncategorized\
**Created:** [August 20, 2006, 3:46am UTC](https://forum.kirupa.com/t/a-little-help-with-action-script-please/197876 "2006-08-20T03:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joakinrox](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@joakinrox](https://forum.kirupa.com/u/joakinrox)\
**Post date:** [August 20, 2006, 3:46am UTC](https://forum.kirupa.com/t/a-little-help-with-action-script-please/197876/1 "2006-08-20T03:46:00Z")

</div>

[LEFT][FONT=Arial]Hello i need some help from someone who knows a little ac. well here mi problem:

```
   im trying to learn ac and im making a little character that moves up down left and right ok so i CAN do it but everytime i hit the arrow key it only moves a litle to the direction i ordered it to move. what i want it to do is that when i press a key he moves nonstop to that direction i wrote this

```

[/FONT]

> [/QUOTE]  
> [COLOR=Red]if(Key.isDown(Key.DOWN)){  
> this.\_y+=speed;  
> }[/COLOR]

[QUOTE]

so what code should i change in order for it to move nonstop?

And the other thing is that while my movieclip is moving i dont want it to be able to move to another direction (for example i push down arrow so it stars to move but if i press right arrow while its moving down nothing happens… just moves down until a wall stops it) until it stops moving(hits a wall)

would it be something like this?

> [/QUOTE]  
> i[COLOR=Red]f(Key.isDown(Key.DOWN)){  
> this.\_y+=speed;  
> if(Key.isDown(Key.DOWN)){  
> Disable.Key.DOWN[COLOR=Blue] (i dont know if disable is a command! but something like that to make [/COLOR]  
> Disable.Key.UP [/COLOR][COLOR=Red][COLOR=Blue]the other keys not to work while one is pushed down =P)[/COLOR][/COLOR]  
> [COLOR=Red]Disable.Key.LEFT  
> Disable:Key.Right  
> }[/COLOR]

[QUOTE]

In advance thank for any help you can give me 🙂 =)  
[/LEFT]
