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

Can't change fill color in shape nested in movie clip

Community Beginner ,
May 19, 2022 May 19, 2022

I'm trying to change the fill color of shape/symbol nested within a movieclip but I can't get the code referenced in in similar post on this forum to work. 

 

this.myMC.mySymbol.shape_1.graphics._fill.style = "rgb(20,22,36)";0);

 

Throws an error. What am I doing wrong. What would be the proper way to change the fill color of a symbol/button or movieclip?

74
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
Community Expert ,
May 19, 2022 May 19, 2022
LATEST

assuming the nested object is this.myMC.mySymbol.shape_1, use

 

this.myMC.mySymbol.shape_1.shape.graphics._fill.style = "rgb(20,22,36)";

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