Hi, Here is a sample:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.containers.TitleWindow; import mx.managers.PopUpManager; private var titleWin:TitleWindow; private function init():void{ this.addEventListener(KeyboardEvent.KEY_DOWN,handleClose); } private function openPop():void{ titleWin = new TitleWindow; titleWin.width = titleWin.height = 200; titleWin.title = "Popup Window" PopUpManager.addPopUp(titleWin,this,true); PopUpManager.centerPopUp(titleWin); } private function handleClose(event:KeyboardEvent):void{ if (event.keyCode == Keyboard.ESCAPE) { PopUpManager.removePopUp(titleWin); } } ]]> </mx:Script> <mx:Button label="Open Popup" click="openPop()"/> </mx:Application> Regards, Venkat www.venkatv.com On Mon, Sep 29, 2008 at 5:50 PM, Ravindra <[EMAIL PROTECTED]> wrote: > > How to I can close popup window though Esc. key, in flex 3.0. > > I have tried > > this.addEventListener(KeyboardEvent.KEY_DOWN,titleWindow_keyClose); > > But not affected any...So any idea about same? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

