triggering events with Date function (addEventListener)
I am trying to figure out a way to be able to trigger an event which will display a message. The only thing is that the date function does not seem to be equipped with the ability to set events to it. I read the reference to it on the Flash support site and it seems as it is usually only used for date stuff.
I downloaded a digital clock, but it seems as that is based on diffrent principals as it was simply iterating throught the if stmts
var todayDate:Date = new Date();
var currentHours:Number = todayDate.getHours();
var currentMinutes:Number = todayDate.getMinutes();
//Looking to set a addEventListener when the current time reaches 15:30 and to fire off a public function showTime
//If it 10 minutes away from 15:30 play function almostThere()
public function showTime(event:Event):void
{
if ( (currentHours == 15) && (currentMinutes == 38))
{
timeis_mc.text = currentHours + ":" + currentMinutes;
}
}
public function almostThere
{
}
Could someone assist me in analysis of this problem
Any suggestions