Comunidad de diseño web y desarrollo en internet online

error en timer

Citar            
MensajeEscrito el 30 May 2012 02:38 pm
estoy haciendo un simple slideShow con unos videos en medio en el q uso un Timer para hacer la transición entre fotogramas el Timer ejecuta la funcion q hace avanzar, cuando llega al video se detiene, espera a que el video termine, y vuelve a arrancar, la cosa es q entra en la funcion, ejecuta, pero me tira un error?¿?

Código :

TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
   at vid_fla::MainTimeline/slideShow()
   at flash.utils::Timer/_timerDispatch()
   at flash.utils::Timer/tick()


el codigo es simple:

Código ActionScript :

var _video:FLVPlayback = mainClip.verallia;
var _rank:Number = 3;
//
_interval = new Timer((_rank *1000),0);
_interval.start();
_interval.addEventListener(TimerEvent.TIMER, slideShow);
//
function slideShow(event:TimerEvent):void
{   
   mainClip.nextFrame();
        if (mainClip.currentLabel == "verallia")
   {
      _interval.removeEventListener(TimerEvent.TIMER, slideShow);
      mainClip.verallia.addEventListener(VideoEvent.COMPLETE, continueMovie);
   }
}
function continueMovie(e:VideoEvent):void
{   
   mainClip.nextFrame();
   _interval.addEventListener(TimerEvent.TIMER, slideShow);
}

Por penHolder

Claber

4661 de clabLevel

39 tutoriales
2 articulos

Genero:Masculino   Premio_Secretos

| mdz |

chrome
Citar            
MensajeEscrito el 30 May 2012 04:52 pm
Si dentro del if apuntas que deber'ia estar en el fotograma al que se mueve (sospecho de mainClip.verallia ) entonces te dice que no existe, porque mueve el cabezal, pero todavía no instancia los elementos del nuevo frame ... desde AS1 se reportan estos problemas, pero es asi como funciona

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 30 May 2012 05:38 pm
pasa q el error lo tira cada vez q ejecuta la funcion aun despues de haber pasado el video :?

Por penHolder

Claber

4661 de clabLevel

39 tutoriales
2 articulos

Genero:Masculino   Premio_Secretos

| mdz |

chrome
Citar            
MensajeEscrito el 30 May 2012 07:01 pm
Con que lo tire una vez suficiente, mira si lo que te digo tiene sentido

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.