Set variable in mx 2004

I have a dynamic textField called “currentYear”
I want to set the variable to “1767”

I am using the following actionscript which does not work.

currentYear=1767;

Did something change in actionscript 2.0 that I don’t know about?
This is such a simple thing I just can’t get it to work.