A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How can I use a combo box as navigation, similar to

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    20
    I'm trying to use a combo box within the mx components to create a single navigation element. Similar to the use of the form element in HTML. I tried to play with a change handler, but I'm not having any luck.

    How can I do this? What is the AS syntax?

    Thank You for your help.

  2. #2
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Hi,

    Are you wanting to do something when an item is selected from the combo box or ..

    not quite sure

    Chi

  3. #3
    Junior Member
    Join Date
    Mar 2000
    Posts
    20
    Yes, I want to be able to select something from the combo box and when the item is selected I want an action to start. Something like gotoAndStop(3) or loadMovie ... or whatever is tied to the item in the combo box list.

    Thank you for your quick response!

  4. #4
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Okie doke

    Say your combo box was called myCombo, it has two options, namely One and Two, and they have that value. If you make a function

    Code:
    function onComboChange() {
      selected = myCombo.getValue();
      switch(selected) {
        case "One":
          //do some code as One has been chosen
          break;
        case "Two":
          //do some code because Two has been chosen
          break;
      }
    }
    Then you just have to put onComboChange as your Change Handler

    Chi

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