PDA

View Full Version : Client side saving



jose3760
November 23rd, 2007, 09:04 PM
Ok, Ive created a log-in set up using Flash Cookies. And suprise suprise it does not work. So to try and troubleshoot the problem area I put
trace(user.data.firstname);
and it comes up with "Undefined".
So im wondering if the Data is not saving right?
I was going to post the .fla but it was too big for kirupa, so i tried to make the file smaller but it some how increased in size :|

Also, here is the code i have on the "Submit Register" button

on(release){
user.data.name = name;
user.data.firstname = firstname;
user.flush();
trace(user.data.firstname);
//Tell the user they are registered
}

And here is the code for the log in section (after you register) - Please not this is not working

on(release){
//Log user is te username text box and logpass is the password text box
if(loguser == user.data.firstname && logpass == user.data.name){
//go to the main game
//I cant get this to work :/
}else {
}
}

Thanks,
Joseph

jose3760
November 25th, 2007, 11:45 PM
Oh and Note this is from the tutorial on Kirupa, ive just moved a few things around to make it like a register and log in screen