dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: for (; ; ) question

  1. #1
    Member
    Join Date
    Oct 2000
    Posts
    78
    using this...
    Code:
    daysToGoBack = 6;
    date = new Date();
    day = date.getDay();
    monthNum = date.getMonth()+1;
    dateNum = date.getDate();
    fullYear = String(date.getFullYear());
    year = fullYear.substr(2, 4);
    today = monthNum+"/"+dateNum+"/"+year;
    for (i=0; i<daysToGoBack; i++) {
        dateNum = dateNum-1;
        set ("endDate"+i, monthNum+"/"+dateNum+"/"+year);
    }
    to create this...
    [swf width=250 height=300]http://www.geocities.com/tapo210/help.swf[/swf]

    it gets the current date and goes back the six previous days (i have a script that accounts for changing in between months) but i cant figure out why it duplicates a number twice. the code seems ok to me, anyone have some insight? if need be...

    http://www.geocities.com/tapo210/help.zip

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    1,838
    Maybe you have solved it.

    You got two endDate2 but no endDate3;
    Check the variable name of the textbox.

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