topical media & game development

talk show tell print

professional-flex-code-19-LoggerButton.mx

professional-flex-code-19-LoggerButton.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Button 
    initialize="init()"
    label="Trace Panel" 
    xmlns:mx="http://www.adobe.com/2006/mxml">
  
    <mx:Script>
      <![CDATA[
        import mx.managers.PopUpManager;      
        
        private function init():void
        {
          this.addEventListener( MouseEvent.CLICK, viewTracePanel );
        }
        
        [Bindable]
        public var tracePanel:professional_flex_code_19_TracePanel ;
        private function viewTracePanel( event:MouseEvent ):void
        {
          if( !tracePanel )
            tracePanel = new professional_flex_code_19_TracePanel();
            
          if( !tracePanel.isOpen ) {
            tracePanel.isOpen = true;
            PopUpManager.addPopUp( tracePanel, 
                                   DisplayObject( this.parentApplication ) );
            PopUpManager.centerPopUp( tracePanel );
          }
        }
      ]]>
    </mx:Script>
  </mx:Button>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.