Tema: if
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2009, 13:00
txepetxa
 
Fecha de Ingreso: julio-2008
Mensajes: 51
Antigüedad: 15 años, 8 meses
Puntos: 1
if

Hola soy bastante nuevo por este foro ,y tengo un problema con un codigo As creo que es simple pero no se que hago mal.
El problema es que he creado txt con unas variables urte1=2009-MARTXOA-10&urte2=2009-MARTXOA-25& etc....

onClipEvent (enterFrame) {
meses = new Array("URTARILA","OTSAILA","MARTXOA","APIRILA","MA ITZA","EKAINA","UTZAILA","ABUZTUA","IRAILA","URRIA ","ARAZOA","ABENDUA");
hilabete = fecha.getMonth();
mes = meses[hilabete];
fecha = new Date( );
_root.U = fecha.getFullYear();
_root.H = mes;
_root.E = fecha.getDate();
_root.total = _root.U+"-"+_root.H+"-"+_root.E;
}

onClipEvent (load) {
loadVariablesNum ("dias.txt", 0);
}
onClipEvent (enterFrame) {
if (_root.total==_root.urte1) {
trace ("ok1");
} else if (_root.total == _root.urte2) {
trace ("ok2");
setProperty (this, _alpha, 25);
} else if (_root.total==_root.urte3) {
trace ("ok3");
}
}
La cuestion es que las variables me las carga en unos cuadros de texto pero la igualdad del if no la detecta.

Podrian ayudarme me estoy volviendo loco con esto estoy trabajando con flash 5


Muchas gracias Mil ezker