Learn how to use Adobe Flash with all the free tutorials. Game Making, Animating, Cartoon Design, Web Design and much more...
How to make a 'scared ya' maze game
This video includes a section showing you how to add a 'scared ya' part, simply ignore this part if you want it just to be a normal game.
Making your first game
We will be making our first game in this tutorial. Even if you have no interest in making games with flash, I recommend that you take this tutorial as it will expand on your knowledge and skills in flash, this will help with your creativity just as much as making a mini movie.
Okay let’s start. This is going to be a very simple game as this is our very first tutorial on game making, but this will be good for your skills in using flash.
Rename layer 1 to score. This will be our score layer, every game needs a score.
Now insert another layer and name it actions. Insert one more layer and name it enemy. Ok, that is all the layers we will need for our first game. Let’s start with our score layer. Start by selecting the text tool, in the properties inspector, change the box that says static text to dynamic text, now draw out a text box that would hold about three digits. Make the text size about 70 to 80. Move the text box the top of the stage and position it in the centre. Now back in the properties inspector of the text box you will see a little box that says var, if you do not see this box, click on the little down arrow in the lower right and corner of the properties inspector. Now in the box where it says var, type in “score”, without the quotations.
This is so that we can communicate with this text box through AS2.
On the first and only frame of the actions layer right click and select actions.
Now on the first line type in:
var score = 0;
what this does it sets the score to zero, as we gave the text box a variable of score, flash knows that we want this to be set to zero, var is short for variable.
Now on the enemy layer draw out a circle or any simple shape, and convert it to a button, and name it enemy.
Now right click on the button and select actions, on the first line type in:
on (release) {
score += 1;
}
We already know what the on (release) means as it was discussed in a previous tutorial. score+=1; simple means when the button is clicked on the score is to go up by one. If we were to change the 1 to a 6 it would go up by 6. {} these simply define that these are the action to do when the button has been clicked on.
Now test the move, click on the button, each time you click on the button the score will go up by 1. Great work, you have made a 5 star game, should sell for millions. This is a very basic tutorial on game making, but further on, I will make more advanced tutorials for those of you who would be interested.
Now, although this tutorial was not important to all of you, it is still good to take it anyway, as I said, it introduces you to the different areas of flash, understanding this will help you greatly.
Next we will be making a timer that counts down form 10 to 0, when the timer reaches 0 it will go to the next frame and stop. This tutorial is not really important, but I would recommend taking it anyway, just to understand it a bit more. I want to introduce you to some very back AS2.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment