# Issue with timer trigger

**URL:** <https://forum.kirupa.com/t/issue-with-timer-trigger/328829>\
**Category:** Uncategorized\
**Created:** [June 21, 2012, 11:00am UTC](https://forum.kirupa.com/t/issue-with-timer-trigger/328829 "2012-06-21T11:00:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry\_utsikt](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@harry\_utsikt](https://forum.kirupa.com/u/harry_utsikt)\
**Post date:** [June 21, 2012, 11:00am UTC](https://forum.kirupa.com/t/issue-with-timer-trigger/328829/1 "2012-06-21T11:00:21Z")

</div>

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:

```auto
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;
}

```
