Application initialize event : Application Event « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » Application Event 




Application initialize event
Application initialize event
            

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
  <mx:Script>
    

      import mx.controls.Alert;

      private function initializeHandler(event:Event):void {
        button.addEventListener(MouseEvent.CLICK, clickHandler);
      }

      private function clickHandler(event:MouseEvent):void {
        Alert.show(event.toString(  ));
      }

  
  </mx:Script>

  <mx:Button id="button" />

</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  














Related examples in the same category
1.Application creationComplete event
2.Add event handler for applicationAdd event handler for application
3.Use Application control's initialize eventUse Application control's initialize event
4.preinitialize, initialize, creationComplete events for Applicationpreinitialize, initialize, creationComplete events for Application
5.Application complete eventApplication complete event
6.Application click eventApplication click event
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.