function cargando ():void
{
var total, cargados, porcentaje;
total = MovieClip(root).LoaderInfo.bytesTotal();
cargados = MovieClip(root).LoaderInfo.bytesLoaded();
porcentaje = Math.floor((cargados*100)/total);
porcentaje_txt.text = porcentaje;
MovieClip(this).mi_barra.gotoAndStop(porcentaje);
if (cargados == total) {
//Hacer que se deje de ejeuctar esta función
clearInterval(hiloPrecarga);
//Iniciar la pelicula
play();
}
}
var hiloPrecarga = setInterval(MovieClip(root).cargando, 1);
stop();
pero me manda un error
TypeError: Error #1010: Un término no está definido y no tiene propiedades.
at servicios_fla::MainTimeline/cargando()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at <anonymous>()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
y no se a que se deba.
espero y me puedan ayudar.