xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="initApp()">
[Bindable]
private var curSize:int = 10;
private function initApp():void {
ip1.setStyle("fontSize", curSize);
b1.setStyle("fontSize", curSize);
b2.setStyle("fontSize", curSize);
}
public function showStyles():void {
mx.controls.Alert.show("Font size is " + ip1.getStyle("fontSize") + ".");
}
public function setNewStyles():void {
curSize = Number(ip2.text);
ip1.setStyle("fontSize", curSize);
b1.setStyle("fontSize", curSize);
b2.setStyle("fontSize", curSize);
}
text="This is a TextInput control." width="400" />
click="setNewStyles();" />