A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How do I make a combo box into a jump menu?

  1. #1
    Join Date
    Feb 2002
    Indiana, USA

    How do I make a combo box into a jump menu?

    I have created several static combo boxes for a movie, but I want them to behave like Dreamweaver Jump Menus.

    In other words, when the selected option changes in a box, go to that option's URL (selection value).

    I realize that it probably involves an event handler, but I don't have one.

    Can anyone give me the right one or direct me to a tutorial, etc. ??

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Planet Earth
    When you put the combox on the stage and select it, you see it's options on the property inspector.

    The Label field will be what actually appears in the list.
    The Data field is what that Label refers, in your case the URL.
    Look there for the "Click Handler" field. That will be the name of a function (i usually place these in the first frame of the movie) that will do something someone makes a selection from the list.

    You use the getValue() method within you function to find what has been selected. you would need to put that into the getURL statement.

    so your function or Click handler which is on the first frame of the movie on its own layer looks like this:
    function chosenOption(component){
    	getURL(component.getValue(), _blank);
    If the first Label of the combobox is "monkey" and the first Data is "http://www.yahoo.com", selecting that option takes you to yahoo's web site.

    Got it?
    Thinking outside of the box will get you fired if the "box" is strict budget.

  3. #3
    Join Date
    Feb 2002
    Indiana, USA
    Amazingly simple, as predicted.

    THANK YOU !!

    Your explanation was clear, complete, and correct.

    You get a C3 (c cubed).

    Todd Callen

  4. #4
    Join Date
    Apr 2003
    Always from The Bronx

    Combo Box and URLs

    Wow...I've been workin and trying to learn this for months. If you take a look at my Web site you will see a combo box with a list but it doesn't take you anywhere. Now I know how to make things happen. I just found your post and I agree 100% with todd....your explanation was great. Thanks, and keep up the good work.
    Last edited by Ginns; 11-17-2006 at 05:04 PM. Reason: Spelling Error
    Lynx Airways Worldwide
    "Leading the way, while others merely follow."

    CEO Lynx Airways Worldwide

    Chief Executive Officer
    Special Operations Officer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center