Date.getDay( ) Method | Flash 5 |
the day of the week |
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");