Time based ActionScript Reference


Properties


getCompletedText
getCountDown
getEndDate
getEndTime
getGmtTimeDifference
getStartDate
getStartText
getStartTime
getStartTimerDate
getStartTimerTime
getTimeFormat
setEndDate
setEndTime
setGmtTimeDifference
setCompletedText
setCountDown
setStartDate
setStartText
setStartTime
setStartTimerDate
setStartTimerTime
setTimeFormat



Methods

getCurrentDate
getDays
getHours
getHundredSeconds
getMinutes
getMonths
getSeconds
getTimerText
getYears
reInit

Events

onEndCounter
onStartCounter

 

PROPERTIES

getCompletedText
Returns the value of the text to appear when the timer has completed

trace(myTimer.getCompletedText());



getCountDown
Returns the boolean value of true if the timer has been set to count down

trace(myTimer.getCountDown());

getEndDate
Returns the date which the timer has been set to count up or count down to

trace(myTimer.getEndDate());



getEndTime
Returns the time which the timer has been set to count up or count down to

trace(myTimer.getEndTime());



getGmtTimeDifference
Returns the GMT offset for the timer

trace(myTimer.getGmtTimeDifference());

getStartDate
Returns the date that the timer should start counting from, when counting up

trace(myTimer.getStartDate());


getStartText
Returns the text to display while waiting for the counter to start counting when using a delayed start

trace(myTimer.getStartText());



getStartTime
Returns the timer that the timer should start counting from, when counting up

trace(myTimer.getStartTime());



getStartTimerDate
Returns the date that the timer has been set to begin the count down/count up

trace(myTimer.getStartTimerDate());



getStartTimerTime
Returns the time that the timer has been set to begin the count down/count up

trace(myTimer.getStartTimerTime());



getTimeFormat
Returns the format that has been set for the timer output

trace(myTimer.getTimeFormat());



setCompletedText
Returns the value of the text to appear when the timer has completed

trace(myTimer.getCompletedText());



setCountDown
Sets the boolean value as to whether the timer has been set to count down or not

myTimer.setCountDown(true);



setEndDate
Sets the date which the timer should count up or count down to

myTimer.setEndDate("2004-12-31");

Note: The date format is: YYYY-MM-DD



setEndTime
Sets the time which the timer should count up or count down to

myTimer.setTimeDate("23:59:59");

Note: The time format is: HH:MM:SS and is based on 24 hour time format



setGmtTimeDifference
Sets the GMT offset for the timer

myTimer.setGmtTimeDifference(-5)


setStartDate
Sets the date that the timer should start counting from, when counting up

myTimer.setStartDate("2004-10-01");

Note: The date format is: YYYY-MM-DD


setStartText
Sets the text to display while waiting for the counter to start counting when using a delayed start

myTimer.setStartText("Waiting for timer to start...");



setStartTime
Sets the time that the timer should start counting from, when counting up

myTimer.setStartTime("08:00:00");

Note: The time format is: HH:MM:SS and is based on 24 hour time format



setStartTimerDate
Sets the date that the timer should start the count down/count up

myTimer.setStartTimerDate("2004-12-15);

Note: The date format is: YYYY-MM-DD


setStartTimerTime
Sets the time that the timer should start the count down/count up

myTimer.setStartTimerTime("08:00:00");

Note: The time format is: HH:MM:SS and is based on 24 hour time format


setTimeFormat
Sets the format for the timer output text

myTimer.setTimeFormat("%YEARS% years %MONTHS% months %DAYS% days %HH%:%MM%:%SS%:%HS%");

 

METHODS

getCurrentDate
Returns the current GMT date and time

trace(myTimer.getCurrentDate());



getDays
Returns the number of days in the count up or count down

trace(myTimer.getDays());



getHours
Returns the number of hours in the count up or count down

trace(myTimer.getHours());



getHundredSeconds
Returns the number of hundredths of a seconds in the count up or count down

trace(myTimer.getHundredSeconds());



getMinutes
Returns the number of minutes in the count up or count down

trace(myTimer.getMinutes());



getMonths
Returns the number of months in the count up or count down

trace(myTimer.getMonths());



getSeconds
Returns the number of seconds in the count up or count down

trace(myTimer.getSeconds());



getTimerText
Returns the current timer output text

trace(myTimer.getTimerText());



getYears
Returns the number of years in the count up or count down

trace(myTimer.getYears());

reInit
Reinitializes the timer

myTimer.reInit();


EVENTS

onEndCounter
This event is called when the timer has completed counting. It will also be called in the event that the movie is accessed after the end time has been reached.

myTimer.onEndCounter = function() {
   movie1.gotoAndPlay(2);
};


onStartCounter
This event is called when the timer starts counting. It will also be called in the event that the movie is accessed after the end time has been reached, as long as a delayed start time and date have been set for the timer.

myTimer.onStartCounter = function() {
   movie2.gotoAndPlay(2);
};