scx7 escribió:
te faltó la referencia this.
Código :
this.main_btn.onRelease = function() {
getURL(Page.firstChild.childNodes[0].attributes.nombre);
};
la cual debe estar en la misma linea de tiempo.
Hola, muchas gracias por la ayuda y la bienvenida, ahora utilicé el this pero moví el botonzote con el movieclip a otra escena para ver si tenía algo que ver que el cargador del xml no estuviera en el primer frame, sigue sin hacer nada de nada, lo extraño es que si funciona en otras circunstancias. Ayudará en algo que ponga el código de mi pre-loader??. No sé lo de que se trate
ya probé poniendo el script directo en la instancia del botón, lo quité y terminó luciendo así:
Código :
this.main_btn.onRelease = function () {
getURL(Page.firstChild.childNodes[0].attributes.nombre);
}
¿Qué podrá ser?... Gracias de antemano por la ayuda.
-----------------------------
Mi cargador
Frame 1
Código :
//iniciamos variables y propiedades
estado=0;
setProperty("pBar",_xscale,0);
Frame 2
Código :
//calculamos el porcentaje cargado y lo aplicamos a
//nuestra barra y campo de texto
setProperty("pBar", _xscale, iBytes);
estado=iBytes add "%";
iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = ((iBytesLoaded * 100) / iBytesTotal);
iBytes = int (iBytes) ;
Frame 3
Código :
//refrescamos
if (iBytes<100) {
iBytes=iBytes+2;
gotoAndPlay(2);
} else { //carga completa
estado='COMPLETE'
gotoAndPlay(4);
}
Frame 4
Código :
//carga completada
estado='COMPLETE'
gotoAndPlay("Scene 2", 1);
En mi escena 2
Frame 1
Código :
System.useCodepage = true;
var Page:XML = new XML();
Page.ignoreWhite = true;
Page.onLoad = function(exito)
{
if(exito)
{
trace("si se pudo!!");
}
else
{
trace("no se pudo");
}
}
Page.load("gcindexright.xml");
Frame 2
Código :
stop();
this.main_btn.onRelease = function(){
getURL(Page.firstChild.childNodes[0].attributes.nombre);
}
[/code]