1 Attachment(s)
[F8] For Loop with Mind of its Own!!!!
Code:
for (i=0; i<firstDay; i++) {
dateHolder[i].text = "";
}
for (i=firstDay; i<=_root.daysInMonth[month]; i++) {
trace(dateTracker + ":" + _root.daysInMonth[month]);
dateHolder[i].text = dateTracker;
dateTracker++;
}
for (i=i; i<=42; i++) {
trace(i);
dateHolder[i].text = "";
}
I have this series of loops I use to fillin dates of a calendar. The first one sets teh days before teh firstDay blank. The second nunmbers 1 to number of days in the month and the last is for blank days at the end of the calendar.
I trace both dateTrack and daysInMonth[month] and for august its 31. But my loop stops at 29? wtf?
Ive attached the whole file as well.