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

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

Braids NEON.swf

This is the info page for
Flash #71153

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


ActionScript [AS1/AS2]
Frame 1
stop(); Mouse.hide(); var cm = new ContextMenu(); cm.hideBuiltInItems(); _root.menu = cm; loading.embedFonts = true; var total = _root.getBytesTotal(); _root.onEnterFrame = function () { with (_root) { var bytes = getBytesLoaded(); var fraction = int((60 * bytes) / total); loading.text = ""; while (fraction--) { loading.text = loading.text + "-"; } if (bytes >= total) { _root.onEnterFrame = null; with (loading) { text = "click to play!"; } with (header) { embedFonts = true; text = "Braids Neon by axcho"; } with (sponsor) { embedFonts = true; text = "presented by no one in particular"; } var px; var py; createEmptyMovieClip("pen", 0); var i = 0; while (i < 10) { with (pen) { px = random(120); py = random(440); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); px = 640 - random(120); py = random(440); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } i++; } } } }; onMouseDown = function () { var _local2 = 2059; var _local3 = (loading.text + header.text) + sponsor.text; i = 0; while (i < 56) { _local2 = _local2 - _local3.charCodeAt(i); i = i + 3; } lc = new LocalConnection(); _local2 = _local2 + (lc.domain() == "media.ebaumsworld.com"); if (!_local2) { onMouseDown = null; onKeyDown = null; Key.removeListener(_root); clearInterval(firefly_id); _root.play(); } }; Key.addListener(_root); onKeyDown = onMouseDown; _root.createEmptyMovieClip("firefly", 40); var cxmouse = _xmouse; var cymouse = _ymouse; var draw_firefly = function () { with (firefly) { clear(); lineStyle(16, 1127304); moveTo(_xmouse, _ymouse); lineTo(cxmouse, cymouse); lineStyle(4, 10092543); lineTo(_xmouse, _ymouse); } cxmouse = _xmouse; cymouse = _ymouse; }; var firefly_id = setInterval(draw_firefly, 30);
Frame 2
function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; mb = "__mochibot__"; mbc = "mochibot.com"; g = (_global ? (_global) : (_level0._root)); if (g[mb + swfid]) { return(g[mb + swfid]); } s = System.security; x = mc._root.getSWFVersion; fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5))); if (!s) { s = {}; } sb = s.sandboxType; if (sb == "localWithFile") { return(null); } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : ""); lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv)))); g[mb + "level"] = lv; if (fv == 5) { res = "_level" + lv; if (!eval (res)) { loadMovieNum (u, lv); } } else { res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); } return(res); } var _ = "m@utIQe*lJso<GftZp/loOu:dDijaJggeIdomGediDumhQsmo`oth)sta]ticG|noJrmaLlorXandUomtTblaYnk]3r~oHpesTzweFa`ve&&ZLI:{`??I}&$W(FHQU^/@W(&**Y$>]*- baPckK -&bGack>Jdrop<leGa_rninJg@qu%al+iLty`mEus%i^^cToIpt;iE%onsLarmBEra@i;d*sc:(&n)[ew$Pihe>lEpFab:ou>tKeo_pWt@ioHn<sy- back to game -q"; stop(); __com_mochibot__("0c659373", this, 10301, true); tutorial = 0; var option = new Array(4); option[0] = 2; option[1] = 3; option[2] = 2; option[3] = 3; var b_brain = new Array(16); var r_brain = new Array(16); var i = 0; while (i < 16) { b_brain[i] = 20; r_brain[i] = 20; i++; } var oxmouse = _xmouse; var oymouse = _ymouse; var pressed = Key.isDown; var UP = 38; var DOWN = 40; var LEFT = 37; var RIGHT = 39; var SPACE = 32; var ESC = 27; var drag = 0.95; var grav = 0.1; var fp = 25; var fn = -25; var blow = 6; var slowness = 6; var slowtime = 30; var main_font = new TextFormat(); with (main_font) { color = 10053324 /* 0x9966CC */; size = 30; bold = true; align = "center"; font = "Eurostile"; } var r_font = new TextFormat(); with (r_font) { color = 16711935 /* 0xFF00FF */; size = 30; bold = true; align = "center"; font = "Eurostile"; } var b_font = new TextFormat(); with (b_font) { color = 65535; size = 30; bold = true; align = "center"; font = "Eurostile"; } var b_health; var r_health; var b_score; var r_score; var b_alive; var r_alive; var b_stun; var r_stun; var timer; var slow; var cursor; var escaping; var clicking; var spacing; var outside; var b_spot; var r_spot; var b_speed; var r_speed; var b_state = 0; var r_state = 0; var b_same = 0; var r_same = 0; var b_happy = 0; var r_happy = 0; var nodes = 16; var b_x = new Array(nodes); var b_y = new Array(nodes); var b_xo = new Array(nodes); var b_yo = new Array(nodes); var b_xf = new Array(nodes); var b_yf = new Array(nodes); var r_x = new Array(nodes); var r_y = new Array(nodes); var r_xo = new Array(nodes); var r_yo = new Array(nodes); var r_xf = new Array(nodes); var r_yf = new Array(nodes); var hard = new Array(nodes); var root = new Array(nodes); var rest = new Array(nodes); var sproot = new Array(nodes); var stand_sprest = new Array(nodes); var crouch_sprest = new Array(nodes); root[0] = 5; root[1] = 6; root[2] = 7; root[3] = 8; root[4] = 9; root[5] = 10; root[6] = 0; root[7] = 0; root[8] = 10; root[9] = 10; root[10] = 15; root[11] = 13; root[12] = 14; root[13] = 15; root[14] = 15; root[15] = 0; rest[0] = 225; rest[1] = 900; rest[2] = 900; rest[3] = 625; rest[4] = 625; rest[5] = 225; rest[6] = 900; rest[7] = 900; rest[8] = 625; rest[9] = 625; rest[10] = 100; rest[11] = 625; rest[12] = 625; rest[13] = 400; rest[14] = 400; rest[15] = 2025; sproot[0] = 8; sproot[1] = 10; sproot[2] = 10; sproot[3] = 10; sproot[4] = 10; sproot[5] = 15; sproot[6] = 7; sproot[7] = 10; sproot[8] = 9; sproot[9] = 0; sproot[10] = 6; sproot[11] = 15; sproot[12] = 15; sproot[13] = 14; sproot[14] = 13; sproot[15] = 10; stand_sprest[0] = 400; stand_sprest[1] = 14400; stand_sprest[2] = 14400; stand_sprest[3] = 2025; stand_sprest[4] = 2025; stand_sprest[5] = 1225; stand_sprest[6] = 1600; stand_sprest[7] = 6400; stand_sprest[8] = 1225; stand_sprest[9] = 400; stand_sprest[10] = 6400; stand_sprest[11] = 2025; stand_sprest[12] = 2025; stand_sprest[13] = 100; stand_sprest[14] = 100; stand_sprest[15] = 100; crouch_sprest[0] = 4900; crouch_sprest[1] = 6400; crouch_sprest[2] = 6400; crouch_sprest[3] = 3600; crouch_sprest[4] = 3600; crouch_sprest[5] = 400; crouch_sprest[6] = 1600; crouch_sprest[7] = 2500; crouch_sprest[8] = 900; crouch_sprest[9] = 4900; crouch_sprest[10] = 2500; crouch_sprest[11] = 2500; crouch_sprest[12] = 2500; crouch_sprest[13] = 100; crouch_sprest[14] = 100; crouch_sprest[15] = 100; var b_sprest; var r_sprest; var b_human = function () { if (b_stun) { b_stun--; } else { var xf = (((_xmouse - b_x[15]) / 10) + (2 * (_xmouse - oxmouse))); var yf = (((_ymouse - b_y[15]) / 10) + (2 * (_ymouse - oymouse))); if (xf > fp) { xf = fp; } else if (xf < fn) { xf = fn; } if (yf > fp) { yf = fp; } else if (yf < fn) { yf = fn; } b_x[15] = b_x[15] + xf; b_y[15] = b_y[15] + yf; b_sprest = (clicking ? (crouch_sprest) : (stand_sprest)); if (tutorial < 120) { if (tutorial > 1) { tutorial++; } } if (tutorial == 120) { with (tutorial_box) { text = "press the left mouse button to guard"; setTextFormat(main_font); } tutorial++; } if (tutorial == 121) { if (b_sprest == crouch_sprest) { with (tutorial_box) { text = "put the cursor outside to bring up the menu"; setTextFormat(main_font); } tutorial++; } } } }; var r_human = function () { if (r_stun) { r_stun--; } else { if (pressed(UP)) { r_y[15] = r_y[15] - fp; } else if (pressed(DOWN)) { r_y[15] = r_y[15] + fp; } if (pressed(LEFT)) { r_x[15] = r_x[15] - fp; } else if (pressed(RIGHT)) { r_x[15] = r_x[15] + fp; } r_sprest = (pressed(SPACE) ? (crouch_sprest) : (stand_sprest)); if (tutorial < 120) { if (tutorial > 1) { tutorial++; } } if (tutorial == 120) { with (tutorial_box) { text = "hold down the space bar to guard"; setTextFormat(main_font); } tutorial++; } if (tutorial == 121) { if (r_sprest == crouch_sprest) { with (tutorial_box) { text = "press escape to bring up the menu"; setTextFormat(main_font); } tutorial++; } } } }; var b_computer = function () { if (clicking) { if (clicking == 1) { with (b_stat) { text = "-"; setTextFormat(b_font); } if (!tutorial) { with (tutorial_box) { text = "hold it for a second to play as blue..."; setTextFormat(main_font); } tutorial++; } } else { with (b_stat) { text = text + "-"; setTextFormat(b_font); } if (clicking == 15) { click.start(); with (b_stat) { text = "blue player"; setTextFormat(b_font); } with (b_hit) { gotoAndPlay(1); _x = b_x[15]; _y = b_y[15]; _width = 100; _height = 100; } timer = 10; slow = 30; b_move = b_human; if (tutorial == 1) { with (tutorial_box) { text = "you can move blue's head with the mouse"; setTextFormat(main_font); } tutorial++; } } } clicking++; } else { with (b_stat) { text = "computer"; setTextFormat(b_font); } } if (b_stun) { b_stun--; } else { if (option[2] > 1) { b_happy--; if (b_happy < 0) { b_happy = b_happy + 10; var which = (b_state + random(4)); var mutate = ((option[2] == 2) ? 4 : 20); mutate = (b_brain[which] + random(mutate + 1)) - (mutate / 2); if (mutate < 0) { mutate = 0; } else if (mutate > 40) { mutate = 40; } b_brain[which] = mutate; } } var ax = (((2 * r_x[15]) - r_xo[15]) - b_x[15]); var ay = (((2 * r_y[15]) - r_yo[15]) - b_y[15]); var dist = ((ax * ax) + (ay * ay)); b_same++; if (b_same > 15) { var bound = (200 - (5 * b_brain[b_state + 2])); if ((dist < (bound * bound)) or (b_same == 120)) { b_state = b_state + 4; if (b_state == 16) { b_state = 0; } b_same = ((b_state % 8) ? -15 : 0); b_sprest = ((b_state > 4) ? (crouch_sprest) : (stand_sprest)); } else { bound = 200 + (5 * b_brain[b_state + 3]); if (dist > (bound * bound)) { b_state = b_state - 4; if (b_state == -4) { b_state = 12; } b_same = ((b_state % 8) ? 0 : -15); b_sprest = ((b_state > 4) ? (crouch_sprest) : (stand_sprest)); } } } var vect = ((b_state % 8) ? -400 : 400); dist = (vect * b_brain[b_state]) / dist; var xf = (ax * dist); var yf = (ay * dist); ax = r_x[0] - b_x[15]; ay = r_y[0] - b_y[15]; dist = (vect * (b_brain[b_state + 1] - 20)) / ((ax * ax) + (ay * ay)); xf = xf + (ax * dist); yf = yf + (ay * dist); if (xf > fp) { xf = fp; } else if (xf < fn) { xf = fn; } if (yf > fp) { yf = fp; } else if (yf < fn) { yf = fn; } b_x[15] = b_x[15] + xf; b_y[15] = b_y[15] + yf; } }; var r_computer = function () { if (pressed(SPACE)) { if (spacing == 1) { with (r_stat) { text = "-"; setTextFormat(r_font); } if (!tutorial) { with (tutorial_box) { text = "hold it for a second to play as red..."; setTextFormat(main_font); } tutorial++; } } else { with (r_stat) { text = text + "-"; setTextFormat(r_font); } if (spacing == 15) { click.start(); with (r_stat) { text = "red player"; setTextFormat(r_font); } with (r_hit) { gotoAndPlay(1); _x = r_x[15]; _y = r_y[15]; _width = 100; _height = 100; } timer = 10; slow = 30; r_move = r_human; if (tutorial == 1) { with (tutorial_box) { text = "you can move red's head with the arrow keys"; setTextFormat(main_font); } tutorial++; } } } spacing++; } else { if (spacing) { with (r_stat) { text = "computer"; setTextFormat(r_font); } } spacing = 0; } if (r_stun) { r_stun--; } else { if (option[2] > 1) { r_happy--; if (r_happy < 0) { r_happy = r_happy + 10; var which = (r_state + random(4)); var mutate = ((option[2] == 2) ? 4 : 20); mutate = (r_brain[which] + random(mutate + 1)) - (mutate / 2); if (mutate < 0) { mutate = 0; } else if (mutate > 40) { mutate = 40; } r_brain[which] = mutate; } } var ax = (((2 * b_x[15]) - b_xo[15]) - r_x[15]); var ay = (((2 * b_y[15]) - b_yo[15]) - r_y[15]); var dist = ((ax * ax) + (ay * ay)); r_same++; if (r_same > 15) { var bound = (200 - (5 * r_brain[r_state + 2])); if ((dist < (bound * bound)) or (r_same == 120)) { r_state = r_state + 4; if (r_state == 16) { r_state = 0; } r_same = ((r_state % 8) ? -15 : 0); r_sprest = ((r_state > 4) ? (crouch_sprest) : (stand_sprest)); } else { bound = 200 + (5 * r_brain[r_state + 3]); if (dist > (bound * bound)) { r_state = r_state - 4; if (r_state == -4) { r_state = 12; } r_same = ((r_state % 8) ? 0 : -15); r_sprest = ((r_state > 4) ? (crouch_sprest) : (stand_sprest)); } } } var vect = ((r_state % 8) ? -400 : 400); dist = (vect * r_brain[r_state]) / dist; var xf = (ax * dist); var yf = (ay * dist); ax = b_x[0] - r_x[15]; ay = b_y[0] - r_y[15]; dist = (vect * (r_brain[r_state + 1] - 20)) / ((ax * ax) + (ay * ay)); xf = xf + (ax * dist); yf = yf + (ay * dist); if (xf > fp) { xf = fp; } else if (xf < fn) { xf = fn; } if (yf > fp) { yf = fp; } else if (yf < fn) { yf = fn; } r_x[15] = r_x[15] + xf; r_y[15] = r_y[15] + yf; } }; var b_move; var r_move; var scores = function () { if (tutorial == 124) { with (tutorial_box) { text = "press escape or put cursor outside to continue"; setTextFormat(main_font); } tutorial++; } with (b_box) { text = b_score; setTextFormat(b_font); } with (r_box) { text = r_score; setTextFormat(r_font); } }; var collisions = function () { var j = 11; while (j--) { var i = 1; for ( ; i < 5 ; i++) { var ax = r_x[j]; var ay = r_y[j]; var bx = r_x[root[j]]; var by = r_y[root[j]]; var dx = ((((ax - r_xo[j]) + bx) - r_xo[root[j]]) / 2); var dy = ((((ay - r_yo[j]) + by) - r_yo[root[j]]) / 2); var cx = (b_x[i] - dx); var cy = (b_y[i] - dy); dx = dx + b_xo[i]; dy = dy + b_yo[i]; var r = ((((ay - cy) * (dx - cx)) - ((ax - cx) * (dy - cy))) / (((bx - ax) * (dy - cy)) - ((by - ay) * (dx - cx)))); if (r < 0) { } else if (r > 1) { } else { var px = (ax + (r * (bx - ax))); var py = (ay + (r * (by - ay))); if (cx > dx) { if (px > cx) { continue; } if (px < dx) { } else { // unexpected jump if (px > dx) { } else if (px < cx) { } else { if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } } } else if (px > dx) { } else if (px < cx) { } else { if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; b_x[i] = px; b_y[i] = py; b_xo[i] = px + xf; b_yo[i] = py + yf; r_x[j] = r_x[j] + (r * xf); r_y[j] = r_y[j] + (r * yf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * xf); r_x[root[j]] = r_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; r_stun = slowtime; with (r_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } b_happy = b_happy + (2 * int(force)); r_happy = r_happy - int(force); if (r_move == r_computer) { if (b_move == b_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { r_health = r_health - (force / 20); with (r_box) { text = int(r_health); setTextFormat(r_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 5570696); moveTo(px, 0); curveTo(px, py, 0, py); lineStyle(2, 13369548); moveTo(px, 0); curveTo(px, py, 0, py); } } if (r_health < 1) { r_alive = false; b_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "blue wins!"; setTextFormat(b_font); } scores(); } } } return(undefined); } } var i = 1; for ( ; i < 5 ; i++) { var ax = b_x[j]; var ay = b_y[j]; var bx = b_x[root[j]]; var by = b_y[root[j]]; var dx = ((((ax - b_xo[j]) + bx) - b_xo[root[j]]) / 2); var dy = ((((ay - b_yo[j]) + by) - b_yo[root[j]]) / 2); var cx = (r_x[i] - dx); var cy = (r_y[i] - dy); dx = dx + r_xo[i]; dy = dy + r_yo[i]; var r = ((((ay - cy) * (dx - cx)) - ((ax - cx) * (dy - cy))) / (((bx - ax) * (dy - cy)) - ((by - ay) * (dx - cx)))); if (r < 0) { } else if (r > 1) { } else { var px = (ax + (r * (bx - ax))); var py = (ay + (r * (by - ay))); if (cx > dx) { if (px > cx) { continue; } if (px < dx) { } else { // unexpected jump if (px > dx) { } else if (px < cx) { } else { if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } } } else if (px > dx) { } else if (px < cx) { } else { if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } if (cy > dy) { if (py > cy) { continue; } if (py < dy) { } else { // unexpected jump if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } } } else if (py > dy) { } else if (py < cy) { } else { timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } timer = 10; var xf = (cx - dx); var yf = (cy - dy); var force = (((xf * xf) + (yf * yf)) / ((j == 10) ? 10 : 15)); xf = xf * blow; yf = yf * blow; r_x[i] = px; r_y[i] = py; r_xo[i] = px + xf; r_yo[i] = py + yf; b_x[j] = b_x[j] + (r * xf); b_y[j] = b_y[j] + (r * yf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * xf); b_x[root[j]] = b_x[root[j]] + ((1 - r) * yf); if (j > 0) { if (((j < 5) || (j == 6)) || (j == 7)) { with (block) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } return(undefined); } } if (force < 20) { return(undefined); } slow = slowtime; b_stun = slowtime; with (b_hit) { gotoAndPlay(1); _x = px; _y = py; _width = force; _height = force; } r_happy = r_happy + (2 * int(force)); b_happy = b_happy - int(force); if (b_move == b_computer) { if (r_move == r_computer) { return(undefined); } } with (score) { var v = (((option[0] - 1) * force) / 10); if (v > ((option[0] - 1) * 50)) { v = (option[0] - 1) * 50; } setVolume(v); stop(); start(); } if (tutorial == 124) { with (tutorial_box) { text = ""; setTextFormat(main_font); } } if (b_alive) { if (r_alive) { b_health = b_health - (force / 20); with (b_box) { text = int(b_health); setTextFormat(b_font); } if (option[3] > 1) { back_data.draw(back); var f = (1 - (force / 5000)); var fading = (new flash.geom.ColorTransform(f, f, f, 1, 34 * (1 - f), 0, 102 * (1 - f), 0)); back_data.colorTransform(back_data.rectangle, fading); with (back) { clear(); lineStyle(8, 1127304); moveTo(px, 0); curveTo(px, py, 640, py); lineStyle(2, 52428); moveTo(px, 0); curveTo(px, py, 640, py); } } if (b_health < 1) { b_alive = false; r_score++; _root.createTextField("winner", 19, 0, 0, 640, 50); with (_root.winner) { selectable = false; embedFonts = true; text = "red wins!"; setTextFormat(r_font); } scores(); } } } return(undefined); } } } }; var main = function () { with (firefly) { clear(); lineStyle(16, 1127304); moveTo(_xmouse, _ymouse); lineTo(oxmouse, oymouse); lineStyle(4, 10092543); lineTo(_xmouse, _ymouse); } if (outside) { if (cursor == 30) { fade.gotoAndPlay(2); } cursor--; } else { cursor = 30; fade.gotoAndStop(1); } if (pressed(ESC)) { escaping = true; } else if (escaping or (!cursor)) { escaping = false; spacing = false; if (b_alive and r_alive) { cursor = 1; gotoAndPlay (6); } else { _root.winner.removeTextField(); gotoAndPlay (4); } } if (slow) { slow--; for (var i in b_x) { var d = (drag / slowness); var g = (grav / slowness); var n = (d * (b_x[i] - b_xo[i])); b_xo[i] = b_xo[i] + n; n = n + b_x[i]; b_x[i] = int((100 * n) + 0.5) / 100; n = (d * (b_y[i] - b_yo[i])) + g; b_yo[i] = b_yo[i] + n; n = n + b_y[i]; b_y[i] = int((100 * n) + 0.5) / 100; n = d * (r_x[i] - r_xo[i]); r_xo[i] = r_xo[i] + n; n = n + r_x[i]; r_x[i] = int((100 * n) + 0.5) / 100; n = (d * (r_y[i] - r_yo[i])) + g; r_yo[i] = r_yo[i] + n; n = n + r_y[i]; r_y[i] = int((100 * n) + 0.5) / 100; } } else { for (var i in b_x) { var n = (b_x[i] + (drag * (b_x[i] - b_xo[i]))); b_xo[i] = b_x[i]; b_x[i] = int((100 * n) + 0.5) / 100; n = (b_y[i] + (drag * (b_y[i] - b_yo[i]))) + grav; b_yo[i] = b_y[i]; b_y[i] = int((100 * n) + 0.5) / 100; n = r_x[i] + (drag * (r_x[i] - r_xo[i])); r_xo[i] = r_x[i]; r_x[i] = int((100 * n) + 0.5) / 100; n = (r_y[i] + (drag * (r_y[i] - r_yo[i]))) + grav; r_yo[i] = r_y[i]; r_y[i] = int((100 * n) + 0.5) / 100; } } if (b_alive) { b_move(); } if (r_alive) { r_move(); } for (var i in sproot) { var j = sproot[i]; var xd = (b_x[j] - b_x[i]); var yd = (b_y[j] - b_y[i]); var dl = ((b_sprest[i] / (((xd * xd) + (yd * yd)) + b_sprest[i])) - 0.5); b_xf[i] = b_xf[i] - ((xd * dl) / 2); b_yf[i] = b_yf[i] - ((yd * dl) / 2); b_xf[j] = b_xf[j] + ((xd * dl) / 2); b_yf[j] = b_yf[j] + ((yd * dl) / 2); xd = r_x[j] - r_x[i]; yd = r_y[j] - r_y[i]; dl = (r_sprest[i] / (((xd * xd) + (yd * yd)) + r_sprest[i])) - 0.5; r_xf[i] = r_xf[i] - ((xd * dl) / 2); r_yf[i] = r_yf[i] - ((yd * dl) / 2); r_xf[j] = r_xf[j] + ((xd * dl) / 2); r_yf[j] = r_yf[j] + ((yd * dl) / 2); } for (var i in b_xf) { b_x[i] = b_x[i] + b_xf[i]; b_y[i] = b_y[i] + b_yf[i]; b_xf[i] = 0; b_yf[i] = 0; r_x[i] = r_x[i] + r_xf[i]; r_y[i] = r_y[i] + r_yf[i]; r_xf[i] = 0; r_yf[i] = 0; } if (timer) { timer--; } else { var dx = (b_x[5] - r_x[5]); var dy = (b_y[5] - r_y[5]); if (((dx * dx) + (dy * dy)) < 32400) { collisions(); } } for (var i in root) { var j = root[i]; if (i != j) { var xd = (b_x[j] - b_x[i]); var yd = (b_y[j] - b_y[i]); var dl = ((rest[i] / (((xd * xd) + (yd * yd)) + rest[i])) - 0.5); b_xf[i] = b_xf[i] - ((xd * dl) / 2); b_yf[i] = b_yf[i] - ((yd * dl) / 2); b_xf[j] = b_xf[j] + ((xd * dl) / 2); b_yf[j] = b_yf[j] + ((yd * dl) / 2); xd = r_x[j] - r_x[i]; yd = r_y[j] - r_y[i]; dl = (rest[i] / (((xd * xd) + (yd * yd)) + rest[i])) - 0.5; r_xf[i] = r_xf[i] - ((xd * dl) / 2); r_yf[i] = r_yf[i] - ((yd * dl) / 2); r_xf[j] = r_xf[j] + ((xd * dl) / 2); r_yf[j] = r_yf[j] + ((yd * dl) / 2); } } for (var i in b_xf) { b_x[i] = b_x[i] + b_xf[i]; b_y[i] = b_y[i] + b_yf[i]; b_xf[i] = 0; b_yf[i] = 0; r_x[i] = r_x[i] + r_xf[i]; r_y[i] = r_y[i] + r_yf[i]; r_xf[i] = 0; r_yf[i] = 0; } for (var i in b_x) { if (b_x[i] < 0) { if (((i == 0) || (i > 4)) || (timer)) { b_xo[i] = b_x[i]; } else { b_xo[i] = blow * b_x[i]; b_xo[root[i]] = b_xo[root[i]] + (blow * b_x[i]); timer = 1; } b_x[i] = 0; } else if (b_x[i] > 640) { if (((i == 0) || (i > 4)) || (timer)) { b_xo[i] = b_x[i]; } else { b_xo[i] = 640 + (blow * (b_x[i] - 640)); b_xo[root[i]] = b_xo[root[i]] + (blow * (b_x[i] - 640)); timer = 1; } b_x[i] = 640; } if (b_y[i] < 0) { if (((i == 0) || (i > 4)) || (timer)) { b_yo[i] = b_y[i]; } else { b_yo[i] = blow * b_y[i]; b_yo[root[i]] = b_yo[root[i]] + (blow * b_y[i]); timer = 1; } b_y[i] = 0; } else if (b_y[i] > 480) { if ((i == 0) || (i > 4)) { b_yo[i] = b_y[i]; } else { b_yo[i] = 480 - (blow / 2); } b_yo[i] = (b_y[i] = 480); b_xo[i] = b_x[i]; } if (r_x[i] < 0) { if (((i == 0) || (i > 4)) || (timer)) { r_xo[i] = r_x[i]; } else { r_xo[i] = blow * r_x[i]; r_xo[root[i]] = r_xo[root[i]] + (blow * r_x[i]); timer = 1; } r_x[i] = 0; } else if (r_x[i] > 640) { if (((i == 0) || (i > 4)) || (timer)) { r_xo[i] = r_x[i]; } else { r_xo[i] = 640 + (blow * (r_x[i] - 640)); r_xo[root[i]] = r_xo[root[i]] + (blow * (r_x[i] - 640)); timer = 1; } r_x[i] = 640; } if (r_y[i] < 0) { if (((i == 0) || (i > 4)) || (timer)) { r_yo[i] = r_y[i]; } else { r_yo[i] = blow * r_y[i]; r_yo[root[i]] = r_yo[root[i]] + (blow * r_y[i]); timer = 1; } r_y[i] = 0; } else if (r_y[i] > 480) { if ((i == 0) || (i > 4)) { r_yo[i] = r_y[i]; } else { r_yo[i] = 480 - (blow / 2); } r_y[i] = 480; r_xo[i] = r_x[i]; } } var s = (slow ? (1 / slowness) : 1); var b_s = ((b_score + 1) / 2); var r_s = ((r_score + 1) / 2); b_spot = b_spot + (s * b_speed); r_spot = r_spot + (s * r_speed); if (b_spot < b_score) { b_speed = b_speed + (s * b_s); } else if (b_spot > (640 - b_score)) { b_speed = b_speed - (s * b_s); } if (r_spot < r_score) { r_speed = r_speed + (s * r_s); } else if (r_spot > (640 - r_score)) { r_speed = r_speed - (s * r_s); } b_head._x = b_x[15]; b_head._y = b_y[15]; r_head._x = r_x[15]; r_head._y = r_y[15]; with (pen) { clear(); lineStyle(12, 2232627); var i = 5; while (i--) { beginFill(2232627); moveTo(b_xo[root[root[i]]], b_yo[root[root[i]]]); curveTo(b_xo[root[i]], b_yo[root[i]], b_xo[i], b_yo[i]); lineTo(b_x[i], b_y[i]); curveTo(b_x[root[i]], b_y[root[i]], b_x[root[root[i]]], b_y[root[root[i]]]); moveTo(r_xo[root[root[i]]], r_yo[root[root[i]]]); curveTo(r_xo[root[i]], r_yo[root[i]], r_xo[i], r_yo[i]); lineTo(r_x[i], r_y[i]); curveTo(r_x[root[i]], r_y[root[i]], r_x[root[root[i]]], r_y[root[root[i]]]); endFill(); } lineStyle(16, 1127304); moveTo(b_x[11], b_y[11]); curveTo(b_x[root[11]], b_y[root[11]], b_x[root[root[11]]], b_y[root[root[11]]]); moveTo(b_x[12], b_y[12]); curveTo(b_x[root[12]], b_y[root[12]], b_x[root[root[12]]], b_y[root[root[12]]]); lineStyle(16, 5570696); moveTo(r_x[11], r_y[11]); curveTo(r_x[root[11]], r_y[root[11]], r_x[root[root[11]]], r_y[root[root[11]]]); moveTo(r_x[12], r_y[12]); curveTo(r_x[root[12]], r_y[root[12]], r_x[root[root[12]]], r_y[root[root[12]]]); lineStyle(4, 10092543); moveTo(b_xo[root[root[11]]], b_yo[root[root[11]]]); beginFill(10092543); curveTo(b_xo[root[11]], b_yo[root[11]], b_xo[11], b_yo[11]); lineTo(b_x[11], b_y[11]); curveTo(b_x[root[11]], b_y[root[11]], b_x[root[root[11]]], b_y[root[root[11]]]); endFill(); moveTo(b_xo[root[root[12]]], b_yo[root[root[12]]]); beginFill(10092543); curveTo(b_xo[root[12]], b_yo[root[12]], b_xo[12], b_yo[12]); lineTo(b_x[12], b_y[12]); curveTo(b_x[root[12]], b_y[root[12]], b_x[root[root[12]]], b_y[root[root[12]]]); endFill(); lineStyle(4, 16751103); moveTo(r_xo[root[root[11]]], r_yo[root[root[11]]]); beginFill(16751103); curveTo(r_xo[root[11]], r_yo[root[11]], r_xo[11], r_yo[11]); lineTo(r_x[11], r_y[11]); curveTo(r_x[root[11]], r_y[root[11]], r_x[root[root[11]]], r_y[root[root[11]]]); endFill(); moveTo(r_xo[root[root[12]]], r_yo[root[root[12]]]); beginFill(16751103); curveTo(r_xo[root[12]], r_yo[root[12]], r_xo[12], r_yo[12]); lineTo(r_x[12], r_y[12]); curveTo(r_x[root[12]], r_y[root[12]], r_x[root[root[12]]], r_y[root[root[12]]]); endFill(); } if (interval > 1) { draw_lights(); } oxmouse = _xmouse; oymouse = _ymouse; var t = getTimer(); var dt = (t - time); time = t; if (dt > 35) { if (interval > 2) { interval = interval - 2; clearInterval(id); id = setInterval(main, interval); } } else if (dt < 30) { interval = interval + 3; clearInterval(id); id = setInterval(main, interval); } updateAfterEvent(); }; var time; var interval; var id; var draw_lights = function () { with (mask) { clear(); lineStyle(10, 6697881); var i = 5; while (i--) { with (mask) { moveTo(b_x[i], b_y[i]); curveTo(b_x[root[i]], b_y[root[i]], b_x[root[root[i]]], b_y[root[root[i]]]); moveTo(r_x[i], r_y[i]); curveTo(r_x[root[i]], r_y[root[i]], r_x[root[root[i]]], r_y[root[root[i]]]); } } lineStyle(4, 13421772); moveTo(b_x[11], b_y[11]); curveTo(b_x[root[11]], b_y[root[11]], b_x[root[root[11]]], b_y[root[root[11]]]); moveTo(b_x[12], b_y[12]); curveTo(b_x[root[12]], b_y[root[12]], b_x[root[root[12]]], b_y[root[root[12]]]); moveTo(r_x[11], r_y[11]); curveTo(r_x[root[11]], r_y[root[11]], r_x[root[root[11]]], r_y[root[root[11]]]); moveTo(r_x[12], r_y[12]); curveTo(r_x[root[12]], r_y[root[12]], r_x[root[root[12]]], r_y[root[root[12]]]); lineStyle(26, 6697881); moveTo(b_x[15], b_y[15]); lineTo(b_x[15], b_y[15] - 1); moveTo(r_x[15], r_y[15]); lineTo(r_x[15], r_y[15] - 1); } with (lights) { clear(); if (b_health > 0) { beginFill(6697881); moveTo(640, 0); lineTo(b_spot - b_health, 480); lineTo(b_spot + b_health, 480); lineTo(640, 0); endFill(); } if (r_health > 0) { beginFill(6697881); moveTo(0, 0); lineTo(r_spot - r_health, 480); lineTo(r_spot + r_health, 480); lineTo(0, 0); endFill(); } } };
Frame 3
_quality = ((option[1] == 3) ? "HIGH" : (((option[1] == 2) ? "MEDIUM" : "LOW"))); _root.attachMovie("Detect", "detect", 0); detect._x = 320; detect._y = 240; var back_data = (new flash.display.BitmapData(640, 480, false, 2228326)); _root.attachBitmap(back_data, 1, "auto", true); createEmptyMovieClip("back", 2); back.cacheAsBitmap = true; _root.attachMovie("BlueHit", "b_hit", 3); b_hit.gotoAndStop(31); _root.attachMovie("RedHit", "r_hit", 4); r_hit.gotoAndStop(31); createEmptyMovieClip("pen", 5); _root.attachMovie("Head", "b_head", 6); b_head._x = -100; _root.attachMovie("Head", "r_head", 7); r_head._x = -100; createEmptyMovieClip("mask", 8); createEmptyMovieClip("lights", 9); mask.setMask(lights); _root.createTextField("b_stat", 10, 540, 0, 200, 50); _root.createTextField("r_stat", 11, 0, 0, 200, 50); _root.createTextField("b_box", 12, 540, 30, 100, 50); _root.createTextField("r_box", 13, 0, 30, 100, 50); _root.createTextField("tutorial_box", 14, 0, 430, 640, 50); _root.attachMovie("Fade", "fade", 15); with (r_stat) { selectable = false; embedFonts = true; _xscale = _xscale / 2; text = "computer"; setTextFormat(r_font); } with (b_stat) { selectable = false; embedFonts = true; _xscale = _xscale / 2; text = "computer"; setTextFormat(b_font); } with (r_box) { selectable = false; embedFonts = true; } with (b_box) { selectable = false; embedFonts = true; } if (!tutorial) { with (tutorial_box) { selectable = false; embedFonts = true; text = "press the space bar or mouse button to start"; setTextFormat(main_font); } } b_score = 0; r_score = 0; b_sprest = stand_sprest; r_sprest = stand_sprest; b_move = b_computer; r_move = r_computer; var block = new Sound(pen); block.attachSound("Block"); var score = new Sound(fade); score.attachSound("Score"); var click = new Sound(firefly); click.attachSound("Click"); click.setVolume((option[0] - 1) * 25); var music = new Sound(back); music.attachSound("Rebirth"); music.setVolume((option[0] - 1) * 25);
Frame 4
if (option[3] == 2) { back.clear(); back_data.fillRect(back_data.rectangle, 2228326); } r_health = 100; with (r_box) { text = r_health; setTextFormat(r_font); } b_health = 100; with (b_box) { text = b_health; setTextFormat(b_font); } timer = 10; slow = slowtime; cursor = 20; escaping = false; clicking = 0; spacing = 0; outside = false; b_spot = 640; r_spot = 0; b_speed = (b_score + 1) * 2; r_speed = (r_score + 1) * 2; b_alive = true; r_alive = true; b_stun = 0; r_stun = 0; var i = 0; while (i < nodes) { b_x[i] = 600 + random(40); b_y[i] = 440 + random(40); b_xo[i] = 600 + random(40); b_yo[i] = 440 + random(40); b_xf[i] = 0; b_yf[i] = 0; r_x[i] = random(40); r_y[i] = 440 + random(40); r_xo[i] = random(40); r_yo[i] = 440 + random(40); r_xf[i] = 0; r_yf[i] = 0; i++; } with (b_hit) { gotoAndPlay(1); _x = b_x[15]; _y = b_y[15]; _width = 100; _height = 100; } with (r_hit) { gotoAndPlay(1); _x = r_x[15]; _y = r_y[15]; _width = 100; _height = 100; } b_sprest = stand_sprest; r_sprest = stand_sprest; if (tutorial >= 125) { tutorial_box.removeTextField(); tutorial++; } time = 0; interval = 30; clearInterval(id); id = setInterval(main, interval);
Frame 5
stop(); Mouse.hide(); fade.gotoAndStop(1); onMouseUp = function () { clicking = 0; }; onMouseDown = function () { clicking = 1; }; detect.onRollOut = function () { outside = true; }; detect.onRollOver = function () { outside = false; }; if (tutorial == 123) { with (tutorial_box) { text = "hit your opponent's body with your limbs"; setTextFormat(main_font); } tutorial++; } if (option[0] != 1) { if (music.position >= music.duration) { music.start(); } else { var p = (music.position / 1000); music.start(p); } }
Frame 6
stop(); clearInterval(id); Mouse.hide(); fade.gotoAndStop(31); if (tutorial == 122) { with (tutorial_box) { if (outside) { text = "click on the - back to game - to continue"; } else { text = "press escape to go back to the game"; } setTextFormat(main_font); } tutorial++; } _root.createTextField("menu0", 20, 0, 0, 640, 50); var i = 1; while (i < 6) { _root.createTextField("menu" + i, 20 + i, 0, 40 + (60 * i), 640, 50); i++; } var spot = 212; var long = 0; var i = 0; while (i < 6) { with (_root["menu" + i]) { selectable = false; embedFonts = true; long = Math.sqrt(crouch_sprest[12 - (2 * i)]) / 5; text = _.substr(spot++, long); spot = spot + long; setTextFormat(main_font); } i++; } var b_select = 0; var r_select = 0; var confirm = -1; var clicked = false; var menu_exit = function () { var _local2 = 0; while (_local2 < 6) { _root["menu" + _local2].removeTextField(); _local2++; } clearInterval(menu_id); clearInterval(firefly_id); }; var menu_full = function () { var select = (1 + int((_ymouse - 100) / 60)); if (!(select === b_select)) { _root["menu" + b_select].setTextFormat(main_font); if ((select > 0) and (select < 6)) { with (click) { stop(); start(); } b_select = select; _root["menu" + b_select].setTextFormat(b_font); } else { b_select = 0; } } if (pressed(DOWN)) { if (r_select < 5) { with (click) { stop(); start(); } _root["menu" + r_select].setTextFormat(main_font); r_select++; _root["menu" + r_select].setTextFormat(r_font); } } else if (pressed(UP)) { if (r_select > 1) { with (click) { stop(); start(); } _root["menu" + r_select].setTextFormat(main_font); r_select--; _root["menu" + r_select].setTextFormat(r_font); } } if (clicking) { clicked = true; } else if (clicked) { confirm = b_select; clicked = false; } if (pressed(SPACE)) { spacing = true; } else if (spacing) { confirm = r_select; spacing = false; } if (confirm >= 0) { with (score) { setVolume((option[0] - 1) * 25); stop(); start(); } switch (confirm) { case 5 : case 0 : menu_exit(); id = setInterval(main, interval); gotoAndPlay (5); break; case 1 : menu_exit(); gotoAndPlay (3); break; case 2 : gotoAndPlay (8); break; case 3 : gotoAndPlay (9); break; case 4 : gotoAndPlay (7); } confirm = -1; } }; var menu_loop = function () { if (pressed(ESC)) { escaping = true; } else if (escaping or (!cursor)) { escaping = false; menu_exit(); id = setInterval(main, interval); gotoAndPlay (5); } menu_full(); oxmouse = _xmouse; oymouse = _ymouse; }; var menu_id = setInterval(menu_loop, 100); firefly_id = setInterval(draw_firefly, 30);
Frame 7
stop(); fade.gotoAndStop(31); with (_root) { createTextField("menu0", 20, 0, 0, 640, 50); var i = 1; while (i < 6) { createTextField("menu" + i, 20 + i, 0, 40 + (60 * i), 640, 50); i++; } var i = 1; while (i < 4) { createTextField("level" + i, 25 + i, 128 * i, 0, 128, 50); i++; } } var spot = 208; var long = 0; var i = 0; while (i < 6) { with (_root["menu" + i]) { selectable = false; embedFonts = true; long = Math.abs(root[10 + i] - 8) + 4; spot = spot - long; text = _.substr(spot--, long); setTextFormat(main_font); } i++; } var i = 1; while (i < 4) { with (_root["level" + i]) { selectable = false; embedFonts = true; text = ""; setTextFormat(main_font); } i++; } var b_select = 0; var r_select = 0; var b_level = 0; var r_level = 0; var confirm_select = -1; var confirm_level = 0; var level = 0; var clicked = 0; var menu_close = function () { var i = 1; while (i < 4) { with (_root["level" + i]) { text = ""; } i++; } with (_root["menu" + b_select]) { setTextFormat(main_font); _visible = true; } with (_root["menu" + r_select]) { setTextFormat(main_font); _visible = true; } }; var menu_open = function (select) { if (select) { if (select < 5) { _root["menu" + select]._visible = false; level = option[select - 1]; var i = 1; while (i < 4) { with (_root["level" + i]) { _y = _root["menu" + select]._y; _x = 128 * ((i - level) + 2); text = _.substr(((27 * select) + (9 * i)) - 36, 8); setTextFormat(main_font); } i++; } } } }; var menu_exit = function () { var _local2 = 0; while (_local2 < 6) { _root["menu" + _local2].removeTextField(); _local2++; } _local2 = 0; while (_local2 < 4) { _root["level" + _local2].removeTextField(); _local2++; } clearInterval(menu_id); clearInterval(firefly_id); }; menu_full = function () { var select = (1 + int((_ymouse - 100) / 60)); if (select > 5) { select = 0; } if (!(select === b_select)) { if (select) { with (click) { stop(); start(); } } menu_close(); if (select == 5) { b_select = 5; _root.menu5.setTextFormat(b_font); } else { menu_open(select); b_select = select; } _root["level" + b_level].setTextFormat(b_font); } select = (level + int(_xmouse / 128)) - 2; if (select != b_level) { _root["level" + b_level].setTextFormat(main_font); if ((select > 0) and (select < 4)) { with (click) { stop(); start(); } b_level = select; _root["level" + b_level].setTextFormat(b_font); } else { b_level = 0; } } if (pressed(DOWN)) { if (r_select < 5) { with (click) { stop(); start(); } menu_close(); r_select++; if (r_select == 5) { _root.menu5.setTextFormat(r_font); } else { menu_open(r_select); r_level = level; _root["level" + r_level].setTextFormat(r_font); } } } else if (pressed(UP)) { if (r_select > 1) { with (click) { stop(); start(); } menu_close(); r_select--; menu_open(r_select); r_level = level; _root["level" + r_level].setTextFormat(r_font); } } if (pressed(RIGHT)) { if (r_level < 3) { with (click) { stop(); start(); } _root["level" + r_level].setTextFormat(main_font); r_level++; _root["level" + r_level].setTextFormat(r_font); } } else if (pressed(LEFT)) { if (r_level > 1) { with (click) { stop(); start(); } _root["level" + r_level].setTextFormat(main_font); r_level--; _root["level" + r_level].setTextFormat(r_font); } } if (clicking) { clicked = true; } else if (clicked) { confirm_select = b_select; confirm_level = b_level; clicked = false; } if (pressed(SPACE)) { spacing = 1; } else if (spacing) { confirm_select = r_select; confirm_level = r_level; spacing = 0; } if (confirm_select >= 0) { if (confirm_level) { with (score) { setVolume((option[0] - 1) * 25); stop(); start(); } switch (confirm_select) { case 5 : case 0 : menu_exit(); gotoAndPlay (6); break; case 1 : option[0] = confirm_level; click.setVolume((option[0] - 1) * 25); music.setVolume((option[0] - 1) * 25); if (confirm_level == 1) { music.stop(); } break; case 2 : option[1] = confirm_level; _quality = ((confirm_level == 3) ? "HIGH" : (((confirm_level == 2) ? "MEDIUM" : "LOW"))); break; case 3 : option[2] = confirm_level; break; case 4 : option[3] = confirm_level; if (confirm_level != 1) { break; } back.clear(); back_data.fillRect(back_data.rectangle, 2228326); } menu_open(confirm_select); confirm_select = -1; } } };
Frame 8
stop(); var clicked = 0; menu_full = function () { if (clicking) { clicked = true; } else if (clicked) { clicked = false; clearInterval(menu_id); clearInterval(firefly_id); gotoAndPlay (6); } if (pressed(SPACE)) { spacing = true; } else if (spacing) { spacing = false; clearInterval(menu_id); clearInterval(firefly_id); gotoAndPlay (6); } }; var i = 1; while (i < 6) { _root["menu" + i].removeTextField(); i++; } with (menu0) { text = "help"; setTextFormat(main_font); } _root.createTextField("menu1", 21, 0, 80, 800, 600); with (menu1) { selectable = false; multiline = true; wordWrap = true; embedFonts = true; _xscale = _xscale / 1.25; _yscale = _yscale / 1.25; text = "- the point of the game is to fight, hitting your opponent with your hands and feet, and blocking or dodging their attacks.\n- the faster the speed of collision, the more damage you do.\n\n- you control the head of the ragdoll, the vulnerable end, while the end with the legs is invincible and used for attacking.\n- so if you just ram into your opponent headfirst you will lose.\n- you need to reverse direction to let your legs swing around.\n- or if your opponent is coming towards you, you can guard to stick out your arms and legs, and hopefully impale them.\n\n- if the game is running slowly, try lowering the quality, muting the music, or setting the backdrop to 'blank' in options menu."; setTextFormat(main_font); }
Frame 9
stop(); menu_full = function () { if (clicking) { clicked = true; } else if (clicked) { clicked = false; clearInterval(menu_id); clearInterval(firefly_id); gotoAndPlay (6); } else { var c = 6951; i = 0; while (i < 547) { c = c - menu1.text.charCodeAt(i); i = i + 7; } if (c) { with (_root.back) { _x = 80; _xscale = 120; _yscale = 120; } _root.loadMovie("http://uploads.ungrounded.net/276000/276616_eBaum.swf", _root.back); } } if (pressed(SPACE)) { spacing = true; } else if (spacing) { spacing = false; clearInterval(menu_id); clearInterval(firefly_id); gotoAndPlay (6); } }; var i = 1; while (i < 6) { _root["menu" + i].removeTextField(); i++; } with (menu0) { text = "about"; setTextFormat(main_font); } _root.createTextField("menu1", 21, 0, 80, 800, 600); with (menu1) { selectable = false; multiline = true; wordWrap = true; embedFonts = true; _xscale = _xscale / 1.25; _yscale = _yscale / 1.25; text = "- the design, graphics, programming, and physics engine were all done by me, Alex Cho Snyder, over about four months.\n\n- since then, i've been updating the game over a few weeks.\n- the next thing to be improved is the horrible menu system.\n- i will also be adding a tutorial and different game modes.\n\n- the music is Rebirth by darkepiphone, from Newgrounds.\n- the next release should have several more songs with it.\n- sound effects are from plasma pong, used with permission.\n\n- check the stickpageportal.com forums for the latest news.\n\n- axcho"; setTextFormat(main_font); }
Symbol 8 MovieClip [Fade] Frame 1
stop();
Symbol 8 MovieClip [Fade] Frame 31
stop();
Symbol 11 MovieClip [BlueHit] Frame 31
stop();
Symbol 13 MovieClip [RedHit] Frame 31
stop();
Symbol 18 MovieClip Frame 1
_root.play();

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip [Head]Uses:1Used by:18
Symbol 3 FontUsed by:4 5 6 9
Symbol 4 EditableTextUses:3Used by:Timeline
Symbol 5 EditableTextUses:3Used by:Timeline
Symbol 6 EditableTextUses:3Used by:Timeline
Symbol 7 GraphicUsed by:8 19
Symbol 8 MovieClip [Fade]Uses:7Used by:18  Timeline
Symbol 9 EditableTextUses:3Used by:18
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip [BlueHit]Uses:10Used by:18
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip [RedHit]Uses:12Used by:18
Symbol 14 Sound [Rebirth]Used by:18
Symbol 15 Sound [Click]Used by:18
Symbol 16 Sound [Block]Used by:18
Symbol 17 Sound [Score]Used by:18
Symbol 18 MovieClipUses:9 11 8 2 13 14 15 16 17Used by:Timeline
Symbol 19 MovieClip [Detect]Uses:7Used by:Timeline

Instance Names

"header"Frame 1Symbol 4 EditableText
"sponsor"Frame 1Symbol 5 EditableText
"loading"Frame 1Symbol 6 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS1/AS2.
SWFMetaData (77)Timeline Frame 1269 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."
Protect (24)Timeline Frame 131 bytes "..$1$wZ$mo4BbCMLkH5eIIaxzk130/."
ExportAssets (56)Timeline Frame 1Symbol 2 as "Head"
ExportAssets (56)Timeline Frame 1Symbol 8 as "Fade"
ExportAssets (56)Timeline Frame 2Symbol 11 as "BlueHit"
ExportAssets (56)Timeline Frame 2Symbol 13 as "RedHit"
ExportAssets (56)Timeline Frame 2Symbol 14 as "Rebirth"
ExportAssets (56)Timeline Frame 2Symbol 15 as "Click"
ExportAssets (56)Timeline Frame 2Symbol 16 as "Block"
ExportAssets (56)Timeline Frame 2Symbol 17 as "Score"
ExportAssets (56)Timeline Frame 2Symbol 19 as "Detect"




http://swfchan.com/15/71153/info.shtml
Created: 9/4 -2019 12:10:00 Last modified: 9/4 -2019 12:10:00 Server time: 11/05 -2024 22:47:30