Frame 1
count = 0;
Frame 2
stop();
Symbol 6 MovieClip [Blood] Frame 1
function onEnterFrame() {
if (!Key.isDown(32)) {
xSpeed = xSpeed * Decay;
ySpeed = ySpeed * Decay;
_x = (_x + xSpeed);
_y = (_y + ySpeed);
clear();
lineStyle(3, 11075841, 100);
lineTo(xSpeed, ySpeed);
var _local2 = Math.sqrt((xSpeed * xSpeed) + (ySpeed * ySpeed));
if (_local2 < 1) {
this.removeMovieClip();
}
}
}
var moveSpeed = ((Math.random() * 6) + 5);
var Angle = ((Math.random() * 2) * 3.141593);
var xSpeed = (Math.cos(Angle) * moveSpeed);
var ySpeed = (Math.sin(Angle) * moveSpeed);
var Decay = (0.7 + (Math.random() * 0.25));
Symbol 17 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 25 Button
on (release) {
_root.play();
}
Symbol 26 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 26 MovieClip Frame 2
gotoAndPlay (1);
Symbol 29 MovieClip Frame 1
function updateParts() {
if (_root.Dragging == this) {
xSpeed = _root._xmouse - this._x;
ySpeed = _root._ymouse - this._y;
} else {
xSpeed = this._x - xLocation;
ySpeed = this._y - yLocation;
}
var _local3 = Math.sqrt((xSpeed * xSpeed) + (ySpeed * ySpeed)) / dragSpeed;
if (_local3 > moveSpeed) {
xSpeed = xSpeed * (moveSpeed / _local3);
ySpeed = ySpeed * (moveSpeed / _local3);
}
if (Math.abs(xSpeed) < 0) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0) {
ySpeed = 0;
}
if ((this._y >= (StageYMax - 10)) || (this._y <= (StageYMin + 5))) {
xSpeed = xSpeed * 0.01;
}
if ((this._x >= StageXMax) || (this._x <= (StageXMin + 5))) {
ySpeed = ySpeed * 0.01;
}
xLocation = this._x;
yLocation = this._y;
this._x = this._x + (xSpeed * 1);
this._y = this._y + (ySpeed + 0.6);
}
function partsForce() {
var _local3 = Math.sqrt((xSpeed * xSpeed) + (ySpeed * ySpeed));
return((_local3 > Hit) && (_root.Dragging != this));
}
function collisions() {
var _local2 = false;
if (this._name != "Head") {
if (this._y > (StageYMax - 10)) {
this._y = StageYMax - 10;
_local2 = true;
} else if (this._y < StageYMin) {
this._y = StageYMin;
_local2 = true;
}
if (this._x > StageXMax) {
this._x = StageXMax;
_local2 = true;
} else if (this._x < StageXMin) {
this._x = StageXMin;
_local2 = true;
}
} else {
var _local3 = this._width / 2.5;
if (this._y > ((StageYMax - 10) - _local3)) {
this._y = (StageYMax - 10) - _local3;
_local2 = true;
} else if (this._y < _local3) {
this._y = _local3;
_local2 = true;
}
if (this._x > (StageXMax - _local3)) {
this._x = StageXMax - _local3;
_local2 = true;
} else if (this._x < _local3) {
this._x = _local3;
_local2 = true;
}
}
if (_local2) {
return(partsForce());
}
return(false);
}
function onPress() {
_root.Dragging = this;
}
function onRelease() {
_root.Dragging = null;
}
function onEnterFrame() {
if (!Key.isDown(32)) {
(Key.isDown(65) ? ((_root.Head._x = _root.Head._x - keySpeed)) : null);
(Key.isDown(87) ? ((_root.Head._y = _root.Head._y - keySpeed)) : null);
(Key.isDown(68) ? ((_root.Head._x = _root.Head._x + keySpeed)) : null);
(Key.isDown(83) ? ((_root.Head._y = _root.Head._y + keySpeed)) : null);
}
}
var Hit = 11;
var xSpeed = 0;
var ySpeed = 0;
var dragSpeed = 1.5;
var moveSpeed = 40;
var keySpeed = 1.5;
var StageYMin = (Stage.height - Stage.height);
var StageXMin = (Stage.width - Stage.width);
var StageYMax = Stage.height;
var StageXMax = Stage.width;
var xLocation = this._x;
var yLocation = this._y;
onReleaseOutside = onRelease;
Symbol 30 MovieClip Frame 1
function getVector(x, y) {
this.x = x;
this.y = y;
this.length = Math.sqrt((x * x) + (y * y));
}
function setSize(part1, part2, size) {
var _local7 = 0.025;
var _local9 = part2._x - part1._x;
var _local8 = part2._y - part1._y;
var _local3 = new getVector(_local9, _local8);
var _local6 = (_local3.length - size) / _local3.length;
var _local4 = (_local3.x * 0.5) * _local6;
var _local5 = (_local3.y * 0.5) * _local6;
part2._x = part2._x - (_local4 - _local7);
part2._y = part2._y - _local5;
part1._x = part1._x + (_local4 + _local7);
part1._y = part1._y + _local5;
}
function updateParts() {
var _local3;
var _local2 = 0;
while (_local2 < Joints.length) {
this[Joints[_local2]].updateParts();
_local2++;
}
}
function collisions() {
var _local3;
var _local5;
var _local6;
var _local4 = false;
var _local2 = 0;
while (_local2 < Joints.length) {
_local3 = this[Joints[_local2]];
if (_local3.collisions()) {
_local4 = true;
_local5 = _local3._x;
_local6 = _local3._y;
}
_local2++;
}
if (_local4) {
if (!soundPlaying) {
var _local7 = new Sound(this);
_local7.onSoundComplete = function () {
soundPlaying = false;
};
var _local8 = random(4);
_local7.attachSound("hit" + _local8);
_local7.start();
soundPlaying = true;
}
drawBlood(_local5, _local6);
}
}
function getSize() {
var _local1 = 0;
while (_local1 < Gravity) {
setSize(leftHand, leftElbow, 12 * partsScale);
setSize(leftElbow, Neck, 12 * partsScale);
setSize(rightHand, rightElbow, 12 * partsScale);
setSize(rightElbow, Neck, 12 * partsScale);
setSize(Neck, Waist, 20 * partsScale);
setSize(leftKnee, Waist, 20 * partsScale);
setSize(leftFoot, leftKnee, 20 * partsScale);
setSize(rightKnee, Waist, 20 * partsScale);
setSize(rightFoot, rightKnee, 20 * partsScale);
setSize(Head, Neck, 3.5 * partsScale);
_local1++;
}
}
function setupParts() {
getSize();
var _local2;
var _local3 = 0;
while (_local3 < Joints.length) {
_local2 = this[Joints[_local3]];
_local2.xLocation = _local2._x;
_local2.yLocation = _local2._y;
_local3++;
}
}
function drawBlood(x, y) {
var _local2;
var _local1 = 0;
while (_local1 < (random(250) + 3)) {
_local2 = attachMovie("Blood", "Blood" + bloodDepth, bloodDepth++);
_local2._x = x;
_local2._y = y;
_local1++;
}
}
function drawHead() {
X = 0;
Y = 0;
Radius = 6.5 * headScale;
PI = 0.7853982;
controlRadius = Radius / Math.cos(PI / 2);
Head.lineStyle(2, 0, 100);
Head.moveTo(X + Radius, Y);
Head.beginFill(0, 100);
Angle = 0;
var _local2 = 0;
while (_local2 < 8) {
Angle = Angle + PI;
var _local1 = Angle - (PI / 2);
var _local5 = X + (Math.cos(_local1) * controlRadius);
var _local6 = Y + (Math.sin(_local1) * controlRadius);
var _local3 = X + (Math.cos(Angle) * Radius);
var _local4 = Y + (Math.sin(Angle) * Radius);
Head.curveTo(_local5, _local6, _local3, _local4);
_local2++;
}
Head.endFill();
}
function Draw() {
clear();
lineStyle(partsThickness, ragdollColor, 100);
moveTo(leftHand._x, leftHand._y);
lineTo(leftElbow._x, leftElbow._y);
lineTo(Neck._x, Neck._y);
lineTo(rightElbow._x, rightElbow._y);
lineTo(rightHand._x, rightHand._y);
moveTo(Neck._x, Neck._y);
lineTo(Waist._x, Waist._y);
lineTo(leftKnee._x, leftKnee._y);
lineTo(leftFoot._x, leftFoot._y);
moveTo(Waist._x, Waist._y);
lineTo(rightKnee._x, rightKnee._y);
lineTo(rightFoot._x, rightFoot._y);
var _local2 = Neck._x - Head._x;
var _local1 = Neck._y - Head._y;
Head._rotation = (Math.atan2(_local1, _local2) * 180) / 3.141593;
}
function colorChange() {
new Color(Head).setRGB(ragdollColor);
(Key.isDown(49) ? ((ragdollColor = 16711680)) : null);
(Key.isDown(50) ? ((ragdollColor = 255)) : null);
(Key.isDown(51) ? ((ragdollColor = 65280)) : null);
(Key.isDown(52) ? ((ragdollColor = 16776960)) : null);
(Key.isDown(53) ? ((ragdollColor = 16711935)) : null);
(Key.isDown(54) ? ((ragdollColor = 65535)) : null);
(Key.isDown(55) ? ((ragdollColor = 10066329)) : null);
(Key.isDown(56) ? ((ragdollColor = 6684825)) : null);
(Key.isDown(57) ? ((_root.filters = [blurFilter])) : null);
(Key.isDown(48) ? ((ragdollColor = 0)(_root.filters = [])(_root.filters = [])) : null);
}
function onEnterFrame() {
if (!Key.isDown(32)) {
updateParts();
getSize();
collisions();
Draw(ragdollColor);
colorChange();
}
}
setupParts();
_root.stop();
var Gravity = 3;
var bloodDepth = 0;
var Dragging = null;
var headScale = 1;
var partsScale = 1;
var partsThickness = (5 * partsScale);
drawHead(ragdollColor);
var soundPlaying = false;
MovieClip.prototype.useHandCursor = false;
var blurFilter = new BlurFilter(5, 5, 3);
var Joints = new Array("leftHand", "leftElbow", "rightHand", "rightElbow", "Neck", "Waist", "leftKnee", "leftFoot", "rightKnee", "rightFoot", "Head");
Instance of Symbol 29 MovieClip "Head" in Symbol 30 MovieClip Frame 1
onClipEvent (load) {
moveSpeed = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(39)) {
this._x = this._x + moveSpeed;
} else if (Key.isDown(38)) {
this._y = this._y - moveSpeed;
} else if (Key.isDown(40) && (!fall)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(37)) {
this._x = this._x - moveSpeed;
}
}
Symbol 35 Button
on (press) {
var my_sound = new Sound();
my_sound.attachSound("logoff_id");
my_sound.start(0, 900);
}
Symbol 40 Button
on (press) {
my_sound.stop();
}