프로그래머의 삶 Programmer's Life/Flex3.0

버튼~ 예제~

Oliver's World 2008. 11. 3. 17:43
728x90
<?xml version="1.0" ENCODING="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
 fontSize="11" backgroundGradientColors="[#f7f794,#adb2ce]">
 <mx:Script>
  <![CDATA[
   private function showMsg(input:String):void{
    mx.controls.Alert.show(input);
   }
  ]]>
 </mx:Script>
 <mx:Panel width="100%" height="100%" layout="vertical" horizontalAlign="cetner"
  verticalAlign="middle" label="커서버튼" title="button/linkbutton">
 <mx:Button label="그냥버튼" width="95" click="showMsg('걍버튼')"/>
 <!-- 토글버튼을 누르면 스킨모양이 유지  -->
 <mx:Button label="토글버튼" toggle="true"/>
 <!-- Button에 버튼모드=트루 useHandCursor='true' 로 해주면 링크 버튼 처럼 커서가 생긴다. -->
 <mx:Button label="커서버튼" mouseDown="showMsg('커서버튼')"
 toolTip="buttonMode=\'true\' useHandCursor=\'true\'"
 buttonMode="true" useHandCursor="true"/>
  <mx:LinkButton label="LinkButton"  width="100" click="navigateToURL(new
  URLRequest('http://www.naver.net'),'quote')"/>
 </mx:Panel>
</mx:Application>
728x90