First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: mattyb110 | Website:

Step1: Make your object.

Step2: Turn it into a movieclip.

Step3: Right click on it > Actions.

Step4: Copy and paste following code.

onClipEvent (load) {
    speed = 5;

(This determines the allround speed)

Step5: Change the digit 5 to the speed you want.

Step6: Click on the } sign.

Step7: Copy and paste following code.

onClipEvent (enterFrame) {
    if (key.isdown(key.LEFT)) {
        _x-= speed;
    if (key.isdown(key.RIGHT)) {
        _x+= speed;
    if (key.isdown(key.DOWN)) {
        _y+= speed;
    if (key.isdown(key.UP)) {
        _y-= speed;

(This determines the position of itself relative to the speed varible)

Step8: Control > Test Movie

Well done! You have just made an object which can go in 8 different directions! Now you can simply ssign that to any object you wish!

» Level Basic

Added: 2003-04-11
Rating: 7 Votes: 123
(10 being the highest)
» Author
What about my details?
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.