Ok....I made the appropriate additions to the spaces commented and this is
what I got now:
currentDate = new Date;
today =
currentDate.get Date()+"/"+currentDate.g etMonth()+"/"+currentDate.g etYear();
cookie = sharedObject.ge tLocal("date");
if (cookie.data.ex pire == undefined) {
cookie.data.exp ire =
(currentDate.ge tDate()+7)+"/"+currentDate.g etMonth()+"/"+currentDate.g etYear
();
cookie.data.tod ay = today;
} else {
sepToday = cookie.data.tod ay.split("/");
sepExpire = cookie.data.exp ire.split("/");
if (Number(sepToda y[0]) >= Number(sepExpir e[0]) && Number(sepToday[1]) <=
Number(sepExpir e[1])) {
this.stop(); //stay stopped on frame 1
} else {
this.gotoAndPla y(2); //Play movie
}
}
cookie.flush();
How can I test it?
I mean....I tried searching for a file called date.sol here but couldn't
find it.
Is there a way I can sort of reset the system to test the script's
functionality?
And to change the expiration period I understand I need to change the number
here:
currentDate.get Date()+7
Am I correct?
Thanks in advance for your big help :)
FayeC
what I got now:
currentDate = new Date;
today =
currentDate.get Date()+"/"+currentDate.g etMonth()+"/"+currentDate.g etYear();
cookie = sharedObject.ge tLocal("date");
if (cookie.data.ex pire == undefined) {
cookie.data.exp ire =
(currentDate.ge tDate()+7)+"/"+currentDate.g etMonth()+"/"+currentDate.g etYear
();
cookie.data.tod ay = today;
} else {
sepToday = cookie.data.tod ay.split("/");
sepExpire = cookie.data.exp ire.split("/");
if (Number(sepToda y[0]) >= Number(sepExpir e[0]) && Number(sepToday[1]) <=
Number(sepExpir e[1])) {
this.stop(); //stay stopped on frame 1
} else {
this.gotoAndPla y(2); //Play movie
}
}
cookie.flush();
How can I test it?
I mean....I tried searching for a file called date.sol here but couldn't
find it.
Is there a way I can sort of reset the system to test the script's
functionality?
And to change the expiration period I understand I need to change the number
here:
currentDate.get Date()+7
Am I correct?
Thanks in advance for your big help :)
FayeC
Comment