Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/09/2008, 15:09
Pilar80
 
Fecha de Ingreso: septiembre-2007
Mensajes: 91
Antigüedad: 16 años, 7 meses
Puntos: 0
Cambiar color domingos en calendario

Hola!
No doy con el código actionscript para cambiar el color de la casilla y del número del calendario, supongo que será un código sencillo, pero por muchas pruebas que hago no lo consigo.
Una parte del código actionscript de mi calendario (donde creo que debe ir el cambio) es el siguiente:
Código PHP:
// which day of week does the month begin on
juliandate Number(Number(Number(367*myyear-int(7*(Number(myyear)+Number(int((Number(mymonth)+9)/12)))/4))+Number(int((275*mymonth)/9)))+1)+1721013.5;
mjd juliandate-2400000.5;
whichday mjd-int(mjd/7)*7;
whichday Number(whichday)+3;
if (
Number(whichday)>=7) {
    
whichday whichday-7;
}
// initialize day and row variables
counter 2;
currentday Number(whichday)+1;
currentrow 0;
daysinmonth = eval("month" add mymonth);
// check for leap year
if (Number(int(myyear/4)) == Number((myyear/4)) and Number(mymonth) == 2) {
    
daysinmonth 29;
}
//initialize day1
if(_root.yearNode_xml==|| _root.monthNode_xml==0){
    
_root.dayNode_xml=0;
}

else{
    
_root.dayNode_xml=monthNode_xml.firstChild;
    
_root.dayNode_xml=setDay(_root.dayNode_xml,1,"square1");
}

//set day1 values


while (Number(counter)<=Number(daysinmonth)) {
    
// end of week? start new row
    
if (Number(currentday) == 7) {
        
currentday 0;
        
currentrow Number(currentrow)+1;
    }
    
// duplicate square for each day in month and move to correct position and intialize values
    
duplicateMovieClip("/square1""square" add countercounter);
    
setProperty("/square" add counter_xNumber(getProperty("/square1"_x))+Number(getProperty("/square1"_width)*currentday));
    
setProperty("/square" add counter_yNumber(getProperty("/square1"_y))+Number(getProperty("/square1"_height)*currentrow));
    
set("/square" add counter add ":daynum"counter);
    
    
_root.dayNode_xml=setDay(_root.dayNode_xml,counter,"square"+counter);
    
    
counter Number(counter)+1;
    
currentday Number(currentday)+1;
}
// move first day into right spot
setProperty("/square1"_xNumber(getProperty("/square1"_x))+Number(getProperty("/square1"_width)*whichday));


// highlight current day
if((_root.myyear==_root.todayYear)&&(_root.mymonth==_root.todayMonth)){
    var 
mc="square"+myday;
    
_root[mc].daynum_txt.textColor=_root.myColorAS;
}

// month title
monthtitle = eval("namemonth" add mymonthadd " " add myyear;
trace("MONTHTITLE: " monthtitle);
_root.monthtitle_txt.text=monthtitle;
_root.monthtitle_txt.textColor=_root.myColorAS
El mc square1 es de fondo beige y el número marron, y lo que quiero es que los domingos sean al contrario, de fondo marron y numero beige.
Alguien me puede guiar?