3 Replies Latest reply on Oct 19, 2010 5:41 AM by Ned Murphy

    Combo Box


      Is there a way to set up a combo box so when an item is chosen then criteria for that item is displayed in other boxes.  I am trying to make a fillable form.

        • 1. Re: Combo Box
          Ned Murphy Adobe Community Professional & MVP

          Yes, when an item is selected in a ComboBox, you can detect that a selection was made and what was selected, and then do whatever else to other data display objects that you need.  Look in the Flash help documentation for the 'change' event to see how to detect when a selection is made/changed, and then look at the selectedIndex and/or selectedItem properties to see how to dtermine what was selected.

          • 2. Re: Combo Box
            PNWTC Level 1

            Thanks for the responce, however I didn't find anything.  This is what I'm trying to do:

            Use a Combo Box to Pre-populate Form Fields

            • 3. Re: Combo Box
              Ned Murphy Adobe Community Professional & MVP

              I realize what you are trying to do.  I am really curious where you looked that you did not find anything.  The Flash help documents identify all of the properties, methods, and events associated with every class, including components such as the ComboBox.   Learning to use the help documents is one of the most useful things to pursue, before actually programming anything.


              Here's is an example copied directly from them in the section that discusses the change event I indicated you should look into...


              var listenerObject:Object = new Object();
              listenerObject.change = function(eventObject:Object) {
                  // Your code here.
              comboBoxInstance.addEventListener("change", listenerObject)


              And where it says "// Your code here." is where you would make use of the comboBoxInstance.selectedIndex or selectedItem property to determine which selection was made which you could use to determine which values to assign to the other fields.

              1 person found this helpful