hi, i've a problem with shared objects. i m trying to make popup window to appear only once. one of my files contains popup window's codes, other is main window's...
popup.swf:
Code:
import flash.net.SharedObject;
var userData:SharedObject=SharedObject.getLocal("music");
userData.data.isOpen=1;
userData.flush();
userData.close();
trace (userData.data.isOpen);
main_window.swf:
Code:
import flash.net.URLRequest;
import flash.net.SharedObject;
var userData:SharedObject = SharedObject.getLocal("music");
var url:String="http://www.karadenizmobilya.com.tr/swf/popup.html";
var request:URLRequest=new URLRequest(url);
if (userData.data.isOpen!=1) {
try {
navigateToURL (request, '_blank');
} catch (e:Error) {
trace ("error occured");
}
}
var_txt.text="isOpen = " + userData.data.isOpen;
here main window file always shows "undefined" and keeps opening new window. can anyone help me?