Wednesday, January 16, 2008

Flash Tips - Using Objects - To get Date

Hi
This is about getting date dynamically and displaying on the swf using objects.

Create a Dynamic Text Field on a key frame
Give it an instance name
Open the actions panel for that keyframe where you kept the dynamic field.Type in the below code:
var myDate_date:Date;
myDate_date = new Date();
myTextField_txt.text = myDate_date.getDate();

Publish it and you will get the today's date on the swf.

Regards,
Muthaiah Thiagarajan
http://www.fmass.in/

No comments: