Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Dynamic_Content

Categories A Memopad, using the new MX Shared Object
Author: Joachim Schnier | Website: http://www.cancerinform.net |

 
Page 4
«prev 1 2 3 4 5 6 7 8 next»

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;

«prev 1 2 3 4 5 6 7 8 next»

» 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.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers