House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Adobe Flex

sharing data between two different components

  << Previous Post |  RSS |  Subscribe to this Group Next >> 

sharing data between two different components

hi , again problem in sharing data! I now know how to share data between mojtaba tabatabaie 12/07/2010 05:24 PM

12/07/2010 05:24 PM
Author: mojtaba tabatabaie Short Link: http://www.houseoffusion.com/groups/flex/thread.cfm/threadid:2151#6549 hi , again problem in sharing data! I now know how to share data between components and the main application . I wanted to use the same technique to share data between two different components but id doesn't work . I have a component named "signIn_Up2" and another named " BookView" I assign the "username" property in "signIn_Up2" and I want to use that property in "BookView" .and the actionscript class is named "LoginEvent.as" which has two public variables named "username" and "password". I wrote these codes: <!-- signIn_Up2 component --> .... <fx:Metadata>    [Event(name"login",type="events.LoginEvent")] </fx:Metadata> ..... <fx:script>    .....    public function somefunction():viod{       var e:LoginEvent = new LoginEvent("login");       e.username = "my UserName";       e.password = "my Password";       dispatchEvent(e);    }    ... </fx:script> <!-- BookView component --> <fx:script>    public var myEvent:LoginEvent;    ...    public function creationComplete():void{       sometextinput.text = myEvent.username;    }    ... </fx:script> I expect the textinput to show the "my UserName" value that I have assigned in "signIn_Up2" component in LoginEvent class . but it doesn't show that . can anyone tell me where the problem is? thanks
<< Previous Thread Today's Threads Next Thread >>

Search flex

June 19, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference