I changed it but it still does not work this is what the code looks like now
 
 
 
<?xml version="1.0" encoding="iso-8859-1" ?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="initAll()">
<mx:Script>
public var mySO:SharedObject;
public var mySO2:SharedObject;
public var welcomeMessage:String;
 public var welcomeMessage2:String;
public function initApp() {
 mySO = SharedObject.getLocal("mydata");
 
 welcomeMessage = "Hello " + getName();
}
 public function initApptwo() {
 mySO2 = SharedObject.getLocal("mydata2");
 
 welcomeMessage = "Hello " + getNametwo();
}
public function initAll(){
initApp()
initApptwo()
}
private function getName() {
 return mySO.data.name;
}
 private function getNametwo() {
 return mySO2.data.name;
}
private function storeName() {
 mySO.data.name = ti1.text;
 mySO.flush();
}
private function storeNametwo() {
 mySO2.data.name = ti2.text;
 mySO2.flush();
}
 
</mx:Script>
<mx:Label id="label1" text="{welcomeMessage}" />
<mx:Label id="label2" text="{welcomeMessage}" />
<mx:Label id="label3" text="Enter Name:" />
<mx:TextInput id="ti1"/>
<mx:TextInput id="ti2"/>
<mx:Button label="Store Name" click="storeName()" />
<mx:Button label="Store second Name" click="storeNametwo()" />
</mx:Application>
 
 
 
 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to