I have a fla. file of a drop-down menu that operates very well, but I don't know how to change the code to make it perform a specific task when an item from the menu is clicked.
I simply want the drop-down menu to list the scenes of a flash project (e.g. "Scene 1, Scene 2, Scene 3, …) and by clicking on a scene from the menu it would take me to that specific scene.
I have a flash project with a large number of scenes and I have been able to create "next" and "previous" buttons that takes me from scene to scene using the code:
button1.addEventListener(MouseEvent.MOUSE_DOWN, chngscene);
function chngscene(event:MouseEvent):void {
gotoAndStop(1, "Scene 2");
}
,but it would be very nice if I can use this drop-down menu in my project.
Heres the link to download the fla. file along with the action script class files and swf. file.
http://www.mediafire.com/?3ukaz7uy7hhvnkb
I would appreciate any help.
You should be able to use the CHANGE event of the drop down to trigger a function like the one you show. Inside that function, instead of having "Scene 2" you would replace it with something like... dropdownName.selectedItem.label