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 Basic Shoot 'Em Up
Author: Jack Bowyer

 
Page 1
1

Okay, first of all to be able to do this you must know most of the basic actions in the action script window, and preferably the tell target action. You must also know about movie clips, buttons etc.

So, let's get started. The first thing you must do is create a movie clip and name it "Enemy". In the first 19 frames of the movie clip (It can be longer if you want) draw your enemy and make him stand there, reload his gun, eat something... whatever you want to make space inbetween when he shoots. Once you done that go to the next unused frame in the movie clip. Now over 5 or so frames make him fire his gun at you, on the final frame of this write the code in the frame actions box:

gotoAndPlay (1);

This will make it go back to frame one once he has fired. On the next unused frames you must draw him getting shot himself... the good bit! Now we must make an invisible button the exact shape of the enemy, do this by copying the shape of the enemy one frame one and pasting it into only the "hit" frame of a button symbol inventively named "button". Now go back to the first frame of "enemy" and create a new layer above the drawings. On this layer put the invisible button and make sure that it covers directly over the enemy. Add the action to this button:

on (release) { gotoAndPlay (31); }

The frame number 31 is where the enemy was shot in my one, but you may have to change this depending on where the enemy being shot starts.

Leave the enemy movie clip now and go to the main timeline. There should only be one frame here, on which you must put a "stop" action. In frame two create a "You win" screen. Add a stop action and create a restart button going back to frame one. Do the same for a you lose screen on frame three.

Now go back to frame one. Create a movie clip labeled "Health". In it's first frame you have full health- 100%, 5 green bars, a happy face- you get the idea. In this frame put a stop action. Make the next frame and make the health slightly lower- i.e 80% and do the same for the next few frames until it reaches 0 health, all with a stop ation on. (The more of theese frames you do the longer you live)On the 0 health screen dont do a stop action- instead write:

tellTarget ("_parent") { gotoAndPlay (3); }

This will make the main timeline go to the "you lose" screen.

Go back to the main timeline and name the healthbars instance name as "Health. Go into your enemy timeline and on the frame where his gun fires write the code:

tellTarget ("_parent.Health") { nextFrame (); }

This will tell the health bar to go to the next frame, lowering your health, if it reaches 0 it will make the main timeline go to the "you lose screen". Now go to the last frame of the enemy dying and write the code:

tellTarget ("_parent") { gotoAndPlay (2); }

This will make you go to the "win" screen if you shoot him.

Now for the custom cursor. Draw a crosshair and make it into a movie clip. Now paste it into the center of the first frame of your main timeline. In its actions write:

onClipEvent (enterFrame) { Mouse.hide(); } onClipEvent (load) { startDrag ("", true); }

This will hide the mouse and make the movie clip drag as if it was the cursor. The crosshair must be on a seperate layer above the enemy layer.

This is just the basics of a very simple shoot em up. In the next tutorial i will tell you how to add a lot more detail to the game. And just to make it seem even simpler to make i'll tell you that i am only 13 years old and i worked out the whole thing myself. There probably are better ways for the health bar and stuff but i'll leave that for the experts.

1

» Level Intermediate

Added: : 2003-06-05
Rating: 7.53 Votes: 230
Hits: 1258
» Author
Erm...
» Download
Download the files used in this tutorial.
Download (17 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