Search tutorials
To control your movie clip's using the arrow keys on your keyboard:
1. Make a Movie Clip (MC), and name it ship.
2. Also name the MC's instance name 'ship' (without quotations).
3. Then add this code:
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
_root.ship._x=(this._x- 20;
}
if(Key.isDown(Key.RIGHT)){
_root.ship._x=(this._x+ 20;
}
if(Key.isDown(Key.UP)){
_root.ship._y=(this._y- 20;
}
if(Key.isDown(Key.DOWN)){
_root.ship._y=(this._y+ 20;
}
}
change the number '20' to whatever you want, this
just sets how many pixels the MC moves by
» Level Basic |
Added: 2005-07-20 Rating: 3 Votes: 13 |
» Author |
Brett Joe Frankie |
» Download |
Download the files used in this tutorial. |
Download (0 kb) |
» Forums |
More help? Search our boards for quick answers! |