<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                       xmlns:s="library://ns.adobe.com/flex/spark"

                       xmlns:mx="library://ns.adobe.com/flex/mx"

                       minWidth="955"

                       minHeight="600">

 

       <fx:Script>

             <![CDATA[

                    import flash.utils.clearInterval;

                    import flash.utils.setInterval;

                   

                    import mx.controls.Alert;

                   

                   

                    protected function onClick(event:MouseEvent):void

                    {

                           var myInterval:uint = setInterval(test, 2000);

                          

                           function test():void

                           {

                                 Alert.show("Alert실행");

//                               clearInterval(myInterval);

                           }

                    }

                   

             ]]>

       </fx:Script>

       <s:Button label="2초후 Alert창 띄움" click="onClick(event)"/>

</s:Application>


저작자 표시 비영리 변경 금지
신고
YOUR COMMENT IS THE CRITICAL SUCCESS FACTOR FOR THE QUALITY OF BLOG POST