Flash game creation tutorial – part 1

Emanuele Feronato Actionscript 2, Flash, Game design

March 14th update: part 5.3 released.
March 3rd update: part 5.2 released.
February 9th update: part 5.1 released.
December 31st update: 5th part released.
December 23rd update: 4th part released.
December 6th update: 3rd part released.
November 18th update: 2nd part released.

This is a quite long tutorial, so I decided to split it in pieces.
It started as a didactic example about flash game creation.

After compiling the script and successfully made your flash file, it is recommended to upload it to a stable and reliable top hosting sites to make sure that your site is up and running all the time.

First of all, I got inspiration from Ball Revamped series (do not remember the link, search it on Google), but I’ll add a lot more features. That means more than… two.

Let’s start creating the main character.

The hero

Ok, I said I am going to create the Ball, our hero.

So at the moment our hero will be a red circle with a yellow circle inside. It looks good! Maybe you should print it and keep it on your bedroom wall.

First of all, let’s think about our interaction with the hero. Basically, I want the hero to move when I press a key.

He will move to the left if I press left key, to the right if right key is pressed, and so on.

So the first hero actionscript will be:

It’s easy, isn’t it?

The enterFrame event simply checks if a key is pressed, and increases or decreases the hero x or y position according to the key pressed.

Click on the movie and press arrow keys to control the hero, click on “reset” to.. hm.. reset the movie

The Power

Well, you will notice that our hero always moves at a fixed speed.

I want to set up a variable to store the speed, so if I want the hero to move faster/slower I only have to change one value.
This is very important since I am planning to develop different levels where hero speed may vary.

I need to set up a “power” variable to move the hero fastly or slowly.

Now you can change your hero’s speed just adjusting the power variable.
The higher the power value, the fastest the hero movement.

The Speed

That’s quite better than before, but our hero always moves at the same speed, and always starts without moving.

Now I need some kind of acceleration, and eventually some initial speed.

Notice how I reduced the power from the previous example (3) and this one (0.2).
Now that the power increases the speed, I need to play carefully with it or our hero will move too fast.
I have a yspeed and xspeed values starting at 0, but I can change them to make the hero move as he enters the frame.

Now, the more you press a key, the more your hero gains speed, the harder is to change direction.

Good.

The Fritcion

But now I want a friction, because I do not want the hero to move forever if I don’t press any key.
I want the hero to slowly stop moving if no key is pressed.

So I introduced a friction, minor than 1, that will affect hero’s speed. Now, when I press a key the hero starts moving, but when I release the key the hero will slowly stop. How slowly? The higher the friction (always minor than 1, remember), the slowly our hero will decrease his speed.

The Gravity

I said I wanted to do something similar to Ball Revamped, so I need a gravity. The hero will fall according to gravity strenght.

So I replaced the friction with the gravity for vertical movements. If I do not press UP arrow, the hero will fall down. When you read this line, probably the hero has fallen outside of the movie (you’ll see how to prevent this later in the tutorial), so you may need to click on reset to place the hero at the center of the movie.

The Thrust

If I have gravity, I need a thrust. I want to be more complicated to move up since my hero is living in a world where gravity exists.

As you can see, thrust (again minor than 1) affects the UP movement, making it weaker and more complicated to accomplish

The Wind

What’s now? Sure, the wind!
I want to make the stage look windy, you know, heros’ life is complicate, so that’s it!

Wind affects side movements, if positive will move the hero to the right, if negative will move the hero to the left.
Play with all those variables wisely and find a perfect mix of realism and playability.

The Rotation

Now, the final touch. Just like in Ball Revamped, I want the hero to rotate clockwise when moving to right, and counter clockwise when moving to left.

That’s easy, I only need to se the hero rotation equal to his xspeed.

This is where the first part ends… leave me feedback and tell me what do you think about it.

Here it is a zipped file with all source codes explained in this tutorial.

Continue with the 2nd part

From null to full HTML5 cross platform game

I will take you by hand from the bare bones of JavaScript programming through the creation of a full cross platform HTML5 game, with detailed explainations and source code.

If you don't know where to start, then From null to full HTML5 cross platform game is the book for you.

Comments 364

  1. qhiiyr

    Great tutorial! I’ve been wanting to learn actionscript, and this is a great introduction to it. One thing though: I think the last flash demo window (when the ball is supposed to rotate) is the same as the first one. Whoops!

  2. santosh maharana

    this is a very nice tutorial. becoz this script lets you to control the caracter just like a game.
    thanx to those brillient mind who had given this idea.

    i request you, that Will you please send me some tutorials for aading nice effects to the text alongwith animation only via script not by frame.

    Regards

    santosh maharana
    (web developer)

  3. Mat

    Pretty neat tutorial, I was looking into flash for some small game creations instead of XNA while I wait to get out of high school and into college. I think i’ll try this one and some others i found.

    Thx,
    Mat

  4. V34

    Hello, thanks for making this tutorial. But as the first said. The last and the first The both are /downloads/just_move.swf (:

    But i learned alot from these tutorials, and you keep it simple. Thats nice. Thanks alot!

  5. morgan

    hey the tutorial really helped me out alot seeing how i started flash just recently

    i have a question though

    how would you stop the ball from moving on contact with a wall or platform or boundary

    i tried to figure it out my self many times and here were my problems

    1.when i hittest the wall i made the xspeed = 0, but the meant that couldent move left off the wall either

    2.i fixed that by saying if (hit test the wall) xspeed = -0.1 which nugged the ball off the wall and let me regain left control again, but the friction property carried the ball threw the wall

    3.then i made it so friction is off and xspeed=0.1 and that works almost perfectly, and i say almost because now what happends is the ball goes a little bit into the wall and then is pushed back out, which works and you barley notice but looks really sloppy

    so could you show me how to use those same physics including gravity but stop on contact with walls and esspecially the ground, im trying to make a little jet pack kinda game

  6. Post
    Author
  7. morgan

    thanks alot thats good

    because ive been yelling at my computer screen for 2 days now

    great tutorial by the way, the code is simpler than anyone elses ive seen and by far works the best

    and i hope your tutorial covers oddly shaped terrain because if i have to figure it out myslef ill probly rip the screen or my laptop before i figure it out

  8. morgan

    hello

    i tried somthing and i was hoping you could tell me what i did wrong

    i had the wall return a hittestboolean GRAVITYALLOWED=false

    and the code at the bottom of all you have up there inside the ball went like this

    if(gravity allowed=true)
    xspeed*=friction
    yspeed =gravity

    if(gravity allowed =false)
    xspeed*=friction
    yspeed=0

    why does it sink threw a little before stopping!?

    if i drop the ball from high enough at the begining it goes almost all the way threw my little box for the ground
    by the way im really looking forward to more of ur tutorials

  9. Post
    Author
  10. Pingback: Flash game creation tutorial - part 2 at Emanuele Feronato

  11. Conor

    Why are there errors even though I am copying the actionscript from the tutorial?

    When you draw the ball, how do u make sure that it is the ball that you’re moving?

  12. Post
    Author
  13. dhaval

    hi,

    this is really cool tutorial

    but i have littel question

    after i finish this game. it was working fine.

    i solved the problame about the coin out side of wall

    but now my hero is not hitting the coin.

    i try to arrange it with right cliick.

    but some time it goes from the top of the coin, some time beneth the coin.

    it is not hitting the coin.
    can any budy help me please.

    thanks

    dhaval

  14. guesswho

    it’s a great strip, but when I did the first step it went just fine.On the second step it din’t change the speed. maybe it’s because I kept ONE action script instead of many, i dont know how to make numerous scripts for one symbol.

    plz help
    thanks in advance,
    guesswho

  15. guesswho

    reply to CoolGuy:

    yes. Draw and make the character, then make it a symbol. I find it works better when you make it a movieclip. Click on the hero you made. Open the actionscript and start writing the code.

  16. Fire Caller

    This is a 100% great tutorial. I have been looking hard for a game tutorial with immediate results and this is it. Just one problem, when I finish my game, the ball speed is jerky and slow.

  17. Pingback: Flash game creation tutorial - part 4 at Emanuele Feronato

  18. Salman

    Hey it’s a really kewl tutorial. But it only has one problem. You didn’t explain everything very well. Sorry to say that but it’s true. Maybe if you explain everything a little bit more, then more people will come and try to learn from your website. ☺

    ♫♪♫♪♪♫♪♫

  19. Zach Hill

    I am *trying* to make an extensive flash game or even a full game with my friend. This tutorial you have compiled looks promising, so I will try it. Thank you!

    By the way, I found the Ball Revamped series:
    [http://www.ebaumsworld.com/ballrevamped.html]

  20. Pingback: Flash game creation tutorial - part 5 at Emanuele Feronato

  21. yura

    Hey. Got to tyhe first part but is says i have an error the error is the following=Scene=Scene 1, Layer=hero, Frame=1: Line 1: Clip events are permitted only for movie clip instances.
    see that is the error and my hero wont move so plz email me and tell me what i did wrong???

  22. Hugh

    hey, I just started this tutorial with a high interest in flash, and game design. I thought I should try out this tutorial, and everything was going well up until you asked to put in a variable for the “hero’s” speed. I keep being told that the variable was incorrect and cannot be used until its fixed. I believe that this is caused by my lack of experience in flash. please get back to me, prefferably by email, which I left.

    Thanks,

    Hugh

  23. attacklvl98

    ok lol maybe my thing didnt make sence…the reason why i am asking is because my ball just keeps a constant rotation no matter what i do..how would i make it rotate in the direction that i push? (is that more clear) lol

  24. Pingback: Flash game creation tutorial - part 6a at Emanuele Feronato

  25. flash the hedgehog

    Great tutorial, im getting flash 8 soon, probably. Anyway, this tutorial will probably help me a lot when i get it. Im thinking of making a sonic the hedgehog flash game for my website. MAybe even a sonic battle flash game.

  26. Pingback: Skylog » Blog Archive » links for 2007-02-02

  27. helper monkey

    great tutorial!! but one thing i like to add to my games like that is:
    if (_y 400) {
    _y = 0;
    }
    if (_x 550) {
    _x = 0;
    }
    this will make it so that when the hero goes off one side of the screen, he comes back on the other!! =)

  28. helper monkey

    sry bout that stupid moderation took half the script out :(
    -attacklvl98,
    all you have to do is put in
    if (Key.isDown(Key.LEFT)) {
    _rotation -= 15;
    }
    then the sme for right, except adding the rotation.
    hope this helps! =)

  29. Zee7

    sir i learn your gamming tutorial in flash its realy intresting but here is a little problem and its that you did not put high detail with you tutorial.

    Anyways its realy good i will get many things from your tutorials.

    Sir i hope you know flash coding very well i just want to ask one thing to you that are you only work in gamming i mean do you make flash base wensite……..

    if you will write tutorials on full flash base scripting.then i will be thanksfull to you.

    sir i am webdesigner and currently designing websites in flash but i dont know flash coding very well..

    I hope that you can help me sir i will wait for your new tutorials ..

    Sir i will be thankful to you if you send me tutorials that i require ….

    thanks for readin this message………….please reply me back either you want to help me or not …….please

    With best regards.
    Zee7………….^^

    my email address is zee7_idol@yahoo.com

  30. Zee7

    sir i realy want to know about flash scripting and i cant learn this from our country i mean l live in pakistan and i have limited resources at here i mean i cant learn about flash scripting at here…………but i visit you site and i dont know why am i writing these things..

    But my heart i saying that i will get something from you.sir now i am depend on you i mean i will wait for help from you.

    sir i just want to know full flash website coding level.I told you befor that i am currently making full flash sites.

    Please contat me i realy need you help and hope that you will be prove yourself a great leader for me..

    Thanks for reading these messages……….thanks ..thanks

    must reply back ……

  31. Pingback: Create a flash draw game like Line Rider or others - part 2 at Emanuele Feronato

  32. Ian

    very simple and easy to understand tutorial, great introduction to flash game programming due to the lack of complicated maths

  33. Glucozade

    my script doesn’t work..when i try it, it says

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {

    what that about?

    plz help.

    (im hoping to get my skills good enough to make a small but fully playable game)

  34. glucozade

    im getting the same problem as yura, but i dont know how to turn the hero in to moviescript(?). can anyone please help me?

    PS can i use a sprite from a game instead of the ball?

  35. Glucozade

    ARGH!!!! im getting frustrated here. my script isnt working:

    **Error** Scene=Scene 1, layer=Sonic, frame=1:Line 1: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {

    Total ActionScript Errors: 1 Reported Errors: 1

    This message always comes up. WHY?!?!!? Somebody plzzzz help me

  36. Daniel

    Great tutorial m8!

    Really helped I changed the ball for a ship but used the same movement code (-wind) as a starship game it works great.

    thanx alot

    Dan
    Graphic Designer

  37. ronald

    just started with flash and i didnt know anything about it
    thanks to your tutorial i’m starting to get it
    i only think that u should make a part 0.1 to show people where they should put their scripts, because i couldnt find it, anyway thanks for the tutorial .

  38. Pingback: Flash game creation tutorial - part 5.2 at Emanuele Feronato

  39. Pingback: Create a flash draw game like Line Rider or others - part 3 at Emanuele Feronato

  40. Pingback: Flash game creation tutorial - part 5.3 at Emanuele Feronato

  41. Pingback: Flash game creation tutorial - part 3 at Emanuele Feronato

  42. Kyle Poole

    Ok, here is the stupidest question ever, HOW DO I OPEN ACTIONSCRIPT? I cant figure it out, i have a ball, but i cant even see the actionscript window to type that stuff in, or do you not even type it, im totally a newb at this so far, but right now im trying to use flash durings chool, and its slightly difficult so far, so how do i do that? or do you have a tutorial that i can go look at elsewhere? ty!

  43. Pingback: Tunnelball: design a level for this flash game at Emanuele Feronato

  44. radcobra

    the ball is too fast i tried changing power and thrust but no use and i even change the fps
    would someone tell me what should i do

  45. serkan

    onClipEvent (load) {
    yspeed = 0;
    xspeed = 0;
    wind = 0.00;
    power = 0.65;
    gravity = 0.1;
    upconstant = 0.75;
    friction = 0.99;
    }
    onClipEvent (enterFrame) {
    if (Key.isDown(Key.65))
    xspeed = xspeed-power;
    }
    if (Key.isDown(Key.68)) {
    xspeed = xspeed power;
    }
    if (Key.isDown(Key.87)) {
    yspeed = yspeed-power*upconstant;
    }
    if (Key.isDown(Key.83) {
    yspeed = yspeed power*upconstant;
    }
    xspeed = (xspeed wind)*friction;
    yspeed = yspeed gravity;
    _y = _y yspeed;
    _x = _x xspeed;
    _rotation = _rotation xspeed;

    if (_root.wall.hitTest(_x, _y, true)) {
    xspeed = 0;
    yspeed = 0;
    _x = 120;
    _y = 120;
    _root.bscore -=2;
    }
    if (_root.coin.hitTest(this.hero_hit)) {
    _root.coin._x = Math.random()*400 50;
    _root.bscore =2;
    }
    }

    as you have seen ı have only changed the keys to a s d w with their codes but ı am getting and he is the error “**Error** Scene=Scene 1, layer=hero2, frame=1:Line 11: ‘)’ or ‘,’ expected
    if (Key.isDown(Key.65))

    **Error** Scene=Scene 1, layer=hero2, frame=1:Line 14: ‘)’ or ‘,’ expected
    if (Key.isDown(Key.68)) {

    **Error** Scene=Scene 1, layer=hero2, frame=1:Line 15: Statement must appear within on/onClipEvent handler
    xspeed = xspeed power;

    **Error** Scene=Scene 1, layer=hero2, frame=1:Line 16: Unexpected ‘}’ encountered
    }

    Total ActionScript Errors: 4 Reported Errors: 4

    any idea why???

  46. R3AP3R

    i want to learn to make flash games but i understand the html a bit but where do i put the html to get that ball screen wordpad? or another program?

  47. sam

    hey…i was making a car racing game and didn’t need gravity, wind etc.
    so i tried to use the friction code. i put it into my car MC and got this error…

    **Error** Scene=Scene 1, layer=Layer 1, frame=3:Line 1: Statement must appear within on/onClipEvent handler
    1.

    **Error** Scene=Scene 1, layer=Layer 1, frame=3:Line 13: Syntax error.
    7. onClipEvent (enterFrame) {

    Total ActionScript Errors: 2 Reported Errors: 2

    please help me…

    other than that, the tute was good and easy to follow :D

  48. sam

    also…when my other problem is fixed….it came to me that i would need to put something in to make the finish line determine who wins (p1 or p2)
    and bring up a winner screen…i know sort of about hit test but i would like to be able to make it that you have to do say 3 laps before the win screen comes up…and make it so somebody couldn’t cheat by just reversing straight into the finish line…

    i know that probably didn’t even make sense…oh well please get back to me soon…

    Sam. o_0

  49. Omar G.

    hey do you think you could make a fighting game tut that covvers walk and hiting combos and enemy AI. im tring to make a fighter and i need help on Ai and combos , heck i even need help on making the dang character walk (the animation of him walking). i think you tuts are easier to understand and more detailed which is way im asking, so do you think you can help me out?

    or could you email one to me
    my email’s legean1@hotmail.com

  50. sam

    hey Omar….this probably wont help and ur probably way better than me at flash anyway…but oh well
    if by the character walking u mean for example when you press right the feet move then this one might help you….http://www.tutorialized.com/tutorial/Walking-Movie-Clip/2422
    look at the source file…and see how there r frames of the walking animation in the moviclip…and in the script it says when you press a key…it plays…if that makes sense i hope it helps…

    this dude hasn’t seemed to reply for a while…i like awesty…try him on…www.awestyproductions.com

  51. Omar G.

    if we’re thinking the same thing right click and go to actions thats the actionscript area(you could also click the actions panel on the bottum.)

    if thats not what you mean then i cant help you, sorry.

  52. Pingback: Create a flash game like Security - part 1 at Emanuele Feronato

  53. CBURNS

    Hi There

    I get this error :
    __________________________________________

    **Error** Symbol=Symbol 45, layer=Layer 1, frame=1:Line 18: Syntax error.
    0._visible = “0”;

    Total ActionScript Errors: 1 Reported Errors: 1

    __________________________________________

    When my script looks like this :

    onClipEvent (enterFrame)
    {
    if (_parent.entrada == null)
    {
    if (this._xscale

  54. Andreius

    ive been making a car racing type game, and ive managed designing the levels, made character, added if (Key.isDown(Key. -x-)
    statmentsd to move down and up and ive added rotation for left and right…
    it all works perfect ( no syntax errors)
    but when using up and down keys it uses the default north and south.. i want to know how to get it going forward and back but the way the car is actually facing…

    any help at all highly appreciated

    thx in advanced

  55. tom

    OMFG OMFG OMFG
    I CANNOT GET THIS TO WORK!!!

    AHHHHHHHHHHHHH FAR OUUUUT!
    I keep getting errors… Every tutorial i do i get
    fuking errors!

    **Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Statement must appear within on/onClipEvent handler
    1.

    **Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 13: Statement must appear within on/onClipEvent handler
    7.

    Total ActionScript Errors: 2 Reported Errors: 2

  56. Elfvision

    thanks alot!
    really nice tutorial!
    i was always searching for a tutorial which would teach me how to make objects move using arrow keys and how to give thrust and etc.
    thanks ALOT!
    really liked this tutorial

  57. Deimox

    First off all i want to thank you for your amazing tut!
    now my idea is to create a ball whose position is equal to mouse position…but that part is easy (_root.[my object]._y = _root.mouse_y and _root.[my object]._x = _root.mouse_y)

    now i want to have a canon incorporated in the ball that rotates when i press the left and right arrow keys, this part ir already done too (if(Key.isDown(Key.LEFT)){ this._rotation = 10)

    this part is the trouble…
    I dont know how to make it shoot a bullet in the direction wich the cannon is facing…thats were i need your help…

    thx
    Deimox

  58. Pingback: A strange way to move the player with Flash at Emanuele Feronato

  59. Ted

    the first script isnt working:

    **Error** Scene=Scene 1, layer=Action, frame=5:Line 1: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {

    Total ActionScript Errors: 1 Reported Errors: 1

  60. Pingback: Creation of realistic spheres in Flash with textures and masking at Emanuele Feronato

  61. Pingback: Create a Flash ball game with visual from above tutorial at Emanuele Feronato

  62. Scott

    great tutorial! ive been searching google forever trying to find a complete tutorial. although this just has the hero…. its helped me a lot, since i just started flash.

    thanks.

  63. Samus Man

    I have to say–this tutorial is looking optimistic. I’m actually entering a competition in less than 30 days, so I need something like this–complete enough to teach me most of what i’ll need and detailed enough so that I can adapt the concepts to my own engine.

  64. Pingback: On the horizon #1 at Emanuele Feronato

  65. flaming

    I keep getting this error.

    **Error** Symbol=hero, 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

    I’ve seen other ppl fix it but didn’t explain how.

    Plz help me.

  66. Jimmy P

    Hey, I want to start with saying that this is a great tutorial! I just got Adobe Flash CS3 Proffesional a few days ago. And I want to start making a really simple game, so I was wondering how you put this actionscript, and the character that you’ve created, together to make it move?

  67. Izz

    help please!
    I’m pretty new to flash, and ive got a problem with my flash 8. It used to work fine but and when I drew and object and clicked on it, it would be appear normally with a blew rectangle around it. Now when ever I draw something and select it, it automatically has these dots all over it… kind of like it’s already broken apart (I think that’s the term anyway…).
    Anyway, it’s being a bit restricting. Does anyone know how to fix this

  68. Tim F

    Great Tutorial

    The last one (rotation).
    It’s very great!!!
    And usefull to make rolling balls like RocoLoco (PSP).

    TF

  69. Dan

    This is a really nice tutorial. But I have a problem. I copy and pasted your script, but my hero still wouldn’t move.

  70. BoJaN

    wow! thank you so much, i’ve been looking for a great tutorial for a long time but all the ones i find start past the basics I usually do coding in
    LSL, a scripting language in an MMO and im out of things to program for it so I wanted to learn somthing different and i’m so happy with this tutorial!! Thanks a bunch!

  71. Pingback: Creation of a Ragdoll with Flash part 1: Verlet integration at Emanuele Feronato

  72. Pingback: Create a Flash ball game with visual from above tutorial part 2 at Emanuele Feronato

  73. Pingback: Flash: Game Tutorials « Rogério Lino

  74. Pingback: Controlling a ball like in Flash Elasticity game tutorial at Emanuele Feronato

  75. Pingback: Landslide Games Blog » Creating our First Game: Part 1

  76. Pingback: | flashgame.gamesforplayers.com

  77. Lazar

    Really good tutorial, but I don’t know only one little thing: HOW, TO HELL, WILL I PLAY THIS GAME ON MY COMPUTER? I copied the plain text in *.txt file, but how will I play it?

  78. Pingback: flashgame.gamesforplayers.com » Blog Archive

  79. s0d4player

    Note to many. If you get this:
    **Error** Symbol=hero, layer=Layer 1, frame=1:Line 1: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {
    your probably putting the actionscript on the frame, not on the movie clip.
    Make sure that you are editing the actionscript on the movie clip.

  80. Thibledorf

    Hi this is a noobish question but how do I make an action script that dose the same thing as a go to and play command?

    I want to make it so that the hero goes to a different scene when you press one of the directional buttons.

  81. Thibledorf

    Hi, I figured out the answer to my first question but now I need to know how to make it so the directional keys only function when the oposite key is up.

    Here is an example of what I mean, using codes that for some reason don’t seem to work:

    if (Key.isDown(Key.UP) && Key.isUp (Key.DOWN)) {
    yspeed -= power;
    gotoAndstop(81);

  82. Menno

    Hey guys, just to respond on the refresh button… I searched it for some time too, and found a great solution. This is simulair to the refresh browser button, but now it will only refresh the flash clip.

    on(release){
    loadMovieNum(_root._url.substring(_root._url.lastIndexOf(“/”)+1),0);
    }

  83. none

    I have a sprite with a walking animation. if he is moving to the right i want it to play and if he is moving to the left i want it to play backwards, how can i do this?

  84. Liquid Snake

    Hello, i need a little help with “Flash”, i wish to start out on the subject, but, i do not know how to get thr right tools for the job, if anyone can help me, it’ll be greatly apretiated

  85. tro95

    It was a great tutorial but how do you make it so the gravity doesn’t increase and there is a floor which it WONT bounce on???

    (\___/)
    (=’.’=)
    (“)_(“)

    Meet bunny!!!

  86. Cindy White

    Is this Zach Hill from Chesapeake? I know Jim and Connie. Are you into designing and do you use Flash and Dreamweaver often. If you like 3D, I found Electric Rain a good tool as well.
    Cindy White (Porch)Patrick’s mom

  87. Nico

    hi,

    I use Adobe Flash CS3 Professional, after a while i figured out that i must make a movieclip of the ball… then i right-clicked it, clicked on ‘actions’, but then it said: “Current selection cannot have actions applied to it”. I also dont see the name of my instance (hero) under “Scene 1″ at the actions tab.

    What am i doing wrong???

  88. Adam Ch

    to nico

    with cs3 u need to clik actionscript 2.

    to jack

    u need to use adobe or macromedia flash.

    to emanuele feronato

    how to do u make it so that left and right rotates but does not move and up is to make it move in the direction it is facing and down is to make it reverse, with a car for example.

  89. Pingback: Create a Flash game like Metro Siberia Underground : Emanuele Feronato - italian geek and PROgrammer

  90. bob

    Hi! First of all, great tutorial!

    I’m trying to make a two player game, one controlled with the arrows and another one with keys W A S D. However, when I type:

    onClipEvent (enterFrame) {
    if (Key.isDown(Key.”a”)) {
    xspeed -= power;
    }
    }

    it doesnt let me use “a” as a key. Please help me, and thank you for the tutorial.

  91. stupid

    It’s not working! this is what the computer spits out:
    **Error** Symbol=Symbol 1, layer=Layer 1, frame=8:Line 2: Clip events are permitted only for movie clip instances
    onClipEvent (load) {

    **Error** Symbol=Symbol 1, layer=Layer 1, frame=8:Line 10: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
    1.

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 15: Statement must appear within on/onClipEvent handler
    8.

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 17: Statement must appear within on/onClipEvent handler
    9.

    Total ActionScript Errors: 5 Reported Errors: 5

  92. Lemony

    This is atually the best tutorial i have found, the way it takes you step by step, teaching all the variations makes it really easy to learn. Thanks

  93. Hallucination

    your tutorial is brilliant! the only problem is that i have Flash CS3 and the scripting language is quite different. I’m still failing to even get the ‘hero’ to move when i press the arrow keys, but im pretty dim so im not suprised.

  94. Zach Cross

    I can’t find a site to download ActionScript, I know how to do everything, but I can’t find a place to download it! Send link to me in email please.

  95. wil

    sir can you help me in my project using the software adobe flash, my propose game was cayatting can you help me sir pls reply in my email address.tnx

  96. Nick

    Hey, Im a new programmer and heard of your tutorials of flash programming by Jimmyr.com and I dont know how to save it like .swf or .as or .html can you help also how do you program it to have those colors and stuff and what programs do you need.

    Thanks I know im a noob.

  97. Pingback: Create a Flash ball game using AS3 : Emanuele Feronato - italian geek and PROgrammer

  98. Pingback: How The Game “Hungry Plushies” Was Made «

  99. Daniel

    how come whenever i try the very first actionscript it says that it is a movie clip, and that it needs to be a mvoie. Pls someone explain

  100. gimpydingo

    OK, so how does the box move diagonal?? When I try to type the code my dot only moves 4 way, not 8. Also what’s the diff in code (I am using CS3).

    You have:

    if (Key.isDown(Key.RIGHT)) {
    _x++;

    I tried that and:

    if (Key.isDown(Key.RIGHT)) {
    this._x++;

    So what’s the deal with 8 way movement??

  101. Sander

    Hey, this is how all tutorials should be! Great!!

    I’m experimenting with this code but now I’ve got one question. If I want my hero to stop at ‘Spacebar-hit’ how can I do that?! I set the code

    if (Key.isDown(Key.SPACE)) {
    xspeed = 0;
    yspeed = 0
    }

    It stops but everything stops haha; the hero is rotated to it’s starting position and my whole movie is stopped and I can’t do anything!?

    Have you any ideas for me??

  102. Rob

    Hey, this was an awesome intro into Action Script, me and a Friend are hoping to create a flash game and this was a way better starting point than we could have hoped for! Keep up the aweosme work! :)

  103. Claire

    Hey, i was just wondering if you could tell me
    how to make objects solid, so that your mover
    cannot go on top of them? i have to make a game
    where an image has to move around collecting things but isnt allowed to go through anything.

    Thank you

    Claire x

  104. Pingback: Prototype of a Flash game like Floaty Light : Emanuele Feronato - italian geek and PROgrammer

  105. Pingback: Brettcr » Blog Archive » Programming Tutorials / Game Making Check Video Description download videos off you tube

  106. Rajiv Srivastava

    hi..it’s cool…
    but not given the logic of reset button which is one of the most important part of all game..

  107. Pingback: Elise » Programming Tutorials / Game Making Check Video Description convert youtube video to dvd

  108. Samuel

    Brilliant tutorial…
    Even better than what my eacher could teach me
    and the best thing is…
    I UNDERSTAND IT!
    I will be creating a version of this in the months to come for my website with a christian slant to it…

    Thanks for the Tutorial,
    Sam

  109. B_Gwra

    sir,
    i want to make a carome game. cud u kindly help me. i m confused how to write actionscript 4 a carome game?

  110. Pingback: Step by step AS3 translation of Flash game creation tutorial - part 1 : Emanuele Feronato - italian geek and PROgrammer

  111. halloichbins

    I have a question:

    if (Key.isDown(Key.DOWN)) {
    yspeed += power*thrust;

    Why do you also multiply the power by the thrust? It will slow down the gravity.
    But you just want to slow down the power to go up, actually you would have to power up the power because of gravity (if you press down the DOWN-arrow you would have to be faster down than doing nothing [just acting gravity]).
    I think the thrust just belongs to the UP-arrow.

  112. Andy Cook

    @ halloichbins

    He is multiplying the power by the thrust to cut down on the power, not make it easier to go up and try to cancel out gravity. In effect, he is making the power 3/4 of what it should be. You have to multiply it because no matter what the power is, you should only be making it 3/4 as strong every time.

  113. james

    dude u r my hero

    soo many tutorials out there but they make them to confusing urs is nice and simple

    and it actually works

    good job…

  114. Nathan

    Hi Emanuele

    Fantastic site and tutorial!
    But im new to flash so how do you make the code for the reset button???

  115. Pingback: Tutoriais « Gameslmjb’s Weblog

  116. Pingback: Adobe Flash Tutorial Part 2

  117. Malboro Jones

    Hiii awesome tutorial!
    I downloaded the file so I could mess around and change things to help me get a bit more understanding, but when I open it to edit in Flash CS3 I cant find the Actionscript! On what frame or where can I find it?
    Thanks!

  118. Malboro Jones

    I just noticed this is quite an ancient post :P but anyway, I’m using Action Script 1/2 and The
    onClipEvent(load); won’t work,
    I changed it to

    function moveball() {
    movement code here
    }

    then at the end of the script i put –

    this.onEnterFrame = function() {
    moveball();
    }
    works better for me, the onClipEvent just says clipEvent is only for Movie Clips, strange seeing that I had put it on a Mc…

    Well its there in case anyone has the same problem.

    Im having problems making a border for my game though. I don’t want it to reset when the border is touched I want it to bounce back.
    If anyone can tell me how to do that I will be very happy :) malborojones@hotmail.co.uk

  119. Orangatangx

    I really need help on my game, I made a maze but if I hit a wall, my goal changes its position! Please help me, I can send u the swf so you can see it. Email me please.

  120. Pingback: reducedoverlarge » Trailer for the upcoming Echo Wall climbing film

  121. Pingback: forfreebigger » Diving with Sharks at the Chumphon Pinnacles, Koh Tao Thailand

  122. Pingback: Presentation: Flash Games « Dart 381

  123. Beastial Pride

    if like me you had the problem of making the ball move, first select your ball, right click it and press convert to symbols on the screen that comes up, click on MovieClip on the type section and look about half way down the text box and you will see a box for “export for actionscript” click that, then press ok,

    that seemed to work for me, hope it works for you aswell

    P.S great tutorial but it is very different to the other one im using that is on Kongregate Labs, which is “object oriented” (whatever that means).

  124. Nathan

    @Kurt

    This is as easy as it gets, if you still need something that explains everything, I suggest you go back to the basics, and not move on to coding until your comfortable drawing circles and creating movie clips.

  125. Wortho

    Ok, thanks Beastial, but I kind of figured it out after about an hour of hard thinking :D

    For all those who dont know how to do it please do the following steps:

    1) Press new file.
    2) Actionscript 2.0 (Not 3.0)
    3) Make an object. Example, a square.
    4) Click the square, then press [F8] to Convert it to a symbol. You can also right click and convert it there.
    5) Make sure it is a movie clip.
    6) Name it Hero instead of the defalt, Symbol 1.
    7) Apply, then press [F9] after it has been converted to a symbol to bring up where you enter in the actionscript. You can also right click and press actions.
    8) Paste the actionscript.
    9) Ok, then press View (I think, but its in the File, Edit, etc… menus) then press test movie. You should have a moving ball.

    Smiley face.

  126. Pingback: Programming Tutorials / Game Making Check Video Description convert files from youtube : nocostlargish

  127. Pingback: couponlargish » Vegas-Promotions.com

  128. Pingback: discountsize » 7 Tips for a Fun Filled Family Holiday Posted By : Johnn

  129. Gabe

    i did all of it axactly as you said.
    but when i tried it out i got a bunch of errors saying that i could only use these actions on a movie clip however my blobby hero thingy already was a movie clip

  130. RikaLucia

    Thanks, Emanuele.
    Awoke from Kongregate told me about you.
    Your tutorial has helped me with creating a game. Not on AS. But on an easier platform.
    Anyway, thanks.

  131. Victor

    Yep. Been Looking for a decent actionscript tutorial for days and finally found a diamond in a sea of dog crap. Thanks for the great info. I know how much work they are to put together. If you make more tutorials then I’ll get all weird and try to pin all of my hopes and dreams on you like that weirdo from Pakistan and start asking dumb questions like what programs should I use to make a flash game…

    Seriously the highest quality tut I’ve seen. Please make more if it is possible

  132. The Old Brick

    Can we take one step back, please?

    What is the development environment that I need to program a Flash game?

    Adobe Flash CS4 Professional? (Retail: $699)

    Is there a more entry-level (i.e. cheaper) version?

    Is there a public-domain version?

    Thanks for your help.

  133. Pingback: Actionscript Basics - Keyboard Input

  134. Billigflug

    It’s a great tutorial and it helped me a lot. And it brought back memories, when I was still at school and I had my first programming experiences in Delphi. We also had to program a ball and “played” with it by changing the variables.

  135. mie

    i would like to ask how did you do your reset button?i need the exact actionscript for the game im currently developing right now.it was just a simple clicking game….by the way love your tutorial..

  136. Pingback: pligg.com

  137. lolo

    hello emmanuele
    this is a nice tutorial but when i make the first step on a new flash doccument it goes wrong, tough i make hero a movie clip.
    i have Flash MX professional 2004 but i cant make an actionscript 2 file in it. is that the problem?

  138. jimmy

    hey, great tutorial, just wondering…
    when the ball is moving, it seems a bit choppy.
    when i raise the “power” factor, it seems to move by that many pixels (ex: power = 4, it moves by 4 pixels)
    could anyone tell me how to make it smoother?
    thnx

  139. Pingback: Create a game like ball revamped | Tutorial Collection

  140. Kiran

    i used this tutorial to create a ‘UFO Joe’ style game and it worked perfectly, thanks so much.

    anyone getting the ‘ only avalabie to movieclip’ stuff:

    select the hero, right click – convert to symbol and choose ‘movieclip’ – you should do this with almost anything you want to code in these kind of tutorials.

  141. Ger

    I have a question. I drew a ball and I can move it with my cursor but how come it’s slower? Your second example(The one about power) is faster than what i did, and the power on mine is 5. I downloaded your file and it’s as fast as the example in this site, so its not about the computer. Can you help me?

  142. Pingback: Flash Tutorial

  143. Dan

    could someone plz help me? I need to make my object rotate as the mouse moves to point at the mouse. is there any way to do this?

  144. Gondai Nathaniel Richard Mgano

    thanx 4 the great tutorial i was looking some thing similar using actionscript

    Ques:
    is javafx capable of bitting flash

    i love pl/sql , java , netbeans THE ONLY IDE!

    thanx for the tutorial

  145. Moh

    I have been through this tutorial and take it as my helping hand. I’m trying to build up a race game kind of thing with fps view. Here the object will increase according to my progress. For a flash based game, I took object as your Hero and have given the script which is in your tutorial. The changes are liked opposite. E.g. when I press the UP key the object goes down so that the view is like I’m going ahead. But the problem is that the result is not coming according to my logic. The object is coming closer with increasing of size but it also changed its x position which I don’t want. Any solution will appreciate.

  146. Dark Link

    well i was looking for something mre like a different sprite when you click a buton like click left and plays sprite link move left can u help ????thnx :3

  147. zeus

    these tutorials are great

    I’m already familiar with graphical design and pro at coding, I just needed this kind of reference to tie them together.

    thanks!

  148. Steve

    I was actually planning to buy a book and study more about actionscript, then I found your website!! This is Great, Nice tutorial, easy to understand & very straight forward, keep up the good work !!

  149. Pingback: [Flash CS4] - x y-Bewegung in Vektoren? - Flashforum

  150. Flash Games Master

    This is great info. I am currently gathering as muc info on flash game creation as i am hopefully going to try to build some of my own.

    I am sure this guide will come in handy at somepoint. You are bookmarked.

  151. Darth

    This is a great tutorial except I have a question about using the rotation method. My movieclip is rotating around a point that seems to be on the outside or corner of the actual image. Is there a way to rotate around the center point?

  152. Pingback: Triqui’s Picks #1 : Emanuele Feronato

  153. daysdarkness

    It’s all great and wonderful to know what to type, but would it be possible for you to explain why you type what you do, so, for example, I could create it myself and not copy and paste?

    e.g.
    why do you do xspeed? what does that do
    What is += mean?
    e.g.

    It’s definitely helpful to see what everything does, though, it would be nice to see what happens for each individual thing.

  154. daysdarkness

    sry to double post, but
    _y–;
    why does that go up?

    I’d guess that it would mean image goes to -oo
    (on y-x grid)
    …….^ Y(+)
    …….|
    …….|
    (-)____|____>X(+)
    …….|
    …….|
    …….|(-)

    So Y++ should go up? I mean X++ goes right(+oo)
    You have it so that Y– goes up

    And is there a z-axis?

  155. Pingback: Making a basic flash game! HELP! - Overclock.net - Overclocking.net

  156. Pingback: Flash Game Development for Beginners — FlashRealtime.com

  157. Pingback: Mal kurz rundgeschaut… #9 – Braekling.de

  158. zard

    How good that there is someone who cares about newbies here is my recomendation another thing i did for the friction effect was
    if(key right is down)
    {
    _x += sp;
    }
    if(sp < 0)
    {
    sp -= friction;
    }
    and the contrary for left i am very surprised how many comments you have thans a lot for making pages for us newbies

  159. Pingback: Great tutorial for Game developer beginners « rksaran

  160. Pingback: Box2D Flash game creation tutorial – part 1 : Emanuele Feronato - italian geek and PROgrammer

  161. tim

    i am a beginner when it comes to coding have experience using flash for web sites always been interesting in making games, can’t seem to get the code to work tried creating a ball using the shape tool then changed it to a movie clip, didn’t work all i get is……

    1087: Syntax error: extra characters found after end of program.
    please help!!!! so grateful to anyone who knows my mistake or what i am not doing

    tried just creating a movie clip then creating the ball using the shape tool but I still get the same message please help i really need to get this because i want to start learning coding for small game development using flash cs4 please someone give direction thanks alot.

  162. Leandro

    Simply the best actionscript 2.0 tutorial (not only game tutorial) for beginers that i found in the hole web.
    Really, really nice job. I can say that most of my progress is due to your tutorials.

    Thanks again.

  163. babalack sheep

    can you help me with my thesis.. it’s CAI i wanna learn how to make a simple game tutorial for prep school.. email me pls… i badly need help of anyone :c

  164. Marco

    when i try to make the camera follow the ball it doesn’t works! Actually i’m making a little different from you. The “Hero” is a Baloon and named like that. instead of “wall” i made a grounds (don’t ask why there’s an “s”) so, back to the problem, the baloon doesn’t move! my lines are like that:

    onClipEvent (load) {
    power = 0.3;
    yspeed = 0;
    xspeed = 0;
    friction = 0.95;
    gravity = 0.1;
    thrust = 0.75;
    wind = 0;
    }
    onClipEvent (enterFrame) {
    if (Key.isDown(Key.LEFT)) {
    xspeed -= power;
    }
    if (Key.isDown(Key.RIGHT)) {
    xspeed += power;
    }
    if (Key.isDown(Key.UP)) {
    yspeed -= power*thrust;
    }
    if (Key.isDown(Key.DOWN)) {
    yspeed += power*thrust;
    }
    xspeed += wind;
    xspeed *= friction;
    yspeed += gravity;
    _root.grounds._y -=yspeed;
    _root.grounds._x -=xspeed;
    if (_root.grounds.hitTest(this)) {
    xspeed = 0;
    yspeed = 0;
    _x = 120;
    _y = 120;
    }
    }

    and the error message is that:
    Scene=Scene 1, Layer=Layer 1, Frame=1: Line 33: Syntax error.

    Scene=Scene 1, Layer=Layer 1, Frame=1: Line 10: Statement block must be terminated by ‘}’
    onClipEvent (enterFrame) {

    Scene=Scene 1, Layer=Layer 1, Frame=1: Line 33: Syntax error.

    HELP ME!

  165. Aly

    I don’t under stand these,can you please tell me what this mean!??
    xspeed *= friction;
    yspeed *= friction;
    _y += yspeed;
    _x += xspeed;
    }

  166. Tamas

    Hey!
    I’m a very beginner in the game making, but I want to learn it.
    Here is a simple question:
    I don’t understand the scripts.. Do you use a programm to write these, or you only write those scripts into a notepad?
    If you’re write them in a notepad then what the type of the format that in you save it?
    Sorry if this is a stupid question:S

  167. Samuel

    Hey Emmanuele, this is a pretty good tutorial to get started(ahh the nostalgia of learning actionscript). However, I haven’t had the oppurtunity to learn AS3 yet, so is there any chance of converting this tutorial to AS3 or just making a separate tutorial explaining how AS3 works? Thanks.

  168. Pingback: HTML5 game creation prototype - Emanuele Feronato

  169. Pingback: Flash | Raccolta tutorial Flash

  170. nubtime!

    ok, im getting it and most of the code makes sense although i dont have much programming experience but when i declare the power variable and compile my stuff to check out the video clip, it doesnt change my movement speed! Please help me/point to another tutorial/email me.

    Thanks!

  171. Dave

    I want to make a character card game similar to Yugioh, but with its own characters and enhancements. I can provide a storyboard for the game and am willing to help with the programming, even though I am a complete novice. Can you help me with this?

  172. Pingback: Basic FlashPunk game prototype using Flash IDE - Emanuele Feronato

  173. beginner

    oh no… another tutorial that i have to add to my favorites and i still have so much to learn :(

    thank you Emmanuelle for all your tutorials!! :)

  174. Pingback: 8 Online Resources for Budding Flash Game Designers | Flash downloader

  175. pat isley

    One key consideration you may want to take here is that in terms of speed, the hero moves faster when he moves in a diagonal direction (ie, up + rt, vs rt.). This similar to why running sideways (using c buttons) in Goldeneye N64 would allow you to outrun other characters. It’s because the vector sum of two perpendicular vectors is greater than the magnitude of either. Gotta love the phys. of game development.

  176. Thwap Thwap

    Hey, i was wanting to create a helicopter-like game, so, how would you write an actionscript for a helicopter? sorry, i cant write actionscript at all.

    Example is, helicopter achieves max velocity, therefore it does not rotate anymore. also when you let go of left / right keys, it returns to original, horizontal state…..?

  177. The Guy

    Hi there. I tried first 2/3 script codes and I realised that my ball isn’t as smooth going as yours. What is happening? Is is only test window fault?

  178. ninjanater

    i am complete begginer to this kind of thing, i have done bits of html amd javascript and i have a couple problems i hope someone could help me with.

    first: in my program (notepad++) it says im using flash actionscript is that right?

    second: how do you turn the actionscripts into a game?

  179. Pingback: 20+ Websites To Help You Learn Flash and ActionScript

  180. Pingback: 20+ Websites To Help You Learn Flash and ActionScript | Free Web Design Tucson

  181. Pingback: 20+ Websites To Help You Learn Flash and ActionScript | EzraMod | WordPress , Joomla , Template , Graphic , Theme , Style

  182. Pingback: 20+ Websites To Help You Learn Flash and ActionScript | General Zone

  183. Pingback: 20+ Websites To Help You Learn Flash and ActionScript - Flash24h.com | Th? gi?i Flash c?a b?n!

  184. Pingback: 20+ Websites To Help You Learn Flash and ActionScript | Blackhat Money

  185. santosh

    dear sir,
    The code you provided are absolutely fantastic for rocket game or for aircraft game.

    Thank you very much for your support.

  186. Manny

    Wow! This is really helpfull!
    I am currently studying Game Design and I been focusing on doing Flash Games so this is going to help me a lot, Thank You and I hope to see more wonderful tutorials such as this one! ;)

  187. Xelon

    erm… got my first problem. my character won’t move. Getting these errors:

    Scene=Scene 1, layer=Layer 1, frame=1, Line 1 Clip events are permitted only for movie clip instances
    Scene=Scene 1, layer=Layer 1, frame=1, Line 6 Clip events are permitted only for movie clip instances

  188. brandon

    When I add the code to a layer I want, this pops up in an error window:
    **Error** Scene=Scene 1, layer=Car, frame=1:Line 1: Clip events are permitted only for movie clip instances
    onClipEvent (enterFrame) {

    Total ActionScript Errors: 1 Reported Errors: 1
    What does this mean and how can I fix it?

  189. Pingback: 21 Helpful Websites to Learn Flash and ActionScript | blueblots.com

  190. Pingback: Bibliography « bringouttheengine

  191. Rimmler

    Hey man awesome tutorial.

    But I have a little question: Where do I start?
    What softwear is required to make a game?
    Please answer as fast as you can.

  192. Chaghtai

    It is really a very good tutorial and I think the writer of this tutorial has very clear picture of the subject in his mind. A reader when gets such tutorials, he not only learn the subject but interest in the subject is also created in his mind.

  193. Pingback: 20+ Websites To Help You Learn Flash and ActionScript « Education

  194. ripon

    I want the ball to move when I press a key.The ball will move to the left if I press left key, to the right if right key is pressed,to the jump if i press up key . when the ball down the line the ball star first time.

  195. Pingback: Create Flash Games | Leonardo França

  196. andy

    Damn!

    Now that I finally got Flash IDE to work in Linux (using axdt and Eclipse) I find out that I can’t open those .fla files included in the source zip!

    It would be a lot better if these were included as .as3 source so we can compile it ourselves. Instead, we will have to copy-paste the code from the code boxes…ugh…

  197. shakthi

    I’m a beginner.I’m very mush interested in designing flash game.Can you give me the name of the software you have used ?? and certain guidelines to become a good game designer.

  198. sam

    me and my freind want to make a flash game about guns and stick figures. how would you create the different levels, figures, graphics and subtitles/speech.

  199. Pingback: Simple Ball Platformer « greenhorngamesdotcom

  200. xXStickymaster

    I always wanted to make my own flash game. This tutorial just showed me the first step. Very helpful and easy. Thanks a lot!

  201. Claptrap The Third

    Wow. awesome tutorial, finnaly I found a tut worth actually reading. thanks for everything now I can finnaly make my own flash games :] many thanks.

  202. Rad

    Hey! Nice tutorial! But Im having trouble with converting these scripts into Class files (If it is possible), heres mine, it doesnt have errors, But I cant make it working :(

    class Ship1 extends MovieClip
    {
    var xspeed;
    var yspeed;
    var power;
    var friction;

    function onLoad()
    {
    {
    power = 1;
    yspeed = 0;
    xspeed = 0;
    friction = 0.95;
    }
    function onEnterFrame()
    {
    if (Key.isDown(Key.LEFT))
    {
    xspeed -= power;
    }
    if (Key.isDown(Key.RIGHT))
    {
    xspeed += power;

    }
    if (Key.isDown(Key.UP))
    {
    yspeed -= power;
    }
    if (Key.isDown(Key.DOWN))
    {
    yspeed += power;

    }
    xspeed *= friction;
    yspeed *= friction;
    _y += yspeed;
    _x += xspeed;
    }
    }
    }

    SOmeone help me with this! :( Thanks!

  203. Pingback: Flash Tutorial Websites | college200

  204. Pingback: Top 26 Flash Tutorials SitesGoBestOnline

  205. Pingback: Flash: Game Tutorials | Rogério Lino

  206. Pingback: Tutorial – Flash Game Development für Einsteiger | webmagazin

  207. Pingback: macromedia flash tutorialized | PDF Finder

  208. Pingback: tutorialized flash button | PDF Finder

Leave a Reply

Your email address will not be published. Required fields are marked *