Hi Hissam,
Check out this code..Hope this code solves your problem.. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="call()" layout="absolute" xmlns:ns1="components.*"> <mx:Button x="173" y="172" label="click" id="button1" /> <mx:Script> <![CDATA[ import mx.controls.Alert; public function call():void { var a:String="hello" button1.addEventListener(MouseEvent.CLICK,function(e:MouseEvent): void{display(e,a);}); } public function display(evt:MouseEvent,a:String):void { Alert.show(a); } ]]> </mx:Script> </mx:Application> Cheers Satish On Tue, Oct 7, 2008 at 4:08 PM, HISSAM <[EMAIL PROTECTED]> wrote: > > how to send extra-parameter to the event handler while calling the > addEventListener > > T.addEventListener(FlexEvent.CREATION_COMPLETE,getTEvents(event,T.id));// > error//event > > // > undefined > > public function getTEvents(e:FlexEvent,s:string):void > { > if(e.currentTarget.btnSelect!=null) > {e.currentTarget.btnSelect.addEventListener( > MouseEvent.CLICK,btnSelectClick);} > } > private function btnSelectClick(e:MouseEvent):void > { > > } > > I'm getting error > > I have to send the T.id since there many dynamic T > > > how to send extra-parameter to the event handler while calling the > addEventListener > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

