Flash Tutorial - Controlling a Character/movieclip with Arro

  • Share
    Share Video

  • Add
  • More
    Report this video as:
0 0
You have already voted for this video.
Here is the actionscript/code for the movieclip to control it, just copy and paste it: var speed = 5; ...
Here is the actionscript/code for the movieclip to control it, just copy and paste it: var speed = 5; this.onEnterFrame = function() { if (Key.isDown(Key.UP)) { square._y -= speed; } if (Key.isDown(Key.DOWN)) { square._y += speed; } if (Key.isDown(Key.LEFT)) { square._x -= speed; } if (Key.isDown(Key.RIGHT)) { square._x += speed; } };
Categories:
Related