Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetFullYear() method is not working

Status
Not open for further replies.

SeaCrystal

Programmer
Jun 8, 2008
2
0
0
GB
I created a dynamic text box linked to a movie clip’s keyframe in one layer and the actions code in another layer in order to insert text by code (Actionscript 3.0).

Oddly enough, the getFullYear(), in the below code, is not retrieving the current year, so, instead of getting the output "© 2008 Artemis Art", I get just "© Artemis Art".

Yet when I did a very simple Flash program ( just the main stage, one layer with with a link to a dynamic text box and the below code ) it WORKS !

What is the bug in this situation ?


Here is the code:

var ydate:Date = new Date();

var yy = ydate.getFullYear();

coright.text = "© "+ yy + " Artemis Art";
 
Kenneth, I found out that the cause of the problem is that I was using ActionScript 3 code inside an ActionScript 2 code.

I corrected that and now it is working.

Thank you anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top