Hi there!
In this calendar i made i need to make that every day appear from 0 alpha to 100 alpha in order from 1 to 30, 31 etc. (secuenced appear)
http://www.theguaz.com/calendario/
The days are dinamically generated here is the code:
ref = this;
//
//
diasArray = ["LUNES", "MARTES", "MIERCOLES", "JUEVES", "VIERNES", "SABADO", "DOMINGO"];
mesesArray = ["ENERO", "FEBRERO", "MARZO", "ABRIL", "MAYO", "JUNIO", "JULIO", "AGOSTO", "SEPTIEMBRE", "OCTUBRE", "NOVIEMBRE", "DICIEMBRE"];
days_in_month = new Array("31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31");
//
now = new Date();
//
entonces = new Date();
//
entonces.setDate(1);
//
primerdia = entonces.getDay();
//
nDay = now.getDay();
//trace(nDay);
//
nDate = now.getDate();
//trace(nDate);
//
nYear = now.getFullYear();
//trace(nYear);
//
nMonth = now.getMonth();
//trace(nMonth);
//
a = 0;
b = primerdia-1;
if (b == -1) {
b = 6;
}
//
//
Ynicial = 0;
//
if (nYear%4 == 0) {
if (nYear%100 == 0) {
return (nYear%400 == 0);
} else {
days_in_month[1] = "29";
}
} else {
days_in_month[1] = "28";
}
//
for (count=0; count<days_in_month[nMonth]; count++) {
//
a++;
//
if (b>6) {
b = 0;
Ynicial += 90;
}
//
//
//
ref.thumbMC.duplicateMovieClip("thumbMC"+a, a);
//
ref["thumbMC"+a]._x = 90*b;
ref["thumbMC"+a]._y += Ynicial;
//
ref.thumbMC._visible = false;
//
//
ref["thumbMC"+a].textoIn.text = a;
//trace(b);
if (b == 6) {
ref["thumbMC"+a].textoIn.textColor = "0xFE8B8B";
}
ref["thumbMC"+a].ident = a;
//
//
b++;
//
}
//
ref.prevMes.textoIn.text = mesesArray[nMonth-1];
ref.nextMes.textoIn.text = mesesArray[nMonth+1];
//
ref.yiar.text = nYear;
//
ref.mestext.text = mesesArray[nMonth];
//
//
formatoDia = new TextFormat();
formatoDia.align = "center";
//
ref.textoMain.text = diasArray[nDay-1]+" "+nDate;
//
ref.textoMain.setTextFormat(formatoDia);
ref.mestext.setTextFormat(formatoDia);
ref.yiar.setTextFormat(formatoDia);
//
MovieClip.prototype.animateBrightness = function(ori) {
this.ori = ori;
this.jj = new Color(this);
this.col = this.jj.getTransform();
this.col.rb = this.col.gb=this.col.bb=this.val=this.ori;
this.jj.setTransform(this.col);
this.onRollOut = function() {
this.val = this.ori;
};
this.onRollOver = function() {
this.val = 300;
};
this.onEnterFrame = function() {
if (this.col.bb != this.val) {
this.col.rb = this.col.gb=this.col.bb += (this.val-this.col.bb)/5;
}
this.jj.setTransform(this.col);
};
};
//
stop();
How i do this ?
thank to all
theguaz