특별한딸기이야기
컴포넌트 만들기 본문
MyButton.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" width="70" height="32" click="onClick();">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function onClick() : void
{
mx.controls.Alert.show("Button Clicked");
}
]]>
</mx:Script>
</mx:Button>
Study.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:nsl="*">
<nsl:MyButton x="23" y="26" width="105" />
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" width="70" height="32" click="onClick();">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function onClick() : void
{
mx.controls.Alert.show("Button Clicked");
}
]]>
</mx:Script>
</mx:Button>
Study.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:nsl="*">
<nsl:MyButton x="23" y="26" width="105" />
</mx:Application>
'딸기 공부방 > flex' 카테고리의 다른 글
커스텀 프로퍼티 (0) | 2008.12.27 |
---|---|
컴포넌트를 이용한 비디오 플레이어 (0) | 2008.12.27 |
http로 서버에 정보 전달하기 (0) | 2008.12.27 |
xml 통신 (0) | 2008.12.27 |
http통신 (1) | 2008.12.27 |