home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 108
/
jogo-disk-108.iso
/
Games
/
Titans
/
robin.swf
/
scripts
/
DefineSprite_240_hc
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-05-15
|
2KB
|
91 lines
_X = 700;
_Y = 100;
energy = 5;
xs = -12;
udah = 0;
delay = 160;
shootdelay = 40;
sd = shootdelay;
ys = -1;
r.zhc.start(0,999999);
r.zhc.setvolume(0);
movieclip.prototype.stopgun = function()
{
this.shooting = 0;
r.zhcgun.stop();
h.h.gun.gotoAndStop(1);
r.hcfire.removeMovieClip();
};
onenterframe = function()
{
if(!udah)
{
_X = _X + xs;
xs *= 0.95;
if(_X < 500)
{
udah = 1;
x = _X;
y = _Y;
d = delay;
}
if(r.zhc.getvolume() < 100)
{
r.zhc.setvolume(r.zhc.getvolume() + 10);
}
}
else
{
d--;
if(d > 0)
{
_X = x + math.sin(a++ * 0.03) * 20;
_Y = y + math.sin(a++ * 0.03) * 8;
sd--;
if(sd == 30)
{
shooting = 1;
r.zhcgun.start(0,999999);
h.h.gun.gotoAndStop(2);
r.attachmovie("hcfire","hcfire",r.ed);
r.hcfire.dep = r.ed;
r.hcfire._x = _X - 100;
var sy = s._y;
if(sy < r.ymin)
{
sy = r.ymin;
}
r.hcfire._y = sy;
r.ed = r.ed + 1;
}
if(!sd)
{
sd = shootdelay;
stopgun();
}
}
else
{
stopgun();
_Y = _Y + ys;
_X = _X + xs;
xs *= 1.1;
ys *= 1.05;
if(r.zhc.getvolume() > 0 and _X < 300)
{
r.zhc.setvolume(r.zhc.getvolume() - 3);
}
if(_Y < -50)
{
r.zhc.stop();
r.enemy.removevalue(_name);
delete onenterframe;
this.removeMovieClip();
stop();
}
}
}
cekbulletenemy2();
};
stop();