A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: combobox same value

  1. #1
    Senior Member
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    326

    combobox same value

    I can use this to trace the new combobox value every time the user changes it:
    Actionscript Code:
    // Create listener object.
    var cbListener:Object = new Object();
    // Create event handler function.
    cbListener.change = function (evt_obj:Object) {
     trace("Currently selected item is: " + evt_obj.target.selectedItem.label);
    }
    // Add event listener.
    my_cb.addEventListener("change", cbListener);

    But that doesn't do anything when I select the same value. This is what I want it to do: when using the combobox some textfields should fill itself with some default values belonging to that label. Then the user can change those values if desired. When the user then chooses another combobox label the fields get filled with the default values of that label again. But when the user chooses the label previously set, the textfields don't get refilled, cause the listener object only reacts when the label value has been changed, not when the label value is the same as previously chosen. Is there a way to make it react upon chosing any label? Not just others, but every label?

    Illustration | Animation | Web Banners | Graphic Design
    Ducklord Studio

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    maybe try using the: ComboBox.close

    method..and see if you can use that to check for the same/current value that is selected?
    and then do something accordingly..

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