Date Using Images
- Started
- Last post
- 7 Responses
- 187LockDown0
I put the comma in the worng place, Im a dumbass, Don't even know how to write a date.
- 187LockDown0
I updated the code for displaying images using a date.
Just figured you guys might need something like this someday.
- kodap0
nice!
- ilmarine0
yep, sure is nice.
one thing tho. javascript gets the date from the visitor's computer, while php and asp get it from the server.since the server is somewhere in US (i think), the php example shows 30th august. since i am far ahead of the server (time-wise), the javascript example show 31st august.
just thought, i'd remind you.
- unfittoprint0
very nice, Lock.
you can also include this actionscript, then we'll have this nice and happy family:
//current date
currentDate = new Date();
//day and month names
DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
MonthArray = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
//load images
this.createEmptyMovieClip("day", 1);
day.loadMovie(DayArray[currentDa...
this.createEmptyMovieClip("dayNu... 2);
dayNumber.loadMovie(currentDate...
this.createEmptyMovieClip("month... 3);
month.loadMovie(MonthArray[curre...
this.createEmptyMovieClip("year... 3);
year.loadMovie(currentDate.getFu...
//position images
dayNumber._x = day._width;
month._x = day._x+day._width;
year._x = month._x+month._width;
stop();
- unfittoprint0
oops, you're you read:
this.createEmptyMovieClip
("year", 3);one shoud read:
this.createEmptyMovieClip
("year", 4);
- 187LockDown0
Thanks I will add that unfittoprint.