There is a close and closing event on windowedApplication. You could probably just catch those and use something like event.preventDefault() when you don't want it to close.
This works: <mx:WindowedApplication closing="onClose(event)" xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ private function onClose(event:Event):void { Alert.show('try to close'); event.preventDefault(); } ]]> </mx:Script> </mx:WindowedApplication> grtz, marcel --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > I think you want: > > flash.events.Event.EXITING > <http://livedocs.adobe.com/flex/3/langref/flash/events/Event.html#EXITIN > G> > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of aphexyuri > Sent: Thursday, August 07, 2008 2:16 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] WindowedApplication custom close / exit > > > > Hi > I need some help preventing window close, on system chrome close > button click. > > Basically, what I would like to do, is check for a condition when the > user clicks the system chrome close btn. It the condition states its > ok, I'd like to call app.exit(), and if not, perform other actions. > > Any help will be appreciated. >