• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do you use the combobox component to...

Explorer ,
Oct 10, 2017 Oct 10, 2017

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.

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 10, 2017 Oct 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;

}

Votes

Translate

Translate
Community Expert ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

canvas/html5 or otherwise?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

sorry.  canvas/html5.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 10, 2017 Oct 10, 2017

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;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

thanks kglad, that did it!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

Just wondering - how do you set the initial value of the box so it is not blank?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2019 Apr 06, 2019

Copy link to clipboard

Copied

LATEST

use the parameter's panel or edit the lib.an_ComboBox constructor in the js file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines