Groups | Blog | Home
all groups > flash actionscript > january 2006 >

flash actionscript : Button Component Color


datasix
1/20/2006 6:15:36 PM
I'm going through a slightly old book that uses the following to change the
color. The following is the global settings they use in the book. The ".face"
property I believe is the one that should change the color of the buttons in
the version they use.

// component colors
globalStyleFormat.face = 0xFF6600;
globalStyleFormat.darkshadow = 0x000000;
globalStyleFormat.highlight = 0xCC0000;
globalStyleFormat.highlight3D = 0xFFC055;
globalStyleFormat.shadow = 0xCC0000;
globalStyleFormat.selection = 0xFF9933;


I'm using mx2004, and after reading through the help, I saw the
"_global..style" way of doing the above.

I've tried using

_global.style.setStyle("backgroundColor", 0xFF6600);
_global.style.setStyle("buttonColor", 0xFF6600);

//and a number of other options

None of these change the color of the buttons.

How do I do this?
datasix
1/21/2006 12:46:40 PM
NSurveyor
1/21/2006 1:27:44 PM
The code you have at the top is Flash MX code. Check out:

http://livedocs.macromedia.com/flash/8/main/00003118.html

and

datasix
1/22/2006 4:32:50 PM
Thanks for the reply.I haven't been able to find a simple way of changing the
color, like what was possible with the globalStyleFormat's ".face" property
that was apparently available in previous versions.

It seems I'd have to do something more involved to get the color to change
which I'm not up for doing at this stage. Perhaps when I'm further along.

Thanks again.
AddThis Social Bookmark Button