Application click event : Application Event « Container « Flex






Application click event

Application click event
            


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle"
  click="clickHandler(event)">
  
  <mx:Script>
    
    
      private function clickHandler(event:Event):void
      {
        eventLog.text += "target=" + event.target.id + ", currentTarget=" + event.currentTarget.id + "\n\n";
      }
  
  </mx:Script>
  
  <mx:VBox id="myContainer" click="clickHandler(event)">
    <mx:Button label="myButton" id="myButton" click="clickHandler(event)"/>
  </mx:VBox>
  <mx:TextArea id="eventLog" height="110" width="50%"/>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Application creationComplete event
2.Add event handler for applicationAdd event handler for application
3.Application initialize eventApplication initialize event
4.Use Application control's initialize eventUse Application control's initialize event
5.preinitialize, initialize, creationComplete events for Applicationpreinitialize, initialize, creationComplete events for Application
6.Application complete eventApplication complete event