Ver Mensaje Individual
  #8 (permalink)  
Antiguo 02/06/2004, 14:56
Avatar de eldervaz
eldervaz
 
Fecha de Ingreso: agosto-2003
Ubicación: lima
Mensajes: 551
Antigüedad: 20 años, 8 meses
Puntos: 0
yo uso un case, mira esto lo hice ayer:

stop();
trace(manda);
switch (manda) {
case "01" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/01.txt");
break;
case "02" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/02.txt");
break;
case "03" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/03.txt");
break;
case "04" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/04.txt");
break;
case "05" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/05.txt");
break;
case "06" :
dataVars = new LoadVars();
te.text = "cargando...";
dataVars.onLoad = function(ok) {
if (ok) {
te.html = true;
te.htmlText = dataVars.te;
}
};
dataVars.load("txt/06.txt");
break;
}



como veras, dependiendo de la variable q reciba, ejecutare una accion , con case, no tienes nada q usar, yo mando desde el _root asi mi variable

caja.manda = "01";


en este ejemplo uso solamente una caja de texto, deacuerdo a la variable q mande, me carga un txt, y asi solo uso una animacion de entrada y una caja de text

suerte
__________________
eldervaz
www.eldervaz.com | www.ini4.com