2 Replies Latest reply on Oct 23, 2011 9:54 PM by ksequen

    unselecting Data List in custom component

    janazdislava

      Hi,

      I am trying to make a dropdown menu.  I've followed instructions here: http://cookbooks.adobe.com/post_Creating_a_custom_combobox_component_using_Flash_C-17234.h tml and it works well but there is a problem.

       

      Here's what I did.

      Created a custom component with 2 parts.  Toggle Button and Datalist.  then I set up the states appropriately.  When I select a specific item on the datalist, I go to a different screen state but I share that button across the states (it's basically a menu option).  That part works great.

       

      Here's my problem:

      On my datalist, I have a "on select" event which takes me to the right screen state.  However, When I come back to that component, the datalist still has that item selected.

       

      Is there a way to "deselect" something on the datalist when I move from one state to another?  Or to force the selectedIndex to be -1 whenever the datalist appears?

       

      Thanks!

      - Jana