3 Replies Latest reply on Nov 22, 2009 10:32 AM by tylershep123

    Drop down box

    tylershep123

      hi i am currently trying to make a dropdown box and i can not get the combo box to work correctly so i want to try another item.

       

      I was wondering if there was a way that when i roll over a "button" that a box opens up with the other options to choose to navigate through.

       

      so in other words u roll over the button, the box drops down, and the other boxes or the text in the dropdown box is clickable. thank you for your time.

        • 1. Re: Drop down box
          harihisu Level 2

          Is this what you want?

           

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
               verticalGap="0"
               >
              <mx:AnimateProperty id="dropBox"
                   target="{dropDownBox}" property="height"
                   toValue="50" duration="500"
                   />
              <mx:LinkButton
                   label="Drop down Button"
                   width="150"
                   rollOver="dropBox.play();"
                   />
              <mx:VBox id="dropDownBox"
                   verticalScrollPolicy="off"
                   horizontalAlign="left" verticalAlign="bottom"
                   backgroundColor="white"
                   width="150" height="0" 
                   >
                   <mx:LinkButton label="Button 1"     />
                   <mx:LinkButton label="Button 2"     />
              </mx:VBox>
          </mx:Application>
          
          • 2. Re: Drop down box
            Subeesh Arakkan Level 4

            Hi,

             

            You can use the open() method of the combobox to open it explicitly on roll over

             

            <mx:ComboBox id="combobox" mouseOver="combobox.open()"/>.

            • 3. Re: Drop down box
              tylershep123 Level 1

              THE CODE WORKED!