Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
A Memopad, using the new MX Shared Object
Author: Joachim Schnier
| Website: http://www.cancerinform.net |
The Actionscript: Date
A memopad should show the current date, which is shown in the code below. You have to add +1 to the current month, since in Flash the count starts at 0. If you did not add +1 you would always be one month behind (which could be nice depending on the situation?!).
stop();
//get the current date
var today = new Date();
var currentDay = today.getDay();
var currentMonth = today.getMonth();
var currentDate = today.getDate();
var currentYear = today.getFullYear();
//you have to add +1 to the month, because counting starts at 0.
dateTextField = (currentMonth + 1) + " - " + currentDate + " - " + currentYear;
| » Level Basic |
|
|
Added: : 2002-08-16
Rating: 7.48 Votes: 30
Hits: 1663
|
| » Author |
|
The author is a scientist in cancer research
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (197 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|