hi … anyone can help with cookies in flash MX ?
i have found the kirupa tutorial on flash mx cookies but if i am retrieving the cookie from another flash page, do i also do teh same thing?
that is i create teh cookie in one flash page
user = SharedObject.getLocal(“user_profile”);
user.data.name = name;
user.flush();
do i hav to create teh cookies by scripting it to a button like in teh kirupa tutorial?
then on another page i just write :
user = SharedObject.getLocal(“user_profile”);
name = user.data.name;
on the login page,
wat i hav done is load the script at the click of the button
loadVariablesNum(“post002.asp”,0,“GET”);
then after the execution of the script, it is suppose to return me two variables, one is a “go” variable to indicate whether login is successful or not (true or false) , the second is a variable named “xuserid” which is the userID i hav taken from the database to indicate which user have login.
then what i intended to do is set the xuserid as a cookie , do i put it as :
user = SharedObject.getLocal(“user_profile”);
if (go == “true”) {
user.data.login = “xuserid” ;
user.flush();
getURL(“mainmenu.html”, “_self”);
}
if (go == “false”) {
gotoAndStop(“error”);
}
and then i intend to retrieve it from another flash page. is it that i just put:
user = SharedObject.getLocal(“user_profile”);
currentuserID = user.data.login;