OK, so I have two swf files. SWF#1 creates a local Shared Object and enters data. Code for SWF#1:
var msg:String;
var sol:SharedObject = SharedObject.getLocal(“SOLtest”);
function saveData():void{
msg = inputText.text;
sol.data.msg = msg;
sol.flush();
sol.close();
}
I’d like to access the Shared Object data from SWF#2. I’ve tried
var sol:SharedObject;
sol = SharedObject.getLocal(“SOLtest”);
btn. addEventListener(MouseEvent.CLICK, onup);
function onup(e:MouseEvent):void{
if(sol.data.msg == null) trace("no data");
inputText.text = sol.data.msg;
}
but it doesn’t work. Can anyone tell me how to pull this off? Many thanks.