Thursday, 28 May 2009

Scary maze game

This Flash tutorial will teach you how to create a scary maze game in Flash. A scary maze game is basically a maze where an image and sound effect is played at the end of the game. This scares the players as they are expecting another level in the game, but instead receive a scare. An example of a scary maze game can be found at: www.maniacworld.com/maze_game.htm

The tutorial is split into three sections. The first section creates the instructions; the second section creates the maze and the final section adds the scary image and the sound effects to the game.

I have used a free stock image of a scary face which is available from: everystockphoto.com and have also used a screaming sound effect which is available from: sounddogs.com. Some knowledge of basic buttons and custom cursors are need for this tutorial.

UPDATE: Actionscript 3 version now available here.

Scary maze game

Step 1 – Instructions

Open a new Flash document with 400 width and 300 height. Change the background colour to #00CCFF.

On the timeline right click on the first frame and select Actions and add the following code:

Stop();
Mouse.show();

**Only add the Mouse.show() if you intend to use a custom cursor for your game.


Step 2

Select the text tool (T) and type your instructional message on the stage. I have typed the following message below using Myriad Pro Cond font type, but you can type whatever message or font type you wish.



**For the heading I have used a double knocked out text effect using different colours for each glow filter, which gives a blood like effect.


Step 3

Create a button on the stage with the message “play” like below:



For more information on buttons checkout the basic buttons tutorial. Now right click on your button and select Actions and add the following code:

on(release){
gotoAndStop(“Scene 2”, 1)
}

**This code will stops at frame 1 on the second scene when the button is released.


Step 4

Insert a new scene by selecting Window > Other Panels > Scene or (Shift + F2).
Click the black plus sign to add a new scene and make sure the new scene is below current scene.



On the timeline right click on the 1st frame, select Actions and add the following code:

Stop();


Step 5 – Create the maze

Take the rectangle tool (R) and create a maze pattern on the stage like below.
Firstly, you need to create a large rectangle that fills the whole area of the stage. Then you create smaller rectangles on top of large rectangle.
You then delete the smaller rectangles to leave the areas visible underneath the large rectangle.



Here are a few points to note:
• Addition messages on the stage will help the player understand how to play.
• Make the maze pattern increasingly narrow towards the ends of the maze.
• Towards the end of the maze remember to leave enough room for your cursor.
• Try to keep the pattern simple, as making it too complicated will take you longer to complete.
• Keep the colour of maze consistent.


Step 6

Choose the selection tool (V) and select the whole maze. Convert your maze into a symbol by pressing F8. Give your symbol an appropriate name, check button and click ok.

Now right click on your newly created button and select Actions. Add the following code:

on(rollOver){
gotoAndStop(“Scene 1”,1)
}

** This code returns the player to the first scene when the mouse touches the maze areas.


Step 7

On the timeline insert a new layer. Select the brush tool with an appropriate brush size and make one brush point at the end of maze. This is area where the player has to reach on the maze. Your stage should look something like below:



Select the brush point and convert it into a symbol by pressing F8. Give your symbol an appropriate name, check button and click ok.

Now right click on your button and select Actions. Add the following code:

on(rollOver){
gotoAndPlay(“Scene 3”,1)
}

** This code sends the player the next scene when the mouse touches the red area.


Step 8 – optional

In this step you create a custom cursor object. For more information checkout the custom cursor tutorial. I have created basic rectangular custom cursor, but you can create whatever kind of cursor you wish.


Step 9 - Scary image & sound effects

Insert a new scene by selecting Window > Other Panels > Scene or (Shift + F2).
Click the black plus sign to add a new scene and make sure the new scene is below scene 2.

On the timeline right click on the 1st frame, select Actions and add the following code:

Stop();


Step 10

Import your scary image and sound effect into the library by selecting File > Import > Import to library select your files and click ok.

On the timeline rename “Layer 1” to “Image” and insert a frame (F5) at frame 40. Drag your scary image onto the stage and make sure it lines up correctly within the stage boundaries.

Now insert a new layer on the timeline called “sounds” and drag your sound file from the library onto the stage. Your timeline should look something like below:




Step 11

On the timeline insert a new layer called “button” and drag it above the “sounds” layer. Insert a key frame (F6) at frame 40. Create a button on the stage with the message “play again?”

Right click on the button and select Actions and add the following code:

on(release){
gotoAndStop(“Scene 1”,1)
}

**This code returns the player to the instructions pages when the button is clicked.


Step 12

Insert a new layer called “actions” and drag it above the “buttons” layer. Insert a key frame (F6) at frame 40. Right click on the 40 frame, select Actions and add the following code:

Stop();
Mouse.show();

**Only add the Mouse.show() if you intend to use a custom cursor.

Your timeline should look like below:




Step 13

Test the game Ctrl + Enter.



You should now have a scary maze game. Feel free to contact me for any questions or comments and remember to subscribe. Why not take a look at the magic 8 ball tutorial ?

Wednesday, 27 May 2009

Double knocked out text effect

This is an update tutorial from the previous knocked out text effect. In this tutorial I will be doubling the knocked out effect. This means instead of having a single outline around the text there will be a double outline. This technique can also be used to triple or even quadruple the effect. The major steps in this tutorial are similar to the previous knocked out text effect.

Double knocked out text effect

Step 1

Open a new Flash document.
Select the text tool and type your message on the stage. I have used Myriad Pro bold font type with black colour, but you can use whatever font you wish.




Step 2

Select your text message using the selection tool (V).
Now select the Filters tab at the bottom the screen and add a glow filter by clicking the little blue plus sign.
Add the following settings below:



*I have checked the knocked out, change the colour to black and given the strength 1000%.


Step 3

Add another glow filter by clicking the blue plus sign again and add the following setting below:



* I have checked the knocked out, change the colour to black and given the strength 400%.


Step 4

Test your movie clip Ctrl + Enter. You can keep adding glow filters to add an addition knocked out effect to your text, if you wish.



You should now have double knocked out text effect. Feel free to contact me for any questions or comments and remember to subscribe.

Why not checkout some of the other text effect like Gun Shot text effect or Cinema style text effect ?

Saturday, 23 May 2009

Zoom horizontal navigation

This Flash tutorial will teach you how to create a horizontal navigation bar with a zoom effect on the menu items. When the user clicks on a menu items the text will zoom in, before displaying the navigational page. Some knowledge of basic buttons and opening urls will be needed for this tutorial.

Zoom horizontal navigation

Step 1


Open a new Flash document with an appropriate stage size. I have used a 400 width by 100 height stage size with a black background colour.

Select the rectangle tool with #666666 colour and no stroke. Draw a rectangle shape on the stage like below:




Step 2

Convert your rectangle into a symbol by selecting F8. Give your symbol the name “menu bar”, check movie clip, centre the registration point and click ok.




Step 3

ouble click on the rectangle to enter the rectangle’s timeline. On the timeline change layer1 name to “menu bar” and lock the layer. Then insert a new layer called “buttons” above the menu bar layer. Your timeline should look like below:




Step 4

Select the text tool (t) and type the name of your first menu item. I have used the Myriad Pro font type with white colour, but you can use whatever colour and font you wish.

Convert your text message into a symbol by pressing F8. Give your symbol the name “item 1 button”, check button, centre the registration point and click ok.

Now convert button into symbol by pressing F8. Give your symbol the name “item 1 movie clip”, check movie clip, centre the registration point and click ok. I have also added a glow filter to the movie clip to give a black outline around the text. You can also add a knocked out text effect on the movie clip if you wish. You should now have button inside a movie clip which is inside a movie clip.

Repeat this step for the number of menu items you wish. And your menu bar should look something like below:




Step 5

Double click on your first movie clip (text message) to enter the movie clip’s timeline. Now insert a keyframe (F6) at frame 20 then return to the 10th frame and insert a keyframe (F6).

On the 10th key frame, select the Free Transform Tool (Q) and hold down the shift key and drag one of the corner handles, so that the text is slightly larger.



Now right click anywhere in between the 1st and 10th frame and select Motion tween then repeat this for the 10th and 20th frames.

Select the 10th frame using the Selection Tool (V), then selects the text on the stage and change the colour properties to Alpha and at 0%.

On the timeline insert a new layer called “actions” right click on the first frame and select Actions and add the following code:

stop();

Now insert a key frame (F6) at frame 20 right click on the frame and select Actions and add the following code:

stop();
getURL("http://www.ilike2flash.com","_blank");

**For more information on getURL checkout the open url tutorial. The code above basically stops at the 20th frame and displays the web page.

Return to the menu bar timeline and repeat this step for all the buttons you have. Your timeline should look something like below:



Step 6

Right click on each button in turn and add the following code:

on(release){
gotoAndPlay(2);
}


Step 7

Test your movie clip Ctrl + enter. Use your mouse to click each button.



You should now have a zoom horizontal navigation.Feel free to contact me for any questions or comments and remember to subscribe.

Tuesday, 19 May 2009

Drop down menu

This Flash tutorial will teach you how to create a basic drop down menu. A drop down is simply a menu of options that appear below the menu title. The menu of options will only be visible when the user mouses over the menu title, and the options are displayed below the menu title.

You will need some basic knowledge of buttons for this tutorial. Also a few lines of Actionscript will also be required.


Drop down menu


Step 1

Open a new Flash document with an appropriate stage size.
Create a menu title button. I have created a basic rectangle shape with #0033FF colour. The text I have used is Franklin Gothic Medium with #66FFFF colour, but you can use whatever colour and font you wish.

Photobucket


Step 2

Convert your button into a symbol by pressing F8. Give your symbol an appropriate name, check button and click ok.

Now double click on your new button and change the over, down and hit states. For more information on buttons checkout the basic buttons tutorials. Of course, you could alternatively not change the states of the buttons. You could simply leave the buttons as they are and move onto the next step.

Photobucket

Return to the main by double clicking anywhere on the stage.


Step 3

On the library panel (F11) at the right side of the screen, right click on your button and select Duplicate. A duplicate symbol window should appear, change the name to “Menu item 1” and ensure the button type is checked and click ok.

Photobucket

Still on the library panel double click on the new button (Menu item 1). Change the text in the up, over, down and hit states to an appropriate name. Then return to the main timeline by selecting the back button.

Now repeat step 3 for the number of menu options you wish. Make sure you change the names of the duplicate symbol to “Menu item 2, Menu item 3, Menu item 4” respectively.


Step 4

Return to the main timeline and convert your button (menu title) into a symbol by pressing F8. Give your symbol an appropriate name, select Movie clip as the type and click ok. You should now have a button inside a movie clip.


Step 5

Double click on your newly created movie clip to enter the timeline. Change the “layer1” name to “top”. Insert a new layer called “item 1” and drag it below the “top” layer. Repeat this for the number of menu items you have.

On the “top” layer insert a frame (F5) on frame 5. Now for each menu items you have on the timeline insert a keyframe (F6) on frame 5.

Now insert new a layer called “actions” and drag it above your “top” layer. On the 5th frame insert a new keyframe (F6). Right click on the 1st frame and then the 5th frame, select Actions and add the following:

Stop();


You timeline should look something like below:

Photobucket


Step 6

Now on frame 5 of each menu item layer drag your buttons from the library onto the stage, so each button will be on a separate layer. Make sure the buttons are directly underneath each other and aligned correctly. You stage should look like below:

Photobucket

And your timeline should look like below:

Photobucket

Step 7

Return to the main timeline and right click on the movie clip and select Actions and add the following code:

1. on (rollOver) {
2. gotoAndPlay(5);
3. }
4. on (rollOut) {
5. gotoAndStop(1);
6. }

**Line 1-3: When the user mouses over the movie clip, it will go to frame 5 where the menu items can be seen.

Line 4-6: When the user mouse is not over the movie clip, the menu items will return to frame 1 and will not be seen.


Step 8

Test your movie clip Ctrl + enter.



You should now have a drop down menu. Feel free to contact me for any questions or comments and remember to subscribe.

Saturday, 9 May 2009

Circular transition effect

This Flash tutorial will teach you how to create a circular mask transition effect. This will gives the effect of images merging into each other. This tutorial uses shape tweens and mask layers, so no actionscript will be required for this tutorial. I have used three images for this transition effect, but you can use as many image as you like.

Circular transition effect

Step 1

Open a new Flash document.
Import your images into the library by selecting File > Import > Import to library. Select your images then click ok. I have imported three images for this effect, but you can add more images if you wish.

**Make sure all your images are the same size.


Step 2

On the timeline rename your layer 1 to “Image 1” and change the stage dimensions to the same size as your image. To find out the dimension of the image, simple click the image using the selection tool and notice your sizes at the bottom of the screen.

Photobucket

Select Modify > Document (Ctrl + J) and change the sizes according and then click ok.


Step 3

On the timeline insert at frame (F5) at frame 25 and then insert a new layer called “cmask”.

Photobucket


Step 4

Still on the cmask layer, select the oval tool and drag a small oval shape on the right hand size above the image, like below:




**The colour of the oval does not matter, as this will become the masked layer. Also make sure the oval does not touch the image.


Step 5

On the timeline select the 20th frame and insert a Key frame (F6).
Select the free transform tool (Q) and then hold down shift key and drag your oval until it fills up the whole of your image, like below:

Photobucket


Step 6

On the timeline, select anywhere in between the 1st and 20th frame and insert a shape tween.

Now right click on the “cmask” layer name on the timeline and select Mask from the drop down menu. Your timeline should look like below:

Photobucket


Step 7

On the timeline, insert a new layer called “image 2” and drag it above the “cmask” layer. Then select the 25th frame and insert a key frame (F6) and then select the 50th frame and insert a frame (F5).

Drag your second image from the library on the stage. Make sure your image is within the 25th to 50th frame. Insert a new layer called “cmask2” and make sure it is above the “image2” layer. Then select the 25th frame and insert a key frame (F6).

Now copy and paste the shape tween from the 1st to 20th frame on the “cmask” layer to the “cmask2” layer on the 25th frame.
Right click on the “cmask2” layer name on the timeline and select Mask from the drop down menu.


Step 8

Test your movie clip Ctrl + Enter. If you need to add more images then repeat step 7.



You should now have a nice circle mask transition.
Why not checkout the Fade transtion effect or Image transition effect?
Feel free to contact me for any questions or comments.

  COPYRIGHT © 2011 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP