Okay so I am trying to make a simple count up flash project.
I am still very new to flash. But I’ve done count ups before.
It took me awhile but I finally got rid of ALL the errors, but yet
the dynamic text I have setup is not showing anything.
Could someone help me using the script bellow?
var today:Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();
var targetDate:Date = new Date(2010,9,18);
var targetTime = targetDate.getTime();
var timeLeft = currentTime-targetTime;
var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);
var hrs = Math.floor(min/60);
var totaldays = Math.floor(hrs/24);
var months = Math.floor(totaldays/30);
var odd = Math.floor(months*30);
var days = totaldays - odd;
if (months>11){
var years = Math.floor(months/12);
var NegYears = Math.floor(years*12);
var month = NegYears - months;
}
txtyear.text = years;
txtmonth.text = month;
txtdays.text = totaldays;