Copy link to clipboard
Copied
...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.
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;
}
Copy link to clipboard
Copied
canvas/html5 or otherwise?
Copy link to clipboard
Copied
sorry. canvas/html5.
Copy link to clipboard
Copied
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;
}
Copy link to clipboard
Copied
thanks kglad, that did it!
Copy link to clipboard
Copied
you're welcome.
Copy link to clipboard
Copied
Just wondering - how do you set the initial value of the box so it is not blank?
Copy link to clipboard
Copied
use the parameter's panel or edit the lib.an_ComboBox constructor in the js file.