This uses an Alert box.  In my real app, I use a TitleWindow, and build an “arguments object” that has all the info I know / need when I pop-up the dialog.  When the user closes the pop-up, I add the dialog information to the arguments object and then call a handler function which in turn does the work specified in the passed-in argument object.

 

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

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

<mx:Script><![CDATA[

           

            private function doAction(sAction:String):Void

            {

                        alert(sAction,

                                                "Confirm Action",

                                                mx.controls.Alert.YES|mx.controls.Alert.NO,

                                                handleConfirm,

                                                mx.controls.Alert.NO)

            }//        

           

            private function handleConfirm(oEvent:Object):Void

            {

                        switch(oEvent.detail)

                        {

                                    case 1:

                                                alert("The Action was Confirmed")

                                                break;

                                    case 2:

                                                alert("The Action was Canceled")

                                                break;

                        }//switch()

                       

            }//

]]></mx:Script>

 

            <mx:Button label="Do Some Action" click="doAction('delete')"/>

</mx:Application>

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jignesh Dodiya
Sent: Thursday, April 06, 2006 6:14 PM
To: [email protected]
Subject: Re: [flexcoders] Question: is there a way to hold code execution?

 

better u post the example here tracy
 

 

--
Regards,

Jignesh Dodiya....




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to