Skip navigation
edmikey
Currently Being Moderated

Need help assigning specific task to drop-down menu

Jul 11, 2012 10:37 AM

Tags: #drop #flash #files #swf #down #menu #dropdown #actionscript #project

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.

 
Replies
  • Currently Being Moderated
    Jul 11, 2012 11:55 AM   in reply to edmikey

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points