home *** CD-ROM | disk | FTP | other *** search
- curPos += speed;
- if(curPos > maxMove)
- {
- speed = - Math.abs(speed);
- curPos = maxMove;
- if(!loop)
- {
- gotoAndStop(1);
- }
- }
- else if(curPos < 0)
- {
- speed = Math.abs(speed);
- curPos = 0;
- if(!loop)
- {
- gotoAndStop(1);
- }
- }
- if(moveAxe == "x")
- {
- _X = _X + speed;
- _parent._parent["anim_" + _name]._x += speed;
- if(perso.persoFeet.hitTest(this))
- {
- perso._x += speed;
- }
- }
- else
- {
- _Y = _Y + speed;
- _parent._parent["anim_" + _name]._y += speed;
- if(perso.persoFeet.hitTest(this))
- {
- perso._y += speed;
- }
- }
-