May 2001
Intermediate to advanced
720 pages
23h 24m
English
Date.getDay( ) Method — the day of the week
Flash 5
date.getDay( )
An integer from 0
(Sunday) to 6 (Saturday), representing the day of the week for
date.
The following code loads a .swf file specific to
the current day of the week into the movie clip
welcomeHeader (the seven .swf
files are named in the series sun.swf,
mon.swf, and so on):
now = new Date( ); today = now.getDay( ); days = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"]; welcomeHeader.loadMovie(days[today] + ".swf");
Read now
Unlock full access