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 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:6549
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/flex/unsubscribe.cfm

Reply via email to