I am pretty new to shared objects and need some help.
I have two mc's, one is the login (php/flash) and the other is secured area. Basically when a customer accesses the secure area I want it to create a Shared Object for the login page to read.
Example:When the customer logs into the secure area and then goes back to the login page it will read the SharedObject telling it they already visited the secure area and go to frame 3 on the login page... bacially bypassing the login process again.
Below is the code I current have but it is not working... any help would be appreciated.
Secure area fram 1 fla:
Code:
var sos:SharedObject = new SharedObject();
sos.data.Play = "AA";
sos.flush();
Log in page:
Code:
var sos:SharedObject = new SharedObject();
if (sos.data.Play != "undefined") {
this.authmain.gotoAndStop(3);
sos.flush();
}
Here are the fla's (zipped) to fit. Please note that there are many more mc's and php files that come into play but these are the two files that use the shared objects. I appreciate all your help.
I was expecting it all to be one file, for one thing... For another, if there are two files, you're going to need to use some php to transfer the different SharedObjects.
Plus, you put the "this.authmain" part on the frame, so you should change that to "_root" for it to work.
I also noticed most of the code I posted......wasn't in there...?
Yeah, so only the file that created the SharedObject can access it and vice versa.
Plus, you told the SharedObject to goto frame 3.....................which didn't exist.
That's about it... You can get back to me on that...
Thanks for all your help, very much appreciated. I will have to look around on how to transfer a shared object between two fla's with php. Would you know of any resources or tutorials?
On your comments
this.authmain is the file that needs to go to the frame 3, authmain has a frame 3, it's a mc is inside FFprod.fla.
I did change the you posted code around to try to get it to work... sorry about that for not changing it back before posting the files.
If I did this right, your variable (holding "AA") should be, in the receiving flash, "_root.holder.Play" If not, let me know, because I probably did it wrong.