Trying to get this code working in Flash AS3 but keep getting this error:
1071: Syntax error: expected a definition keyword (such as function) after attribute function, not updateTimer.
var countdownTimer:Timer = new Timer (1000);
counterTimer.addEventListener(TimerEvent.Timer, updateTimer);
countdownTimer.Start();
Function updateTimer(Event:TimerEvent):void{
var Today:Date = new Date();
var year = Today.getFullYear();
var dtsBegin:Date = new Date(year, 2, 31);
var dtsEnd:Date = new Date(year, 9, 27);
if((today >= dtsBegin) && (today <= dtsEnd)){
Today.minutes -= 0;
}
else{
Today.minutes += 60;
}`