Hi there, I’m having a little trouble creating a true continuous movement in AS1.0 syntax.
The syntax,
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,
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
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