N64MARIO64
Technical User
Hi, I am working on a space invaders type game. I would like to know the code to make the x pos to move up and down when the up & down arrows keys are pressed. Thanks -mario
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
onClipEvent(load){
speed = 5;
}
onClipEvent (enterFrame) {
(Key.isDown(key.DOWN))?(this._y+=speed):null;
(Key.isDown(key.UP))?(this._y-=speed):null;
updateAfterEvent();
}