QUICK TIPS: set a global component style in Flash/AS3
7 October 2009
One Comment
Request: How to set a global component style in Flash / AS3?
Solution: 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);











[...] Configurare uno stile globale per un componente in flash Categories: Senza categoria « Barcellona (s)montado… Creare componenti Flex » [...]
Leave your response!