Hi guys.... :)

I am working on flex, and looks hard to get the target object x and y
position. do you have any ideas?

Cheers & THANKS

================================



<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
viewSourceURL="srcview/index.html">
    <mx:Script>
            <![CDATA[
                
                        import mx.core.IFlexDisplayObject;
                        import mx.core.UIComponent;
                        import mx.controls.Alert;
                        
                
                    private function createMsg(event:Event):void {
                        
                                var target:UIComponent = 
UIComponent(event.currentTarget);      
                                                        
                                var alert:Alert;  


                                Alert.show("the X position of LABEL 1 is 
"+event.currentTarget.x,
"Show Me", Alert.YES | Alert.NO)
                    }

            ]]>
    </mx:Script>
    
    <mx:Panel>
        <mx:Form>
            <mx:FormItem label="Label">
                <mx:TextInput focusOut="createMsg(event);"/>
            </mx:FormItem>
            <mx:FormItem label="Label">
                <mx:TextInput/>
            </mx:FormItem>
            <mx:FormItem label="Labe3">
                <mx:TextInput/>
            </mx:FormItem>
        </mx:Form>
    </mx:Panel>
    
</mx:Application>

Reply via email to