Nested inner function is called when the button is clicked : Click Event « Event « 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 » Event » Click EventScreenshots 
Nested inner function is called when the button is clicked
Nested inner function is called when the button is clicked
           

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="initApp()">
    <mx:Script>
    import mx.controls.Alert;
    private function initApp():void {
        b1.addEventListener("click",function(e:Event):void {Alert.show("The button was clicked");});
    }
  </mx:Script>
    <mx:Button id='b1' label="Click Me" />
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Click event example (MXML)Click event example (MXML)
2.Listen to a Button ClickListen to a Button Click
3.button clickbutton click
4.Click event attribute can take ActionScript code as its valueClick event attribute can take ActionScript code as its value
5.ActionScript event handling logic inside the MXML tag's click eventActionScript event handling logic inside the MXML tag's click event
6.Intercept a click eventIntercept a click event
7.Double click eventDouble click event
8.Mark click event as its own tagMark click event as its own tag
9.The click event attribute can take ActionScript code directly as its valueThe click event attribute can take ActionScript code directly as its value
10.Use Event object to get a reference to the clicked ColumnSeries.Use Event object to get a reference to the clicked ColumnSeries.
11.Define custom behavior for the click event of the LinkElement object.Define custom behavior for the click event of the LinkElement object.
www.jav___a__2_s___.___c_om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.