티스토리 뷰
<?xml version="1.0" encoding="utf-8"?>
< mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
enterFrame="appEnter()" creationComplete="initApp()">
<mx:Button x="10" y="20" label="Button" click="btnOk()"/>
<mx:TextInput id="txtId" x="10" y="50"/>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var intCount:int = 0;
private var bInit:Boolean = false;
private function initApp():void {
bInit = true;
}
private function btnOk():void {
intCount = 0;
}
private function appEnter():void {
if(bInit == false) return;
intCount++;
txtId.text = intCount.toString();
}
]]>
</mx:Script>
< /mx:Application>
'Language > Flex' 카테고리의 다른 글
[ Flex ][ Source ] ex08_02 : Event / e.stopPropagation() (0) | 2015.11.29 |
---|---|
[ Flex ][ Source ] ex08_01 : try / catch / finally (0) | 2015.11.29 |
[ Flex ][ Source ] ex04_02 : 클래스 정의 및 사용법 / ex06_01 : set get (0) | 2015.11.29 |
[ Flex ][ Source ] ex03_01 : Button에 이벤트 넣기 (0) | 2015.11.29 |
[ Flex AIR ] AIR Update (0) | 2015.11.29 |