I am using this code to get the months off of the users computer and it then highlights what ever day it is, also it is dynamic. However what if i would like to call up a just july or just november. I know how to make arrows that get the next month in the sequence but my question is could i change the script to just get a month of my choosing?
aMonths = new Array();
aMonths[0] = "January";
aMonths[1] = "February";
aMonths[2] = "March";
aMonths[3] = "April";
aMonths[4] = "May";
aMonths[5] = "June";
aMonths[6] = "July";
aMonths[7] = "August";
aMonths[8] = "September";
aMonths[9] = "October";
aMonths[10] = "November";
aMonths[11] = "December";
aDays = new Array();
aDays[0] = 31;
aDays[1] = 28;
aDays[2] = 31;
aDays[3] = 30;
aDays[4] = 31;
aDays[5] = 30;
aDays[6] = 31;
aDays[7] = 31;
aDays[8] = 30;
aDays[9] = 31;
aDays[10] = 30;
aDays[11] = 31;
function narediDates(fy,fm,fd) {
d = new Date(fy,fm,fd);
aMonth = new String(aMonths[d.getMonth()]);
aMonth = aMonth.toUpperCase();
aYear = d.getFullYear();
aD = aDays[d.getMonth()];
fDate = new Date(d.getFullYear(),d.getMonth(),0);
fDay = fDate.getDay();
j = 1;
for (i=0; i<36; i++) {
if ((j>aD)or (i<fDay)) {
rD = "";
tellTarget ("m-day" add i) {
gotoAndStop(6);
}
} else {
rD = j;
tellTarget ("m-day" add i) {
gotoAndStop(1);
}
if (j==DA) {
tellTarget ("m-day" add i) {
gotoAndStop(5);
}
}
j = j+1;
}
DA = d.getDate();
set("m-day" add i add "/:day", rd);
}
YR = aYear;
MO = d.getMonth();
gotoAndStop(2);
}
if ((YR==null) or (MO==null) or (DA==null)) {
a = narediDates();
}