Skip to main content
Inspiring
April 20, 2011
Question

Button Color

  • April 20, 2011
  • 1 reply
  • 468 views

I need to chnage all the button colours using actionscript. So I tried the follwoing. Created a movieclip inside the button called "insideBtn_mc". Then I useed the follwoing code. But that was not successful.

var colorful = new Color ("insideBtn_mc");

colorful.setRGB(0xc1c1c1);

Basically I need a way to change the button colors using actionscript.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 20, 2011

if you're using a true button (as opposed to a movieclip button), you can't easily reference any of its children.

to remedy, use a movieclip button.  if you're using a movieclip button, you probably have a path problem.

Inspiring
April 21, 2011

Thanks Kglad. Any suggestions in getting this to work?

kglad
Community Expert
Community Expert
April 21, 2011

use a movieclip button