A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Games

Categories How to Make Your First Game in Flash 8
Author: Luke Knepper | Website: http://zazeran.com |

 
Page 1
1 2 3 next»

Hi! This tutorial will teach you how to make a basic space invaders game a lot like this one in Flash 8. So, let's get started!

First you will need to set up your main timeline. You will want to select the size, by clicking on the button in the bottom inspector. A good size varies, for a space invaders game 600x600 would probably be pretty good. I suggest you make multiple layers (click on the new layer button in the timeline at the top), at least two named "game" and "background" and you may have even more, but this is not mandatory, it just makes the game more organized. Next, make a second and third key frame in ALL of the layers. Now you should have three frame sequences. In the top frame of each sequence, put the code "stop()" (click on the frame and press F9 to open up the code editor). In the first frame, also put this code: "var score: Number = 0" and on a newline "var life: Number = 100". What this does is make to variables, score and life, that can be accessed anywhere in the game. You can do this for as many variables as you want if your games get complicated. To access these variables through code, just put "_root.varName". (Note: In a specific symbol / object, you can make a variable just by typing the name and setting it equal to anything. However, this variable is only easily accessed by the specific object, so it is better to make a global variable in the main timeline.) The first frame will be the opening screen. You may design this however you want, putting the title and a bunch of cool effects, but you must have a button. Before you design anything make a button using the drawing tools that you want to be the start button. (Note: If you have any text make sure to select it and press Ctrl+B twice to break it apart!) Now select the whole button image and press F8. This will convert it to a symbol. As a name type "Start btn" and check the button type. now your drawing will be highlighted in blue. Select it, and press F9 and insert the following code:

on(release) {
gotoAndStop(2)
}

This means "When the button is released from a mouse press, go to Frame 2 and stop." If you test run your game, you will see that the button disappears when you click it! This is because the button is not in the second frame. Now make a game over frame in the third one. To make a text field that shows your score, choose the text field tool, and draw one. In the bottom, with the field selected, choose "Dynamic Field" and under the "Var" field put "score". Now that you have the basics set up, you will need to make the following sprites as movie clips: a tank sprite (you), a bullet sprite (your bullet), a ship sprite (the invader(s)). To make a new symbol (sprite) press Ctrl+F8. Then select "Movie Clip" and type in the sprite's name (i.e. tank, ship1...). Now that you have those done, go back to the main timeline. In the second frame (the game frame) place the bullet off the stage (drag and drop the bullet symbol from the library, the left inspector), the tank on the stage at the approximate y location you want it, and the invader off the stage. Next I will show you all the code you need to add!

1 2 3 next»

» Level Basic

Added: : 2006-12-13
Rating: 5.27 Votes: 26
Hits: 2673
» Author
Luke is an active Java, PHP, and Flash programmer, website designer, and game developer. Has much programming experience.
» Download
Download the files used in this tutorial.
Download (0 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs