STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228099
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

swfchan turned sixteen years old yesterday! (5may2024)

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/83920537?noj=FRM83920537-7DC" width="1" height="1"></div>

ragdollv2sp.swf

This is the info page for
Flash #8204

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Frame 81
function Vector(x, y) { this.x = x; this.y = y; this.length = Math.sqrt((x * x) + (y * y)); } function constrain(p0, p1, l) { var correction = 0.025; var dx = (p1._x - p0._x); var dy = (p1._y - p0._y); var d = new Vector(dx, dy); var r = ((d.length - l) / d.length); var x = ((d.x * 0.5) * r); var y = ((d.y * 0.5) * r); p1._x = p1._x - (x - correction); p1._y = p1._y - y; p0._x = p0._x + (x + correction); p0._y = p0._y + y; } function update() { var p; var i = 0; while (i < joints.length) { this[joints[i]].update(); i++; } } function collisions() { var p; var x; var y; var c = false; var i = 0; while (i < joints.length) { p = this[joints[i]]; if (p.collisions()) { c = true; x = p._x; y = p._y; } i++; } if (c) { if (!soundplaying) { var sbreak = new Sound(this); sbreak.onSoundComplete = function () { soundplaying = false; }; var rand = random(3); var pan = (-100 + ((head._x * 200) / 445)); sbreak.attachSound("break" + rand); sbreak.start(0, 0); sbreak.setVolume(75); sbreak.setPan(pan); soundplaying = true; } drawblood(x, y); } } function constraints() { var i = 0; while (i < 2) { constrain(lhand, lelbow, 12); constrain(lelbow, neck, 12); constrain(rhand, relbow, 12); constrain(relbow, neck, 12); constrain(neck, waist, 20); constrain(lknee, waist, 20); constrain(lfoot, lknee, 20); constrain(rknee, waist, 20); constrain(rfoot, rknee, 20); constrain(head, neck, 3.5); i++; } } function setup() { constraints(); var p; var i = 0; while (i < joints.length) { p = this[joints[i]]; p.lx = p._x; p.ly = p._y; i++; } } function drawblood(x, y) { var b; var i = 0; while (i <= (random(3) + 3)) { b = attachMovie("Blood", "Blood" + blooddepth, blooddepth++); b._x = x; b._y = y; i++; } } function drawhead(col) { var cx = 0; var cy = 0; var r = 7; head.beginFill(((col == undefined) ? 0 : (col)), 100); head.moveTo(cx + r, cy); var a = 0; while (a <= (Math.PI*2)) { head.lineTo(cx + (Math.cos(a) * r), cy + (Math.sin(a) * r)); a = a + 0.0698131700797732; } head.endFill(); } function draw(col) { clear(); lineStyle(5, ((col == undefined) ? 0 : (col)), 100); moveTo(lhand._x, lhand._y); lineTo(lelbow._x, lelbow._y); lineTo(neck._x, neck._y); lineTo(relbow._x, relbow._y); lineTo(rhand._x, rhand._y); moveTo(neck._x, neck._y); lineTo(waist._x, waist._y); lineTo(lknee._x, lknee._y); lineTo(lfoot._x, lfoot._y); moveTo(waist._x, waist._y); lineTo(rknee._x, rknee._y); lineTo(rfoot._x, rfoot._y); var dx = (neck._x - head._x); var dy = (neck._y - head._y); head._rotation = (Math.atan2(dy, dx) * 180) / Math.PI; } function onEnterFrame() { update(); constraints(); collisions(); draw(ragdollcolor); } MovieClip.prototype.useHandCursor = false; var dragging = null; var blooddepth = 0; var soundplaying = false; var ragdollcolor = 0; var joints = new Array("lhand", "lelbow", "rhand", "relbow", "neck", "waist", "lknee", "lfoot", "rknee", "rfoot", "head"); drawhead(ragdollcolor); setup(); stop();
Symbol 4 MovieClip [Blood] Frame 1
function onEnterFrame() { _x = (_x + ((xs = xs * decay))); _y = (_y + ((ys = ys * decay))); clear(); lineStyle(1, 10027008, 100); lineTo(xs, ys); var s = Math.sqrt((xs * xs) + (ys * ys)); if (s < 1) { this.removeMovieClip(); } } var ms = ((Math.random() * 10) + 10); var a = ((Math.random() * 2) * Math.PI); var xs = (Math.cos(a) * ms); var ys = (Math.sin(a) * ms); var decay = (0.7 + (Math.random() * 0.25));
Symbol 6 MovieClip [Joint] Frame 1
function update() { if (_root.dragging == this) { xs = _root._xmouse - _x; ys = _root._ymouse - _y; } else { xs = _x - lx; ys = _y - ly; } var s = Math.sqrt((xs * xs) + (ys * ys)); if (s > ms) { xs = xs * (ms / s); ys = ys * (ms / s); } if (Math.abs(xs) < 1) { xs = 0; } if (Math.abs(ys) < 0.25) { ys = 0; } lx = _x; ly = _y; _x = (_x + (xs * 0.94)); _y = (_y + (ys + 0.5)); } function force() { var s = Math.sqrt((xs * xs) + (ys * ys)); return((s >= 12) and (_root.dragging != this)); } function collisions() { var c = false; if (this._name != "head") { if (_y > 245) { _y = 245; c = true; } else if (_y < 0) { _y = 0; c = true; } if (_x > 445) { _x = 445; c = true; } else if (_x < 0) { _x = 0; c = true; } } else { var r = (_width / 2.5); if (_y > (245 - r)) { _y = (245 - r); c = true; } else if (_y < r) { _y = r; c = true; } if (_x > (445 - r)) { _x = (445 - r); c = true; } else if (_x < r) { _x = r; c = true; } } if (c) { return(force()); } return(false); } function onPress() { _root.dragging = this; } function onRelease() { _root.dragging = null; } var lx = _x; var ly = _y; var xs = 0; var ys = 0; var ms = 30; var kl = {}; Key.addListener(kl); kl.onKeyUp = function () { var k = Key.getCode(); if (k == 32) { var dx = (_x - _root._xmouse); var dy = (_y - _root._ymouse); var d = Math.sqrt((dx * dx) + (dy * dy)); if (d < 50) { _x = (_x + ((dx / d) * ms)); _y = (_y + ((dy / d) * ms)); } } }; onReleaseOutside = onRelease;

Library Items

Symbol 1 Sound [Break2]
Symbol 2 Sound [Break1]
Symbol 3 Sound [Break0]
Symbol 4 MovieClip [Blood]
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClip [Joint]Uses:5Used by:Timeline
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip [Ground]Uses:7Used by:Timeline
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:Timeline
Symbol 11 GraphicUsed by:Timeline

Instance Names

"lhand"Frame 81Symbol 6 MovieClip [Joint]
"neck"Frame 81Symbol 6 MovieClip [Joint]
"rhand"Frame 81Symbol 6 MovieClip [Joint]
"waist"Frame 81Symbol 6 MovieClip [Joint]
"lelbow"Frame 81Symbol 6 MovieClip [Joint]
"relbow"Frame 81Symbol 6 MovieClip [Joint]
"lknee"Frame 81Symbol 6 MovieClip [Joint]
"lfoot"Frame 81Symbol 6 MovieClip [Joint]
"rknee"Frame 81Symbol 6 MovieClip [Joint]
"rfoot"Frame 81Symbol 6 MovieClip [Joint]
"head"Frame 81Symbol 6 MovieClip [Joint]

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "Break2"
ExportAssets (56)Timeline Frame 1Symbol 2 as "Break1"
ExportAssets (56)Timeline Frame 1Symbol 3 as "Break0"
ExportAssets (56)Timeline Frame 1Symbol 4 as "Blood"
ExportAssets (56)Timeline Frame 1Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 1Symbol 8 as "Ground"
ExportAssets (56)Timeline Frame 81Symbol 8 as "Ground"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"
ExportAssets (56)Timeline Frame 81Symbol 6 as "Joint"




http://swfchan.com/2/8204/info.shtml
Created: 11/6 -2019 15:33:02 Last modified: 11/6 -2019 15:33:02 Server time: 07/05 -2024 00:37:55