home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Acao
/
Titans
/
raven.swf
/
scripts
/
frame_10
/
DoAction.as
Wrap
Text File
|
2006-01-05
|
4KB
|
178 lines
call("pro");
stopAllSounds();
_global.r = this;
_global.n = this.raven;
Mouse.hide();
r.attachmovie("cursor","cursor",65000);
fadescreen();
noshot = 0;
crash = 0;
grav = 0.1;
grav2 = 0.7;
energymax = 100;
energy = energymax;
energyless = 20;
energymiss = 8;
overloadenergy = 10;
finish = 0;
ontop = 0;
score = 0;
point = 100;
totalfloor = 50;
floornow = 0;
scrollspeed = 3;
stopscroll = 0;
inv = 0;
r.cheat1 = 0;
invhitdelay = 50;
bonus1delay = 80;
rd = 1000;
rd2 = 990;
got = 0;
hit = 0;
rubspeed = 2.7;
rubspeedmax = 5;
rubdelay = 20;
rubdelaymin = 16;
d = rubdelay;
level = 400;
ld = level;
toprubdelay = 90;
td = toprubdelay;
stoprubble = 0;
rubtipe1 = [1,2,3,4,5,6,7,8,9,10];
rubtipe1a = rubtipe1.copy();
rubtipe1a.randomize();
rubtipe2 = [11,12,13];
rubtipe2a = rubtipe2.copy();
rubtipe2a.randomize();
rubpos = [100,150,200,250,300,350,400,450,500];
rubpos2 = rubpos.copy();
rubpos2.randomize();
rubs = [];
r.createEmptyMovieClip("sfx",60001);
allsfx = ["zbonus","zhit","zrock","zspeaker","ztv","zwater","zsplash","zshrink"];
var i = 0;
while(i < allsfx.length)
{
r[allsfx[i]] = new sound(sfx);
r[allsfx[i]].attachsound(allsfx[i]);
i++;
}
r.createEmptyMovieClip("sfx2",60002);
r.zloop = new sound(sfx2);
r.zloop.attachsound("zloop");
r.createEmptyMovieClip("sfx3",60003);
r.zboss = new sound(sfx3);
r.zboss.attachsound("zboss");
r.createEmptyMovieClip("sfx4",60004);
r.zlose = new sound(sfx4);
r.zlose.attachsound("zlose");
r.createEmptyMovieClip("sfx5",60005);
r.zwin = new sound(sfx5);
r.zwin.attachsound("zwin");
zloop.start(0,999999);
var i = 0;
while(i < 15)
{
r.attachmovie("lill","rub" + r.rd,r.rd);
r["rub" + r.rd]._x = 50 + random(550);
r["rub" + r.rd]._y = -5 + random(350);
r.rd = r.rd + 1;
i++;
}
rockwait = 5;
onenterframe = function()
{
if(!r.stoprubble)
{
d--;
if(!d)
{
bonus1delay--;
if(bonus1delay == 0)
{
d = 2 * r.rubdelay;
r.attachmovie("bonus1","bonus1",r.rd);
r.rd = r.rd + 1;
}
else
{
d = r.rubdelay;
r.attachmovie("rub","rub" + r.rd,r.rd);
if(!rubpos2.length)
{
rubpos2 = rubpos.copy();
rubpos2.randomize();
}
r["rub" + r.rd]._x = rubpos2.pop();
r["rub" + r.rd]._y = -100;
if(rockwait > 0)
{
rockwait--;
next = 1;
}
else
{
next = 2;
rockwait = 1 + random(3);
}
if(next == 1)
{
if(!rubtipe1a.length)
{
rubtipe1a = rubtipe1.copy();
rubtipe1a.randomize();
}
r["rub" + r.rd].tipe = rubtipe1a.pop();
}
else
{
if(!rubtipe2a.length)
{
rubtipe2a = rubtipe2.copy();
rubtipe2a.randomize();
}
r["rub" + r.rd].tipe = rubtipe2a.pop();
}
r.rubs.push("rub" + r.rd);
r.rd = r.rd + 1;
}
}
ld--;
if(!ld)
{
ld = r.level;
if(r.rubdelay > r.rubdelaymin)
{
r.rubdelay--;
}
if(r.rubspeed < r.rubspeedmax)
{
r.rubspeed += 0.2;
}
}
if(random(100) > 70)
{
r.attachmovie("lill","rub" + r.rd,r.rd);
r["rub" + r.rd]._x = 50 + random(550);
r["rub" + r.rd]._y = -20;
r.rd = r.rd + 1;
}
}
if(r.ontop)
{
r.td--;
if(!r.td)
{
r.stoprubble = 1;
rockwait = 100000;
}
}
if(r.inv > 0)
{
r.inv--;
}
};
stop();