Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 85594

Re: how to loop if else statement

$
0
0

Can you look into this code for me and tell me why I got this error:

Scene 1, Layer 'Layer 7', Frame 11084: 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


Viewing all articles
Browse latest Browse all 85594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>