Skip to main content
Known Participant
October 10, 2017
Answered

How do you use the combobox component to...

  • October 10, 2017
  • 1 reply
  • 1797 views

...jump to frame labels based on what the user selects in the combobox dropdown component.

Found the "combobox selection change event" code snippet but am at a loss with what to put inside the brackets.

Also, I'm noticing a weird quirk with the combox on the stage.  When I first select a value, it works fine, drops down like you'd expect.   However when I select any value other than the top one, the combobox with drop up, meaning that the options will open up above the combobox.  Not sure if this is a bug or if I'm missing something. here.

    This topic has been closed for replies.
    Correct answer kglad

    if your combobox is 'cb' and your cb has values that are frame numbers (first frame is 0) or frame labels, use:

    if(!this.cb_change_cbk) {

        function cb_change(evt) {

           

    this.gotoAndStop(evt.target.value);

           

        }

        $("#dom_overlay_container").on("change", "#cb", cb_change.bind(this));

        this.cb_change_cbk = true;

    }

    1 reply

    kglad
    Community Expert
    Community Expert
    October 10, 2017

    canvas/html5 or otherwise?

    Known Participant
    October 10, 2017

    sorry.  canvas/html5.

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    October 10, 2017

    if your combobox is 'cb' and your cb has values that are frame numbers (first frame is 0) or frame labels, use:

    if(!this.cb_change_cbk) {

        function cb_change(evt) {

           

    this.gotoAndStop(evt.target.value);

           

        }

        $("#dom_overlay_container").on("change", "#cb", cb_change.bind(this));

        this.cb_change_cbk = true;

    }