M�rate �sto a ver si puedes sacarle m�s provecho que yo me he quedao ah�:
//--------------------------------------------------------------------------
----------
stop();
mi_txt = new LoadVars();
mi_txt.blog = this;
mi_txt.onLoad = function(success){
if(success){
texto = this.texto
trace("DENTRO: "+this.texto); //ESTE TRACE LO HACE CORRECTAMENTE
}
trace("DENTRO-FUERA: "+this.texto); // ESTE TRACE LO HACE CORRECTAMENTE
recibirTexto(this.texto)
}
mi_txt.load("kk.txt");// esta l�nea despu�s del onLoad siempre.
// No tiene contenido la variable y el trace lo hace
// a pesar de no haber cargado a�n el texto que es el contenido que esperas
trace("FUERA: "+this); // AQUI YA NO TIENE CONTENIDO LA VARIABLE
recibirTexto = function(texto){
trace("TEXTO RECIBIDO: "+texto); // AQUI RECIBES EL TEXTO
}
//--------------------------------------------------------------------------
----------
Un saludo, Dani.
----- Original Message -----
From: "David de la Puente" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 6:19 PM
Subject: Re: [ASNativos] Problema con el LoadVars() FELICES
FIESTAS!!!!!!!!!!
> Hola de nuevo.. antes de nada GRACIAS por las respuestas el fichero de
texto
> es como tu has puesto Paulo. Pero sigo teniendo el mismo problema al
> intentar acceder?????
>
> <code>
> stop();
> loadText = new LoadVars();
> loadText.onLoad = function(success) {
> if (success) {
> _global.var_texto = this.kk;
> // trace(_global.var_texto); //ESTE TRACE LO HACE CORRECTAMENTE
> }
>
> }
> loadText.load("kk.txt");// esta l�nea despu�s del onLoad siempre.
> trace(var_texto); // AQUI YA NO TIENE CONTENIDO LA VARIABLE
>
> </code>
>
> Alguna sugerencia?
>
> Gracias de nuevo
> David
> ----- Original Message -----
> From: "Paulo Carvajal -- Vudumedia.com---" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 29, 2003 6:18 PM
> Subject: Re: [ASNativos] Problema con el LoadVars() FELICES
> FIESTAS!!!!!!!!!!
>
>
> > Dos cosillas, haz el load del LoadVars despues de definir el onLoad:
> > <code>
> > loadText = new LoadVars();
> > loadText.onLoad = function(success) {
> > if (success) {
> > _global.var_texto = this.kk;
> > // trace(_global.var_texto); //ESTE TRACE LO HACE CORRECTAMENTE
> > }
> > // trace(_global.var_texto); // AQUI YA NO TIENE CONTENIDO LA VARIABLE
> > }
> >
> > loadText.load("kk.txt");// esta l�nea despu�s del onLoad siempre.
> > </code>
> >
> > Y no nos dices como es el fichero de texto, tiene que ser algo as�:
> > &kk=algo&
> >
> > Para acceder a las variables globales, no hace falta el _global por
> delante.
> > A mi me funciona de esta manera.
> >
> > Feliz a�o nuevo a todo el mundo.
> > Paulo.
> >
> > ----- Original Message -----
> > From: "David de la Puente" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, December 29, 2003 5:55 PM
> > Subject: [ASNativos] Problema con el LoadVars() FELICES
FIESTAS!!!!!!!!!!
> >
> >
> > Hola!!!! a ver si alguno puedo ayudarme....
> >
> > El problema es:
> >
> > Tengo un MC en el cual hago la carga de un fichero de texto, dentro del
> > LoadVars carga correctamente el fichero en la variable
"_global.var_texto"
> > pero, si intento acceder a esa variable desde cualquier parte de la
> pelicula
> > que no sea la funcion del LoadVars no contiene ningun valor la misma???:
> >
> > stop();
> > _global.var_texto="Lorem ipsum dolor sit amet, consectetuer adipiscing
> elit.
> > Etiam faucibus odio a lorem. Mauris nulla mauris, ultrices vel, tempor
> > vitae, consectetuer nec, sapien. Maecenas vestibulum erat a nunc.
> Phasellus
> > mattis mauris quis felis. Nam faucibus, mauris nec sodales fringilla,
> augue
> > tellus luctus velit, a imperdiet turpis sapien a quam. Quisque interdum,
> > massa et rutrum consequat, mauris velit euismod felis, vel adipiscing
leo
> > augue vel lectus. Etiam massa.";
> > loadText = new LoadVars();
> > loadText.load("kk.txt");
> > loadText.onLoad = function(success) {
> > if (success) {
> > _global.var_texto = this.kk;
> > // trace(_global.var_texto); //ESTE TRACE LO HACE CORRECTAMENTE
> > }
> > // trace(_global.var_texto); // AQUI YA NO TIENE CONTENIDO LA VARIABLE
> > }
> >
> > _root.f1();
> >
> >
> > //********************* FIN ****************************
> >
> > MUCHAS GRACIAS A TODOS Y FELICES FIESTAS!!!!!!!!!!!!!!!!
> > <!-------------------------------
> > Lista ASNativos:
> > subscripciones/desubscripciones
> > http://www.sidedev.net/asnativos
> > -------------------------------->
> >
> >
> >
> > <!-------------------------------
> > Lista ASNativos:
> > subscripciones/desubscripciones
> > http://www.sidedev.net/asnativos
> > -------------------------------->
> >
>
>
> <!-------------------------------
> Lista ASNativos:
> subscripciones/desubscripciones
> http://www.sidedev.net/asnativos
> -------------------------------->
>
<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->