public var callcanvas:mycanvas = mycanvas(init());
is this best way to call.. Prajnith On Fri, Oct 30, 2009 at 7:16 PM, prajnith K <[email protected]> wrote: > here u are calling init() its fine... i too know this process... > > if i have another function over there..like an mouse event,event etc... > > than how to do... > > actually my req is different... i just sent the POC code here.... > > is there any way to pass data through metadata.. > > > Prajnith > > > > On Fri, Oct 30, 2009 at 2:44 PM, FlexiSush <[email protected]> wrote: > >> >> Hi, hope the below solution works for u. >> >> ******main.mxml********* >> >> <?xml version="1.0" encoding="utf-8"?> >> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >> layout="absolute" xmlns:ns1="*"> >> <ns1:component x="100" y="100"> >> </ns1:component> >> </mx:Application> >> >> >> *********component1.mxml************ >> >> <?xml version="1.0" encoding="utf-8"?> >> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" >> width="400" height="300" >> creationComplete="init();"> >> <mx:Script> >> <![CDATA[ >> [Bindable] >> public var mystring:String; >> public function init():void >> { >> mystring = "prajnith"; >> } >> ]]> >> </mx:Script> >> </mx:Canvas> >> >> >> >> ************component.mxml********* >> >> <?xml version="1.0" encoding="utf-8"?> >> <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >> xmlns:ns1="*" >> width="400" height="300" >> creationComplete="init()"> >> <mx:Script> >> <![CDATA[ >> import mx.controls.Alert; >> public var callcanvas:component1 = new component1(); >> public function init():void >> { >> callcanvas.init(); >> Alert.show(callcanvas.mystring); >> } >> >> >> ]]> >> </mx:Script> >> </mx:Panel> >> >> >> >> >> >> On Oct 30, 12:38 pm, prajnith K <[email protected]> wrote: >> > hi friends >> > i'm not able bind between two components... >> > >> > im sending my code please help me... >> > >> > how to approach using metadata or waht? >> > got stuck here >> > >> > ***************************** main >> application***************************** >> > <?xml version="1.0" encoding="utf-8"?> >> > <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" >> > layout="absolute" xmlns:ns1="*"> >> > <ns1:mypanel x="100" y="100"> >> > </ns1:mypanel> >> > </mx:WindowedApplication> >> > >> > ********************************* component >> 1***************************** >> > <?xml version="1.0" encoding="utf-8"?> >> > <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" >> > width="400" height="300" >> > creationComplete="init();"> >> > <mx:Script> >> > <![CDATA[ >> > [Bindable] >> > public var mystring:String; >> > public function init():void >> > { >> > mystring = "prajnith"; >> > } >> > ]]> >> > </mx:Script> >> > </mx:Canvas> >> > ************************************component >> > 2*************************************** >> > <?xml version="1.0" encoding="utf-8"?> >> > <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >> > width="400" height="300" >> > creationComplete="init()"> >> > <mx:Script> >> > <![CDATA[ >> > import mx.controls.Alert; >> > public var callcanvas:mycanvas = new mycanvas(); >> > public function init():void >> > { >> > Alert.show(callcanvas.mystring); >> > } >> > >> > ]]> >> > </mx:Script> >> > </mx:Panel> >> > >> > Prajnith >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

