2 Replies Latest reply on Aug 3, 2008 12:05 PM by cheftimo

    Close of titleWindow

    treesg
      Hi
      I am using titlewindow inside which I have VBOX and image in it .
      there is a close button inside titlewindow, but close button is not working properly here is the piece of code----

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow xmlns:mx=" http://www.adobe.com/2006/mxml" backgroundColor="red" horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle" horizontalAlign="center" showCloseButton="true" close="removeMe(event);" >
      <mx:Script>
      private function removeMe(event:Event):void {
      trace("this/----------------- "+event.currentTarget)
      event.currentTarget.visible=false;
      new_Col_1.visible=false;
      new_Col_1.removeAllChildren()
      event.currentTarget.removeAllChildren();

      }
      ]]>

      </mx:Script>
      <mx:VBox id="new_Col_1" enterFrame="enterFrameEvent(event)" x ="1" width="100%" creationComplete="setType(event)" horizontalScrollPolicy="off" verticalScrollPolicy="off" height="80%" verticalAlign="middle" horizontalAlign="center" horizontalCenter="0" verticalCenter="0" backgroundColor="green" />

      </mx:TitleWindow>