View Full Version : Button Component Colour
Nick Toye
02-17-2004, 02:51 PM
Hi all,
I want to know if it is possible to change the overstate of this component button. I can't seem to be able to edit it. I have attached a copy of the file.
It currently changes to green I want it to go another colour.
Many thanks in advance
Nick Toye
02-20-2004, 08:36 AM
Just like to say thanks again for the many people who viewed this thread (over 40), but could not even offer a clue of help. Surely components are customisable, even to colour, I can't believe no one knows how to achieve this.
annexion
02-20-2004, 07:31 PM
buttonName.setStyle("themeColor","haloBlue");
You can also use hexidecimal color values in place of the haloBlue. Such as:
buttonName.setStyle("themeColor","0x6666ff");
You could also set the theme color on a global scale:
_global.style.setStyle("themeColor","0x6666ff");
Keep in mind that other people are learning this stuff too. This is a community of people just like yourself. For you to EXPECT an answer is preposterous. There are two things you're failing to realize. 1: People don't have to answer your question. If they do it's because they're being kind. 2: Even if they are nice enough to answer it doesn't mean they KNOW the answer. For as adamant as you are about getting an answer you could've gotten the answer yourself by looking at the documentation. It's right there under the component section.
Nick Toye
02-21-2004, 04:35 AM
Alrighty, its just like real life, thanks for the reply, sincerely, I am grateful.
timothye
02-23-2004, 02:30 AM
here it is as the guy said above ,in the help files ..
Setting styles on a component instance
You can write ActionScript code to set and get style properties on any component instance. The UIObject.setStyle() and UIObject.getStyle() methods can be called directly from any component. For example, the following code sets the text color on a Button instance called myButton that uses the Halo theme:
myButton.setStyle("themeColor", "haloBlue");
Even though you can access the styles directly as properties (for example, myButton.color = 0xFF00FF), it's best to use the setStyle() and getStyle() methods so that the styles work correctly. For more information, see Setting style property values.
Note: You should not call the UIObject.setStyle() method multiple times to set more than one property. If you want to change multiple properties, or change properties for multiple component instances, you should create a custom style format. For more information, see Setting styles for specific components
cheers
Nick Toye
02-23-2004, 04:10 AM
yeah i did it, quite simple really, but then they mostly are.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.