# Help with continuous movement

**URL:** https://forum.kirupa.com/t/help-with-continuous-movement/253431
**Category:** Uncategorized
**Created:** [March 1, 2008, 1:53am UTC](https://forum.kirupa.com/t/help-with-continuous-movement/253431 "2008-03-01T01:53:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kpxnamja](https://avatars.discourse-cdn.com/v4/letter/k/7c8e57/32.png) [@kpxnamja](https://forum.kirupa.com/u/kpxnamja)
#### Post date: [March 1, 2008, 1:53am UTC](https://forum.kirupa.com/t/help-with-continuous-movement/253431/1 "2008-03-01T01:53:15Z")

</div>

Hi there, I’m having a little trouble creating a **true** continuous movement in AS1.0 syntax.  
The syntax,

```auto

on (keyPress "<Down>"){
    hero._y += speed;
}

```

_Does achieve a continuous motion_, but begins with a “jolt.” I hate the jolt, as it ruins a few mechanics of the game.

I tried, doing the following,

```auto

on (keyPress "<Down>"){
     dir = 1;
 }
if (dir == 1){
     tellTarget("hero"){
          _x += speed;
     }
}

```

That code _does the job of not “jolting,”_ but\*\* continues to move after the key is released.

I can easily achieve this effect using AS2.0 syntax by the

```auto

if (Key.isDown(Key.DOWN)) {
        dir = "duck";    
}
if (dir == "duck"){
        hero.gotoAndStop("duck");
}

```

However, my question is how to do this effect using the AS 1.0 syntax…  
note: I can’t simply use AS2, unfortunately…

thanks guys,  
kpxnamja
