A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11256 Flash Movies | 9 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Marcel Touma |
» Title: Rotating Globe with 3kb
» Description: This is a rotating globe made without any 3D element. It was made using only 2D ones.
» More by Marcel Touma |


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

Featured Site

» Posted in the Flash Kit Links section
» Title: AldoDesign
» Comments: AldoDesign : Abelleira Interactive


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

» FLV Trimmer for mac - trim any clip from the original flv video
» Make a YouTube Love Story with photo and videos
» FLV Converter for Mac
» After Effects Quality Effect using AS3
» FLV to 3GP: Convert video files from FLV (Flash Video) to 3GP for Mac
» create Christmas business flash presentation with hyperlinks
» Let Photos Show Your Happy Family this Christmas and Upload YouTube
» PowerPoint show to DVD slide show--- PPS to DVD
» How to burn FLV to DVD for Mac
» Unknown Tag: Title10
Random Tutorial | Add Site

bbm.netBBM.net is designed to save you time and deliver the highest quality royalty-free music for your multimedia projects. Features include: over 450 Music Loop Packages from some of the best composers in the business, our music search engine to speed your selection process, alternate music versions & bonus sounds to use for rollovers or transitions, free technical support and free consulting.

Click here for details »

Web Content Coordinator
Jewelers of America
US-NY-New york

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.72 Votes: 215
Hits: 1257
» 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.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

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