First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Jesse

Note: If you are reading this, you probably should have read my other tutorial, making a cool multi-level game. OK, first thing's first. Open a new Flash document and create a movie clip called character and draw a person on a scooter.(Don't put the clip on the stage, though.) Then, make another movie clip(not on the stage) and call it energy. Draw a red rectangle. Then make a movie clip called ready and make an animation saying "READY, SET, GO!" Then, type the following code in the last frame, and remove all of the graphics:

 _root.inPlay = true

Now make a movie clip called gameOver. Draw a rectangle and make a text field saying "GAME OVER! PLAY AGAIN?" Now make a text field saying "Type in password:" Then make an input text field with a variable name of passwordText. Finally, make a movie clip called wrongPassword and a movie clip called ok. In the ok movie clip, put in a red circle and a text field saying ok. Put a rectangle with a text field saying "WRONG PASSWORD" in the wrongPassword movie clip, and then put in the ok movie clip and in the actions panel, type in the following script:

	_parent._visible = false

This code just makes the wrongPassword movie clip invisible when you press the ok button. Put these in the gameOver movie clip. Give the wrongPassword clip an instance name of wrongPassword. Go to the actions panel for the gameOver movie clip(The first frame) and type in the following script:

wrongPassword._visible = false

After you've done that, go to the actions panel for the ok movie clip and type in the following script:

	for(a=1; a<=_root.passwords.length; ++a){
		if(_parent.passwordText!=undefined && _parent.passwordText!=””){
				_root.level = a-1
				_parent._visible = false
			} else {
				_parent.wrongPassword._visible = true
		} else {
			_root.level = 0
			_parent._visible = false
» Level Intermediate

Added: 2004-12-29
Rating: 6 Votes: 14
(10 being the highest)
» Author
I love making flash games but it's really annoying when Flash doesn't work!
» 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.