panel_02.addEventListener(FlexEvent.MOVE, moveHandler);
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of flexawesome Sent: Thursday, September 13, 2007 12:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Simple addEventListener Question! hey there, I am working on the addEventListener and I would like to change the title for "panel_01" once "panel_02" has moved, there is no error for the code below, but won't work. Do you have any suggestion? Thanks ========================================================== <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " layout="absolute" creationComplete="initApp(event)"> <mx:Script> <![CDATA[ import flash.events.Event; import mx.core.* private function initApp(event:Event):void{ panel_02.addEventListener(Event.CHANGE, moveHandler); } private function moveHandler(event:Event):void { panel_01.title = "Detected" trace("got"); } private function movePanel(event:Event):void{ panel_02.move(350,109); } ]]> </mx:Script> <mx:Panel id="panel_01" x="64" y="109" width="250" height="200" layout="absolute"> </mx:Panel> <mx:Panel id="panel_02" x="432" y="109" width="250" height="200" layout="absolute"> </mx:Panel> <mx:Button x="346" y="390" label="Button" click="movePanel(event);"/> </mx:Application> ==========================================================