BarPhotoGuy
07-18-2004, 07:29 PM
I am trying to creade a Drink Specials scroller for my website ( www.barphotoguy.com ). The objective that I am trying to accomplish is that when the page loads it will grab the date from the computer and then display the correct drink special. The way that I set it is as follows: I have a scene named "actions" which is a blank scene containing the following code ->
scrollerDate = newDate( );
today = scrollerDate.getDay( );
switch( today ){
case 0:
gotoAndPlay( "sunday", 1 );
break;
case 1:
gotoAndPlay( "monday", 1 );
break;
case 2:
gotoAndPlay( "tuesday", 1 );
break;
case 3:
gotoAndPlay( "wednesday", 1 );
break;
case 4:
gotoAndPlay( "thursday", 1 );
break;
case 5:
gotoAndPlay( "friday", 1 );
break;
case 6:
gotoAndPlay( "saturday", 1 );
break;
default:
gotoAndPlay( "actions", 1 );
}
Then I have my scroller scenes named "sunday, monday, tuesday, etc." Within each scene there are 2 layers "background and message". "message" just contains the text tweens which makeup the scroller. "background" just contains the background information and within the last frame is the action->
gotoAndPlay( "actions", 1 );
When I load the files it will continuously play the "friday" scene. It never changes with the calendar.
Any ideas?
scrollerDate = newDate( );
today = scrollerDate.getDay( );
switch( today ){
case 0:
gotoAndPlay( "sunday", 1 );
break;
case 1:
gotoAndPlay( "monday", 1 );
break;
case 2:
gotoAndPlay( "tuesday", 1 );
break;
case 3:
gotoAndPlay( "wednesday", 1 );
break;
case 4:
gotoAndPlay( "thursday", 1 );
break;
case 5:
gotoAndPlay( "friday", 1 );
break;
case 6:
gotoAndPlay( "saturday", 1 );
break;
default:
gotoAndPlay( "actions", 1 );
}
Then I have my scroller scenes named "sunday, monday, tuesday, etc." Within each scene there are 2 layers "background and message". "message" just contains the text tweens which makeup the scroller. "background" just contains the background information and within the last frame is the action->
gotoAndPlay( "actions", 1 );
When I load the files it will continuously play the "friday" scene. It never changes with the calendar.
Any ideas?