Frame 1
stop();
Frame 2
current_bytes = this.getBytesLoaded();
tot_bytes = this.getBytesTotal();
percent = int((current_bytes / tot_bytes) * 100) + "% ";
if (current_bytes >= tot_bytes) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay ("loading");
Frame 4
System.security.allowDomain("*");
mc_game = "Ultimate-Doodle-Man-2011";
mc_score = _root.bestScore;
this.createEmptyMovieClip("UAScoreBoard", 100000);
loadMovie ("http://www.ultimatearcade.com/include/flash/globalscores/globalscores_descending.swf", UAScoreBoard);
UAScoreBoard._lockroot = true;
UAScoreBoard._x = 180;
UAScoreBoard._y = 50;
play();
Frame 12
_lockroot = true;
stop();
delete human;
delete this.onEnterFrame;
var human = new Human(this);
human.trans(new Vec(1000, -200));
human.draw();
if (!mouseListener) {
this.mouseListener = {onMouseDown:function () {
human.fire();
}};
Mouse.addListener(mouseListener);
}
this.onEnterFrame = function () {
this.clear();
human.hitTest(area);
human.update();
human.draw();
};
_root.bestScore = 0;
Instance of Symbol 100 MovieClip in Frame 12
on (press) {
_parent.gotoAndPlay("game");
}
Instance of Symbol 110 MovieClip "bg" in Frame 12
onClipEvent (load) {
this.swapDepths(-99999999999);
}
Frame 16
_lockroot = true;
var human = new Human(this);
human.trans(new Vec(0, 100));
human.draw();
var line = ((-human.pts[0].x) + (Stage.width / 2));
var depth = 1000;
this.attachMovie("Field", "field", depth++);
this.attachMovie("View", "view", 1000000);
var count = 0;
var level = 1;
var prev_level = 1;
this.onEnterFrame = function () {
this.clear();
human.hitTest(field);
human.hitTest(field2);
human.update();
human.draw();
var _local4 = -(line - (Stage.width / 2));
if ((field._x + field._width) < (_local4 + 600)) {
if (!field2) {
if (count < 9) {
this.attachMovie("Field" + count, "field" + depth, depth);
level++;
_root.bg.nextFrame();
_root.bg._x = _root.bg._x + 3800;
} else {
this.attachMovie("Field" + Math.floor(Math.random() * 11), "field" + depth, depth);
_root.bg.gotoAndStop(Math.ceil(Math.random() * 10));
_root.bg._x = _root.bg._x + 3800;
}
count++;
field2 = this["field" + depth];
depth++;
field2._x = field._x + field._width;
}
}
if (field2) {
if ((field._x + field._width) < (_local4 - 600)) {
field.removeMovieClip();
field = field2;
delete field2;
prev_level++;
}
}
if (line > ((100 - human.pts[0].x) + (Stage.width / 2))) {
line = (line * 0.8) + (((100 - human.pts[0].x) + (Stage.width / 2)) * 0.2);
}
line = line - (1 - Math.floor(line / 50000));
_x = line;
view._x = (-_x) + 350;
view._y = (-_y) + 120;
view.level = "level: " + level;
var _local3 = "" + (-int(line - (Stage.width / 2)));
if (_local3.length == 1) {
_local3 = "0" + _local3;
}
if (_local3.length == 2) {
_local3 = "0" + _local3;
}
view.m = _local3.slice(0, _local3.length - 2) * 10;
view.best = _root.bestScore;
if ((human.pts[0].x < (_local4 - 400)) || (human.pts[0].y > 1000)) {
gotoAndStop ("gameOver");
}
};
stop();
_root.v_mc.removeMovieClip();
Frame 36
stop();
field.removeMovieClip();
field2.removeMovieClip();
view.removeMovieClip();
delete human;
delete field;
delete field2;
delete view;
var str = ("" + (-int(line - (Stage.width / 2))));
if (str.length == 1) {
str = "0" + str;
}
if (str.length == 2) {
str = "0" + str;
}
str = str.slice(0, str.length - 2) * 10;
if (_root.bestScore < str) {
_root.bestScore = str;
}
text = "Total Distance: " + str;
_x = 0;
var human = new Human(this);
human.trans(new Vec(1000, 200));
human.draw();
this.onEnterFrame = function () {
this.clear();
human.hitTest(area);
human.update();
human.draw();
};
stopAllSounds();
Instance of Symbol 118 MovieClip in Frame 36
on (press) {
_parent.gotoAndPlay("game");
}
Instance of Symbol 110 MovieClip "bg" in Frame 36
onClipEvent (load) {
this._x = 0;
this.swapDepths(-99999999999);
}
Symbol 7 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 1
stop();
Instance of Symbol 7 MovieClip in Symbol 8 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(Math.ceil(Math.random() * 100));
}
Instance of Symbol 8 MovieClip in Symbol 9 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(Math.ceil(Math.random() * 100));
}
Symbol 12 Button
on (release) {
gotoAndStop (2);
}
Symbol 15 Button
on (release) {
gotoAndStop (1);
}
Symbol 17 MovieClip Frame 1
_root.soundMute = "no";
stop();
Symbol 17 MovieClip Frame 2
_root.soundMute = "yes";
stop();
Symbol 51 Button
on (release) {
getURL ("http://www.ultimatearcade.com", "_blank");
}
Symbol 56 MovieClip Frame 154
_parent.gotoAndPlay(2);
stop();
Symbol 132 MovieClip [__Packages.Human] Frame 0
class Human
{
var mc, pts, size, left_wire, right_wire, walk_state, on_the_ground, use_left;
function Human (nmc) {
mc = nmc;
pts = new Array(11);
size = 3;
var _local3 = 4;
var _local4 = 6;
var _local2 = 4;
pts[0] = new Vec(0, (-size) * 2.5);
pts[1] = new Vec(0, -size);
pts[2] = new Vec(0, _local2 * size);
pts[3] = new Vec((-_local3) * size, 0);
pts[4] = new Vec(_local3 * size, 0);
pts[5] = new Vec(-size, (_local2 * size) + (_local4 * size));
pts[6] = new Vec(size, (_local2 * size) + (_local4 * size));
pts[7] = new Vec(((-_local3) * 2) * size, 0);
pts[8] = new Vec((_local3 * 2) * size, 0);
pts[9] = new Vec(-size, (_local2 * size) + ((_local4 * 2) * size));
pts[10] = new Vec(size, (_local2 * size) + ((_local4 * 2) * size));
pts[0].addLink(pts[1]);
pts[1].addLink(pts[2]);
pts[1].addLink(pts[3]);
pts[1].addLink(pts[4]);
pts[2].addLink(pts[5]);
pts[2].addLink(pts[6]);
pts[3].addLink(pts[7]);
pts[4].addLink(pts[8]);
pts[5].addLink(pts[9]);
pts[6].addLink(pts[10]);
left_wire = new Wire(mc, left_hand());
right_wire = new Wire(mc, right_hand());
left_wire.trans(left_hand());
right_wire.trans(right_hand());
walk_state = 0;
on_the_ground = 0;
use_left = true;
}
function left_hand() {
return(pts[8]);
}
function right_hand() {
return(pts[7]);
}
function trans(v) {
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].x = pts[_local2].x + v.x;
pts[_local2].y = pts[_local2].y + v.y;
pts[_local2].px = pts[_local2].px + v.x;
pts[_local2].py = pts[_local2].py + v.y;
_local2++;
}
left_wire.trans(v);
right_wire.trans(v);
}
function addForce(v) {
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].x = pts[_local2].x + v.x;
pts[_local2].y = pts[_local2].y + v.y;
_local2++;
}
}
function draw() {
var _local3 = pts[0].x - pts[1].x;
var _local2 = pts[0].y - pts[1].y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
mc.lineStyle(size * 2, 0, 100);
mc.moveTo(pts[0].x, pts[0].y);
mc.lineTo(pts[1].x, pts[1].y);
mc.lineStyle(size * 4, 0, 100);
mc.moveTo(pts[0].x, pts[0].y);
mc.lineTo(pts[0].x + _local3, pts[0].y + _local2);
mc.lineStyle(size * 2, 0, 100);
mc.moveTo(pts[1].x, pts[1].y);
mc.lineTo(pts[2].x, pts[2].y);
mc.lineStyle(size * 2, 0, 100);
mc.moveTo(pts[1].x, pts[1].y);
mc.lineTo(pts[3].x, pts[3].y);
mc.lineTo(pts[7].x, pts[7].y);
mc.moveTo(pts[1].x, pts[1].y);
mc.lineTo(pts[4].x, pts[4].y);
mc.lineTo(pts[8].x, pts[8].y);
mc.lineStyle(size * 2, 0, 100);
mc.moveTo(pts[2].x, pts[2].y);
mc.lineTo(pts[5].x, pts[5].y);
mc.lineTo(pts[9].x, pts[9].y);
mc.moveTo(pts[2].x, pts[2].y);
mc.lineTo(pts[6].x, pts[6].y);
mc.lineTo(pts[10].x, pts[10].y);
left_wire.draw();
right_wire.draw();
}
function update() {
adjust();
left_wire.update();
right_wire.update();
var _local7 = false;
if (on_the_ground > 0) {
_local7 = true;
on_the_ground--;
}
var _local2 = 10 * size;
var _local9 = 20;
pts[7].x = pts[7].x + (pts[7].vx * 0.1);
pts[8].y = pts[8].y + (pts[8].vy * 0.1);
if (_local7) {
var _local8 = -0.8;
if (walk_state < _local9) {
pts[6].y = pts[6].y + (0.02 * _local2);
pts[10].y = pts[10].y + (0.05 * _local2);
pts[5].y = pts[5].y - (0.015 * _local2);
pts[9].y = pts[9].y - (0.01 * _local2);
pts[5].x = pts[5].x - ((0.02 * _local2) * _local8);
pts[1].y = pts[1].y - (0.02 * _local2);
pts[2].y = pts[2].y + (0.02 * _local2);
} else if (walk_state < (_local9 * 2)) {
pts[5].y = pts[5].y + (0.02 * _local2);
pts[9].y = pts[9].y + (0.05 * _local2);
pts[6].y = pts[6].y - (0.015 * _local2);
pts[10].y = pts[10].y - (0.01 * _local2);
pts[6].x = pts[6].x - ((0.02 * _local2) * _local8);
pts[1].y = pts[1].y - (0.02 * _local2);
pts[2].y = pts[2].y + (0.02 * _local2);
} else {
walk_state = 0;
}
walk_state++;
}
if (_local7) {
pts[0].y = pts[0].y - (0.01 * _local2);
pts[1].y = pts[1].y - (0.001 * _local2);
pts[5].x = pts[5].x - (0.001 * _local2);
pts[6].x = pts[6].x + (0.001 * _local2);
pts[9].y = pts[9].y + (0.02 * _local2);
pts[10].y = pts[10].y + (0.02 * _local2);
pts[3].y = pts[3].y + (0.001 * _local2);
pts[4].y = pts[4].y + (0.001 * _local2);
pts[3].x = pts[3].x - (0.0001 * _local2);
pts[4].x = pts[4].x + (0.0001 * _local2);
pts[7].y = pts[7].y - (0.001 * _local2);
pts[8].y = pts[8].y - (0.001 * _local2);
var _local5 = pts[6].x - pts[5].x;
var _local4 = pts[6].y - pts[5].y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_local5 = _local5 / _local6;
_local4 = _local4 / _local6;
pts[6].y = pts[6].y + ((_local4 * 0.001) * _local2);
pts[6].x = pts[6].x + ((_local5 * 0.001) * _local2);
pts[5].y = pts[5].y - ((_local4 * 0.001) * _local2);
pts[5].x = pts[5].x - ((_local5 * 0.001) * _local2);
pts[9].y = pts[9].y - ((_local4 * 0.001) * _local2);
pts[9].x = pts[9].x - ((_local5 * 0.001) * _local2);
pts[10].y = pts[10].y + ((_local4 * 0.001) * _local2);
pts[10].x = pts[10].x + ((_local5 * 0.001) * _local2);
} else {
var _local3 = 0;
while (_local3 < pts.length) {
pts[_local3].y = pts[_local3].y + (0.01 * _local2);
_local3++;
}
pts[0].y = pts[0].y - (0.01 * _local2);
pts[1].y = pts[1].y - (0.001 * _local2);
var _local5 = pts[6].x - pts[5].x;
var _local4 = pts[6].y - pts[5].y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_local5 = _local5 / _local6;
_local4 = _local4 / _local6;
pts[6].y = pts[6].y - ((_local4 * 0.001) * _local2);
pts[6].x = pts[6].x - ((_local5 * 0.001) * _local2);
pts[5].y = pts[5].y + ((_local4 * 0.001) * _local2);
pts[5].x = pts[5].x + ((_local5 * 0.001) * _local2);
pts[9].y = pts[9].y + ((_local4 * 0.001) * _local2);
pts[9].x = pts[9].x + ((_local5 * 0.001) * _local2);
pts[10].y = pts[10].y - ((_local4 * 0.001) * _local2);
pts[10].x = pts[10].x - ((_local5 * 0.001) * _local2);
}
var _local5 = ((pts[2].x - pts[5].x) + pts[2].x) - pts[6].x;
var _local4 = ((pts[2].y - pts[5].y) + pts[2].y) - pts[6].y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_local5 = _local5 / _local6;
_local4 = _local4 / _local6;
pts[1].y = pts[1].y + ((_local4 * 0.005) * _local2);
pts[1].x = pts[1].x + ((_local5 * 0.005) * _local2);
var _local3 = 0;
while (_local3 < pts.length) {
pts[_local3].update(0.995);
_local3++;
}
adjust();
}
function fire() {
if (use_left) {
left_wire.fire();
} else {
right_wire.fire();
}
use_left = !use_left;
}
function adjust() {
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].adjustLinks();
_local2++;
}
}
function hitTest(field) {
left_wire.hitTest(field);
right_wire.hitTest(field);
var _local2 = 0;
while (_local2 < pts.length) {
var _local5 = 0;
if (field.hitTest(pts[_local2].x, pts[_local2].y, true)) {
on_the_ground = 10;
pts[_local2].x = pts[_local2].x - pts[_local2].vx;
pts[_local2].y = pts[_local2].y - pts[_local2].vy;
do {
if (!field.hitTest(pts[_local2].x, pts[_local2].y, true)) {
break;
}
var _local4 = pts[_local2].vx * 0.1;
var _local3 = pts[_local2].vy * 0.1;
if (_local5 > 5) {
_local4 = _local4 - ((pts[2].x - pts[_local2].x) * 0.1);
_local3 = _local3 - ((pts[2].y - pts[_local2].y) * 0.1);
}
pts[_local2].x = pts[_local2].x - _local4;
pts[_local2].y = pts[_local2].y - _local3;
pts[_local2].px = pts[_local2].px - _local4;
pts[_local2].py = pts[_local2].py - _local3;
_local5++;
} while (_local5 <= 10);
}
_local2++;
}
}
}
Symbol 133 MovieClip [__Packages.Vec] Frame 0
class Vec
{
var x, y, px, py, vx, vy, links, distances;
function Vec (xx, yy) {
x = xx;
y = yy;
px = xx;
py = yy;
vx = 0;
vy = 0;
links = [];
distances = [];
}
function addLink(other) {
if (Math.random() < 0.5) {
links.push(other);
distances.push(distance(other));
} else {
links.unshift(other);
distances.unshift(distance(other));
}
}
function clearLinks() {
links = [];
distances = [];
}
function update(o) {
vx = x - px;
vy = y - py;
px = x;
py = y;
vx = vx * o;
vy = vy * o;
x = x + vx;
y = y + vy;
}
function distance(other) {
var _local3 = x - other.x;
var _local2 = y - other.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function adjustUnit(other, distance) {
var _local2 = other.x - x;
var _local3 = other.y - y;
var _local5 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
var _local6 = distance - _local5;
if (_local5 == 0) {
return(undefined);
}
_local2 = (_local2 / _local5) * (_local6 * 0.5);
_local3 = (_local3 / _local5) * (_local6 * 0.5);
x = x - _local2;
y = y - _local3;
other.x = other.x + _local2;
other.y = other.y + _local3;
}
function adjustUnitRate(other, distance, alpha) {
var _local2 = other.x - x;
var _local3 = other.y - y;
var _local6 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
var _local5 = distance - _local6;
if (_local6 == 0) {
return(undefined);
}
_local2 = _local2 / _local6;
_local3 = _local3 / _local6;
x = x - (_local2 * (_local5 * alpha));
y = y - (_local3 * (_local5 * alpha));
other.x = other.x + (_local2 * (_local5 * (1 - alpha)));
other.y = other.y + (_local3 * (_local5 * (1 - alpha)));
}
function adjustLinks() {
var _local2 = 0;
while (_local2 < links.length) {
adjustUnit(links[_local2], distances[_local2]);
_local2++;
}
}
function adjustLinks2(scale) {
var _local2 = 0;
while (_local2 < links.length) {
adjustUnit(links[_local2], distances[_local2] * scale);
_local2++;
}
}
}
Symbol 134 MovieClip [__Packages.Wire] Frame 0
class Wire
{
var mc, pts, hand, size, xtarget, ytarget, hit, fired, maxsize;
function Wire (nmc, nhand) {
mc = nmc;
pts = [];
var _local2 = 0;
while (_local2 < 10) {
pts.push(new Vec(0, _local2));
_local2++;
}
_local2 = 0;
while (_local2 < (pts.length - 1)) {
pts[_local2].addLink(pts[_local2 + 1]);
_local2++;
}
hand = nhand;
size = 0.2;
xtarget = 0;
ytarget = 0;
hit = 0;
fired = 0;
maxsize = 8;
}
function handpos() {
return(pts[0]);
}
function top() {
return(pts[pts.length - 1]);
}
function fire() {
if (fired > 0) {
return(undefined);
}
var _local3 = _xmouse - pts[pts.length - 1].x;
var _local2 = _ymouse - pts[pts.length - 1].y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
xtarget = _local3 * 18;
ytarget = _local2 * 18;
size = 0.2;
fired = 15;
hit = 0;
}
function update() {
if (size <= 0) {
size = 0.0001;
}
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].update(0.9);
_local2++;
}
var _local4 = pts[pts.length - 1].x;
var _local5 = pts[pts.length - 1].y;
_local2 = 0;
while (_local2 < pts.length) {
pts[_local2].adjustLinks2(size);
_local2++;
}
pts[pts.length - 1].x = _local4;
pts[pts.length - 1].y = _local5;
var _local3 = true;
if (fired > 0) {
fired--;
if (hit > 0) {
pts[pts.length - 1].x = xtarget;
pts[pts.length - 1].y = ytarget;
size = maxsize * 0.5;
hit--;
if (hit == 0) {
fired = 0;
}
hand.adjustUnit(pts[0], 0.1);
hand.x = pts[0].x;
hand.y = pts[0].y;
_local3 = false;
} else {
size = size + 1;
if (size > 10) {
size = 10;
}
pts[pts.length - 1].x = pts[pts.length - 1].x + xtarget;
pts[pts.length - 1].y = pts[pts.length - 1].y + ytarget;
pts[pts.length - 1].px = pts[pts.length - 1].x;
pts[pts.length - 1].py = pts[pts.length - 1].y;
}
} else {
size = 0.01;
pts[pts.length - 1].x = (pts[pts.length - 1].x * 0.95) + (pts[0].x * 0.05);
pts[pts.length - 1].y = (pts[pts.length - 1].y * 0.95) + (pts[0].y * 0.05);
}
if (_local3) {
pts[0].x = hand.x;
pts[0].y = hand.y;
}
hand.adjustUnitRate(handpos(), 0.1, 0.51);
}
function draw() {
mc.lineStyle(1, 0, 100);
mc.moveTo(hand.x, hand.y);
var _local2 = 0;
while (_local2 < pts.length) {
mc.lineTo(pts[_local2].x, pts[_local2].y);
_local2++;
}
}
function hitTest(field) {
if (((hit > 0) || (fired == 0)) || (fired > 14)) {
return(undefined);
}
var _local2 = pts.length - 1;
if (field.hitTest(pts[_local2].x, pts[_local2].y, true)) {
hit = 30;
fired = 999;
xtarget = pts[_local2].x;
ytarget = pts[_local2].y;
maxsize = size;
}
}
function trans(v) {
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].x = pts[_local2].x + v.x;
pts[_local2].y = pts[_local2].y + v.y;
pts[_local2].px = pts[_local2].px + v.x;
pts[_local2].py = pts[_local2].py + v.y;
_local2++;
}
}
function addForce(v) {
var _local2 = 0;
while (_local2 < pts.length) {
pts[_local2].x = pts[_local2].x + v.x;
pts[_local2].y = pts[_local2].y + v.y;
_local2++;
}
}
}
Symbol 66 Button
on (release) {
getURL ("http://www.ultimatearcade.com/", "_blank");
}
Symbol 87 Button
on (release) {
nextFrame();
}
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
System.security.allowDomain("http://www.youtube.com");
System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
_root.createEmptyMovieClip("v_mc", _root.getNextHighestDepth());
_root.v_mc.loadMovie("http://www.youtube.com/v/gpLhzY-MZno?fs=1&hl=en_US&rel=0");
_root.v_mc._x = 110;
_root.v_mc._y = 5;
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 25
stop();
Symbol 122 Button
on (release) {
getURL ("http://www.ultimatearcade.com/", "_blank");
}
Symbol 126 Button
on (release) {
_root.mc_score = _root.bestScore;
_root.UAScoreBoard.gotoAndStop(2);
nextFrame();
}
Symbol 128 Button
on (release) {
_root.UAScoreBoard.gotoAndStop(4);
}
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();