home *** CD-ROM | disk | FTP | other *** search
- function iniciaContagem()
- {
- clearInterval(intvCont);
- intvCont = setInterval(function()
- {
- tempo--;
- if(tempo == 0)
- {
- fim = true;
- stopDrag();
- clearInterval(intvCont);
- principal.gotoAndStop("perde");
- }
- }
- ,500);
- return undefined;
- }
- function fimDeJogo(vence)
- {
- fim = true;
- clearInterval(intvCont);
- if(vence)
- {
- intvCont = setInterval(function()
- {
- clearInterval(intvCont);
- gotoAndStop("vence");
- }
- ,500);
- return undefined;
- }
- vidas--;
- intvCont = setInterval(function()
- {
- clearInterval(intvCont);
- vidas != 0 ? continuaFase(false) : (gotoAndStop("perde"), §§push(undefined), undefined);
- }
- ,500);
- return undefined;
- }
- function fimDeFase()
- {
- stopDrag();
- clearInterval(intvCont);
- fim = true;
- okChegada = true;
- principal.gotoAndStop(4);
- pontos += tempo;
- pontos += barraDeEnergia._width;
- if(fase == labirintos._totalframes)
- {
- fimDeJogo(true);
- return undefined;
- }
- painel.play();
- return undefined;
- }
- function continuaFase(nf)
- {
- principal._x = pX;
- principal._y = pY;
- labirintos.labirinto.gotoAndStop(1);
- principal.gotoAndStop(1);
- barraDeEnergia._width = 100;
- if(nf)
- {
- fase++;
- labirintos.nextFrame();
- }
- tempo = tempoTotal;
- contando = false;
- okChegada = false;
- clearInterval(intvCont2);
- intvCont2 = setInterval(function()
- {
- clearInterval(intvCont2);
- fim = false;
- }
- ,500);
- return undefined;
- }
- stop();
- var pontos = 0;
- verPainel = false;
- var dragMouse = false;
- var contando = false;
- var okChegada = false;
- var fim = false;
- var bMargem = 20;
- var tempoTotal = 300;
- var tempo = tempoTotal;
- var fase = 1;
- var vidas = 5;
- var enDec = 2;
- var pX = 45;
- var pY = 45;
-