티스토리 뷰

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
라이브독..

<?xml version="1.0"?>
<!-- controls\alert\AlertEvent.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import mx.events.CloseEvent;

            private function alertListener(eventObj:CloseEvent):void {
                // Check to see if the OK button was pressed.
                if (eventObj.detail==Alert.OK) {
                    myText.text = myInput.text;
                }
            }
        ]]>
    </mx:Script>

    <mx:TextInput id="myInput"
        width="150"
        text="" />
    <mx:Button id="myButton"
        label="Copy Text"
        click='Alert.show("Copy Text?", "Alert",
            Alert.OK | Alert.CANCEL, this,
            alertListener, null, Alert.OK);'/>
    <mx:TextInput id="myText"/>
</mx:Application>

---------------------------------------------------------------------------

private function closeWindowAlert():void{
    Alert.show("업로드나 다운로드 중에 창을 닫으면 데이터가 삭제됩니다.\n프로그램을 종료하시겠습니까?","경고",Alert.YES|Alert.CANCEL,null,closeWindow);
   }
   
   private function closeWindow(event:CloseEvent):void
   {
   
    if(event.detail == Alert.YES){    
     this.exit();  // windows를 닫고 application을 종료
    }
    return;
   }
댓글
댓글쓰기 폼
공지사항
Total
1,769,592
Today
0
Yesterday
10
링크
«   2023/04   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함