Hey guys. I put some AS on a MC that has a dynamic text box in it. here’s the code on the dateMC:
onClipEvent(load) {
currentTime = new Date();
month = currentTime.getMonth();
day = currentTime.getDay();
if(month == 1) {
month = "January";
}
else if(month == 2) {
month = "February";
}
else if(month == 3) {
month = "March";
}
else if(month == 4) {
month = "April";
}
else if(month == 5) {
month = "May";
}
else if(month == 6) {
month = "June";
}
else if(month == 7) {
month = "July";
}
else if(month == 8) {
month = "August";
}
else if(month == 9) {
month = "September";
}
else if(month == 10) {
month = "October";
}
else if(month == 11) {
month = "November";
}
else {
month = "December";
}
}
onClipEvent(enterFrame) {
this.date = month + " " + day + “, 2004”;
}
When I run it, the result in the text box is “April 0, 2004”
Any help?