mattlundstrom
12/15/2012 - 2:52 AM

Date Coding 1

Date Coding 1

var dates = new Array();
dates.push(new Date());
dates.push(new Date(2012,11,7));
dates.push(new Date(2013,0,4));

var cur_num;

for(var i=0; i<dates.length; i++)
  {
    var now:Date = new Date();
    var endDate = dates[i];

    if(now>=endDate)
    {
      cur_num = i;
    }
}

gotoAndStop(cur_num + 1);