티스토리 뷰
[ Flex ][ Source ] ex08_03 : Button Event / MouseWheel 값 event.delta
MiniNeko 2015. 11. 29. 04:35<?xml version="1.0" encoding="utf-8"?>
< mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="371" height="209">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function btnNoOver(event:MouseEvent):void {
trace("Mouse Over");
btnNo.x = screen.width * Math.random();
btnNo.y = screen.height * Math.random();
}
private function btnNoWheel(event:MouseEvent):void {
trace("Mouse Wheel : " + event.delta);
btnNo.width += event.delta;
btnNo.height += event.delta;
}
private function btnYesClick(event:MouseEvent):void {
Alert.show("감사합니다.");
}
]]>
</mx:Script>
<mx:Button x="98" y="47" label="아니요" id="btnNo" mouseOver="btnNoOver(event)" mouseWheel="btnNoWheel(event)"/>
<mx:Button x="25" y="47" label="예" id="btnYes" click="btnYesClick(event)"/>
<mx:Label x="25" y="10" text="2009년 임금을 동결 하시겠습니까?"/>
< /mx:Application>
'Language > Flex' 카테고리의 다른 글
[ Flex ][ Source ] Alert - 내용수정 필요 (0) | 2015.11.29 |
---|---|
[ Flex ][ Source ] ex08_04 : 전자랜지 (0) | 2015.11.29 |
[ Flex ][ Source ] ex08_02 : Event / e.stopPropagation() (0) | 2015.11.29 |
[ Flex ][ Source ] ex08_01 : try / catch / finally (0) | 2015.11.29 |
[ Flex ][ Source ] ex06_02 : enterFrame 활용 (0) | 2015.11.29 |