Yesterday I was looking for a simple DropDown menu in Actionscript 3.0, but all I found was either made more complex than it needs to be or a 45 minute tutorial including the explanation on how to start up your computer. So I made my own. Just 40 lines of code and that is including the rollover effect.
Simply insert your menu items in the Array. The variable selecteditem will return the selection the user made, so you can use it to work with.
For example create a function that goes to different pages when a selection is made.
If you want to make a new and fancy design make sure to leave the object in place as the AS refers to them ( Textfields have to be named, and the main menu button as well)
Download .fla
Cool,thanks. I felt just like you did – everything I saw was way too complicated (this pointers and the like) or went heavily into sub-menus which I didn’t need.
This is perfect for my needs. Thanks very much.
Worked perfectly after I embedded the fonts. I’m going to incorporate it into an already existing program that reads all the data in from XML. So I will use your code to make a dynamic pop-up menu based on the XML supplied.
of course i meant drop-down, not pop-up
Thanks for the comment, great it was useful to you!
Trackback…
[...]take the time to read or visit the blogs we have linked to after the[...]…