Logro que carguen las variables pero no me aplica las fechas en el calendario y si habilito las lineas de dias_activos y acciones funciona de maravilla, ya le he buscado y nada más no logro hacer que funcione este es el código que utiliza:
Código :
_lockroot = true; carga = new LoadVars(); carga.onLoad = function(ok) { if (ok) { dias_activos = [carga.dias_activos]; acciones = [carga.descri]; }; }; carga.load("evento.txt"); ma = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]; //dias_activos = ["01/11/2008","02/11/2008","06/11/2008","30/11/2008"]; //acciones = ["Feliz Año Nuevo","El dia de Muertos","Mi cumple","El nacimiento de Diegín"]; hoy = new Date(); diaHoy = hoy.getDate(); mesCurso = mesHoy = hoy.getMonth(); anioCurso = anioHoy = (Number(hoy.getYear())+1900); function meses(m,a) { for(k=0;k<32;k++) { _root["tempo"+k].removeMovieClip(); }; algo.removeMovieClip(); _root.createEmptyMovieClip("algo",999); delete elmes; //trace(elmes+"elmes"); elmes = new Date(a,m); mesCurso = elmes.getMonth(); anioCurso = (Number(elmes.getYear())+1900); mes_txt.text = ma[mesCurso]+" "+anioCurso; encol = 1; for(d=1;d<=31;d++) { hoyToca = 0; elmes.setDate(d); if(elmes.getMonth()==mesCurso) { for(k=0;k<dias_activos.length;k++) { trace(dias_activos) manejo = new Array(); manejo = dias_activos[k].split("/"); if(manejo[0]==d && manejo[1]==(Number(mesCurso)+1) && manejo[2]==anioCurso) { hoyToca = d; enDia = k; }; }; if(hoyToca>0) { dia = hazBoton(d, d, acciones[enDia] ,idblog[enDia]); } else { if(d==diaHoy && mesCurso==mesHoy) { dia = hazDia(d,"0x71B7FB", d); } else { dia = hazDia(d,"0xF2F2F2", d); //color de fondo de los numeros de dias }; }; dia._x = 27*elmes.getDay(); dia._y = 27*encol; if(elmes.getDay()>=6) { encol++; }; //trace(elmes.getMonth()); }; }; }; function hazDia(p, col, label) { var tm_mc = algo.createEmptyMovieClip("tempo"+p, p); tm_mc.beginFill(col); tm_mc.lineStyle(1, 0x6A6A6A); //color líneas de division tm_mc.lineTo(0, 0); tm_mc.lineTo(0+27, 0); tm_mc.lineTo(0+27, 0+27); tm_mc.lineTo(0, 0+27); tm_mc.lineTo(0, 0); format = new TextFormat(); format.font = "Arial"; // tipo de fuente format.size = 13; //tamaño de la fuente format.bold = false; //activa negritas format.color = 0x000000; //color de la fuente tm_mc.createTextField("label_txt", p+100, 2, 0, 0, 0); tm_mc.label_txt.selectable = false; tm_mc.label_txt.embedFonts = false; //embeber la fuente tm_mc.label_txt.text = label; tm_mc.label_txt.autoSize = true; tm_mc.label_txt.setTextFormat(format); return tm_mc; }; function hazBoton(p, label, accion,idb) { var tm_mc = activo.duplicateMovieClip("tempo"+p,p); format = new TextFormat(); format.font = "Arial"; format.size = 13; format.bold = false; format.color = 0xFAB4E7; tm_mc.createTextField("label_txt", p+100, 2, 0, 0, 0); tm_mc.label_txt.selectable = false; tm_mc.label_txt.html = true; tm_mc.label_txt.text = label; tm_mc.label_txt.autoSize = true; tm_mc.label_txt.setTextFormat(format); tm_mc.accion = accion; tm_mc.bt.onRelease = function() { this.busca_lycos(idb); }; return tm_mc; }; ant_mc.onRelease = function() { if (mesCurso>0) { meses(--mesCurso, anioCurso); } else { mesCurso = 11; meses(mesCurso, --anioCurso); } }; sig_mc.onRelease = function() { if (mesCurso<11) { meses(++mesCurso, anioCurso); } else { mesCurso = 0; meses(mesCurso, ++anioCurso); } }; meses(mesHoy,anioHoy); stop();
y el txt contiene lo siguiente:
Código :
&dias_activos=01/11/2008,02/11/2008,06/11/2008,30/11/2008& &descri=Feliz Año Nuevo,El dia de Muertos,Mi cumple,El nacimiento de Diegín&
todo está en Flash Mx 2004 (

Saludos.