|
||||||
|
||||||
Skinning Components with Style

Free
Members Tutorial
Step Three: Changing Style Properties
For Flash MX04: Window > Development Panels > Actions (F9)
_root.sampleButton.setStyle("themeColor", "haloOrange");
Cross Ref: In you do not know how to input code into the Actions Panel see the tutorial on the Actions Panel
You will have to Hover Over or Click the sampleButton to see the Orange Theme.
The following line contains two parameters that change the Component style:
_root.sampleButton.setStyle("themeColor", "haloOrange");
The first parameter "themeColor" refers to the property you are about to change. In this case, you are about to change the overall "halo" theme. This parameter is always a string.
The next parameter "haloOrange" is the value you are going to change the property to. For the halo theme, the default value is "haloGreen", thus the green color you see most Components in. This line of code changes that value to "haloOrange", a preset value in Flash that gives your Components an orange color. This parameter may or may not be a String.
Note: A String is a line of text with "Quote Marks around it". As a rule of thumb, the following are usually not strings:
All other style property values must be set inside quotations.
Each property also has a set type of possible values that it will accept. For example:
Those are some of the most common properties and their possible values. To view possible values for other Component properties, along with other important information:
Browse to the Component type you want to change. In this case Button Component.
Example: Using Styles with Button Components
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
4513 visitors to this page since
Sept 06 •
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|