Cast Event object for only property access : Event Object « 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 » Event ObjectScreenshots 
Cast Event object for only property access
Cast Event object for only property access
           
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    initialize="addListeners()">
    <mx:Script>
    private function customLogEvent(e:Event):void {
        trace(MouseEvent(e).localY + ":" + MouseEvent(e).localX);
    }
    private function addListeners():void {
        b1.addEventListener(MouseEvent.CLICK, customLogEvent);
    }
  </mx:Script>
    <mx:VBox id="vb1">
        <mx:Button id="b1" label="Click Me" />
    </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Pass a string and Event object to methodPass a string and Event object to method
2.Pass a string and the Event object to the runMove() methodPass a string and the Event object to the runMove() method
3.Define object type as EventDefine object type as Event
4.Access SecurityErrorEvent object's text propertyAccess SecurityErrorEvent object's text property
5.Disables interactivity for events on the first and third PlotSeries objectsDisables interactivity for events on the first and third PlotSeries objects
6.Create event objectCreate event object
7.Event Object PropertiesEvent Object Properties
8.Event type and textEvent type and text
9.Event typeEvent type
10.Log event information to TextAreaLog event information to TextArea
w_w_w___.___j__ava_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.