A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] For Loop with Mind of its Own!!!!

Threaded View

  1. #1
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80

    [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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center