home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Aventura
/
pendekar.swf
/
scripts
/
DefineSprite_395
/
frame_1
/
DoAction.as
Wrap
Text File
|
2006-05-08
|
1KB
|
63 lines
this.onEnterFrame = function()
{
tellTarget(_parent)
{
if(inStage())
{
_X = _X + dirValue(speed);
}
else if(!inStage() && _parent.isScroll && dir == 1)
{
_parent.scrollStage(speed);
}
if(attack)
{
if(weapon > 0)
{
attWeapon();
}
else
{
attCombo(1);
}
}
else if(duck)
{
duckDown();
}
else if(special)
{
if(weapon > 0)
{
releaseWeapon();
}
else if(weapon == 0)
{
attSpecial();
}
}
else if(dir == 1)
{
if(jump)
{
jumpRight();
}
if(left || !right)
{
gotoAndStop(getIdleState());
}
}
else if(dir == -1)
{
if(jump)
{
jumpLeft();
}
if(!left || right)
{
gotoAndStop(getIdleState());
}
}
}
};