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

change symbol background color

Explorer ,
Oct 31, 2017 Oct 31, 2017

Copy link to clipboard

Copied

Hello,

Can you set the properties of a symbol by doing this hot_btn2.backgroundColor ="#FF9900"?

or are symbols created using a static string?

this.shape_1.graphics.f("#00FFFF").s().p("AhSBTQgjgiAAgxQAAgvAjgjQAigjAwABQAwgBAjAjQAjAjgBAvQABAxgjAiQgjAjgwAAQgwAAgigjg");

It would be nice if I could the name of the symbol.

Thank you,

Charles

Views

420

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 31, 2017 Oct 31, 2017

it's not efficient but you can use the filters property of you symbol to assign a color filter:

this.hot_btn2.filters=[new createjs.ColorFilter(0,0,0,1,0,0,255,0)];

this.hot_btn2.cache(0,0,this_etc.nominalBounds.width,this_etc.nominalBounds.height);

better would be to create a movieclip button and use multiple frames on its timeline to display the various colors you want and use gotoAndStop in your code to control which frame/color is displayed.

Votes

Translate

Translate
Community Expert ,
Oct 31, 2017 Oct 31, 2017

Copy link to clipboard

Copied

LATEST

it's not efficient but you can use the filters property of you symbol to assign a color filter:

this.hot_btn2.filters=[new createjs.ColorFilter(0,0,0,1,0,0,255,0)];

this.hot_btn2.cache(0,0,this_etc.nominalBounds.width,this_etc.nominalBounds.height);

better would be to create a movieclip button and use multiple frames on its timeline to display the various colors you want and use gotoAndStop in your code to control which frame/color is displayed.

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