Actionscript 2.0 Game Creation tutorial: Character Animations

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,426
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 6, 2010

In this nugget of pure, untainted knowledge, one learns how one makes a character animate while running in an actionscript 2.0 game.

Finished product- http://spamtheweb.com/ul/upload/060210/62867_runimation.php

Code-

On character MC:

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._xscale = 100;
this._x += 6;
this.gotoAndStop(2);
}
if (Key.isDown(Key.LEFT)) {
this._xscale = -100;
this._x -= 6;
this.gotoAndStop(2);
}
if (!Key.isDown(Key.LEFT) and (!Key.isDown(Key.RIGHT))) {
this.gotoAndStop(1);
}
}

On both frames within the character MC:

stop();


Buy my merchandise at http://www.cafepress.com/hellapengzilla !!!

Please subscribe!

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (roojames)

  • Subscribed man, nice explanation!

  • Thanks man!

  • I subed,Man you blow me out,thats nice tut couse you done animated walk,not just a ball or something stupid like that moving around.Would be nice if you done some tut on point and click games like "Hapland" is.I can send you FLA to see how it looks.

  • Thanks for the subscription! Sadly I do these tutorials far less often than I would like to, so what I do is provide information on small bits of code and then viewers can put these together to make their own games. Sometime in the future, I'll have enough videos for my viewers to take the information from each to create a platformer. So while I wont dedicate a tut on point 'n click games, I might at some point make several different tutorials that can be compiled to make a point 'n click engine

  • Thanks So Much roojames! this video should have way more views than 50! im subbing definetly!

  • No problem! Always glad to help.

see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Clip events are permitted only for movie clip instances onClipEvent (enterFrame) {

    Total ActionScript Errors: 1 Reported Errors: 1

    please help

  • @roojames ya blad!!

  • thank you man!

  • 1:16 lol

  • Thank you so much for this tutorial. Very helpful and easy to understand.

  • great code, tnx a bunch

  • OMG man i FRICKIN love you lol ha ha, i've been looking at tutorials for months that where so confusing, speaking in some weird robot language, thx for breakin it down for a human lol

    SN: I subscribed

  • how to make a point and click?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more