1 Reply Latest reply on Jun 30, 2010 11:58 AM by VRPDeveloper



      Any thoughts on why this wont work on a button but works just fine on the titlewindow close handler? No compiler errors, no flash debugger errors.







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




         title="Create New Ticket" x="800" y="600" width="800" height="600"  textAlign="left" title.workRequest="Create New Work Ticket" title.State1="Create New Support Ticket" title.materialRequest="Create New Material Ticket" close="closeWindow();">







      import mx.events.CloseEvent;

      import mx.managers.PopUpManager;


      public function closeWindow():void


      var closeThisWindow:CloseEvent = new CloseEvent(CloseEvent.CLOSE, true, false);






      <s:Button label="Cancel" click="closeWindow();"/>



        • 1. Re: CloseEvent
          VRPDeveloper Level 3

          Obviously it will not work as close event is made for popup windows


          The CloseEvent class represents event objects specific to popup windows,    such as the Alert control.


          And in closewindow(), you have not specified what to close, so when you are using with titlewindow...it will automatically understands by itself to close window which is open and also it supports close event but for button there is nothing to open which it would close and more button does not suppot close event so it will not work.


          Hope you understood what I mean to say!!!