Estoy cargando variables desde un TXT externo por medio de LoadVars, al hacer la prueba localmente funciona correctamente, pero al subirla a internet, pues nada
El archivo .txt está en formato Unicode y las variables están de la siguiente manera:
&texto1=algun texto
El código es el siguiente (tmbien carga imagenes)
Código :
//Variables
total = 9;
whichPic = 1;
cuadrogris._alpha = 1;
// Asignando Variables y atributos HTML
carga = new LoadVars();
carga.html = true;
carga.onLoad = function(ok) {
if (ok) {
caja.htmlText = this.describe;
describe = eval("carga.texto"+whichPic);
}
};
//Archivo de carga y cambio al presionar siguiente
carga.load("/swfs/campo.txt");
siguiente.onPress = function() {
carga = new LoadVars();
carga.html = true;
carga.onLoad = function(ok) {
if (ok) {
caja.htmlText = this.describe;
describe = eval("carga.texto"+whichPic);
}
};
carga = new LoadVars();
carga.html = true;
carga.onLoad = function(ok) {
if (ok) {
caja.htmlText = this.describe;
describe = eval("carga.texto"+whichPic);
}
};
carga.load("/swfs/campo.txt");
if (whichPic<total && !fadeIn && !fadeOut) {
fadeOut = true;
carga = new LoadVars();
carga.html = true;
carga.onLoad = function(ok) {
if (ok) {
caja.htmlText = this.describe;
describe = eval("carga.texto"+whichPic);
}
};
carga.load("/swfs/campo.txt");
whichpic++;
input = whichPic;
}
};
//Cabia de texto al presionar anterior
anterior.onPress = function() {
carga = new LoadVars();
carga.onLoad = function(ok) {
if (ok) {
caja.htmlText = this.describe;
describe = eval("carga.texto"+whichPic);
}
};
carga.load("/swfs/campo.txt");
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// cuando la nueva foto es selecc. y comienza fade out, llama a la nueva imagen, y fade in
if (cuadrogris._alpha>10 && fadeout) {
cuadrogris._alpha -= 25;
}
if (cuadrogris._alpha<15) {
loadMovie("/imagenes/imagen"+whichPic+".jpg", "cuadrogris");
fadeOut = false;
fadeIn = true;
}
if (cuadrogris._alpha<100 && fadein && !fadeout) {
cuadrogris._alpha += 10;
} else {
fadeIn = false;
}
// total de imagenes
if (input>total) {
input = total;
}
};
Espero que me entiendan y me pueda ayudar, Gracias.
