First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Luke Knepper | Website: http://zazeran.com

Final Touches

A little bit of code is needed to put the finishing touches on your game. Click on the hit area button and, in every keyframe, add this code:

on(release) { score=score+1; }

This makes it so that when you click on the button area the score is incremented by one. Also, not done by this code, when you click on the button area the picture you drew for when he gets hit will appear, if you chose to do that. Next, in one of the final frames of the enemy movie clip, it doesn't matter which layer since they all end at the same frame, insert the following code:

gotoAndPlay(2);

This will send the movie clip back to frame 2 when it reaches the end. If you didn't have this it would go back to frame 1 and then set score to zero every time. Now all you need to do is drag the enemy movie clip onto the stage in its own layer and you're done! You will have an animated sprite moving around the screen and whenever you shoot him you get plus 1 to your score. Of course, you can make this very complex with more guys, levels, and a nice background, but I'll leave that up to you. Hope that you have found this tutorial helpful!

Please send any feedback or suggestions or problems with the tutorial to luke@zazeran.com . Thanks!

» Level Basic

Added: 2006-07-05
Rating: 5.92 Votes: 84
(10 being the highest)
» Author
Luke Knepper only had two weeks of Flash experience when this tutorial was written, and figured most of it out through little bits and pieces from internet articles and the built in tutorial. His site, zazeran.com, is an online archive of games and programs and features Flash games.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • 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: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.