Flash Script – Popup Menu


type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/popup.swf'
width = '400'
height = '400'
bgcolor = 'black'
>

Creating a popup menu in Flash isn’t as difficult as it seems. Here, we’ll step through the process involved in creating yoru won Flash popup menu.

Note that this tutorial assumes you know how to create an Invisible button.

1. Create a button object. I called my button "menu".

2. Select the button object, press f8, and check radio movieclip to convert it to a movieclip. Name this movieclip "popup".

3. Now, go into the time line of the popup movieclip. Select the current layer, and name it "button".

4. Create two key frames in the button layer. Select the first key frame and insert:

stop ();

5. Select the second key frame and insert the same action:

stop ();

6. Now select the first key frame. Give this action to the menu button:

on (rollOver) 
{
gotoAndStop (2);
}

7. Lock the button layer.

8. Next, create a new layer above the button layer, and name it "popup".

9. Create a popup window, and create two key frames in this layer.

10. Now, select the first key frame in the popup layer and press delete. Then, lock the popup layer.

11. Create a new layer above the popup layer. Name it "invisiblebutton".

1188_1

12. Create an invisible button, then select the invisiblebutton layer and extend it two frames. Finally, insert the following aciton:

on (rollOver) 
{
gotoAndStop (1);
}

Once this is done, lock the layer.

That wraps up the basics! You can now go on to customize the popup window and include separate buttons as required. Good luck!

Download the sample files here.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://www.sitepoint.com/flash-script-popup-menu/ mallesh

    i nees to knowm thia