home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- if(ragDollTime > 0)
- {
- _rotation = _rotation + ragDollSpin;
- if(_rotation > ragDollStart + ragDollLimit)
- {
- _rotation = ragDollStart + ragDollLimit;
- ragDollSpin *= -1;
- }
- else if(_rotation < ragDollStart - ragDollLimit)
- {
- _rotation = ragDollStart - ragDollLimit;
- ragDollSpin *= -1;
- }
- ragDollTime--;
- }
- else
- {
- _rotation = _rotation / 1.1;
- }
- }
- ragDollTime = random(40) + 40;
- ragDollLimit = 30;
- ragDollStart = _rotation;
- ragDollSpin = random(3) + 2;
-