I'm trying to make vpet like game on flash for class, but I need to work with time and dates for events like feeding, sleep, etc.
At least for now I need help figuring out how to make the game check like every 5 minutes to bring up an alarm about the pet needing food.
Sadly all i have is this:
stop();
const millisecondsPerMinute:int = 1000 * 60;
const millisecondsPerHour:int = 1000 * 60 * 60;
const millisecondsPerDay:int = 1000 * 60 * 60 * 24;
var date1:Date = new Date();
trace(date1);
I get the actual date, but don't know exactly what to do to make it check every 5 minuts or so. Don't know if it's with "if" or "do/while".