특별한딸기이야기
바인딩 본문
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<!--
바인딩 전
<mx:Script>
<![CDATA[
private function onChange() : void
{
lblMsg.text = txtInput.text;
}
]]>
</mx:Script>
<mx:Label x="53" y="67" text="입력해 주세요" id="lblMsg" />
<mx:TextInput x="53" y="37" text="입력해주세요" id="txtInput" change="onChange()" />
-->
<!-- 바인딩 -->
<mx:Label x="53" y="67" text="{txtInput.text}" id="lblMsg" />
<mx:TextInput x="53" y="37" text="입력해주세요" id="txtInput" />
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<!--
바인딩 전
<mx:Script>
<![CDATA[
private function onChange() : void
{
lblMsg.text = txtInput.text;
}
]]>
</mx:Script>
<mx:Label x="53" y="67" text="입력해 주세요" id="lblMsg" />
<mx:TextInput x="53" y="37" text="입력해주세요" id="txtInput" change="onChange()" />
-->
<!-- 바인딩 -->
<mx:Label x="53" y="67" text="{txtInput.text}" id="lblMsg" />
<mx:TextInput x="53" y="37" text="입력해주세요" id="txtInput" />
</mx:Application>