spacer
Web Development Tutorials FLASH Tutorials
 Developer Newsletter

Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous


Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Developer Manuals
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
Free White Papers

Developer Resources
Developer Tools
Developer Content
Survey Software
Dedicated Servers




Dropdown Menu in Flash MX 2004

By Oleg Lazarenko
2005-04-13


Flash MX 2004 Dropdown Menus

Before using this tutorial it is strongly recommended to read "Creating basic buttons in Flash MX 2004" lesson as many things about buttons in this tutorial are not explained as good as they explained there.

a. Launch Flash MX 2004

b. Create new Flash file. Click File > New...


c. Select Flash Document in a new window


d. With the "Rectangle Tool" draw a simple shape

e. Click with a left mouse button on the shape to select it then click the right mouse button to open a menu. Select "Convert to Symbol" option


f. Convert it to Movie Clip and name it "button"


Double click the "button" movie to enter it. Convert first layer to button. (see "Creating basic buttons in Flash MX 2004"). Rename first layer "Layer 1" to "Menu" and create 2 keyframes of that layer.



g. Add another blank layer and call it "rollout". Create 2 blank keyframes in that layer. Important Note! The layer called "rollout" MUST be under the "menu" layer!


h. Select the second frame of the "menu" layer and draw a couple of other rectangle buttons using different colors. Set "Hit" area to the button size and "Over" frame so that on rollover buttons changed color.


i. Select the second frame of the "rollout" layer and draw the rectangle shape. Note the shape must be bigger then anything drawn in the second frame of "menu" layer. Color of the shape does not matter.


j. Now convert shape from the second frame of "rollout" movie to button and then make only keyframe in the "Hit" area and delete the rest from the button. We need to get invisible button after that. The purpose of such buttons is that we can treat it as a button but it will not be visible to users.


k. We are done with the drawings. The only thing left is to put some ActionScript coding. Select the first frame of the "menu" movie and add the following line in "Actions Panel"
stop();


l. Select a button from the first frame of the "menu" movie and write this code:
on (rollOver) {
gotoAndStop(2);
}



m. Select an invisible button from the second frame of “rollout” layer and add ActionScript code:
on (rollOver) {
gotoAndStop(1);
}


Now the dropdown menu is ready to use. Press "Ctrl+Enter" and enjoy the dropdown menu you just created.

Click here to download source fla file.

Tutorial Pages:
» Flash MX 2004 Dropdown Menus


 | Bookmark Print |   Write For Us
Related Tutorials:
» Flash Race Car Tutorial
» Flash Momentum Tutorial
» Customized Cursor in Flash MX 2004
» How to Change the Movie Visibility Using Action Script in Flash MX 2004
» Changing Colors for the Flash Movie in Flash MX 2004
» Using Symbols in Flash



About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: