RE: [flexcoders] reading problem from local shared object

2008-10-21 Thread Keith Reinfeld
Gökhan, 

 

I hope this helps: 

 

Read.as

private var myLSO:SharedObject;
private var p_name:String;

myLSO=SharedObject.getLocal("parameterCookie");
   // Was myLSO created?
if (myLSO==null) {
  // myLSO was not created
  Alert.show("cannot create shared object ");
   }else{
  // myLSO was created 
  if(myLSO.data.name ==  undefined){
 trace(“myLSO.data.name is undefined”)
  else{
  p_name= myLSO.data.name; 
 // don’t know what the var p_uy is
  text_name.text = p_name; // p_uy ; 
  }
   }



Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 





[flexcoders] reading problem from local shared object

2008-10-21 Thread Gökhan
Hi,

I am trying to pass data between multiple mxml applications with using local 
shared object.
It writes to sharedObject(parameterCookie) but  when i try to read data from 
object it gets nothing.
What is wrong with this code ?

Thanks,

Gokhan.

Write.as

 private var myLSO:SharedObject;
 private var p_name:String;

 myLSO=SharedObject.getLocal("parameterCookie");
 p_name=text_name.text;
myLSO.data.name=p_name;
myLSO.flush();


Read.as

private var myLSO:SharedObject;
 private var p_name:String;

myLSO=SharedObject.getLocal("parameterCookie");
if (myLSO==null) {
   Alert.show("cannot create shared object ");
}
else{
p_name= myLSO.data.;
text_name.text=p_uy;

}