Hi,
Im making a sort of callendar, and I’ve ran upon some problems with a function.
tMonth = new Array();
tMonth = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
tMonthDays = new Array();
tMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
mConstruct = function(d, tabname) {
for (i = 1; i < tMonthDays[d] + 1; i++) {
tabname = new Array();
tabname* = i;
}
return tabname;
};
asdf = mConstruct(0, february);
trace(asdf);
This is just a part of the script, the whole thing will kinda look like a calendar, it will load certain dates from an XML file, cross-check them with the dates, and then it will mark them in a different way in the SWF. However this sample of code should just build arrays of days using the name of the month array, and days in it array.
Later Im gonna check if dates from the xml match some dates in those arrays. If they will, it will change theyr apperance.
Tell me if it’s a good idea for such a thing. I don’t have much experience in coding, so I might be going the wrong way on this one.
Thx.