F
FayeC
Ok....I made the appropriate additions to the spaces commented and this is
what I got now:
currentDate = new Date;
today =
currentDate.getDate()+"/"+currentDate.getMonth()+"/"+currentDate.getYear();
cookie = sharedObject.getLocal("date");
if (cookie.data.expire == undefined) {
cookie.data.expire =
(currentDate.getDate()+7)+"/"+currentDate.getMonth()+"/"+currentDate.getYear
();
cookie.data.today = today;
} else {
sepToday = cookie.data.today.split("/");
sepExpire = cookie.data.expire.split("/");
if (Number(sepToday[0]) >= Number(sepExpire[0]) && Number(sepToday[1]) <=
Number(sepExpire[1])) {
this.stop(); //stay stopped on frame 1
} else {
this.gotoAndPlay(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.getDate()+7
Am I correct?
Thanks in advance for your big help
FayeC
what I got now:
currentDate = new Date;
today =
currentDate.getDate()+"/"+currentDate.getMonth()+"/"+currentDate.getYear();
cookie = sharedObject.getLocal("date");
if (cookie.data.expire == undefined) {
cookie.data.expire =
(currentDate.getDate()+7)+"/"+currentDate.getMonth()+"/"+currentDate.getYear
();
cookie.data.today = today;
} else {
sepToday = cookie.data.today.split("/");
sepExpire = cookie.data.expire.split("/");
if (Number(sepToday[0]) >= Number(sepExpire[0]) && Number(sepToday[1]) <=
Number(sepExpire[1])) {
this.stop(); //stay stopped on frame 1
} else {
this.gotoAndPlay(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.getDate()+7
Am I correct?
Thanks in advance for your big help
FayeC