Can you look into this code for me and tell me why I got this error:
Scene 1, Layer 'Layer 7', Frame 1 | 1084: Syntax error: expecting rightbrace before end of program. |
var timer:Timer = new Timer(60000);
timer.addEventListener(TimerEvent.TIMER, checkTime);
function checkTime(evt:TimerEvent=null):void {
var d:Date = new Date();
if (d.getDay()>=1 && d.getDay()<=5){
if (d.getHours()>=11 && d.getHours()<=20){
Open.visible = true;
Close.visible = false;
}
}
else
{
if (d.getDay()=6 || d.getDay()<=0){
if (d.getHours()>=9 && d.getHours()<=20){
Open.visible = false;
Close.visible = true;
}
}
}
checkTime();
timer.start();
I want to show M-F 11am to 8pm open else close
sat-sun 9am - 8pm open else close
Thank you for your help