I´m trying to make a as2 version of a date time trigger event. When the date hits 3, 2, and 1 days left it triggers a movieclip - making the movieclip visible and changes the string text within the clip.
somethings missing in my as2 version:
box.onEnterFrame = function(){
var today = new Date();
var curTime = today.getTime();
var myFinish = new Date(2012, 10, 3);
var myFinishTime = myFinish.getTime();
var timeLeft = myFinishTime-curTime;
}
if(timeLeft<=259200000 && timeLeft >=172800000)
{
box.countdown_txt.text = "3 dager igjen";
box.countdown_txt._visible = true;
}
else if(timeLeft<=172800000 && timeLeft >=86400000)
{
box.countdown_txt.text = "2 dager igjen";
box.countdown_txt._visible = true;
}
else if(timeLeft<=86400000 && timeLeft >=0)
{
box.countdown_txt.text = "Siste dag!";
box.countdown_txt._visible = true;
}
else
{
box._visible = false;
}