|
|
Search Tutorials
How to move a sprite with the keyboard.
Hi. When I was starting off in Flash 8 I couldn't find any good games tutorials that worked, so I decided to start writing some once I figured out the basics of Flash 8. This is a technique that was especially hard for me to find out how to do without buying an expensive book or taking a course. It will show you how to make a sprite and animate it on the screen and move it using the arrow keys. To Start you will need:
-Flash 8
-a new Flash document first we are going to make a sprite. So make a new symbol by going Insert>New Symbol. Then choose movie clip and name the symbol whatever you want. A symbol is like an object that you can apply actions, code, and animation to in Flash. In the area that opens up you can draw your sprite. It can be as simple as a ball or as complex as a real game sprite, but for learning purposes just make it a circle or a square. If you wanted to animate it you would just insert keyframes in the timeline at the appropriate spots by right clicking (command clicking on Macs) in the appropriate frames, and if you wanted to fill in motion you would apply a motion tween by right clicking inbetween the two keyframes and choosing insert motion tween. The motion tween will fill in the frames with the appropriate changes in position or size in a single symbol/shape. Now that you have your sprite we will need to apply code to it in the main timeline. Go to the main timeline by clicking scene 1 above the timeline. Then, drag the symbol onto the white spot of the stage. This inserts the symbol into your main movie/game. Click on the sprite to make sure you have it selected and press F9 or Windows>Actions. This brings up the actions panel. Now you should type in the following code:
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 1 |
| » Level Basic |
|
Added: : 2006-07-16 Rating: 4.21 Votes: 19 Hits: 1779 |
| » Author |
| Luke Knepper has been using Flash 8 for almost a month at the time that this tutorial was written and had trouble finding good flash tutorials. He also maintains his website, creates websites for others, and programs in Java as tech hobbies. |
| » Download |
| Download the files used in this tutorial. |
| Download (0 kb) |
| Get conversion and unzipping tools for PC and Mac here! |
| » Forums | |
|
|
|
| Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review. | ||||||||||||||||||||
|
||||||||||||||||||||

|