home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 108
/
jogo-disk-108.iso
/
Games
/
Titans
/
robin.swf
/
scripts
/
DefineSprite_56
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-05-15
|
734b
|
42 lines
framerange = 20;
mid = 21;
dyrange = 10;
dymin = - dyrange;
dymax = dyrange;
rb.gotoAndStop(mid);
onenterframe = function()
{
if(r.shakebike)
{
if(random(100) > 50)
{
ad = -1;
}
else
{
ad = 1;
}
rb.gotoAndStop(mid + ad);
rb._y = -2 + random(4);
rb._x = -2 + random(4);
rb._rotation = 0;
}
else
{
rb._y = 0;
rb._x = 0;
dy = s._y - r.oldy;
if(dy < dymin)
{
dy = dymin;
}
else if(dy > dymax)
{
dy = dymax;
}
fra = mid + math.floor(dy / dyrange * framerange);
rb.gotoAndStop(fra);
rb._rotation = 0.7 * dy;
}
};