topical media & game development 
  
 
 
 
 
  
    
    
  
professional-flex-code-19-CustomLoggerMain2.mx
professional-flex-code-19-CustomLoggerMain2.mx
[swf]
 
 flex
  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:logger="*"
    creationComplete="init()"
    layout="vertical">
  
    <mx:Script>
      <![CDATA[
        import mx.logging.Log;
        import mx.managers.FocusManager;
        private function init():void
        {
          this.focusEnabled = true;
          this.focusManager.setFocus( btnTrace );
        }
      ]]>
    </mx:Script>
  
    <mx:Panel id="pnlApp" title="Sample Application"
      paddingBottom="10" paddingLeft="10" 
      paddingRight="10" paddingTop="10"
      layout="vertical" horizontalAlign="center">
      <mx:Label 
        text="Hit CTRL-SHIFT-L at the same time to view the TracePanel!" />
      <mx:Label 
        text="Make a Trace by click on the button below!" />      
      <mx:Button id="btnTrace" label="Click Me!" 
        click="Log.getLogger( 'event' ).info( 'You clicked on ' + event.target )" />
    </mx:Panel> 
  
    <logger:professional_flex_code_19_LogController id="ctlLogger" />
  
  </mx:Application>
  
  
  
(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.