Step by step AS3 translation of Flash game creation tutorial – part 1

Today I am glad to publish the work of Tim Edelaar that translated all AS2 files of the most successful post of this blog, Flash game creation tutorial – part 1.

The most interesting thing is he did not use a class, but he wrote the actionscript directly in the timeline in the… let’s call it “AS2 way”.

I said “interesting” because I think this way is easier to understand for all you “afraid to learn AS3” guys.

Obviously I suggest to read Flash game creation tutorial – part 1 before continuing.

In some cases you may need to reload the page to see examples working, because the ball will fly off stage when you are looking at another example.

Then, let’s start with some well commented code:

Moving the hero

Moving the hero at a given speed

Moving the hero with acceleration

The friction

The gravity

The thrust

The wind

The rotation

Now you have no excuses to refuse making a ball game with AS3

Download the source codes.

  • You got the swfs mixed up. :S

    The one with acceleration is the same as the first, the one with friction is jsut acceleration etc.

    Very nice tutorial, may have to start learning some AS3 over the summer.

  • Evra

    Good, good.

    But you should have added the Reset button like you did on the tutorial with AC2. Because the hero is long gone when you reach that point of the site.

    Souled: No, the swfs are not mixed up. The headlines aren’t under the swf idiot.

  • Awesome, so you -can- still do this in AS3?

    I too shall be diving into AS3 over the summer, last exam was today, so I’ve got a loooong lazy holiday to learn :D

    And this seems the best place to start, Thanks!

  • Cool.. Well Done.. I was sooooo afraid of going into AS3 as i ran into some problems the previous time because i didnt know there are things like events.KeyboardEvent. I had to change my gameplay to use mouse only.

    Thanks heaps. =P

  • bob

    nice, thanks

  • Great! Thanks a lot!

    This makes AS3 look easy and simple

  • Nice tutorial as always.

    The only thing I find weird is the fact that when the hero can rotate and he is pushed by the wind, he goes rotating as if the player had pushed the left or right button.

    I don’t know if that’s the way you intended it but I wanted to tell you.

  • ptz

    Great job. Now i will love to see same tutorial writed using class-method ;p

  • brart

    I was next to Tim…. He did this under one hour :P

  • My bad its because there are two swfs with normal movement. And don’t call me an idiot.

  • JDog

    @ Souled, you’re right !

  • Pingback: Step by step AS3 translation of Flash game creation tutorial - part 2 : Emanuele Feronato - italian geek and PROgrammer()

  • Really great. Keep up the good work!!!

  • Pingback: Flash game creation tutorial - part 1 (with AS3 classes) : Emanuele Feronato()

  • idiot

    souled you’re an idiot… :P

    great tut (mhh im a little late, but i guess as3 still existing XD)

  • martin

    why

    import flash.display.MovieClip;

    and not

    import flash.display.*;

    if you want to make a full game is the second option not better???

  • brilliant, this should help me unravel how to build a physics engine for a uni project, saved me days of theory, now i can reverse engineer stuff!

  • Pingback: FLash (AS3) – Player Movement and Collision Detection | CG – IM()

  • Petter

    arhg :S

    I’m stuck at the first step, does anyone have any helpful tips for when I get the error:

    Scene 1 1046: Type was not found or was not a compile-time constant: hero.

    I so far have understood it as I’m somehow not importing something correctly.. :P

    thanks for any help :)