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

change symbol background color

Participant ,
Oct 31, 2017 Oct 31, 2017

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

459
Translate
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.

Translate
Community Expert ,
Oct 31, 2017 Oct 31, 2017
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.

Translate
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