home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Acao
/
synj_sneak_attack.swf
/
scripts
/
frame_5
/
DoAction.as
Wrap
Text File
|
2006-10-06
|
3KB
|
120 lines
function scroll()
{
if(3400 < _root.score)
{
scrollspeed = - (speed + 6);
}
else if(2400 < _root.score)
{
scrollspeed = - (speed + 4);
}
else if(1400 < _root.score)
{
scrollspeed = - (speed + 2);
}
else
{
scrollspeed = - speed;
}
_root.fg._x += scrollspeed * 2;
_root.fg2._x += scrollspeed * 2;
_root.bg._x += scrollspeed;
_root.sky._x += scrollspeed / 5;
_root.plant1._x += scrollspeed;
_root.log._x += scrollspeed;
_root.mine._x += scrollspeed;
_root.bush._x += scrollspeed;
_root.hill._x += scrollspeed;
_root.bird._x += scrollspeed;
_root.gnome._x += scrollspeed;
_root.gnome2._x += scrollspeed;
if(_root.bg._x < 0)
{
_root.bg._x = 639 + scrollspeed;
}
if(_root.fg._x - scrollspeed * 2 < -415)
{
_root.fg._x = 1140;
_root.fg.gotoAndStop(random(3) + 1);
}
if(_root.fg2._x - scrollspeed * 2 < -415)
{
_root.fg2._x = 1140;
_root.fg2.gotoAndStop(random(3) + 1);
}
if(_root.sky._x < -385)
{
_root.sky._x = 385;
}
if(_root.plant1._x - scrollspeed < -70)
{
_root.plant1._x = 700;
}
}
function synj_hurt()
{
_root.synj.hurt = true;
_root.synj.timer_hurt = 25;
_root.face = "pissed";
_root.s_hit.start();
}
function synj_jump()
{
_root.synj.jumping = true;
_root.synj.dest_y = _root.synj._y - 240;
_root.jumpspeed = _root.jumpspeed_max;
_root.synj.legs.gotoAndStop("jump");
}
_quality = "medium";
score = 0;
life = 5;
firepower = 3;
speed = 18;
jumpspeed_max = 30;
jumpspeed_min = 5;
jumpspeed = jumpspeed_min;
face = "normal";
limit_right = 500;
limit_left = 40;
ramp = false;
music = new Sound();
music.attachSound("music");
s_boom1 = new Sound();
s_boom1.attachSound("boom1");
s_boom2 = new Sound();
s_boom2.attachSound("boom2");
s_clang = new Sound();
s_clang.attachSound("clang");
s_fire1 = new Sound();
s_fire1.attachSound("fire1");
s_fire2 = new Sound();
s_fire2.attachSound("fire2");
s_sword1 = new Sound();
s_sword1.attachSound("sword1");
s_sword2 = new Sound();
s_sword2.attachSound("sword2");
s_splat1 = new Sound();
s_splat1.attachSound("splat1");
s_splat2 = new Sound();
s_splat2.attachSound("splat2");
s_squawk = new Sound();
s_squawk.attachSound("squawk");
s_hit = new Sound();
s_hit.attachSound("hit");
red = new Object();
red.ra = 150;
red.rb = 150;
red.ba = 20;
red.bb = 10;
green = new Object();
green.ga = 150;
green.gb = 150;
nada = new Object();
nada.ra = 100;
nada.rb = 0;
nada.ga = 100;
nada.gb = 0;
nada.ba = 100;
nada.bb = 0;
nextFrame();