Showing 1 - 1 of 1 total. RSS Feed WordPress RSS Feed

How to set a global component style in Flash / AS3

Use StyleManager class and setComponentStyle method to set global styles
Following code sets color, size and textPadding properties to each Button Component used in your own Flash Application.
import fl.managers.StyleManager;
import fl.controls.Button

// Set a global textFormat for every Button Component
var tf:TextFormat= new TextFormat();
tf.color = 0x0000FF;
tf.size = 16;
StyleManager.setComponentStyle(Button, "textFormat", tf);

// Set a global style property for every Button Component
var styleProperty:String = "textPadding";
var value:Number = 30;
StyleManager.setComponentStyle(Button,styleProperty,value);
Showing 1 - 1 of 1 total. RSS Feed WordPress RSS Feed