Get event target label : Event Target « Event « Flex






Get event target label

Get event target label
      

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Button label="Click button!" click="clickFunction(event)" />
    <mx:Script>
        
        import mx.controls.Alert;
        public function clickFunction(event:Event):void
        {
            var message:String = "you clicked me! ";
            message += event.target.label;
            Alert.show(message,"Event Test");
        }
      
    </mx:Script>
</mx:Application>

   
    
    
    
    
    
  








Related examples in the same category

1.Get current target from eventGet current target from event
2.Pass current event target text to functionPass current event target text to function
3.Display current phase and information about the current targetDisplay current phase and information about the current target
4.Display the current phase and current target's IDDisplay the current phase and current target's ID
5.Use the target property not currentTarget propertyUse the target property not currentTarget property
6.Event target idEvent target id
7.Use Event object to access methods and properties of the target component, or the component that dispatched the event.Use Event object to access methods and properties of the target component, or the component that dispatched the event.
8.Check event current target class nameCheck event current target class name
9.Get event type, event target and event target idGet event type, event target and event target id
10.Check event target id
11.Let current event target show the drop feedbackLet current event target show the drop feedback