[an error occurred while processing this directive]

Event.mxml

                         

 

This tutorial will help you to learn event handling on mouse click. Events can be generated by the user's device like keyboard, mouse, or a web service call. Events are also triggered when a component is created,changed or destroyed.

 

 

 

<?xml version="1.0"?>
<!-- events/SimpleEventHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  >
    <mx:Script><![CDATA[
        import mx.controls.Alert;

     
        private function myEventHandler():void {
            Alert.show("An event occurred.");
        }
    ]]></mx:Script>

    <mx:Button id="b1" label="Click Me"  click="myEventHandler()"  />

</mx:Application>


                        

 

                         

[an error occurred while processing this directive]