Share on Google+Share on Google+

Event.mxml

Advertisement
This tutorial will help you to learn event handling on mouse click.

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>


  

 

Advertisements

Advertisement

Posted on: April 3, 2006 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Event.mxml  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0