Move a movie clip with the keyboard.

  1. First: create a movie clip.
  2. Put it on stage
  3. Name it in the Properties panel ( You must assign names to all movie clips in a movie that will use ActionScript for control )
  4. Copy and paste this code for the movie clip to move.
onClipEvent (enterFrame){
if(Key.isDown(Key.UP)) this._y-=5;
if(Key.isDown(Key.DOWN))     this._y+=5;
if(Key.isDown(Key.LEFT))  this._x-=5;
if(Key.isDown(Key.RIGHT))  this._x+=5;
if(Key.getCode()==70){// what key is this???eh?