First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Ken Perletti | Website: http://n/a
I will give you the code for certain aspects of the game, and let you with your creative mind to use the code to create your own unique game.. First OFF- Making the mouse something besides its default in your movie: Make the movie clip for your new mouse, probably a target in this case, and add this code too it: [very useful code] onClipEvent (enterFrame) { Mouse.hide(); } onClipEvent (load) { startDrag("", true); } Now with the mouse being your target; the idea is to make what you are trying to hit and destroy into a button which has actions attached to it... so for example create a box as a button and add the following action: on(release){ _visible=false } ~now test the movie.. you shoot the box and it dissapears.. that's the basic stuff... SCORING: make a text box... and change it to "dynamic text" in the properties tab... below that you can put the name "score"... now on the first frame of your movie(you should only have one frame at this point)apply the code~ score = 0 now go back to the box you created and add the code inside the brackets~ {} of the on(release) command: score +=10, it should look like this now: on(release){ _visible=false score+=10 } *test* the movie now and you should notice that shooting the box makes it go away and gives you 10 points for a score... You can use the same technique for life and use the same idea for a time limit to your game... you're ready now, remember to play around with code and use buttons for targets and movie clips for anything else that needs multiple frames and or actions... one last thing to add sound to a shot you need to find a gunfire sound file on your computer and import it into your library; shortcut(F11); when you create your box button on the third frame of that button go to sound in the properties tab and click on the gunfire file... and you have it.. to make a sound on a miss make a movie clip to cover your whole background and do the same thing, except for this button make the alpha = 0, which you'll find in the properties tab....
» Level Intermediate

Added: 2005-06-08
Rating: 3.89 Votes: 28
(10 being the highest)
» Author
I am 18.. and going on to college to become an engineer or something of the sort...
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.