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

<div style="position:absolute;top:-99px;left:-99px;"><img src="https://tools.swfchan.com/stathit.asp?noj=FRM26339969-29DC&rnd=26339969" width="1" height="1"></div>

armorgames island-survival-10450.swf

This is the info page for
Flash #264653

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


ActionScript [AS1/AS2]
Combined Code
movieClip 19 tile { } movieClip 21 { } movieClip 23 { } movieClip 25 { } movieClip 27 { } movieClip 28 { } movieClip 32 hero { frame 1 { stop(); } } movieClip 34 buttonStyxtwo { frame 1 { stop(); } } movieClip 36 buttonPlay { frame 1 { stop(); } } movieClip 38 { } movieClip 39 { } movieClip 40 star { } // unknown tag 88 length 39 movieClip 43 collectTab { } movieClip 46 twitBut { } movieClip 49 facBut { } frame 1 { stop(); _root.onEnterFrame = function () { if (_root._currentframe == 1) { bytes_loaded = Math.round(this.getBytesLoaded()); bytes_total = Math.round(this.getBytesTotal()); getPercent = bytes_loaded / bytes_total; this.loadBar._width = getPercent * 200; this.loadText = Math.round(getPercent * 100) + '%'; if (bytes_loaded == bytes_total) { gotoAndStop(2); } } }; } movieClip 51 { } movieClip 53 { } frame 2 { stop(); } 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; var pv; 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); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&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); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } __com_mochibot__('912b80f7', this, 10301, true); } movieClip 62 { } button 67 { on (press) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 70 { frame 1 { _root.stop(); gotoAndPlay(2); } frame 218 { _root.nextFrame(); } } frame 3 { stop(); } movieClip 78 { } // unknown tag 88 length 153 movieClip 84 { frame 1 { this._visible = false; _parent.stop(); } frame 1 { stxy.onRelease = function () { getURL('http://www.styxtwo.com', '_blank'); }; } frame 2 { this._visible = true; } frame 150 { _parent.play(); } } frame 4 { stop(); var sound_mute = false; mute_sound = new Sound(); this.createEmptyMovieClip('soundholder1', this.getNextHighestDepth()); loop1 = new Sound(soundholder1); loop1.attachSound('loop1'); loop1.start(0, 20000); loop1.setVolume(50); mute_sound.setVolume(50); muteBut.gotoAndStop(1); unlockedLevel = 1; gameFinish = false; gotoAndStop(5); } frame 5 { muteBut.onRelease = function () { if (sound_mute == false) { sound_mute = true; mute_sound.setVolume(0); muteBut.gotoAndStop(2); } else { sound_mute = false; mute_sound.setVolume(50); muteBut.gotoAndStop(1); } }; } frame 5 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); if (l[y][x] != 1 && l[y][x] != 3) { t._alpha = 0; } t.gotoAndStop(11); } ++x; } ++y; } place_player(); } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 2: over = 'sponsor'; player = [14, 0]; getURL('http://armorgames.com/', '_blank'); place_player(); speed = ground_acceleration; friction = ground_friction; break; case 3: over = 'level'; remover(); speed = ground_acceleration; friction = ground_friction; } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function remover() { removeMovieClip(twitBut); removeMovieClip(facBut); removeMovieClip(level_container); survivalTime = 0; gotoAndStop(6); } styxBut.onRelease = function () { getURL('http://www.styxtwo.com', '_blank'); }; stop(); if (gameFinish == true) { } else { i = 1; while (i <= 10) { this['flower' + i]._alpha = 0; ++i; } } gameLevel = 0; tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 0; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[9] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[10] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3]; level[14] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[15] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[16] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[17] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[18] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[19] = [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; player = [14, 0]; if (level_select == true) { player = [25, 12]; level_select = false; } coin[0] = [23, 15]; i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); attachMovie('twitBut', 'twitBut', getNextHighestDepth(), {'_y': 380, '_x': 55}); attachMovie('facBut', 'facBut', getNextHighestDepth(), {'_y': 380, '_x': 20}); twitBut.onRelease = function () { getURL('http://twitter.com/armorgames', '_blank'); }; facBut.onRelease = function () { getURL('http://www.facebook.com/pages/Armor-Games/19522089061', '_blank'); }; _root.onEnterFrame = function () { if (_root._currentframe == 5) { ground_under_feet(); walking = false; climbing = false; playerMovement(); } }; } movieClip 91 { } movieClip 94 { } movieClip 97 { frame 1 { stop(); } frame 2 { stop(); } } frame 6 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); if (l[y][x] != 1 && l[y][x] != 14 && l[y][x] != 15) { t._alpha = 0; } t.gotoAndStop(11); } ++x; } ++y; } place_player(); } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 14: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 15: over = 'ground'; remover2(); speed = ground_acceleration; friction = ground_friction; break; default: over = 'levels'; gameLevel = current_tile - 1; remover(); } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function remover2() { level_select = true; removeMovieClip(level_container); gotoAndStop(5); } function remover() { removeMovieClip(level_container); survivalTime = 0; gotoAndStop(8); } stop(); if (gameFinish == true) { } else { i = 1; while (i <= 10) { this['flower' + i]._alpha = 0; ++i; } } gameLevel = 0; tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 0; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 14, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; level[15] = [15, 1, 1, 14, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; level[16] = [1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; level[17] = [1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; level[18] = [1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; level[19] = [1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1]; i2 = 4; while (i2 <= 15) { i = 0; while (i <= 27) { if (level[i2][i] == 14) { if (i < 2 + 2 * unlockedLevel) { level[i2][i] = 0; } } ++i; } ++i2; } player = [1, 14]; coin[0] = [23, 15]; i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); _root.onEnterFrame = function () { if (_root._currentframe == 6) { ground_under_feet(); walking = false; climbing = false; playerMovement(); } }; } frame 8 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); if (l[y][x] == 8) { if (y == 17) { t.gotoAndStop(8); } if (y == 18) { t.gotoAndStop(9); } if (y == 19) { t.gotoAndStop(10); } } else { if (grapicsType == 1) { t.gotoAndStop(1); i = 1; while (i < 6) { if (l[y - i][x] == 1) { t.gotoAndStop(i + 1); } ++i; } } if (grapicsType == 2) { t.gotoAndStop(12); i = 1; while (i < 3) { if (l[y - i][x] == 1) { t.gotoAndStop(i + 12); } if (l[y][x - 1] == 0 && l[y][x + 1] == 0) { t.gotoAndStop(15); i2 = 1; while (i2 <= 3) { if (l[y - i2][x] == 1) { t.gotoAndStop(i2 + 15); } ++i2; } } ++i; } } if (grapicsType == 3) { t.gotoAndStop(1); var v3 = new Color('t'); v3.setRGB(Math.round(Math.random() * 16777215)); } if (grapicsType == 4) { t.gotoAndStop(15); i2 = 1; while (i2 <= 3) { if (level[y - i2][x] == 1) { t.gotoAndStop(i2 + 15); } ++i2; } } } } ++x; } ++y; } place_player(); } function starMovement() { ++timerStar; if (timerStar > timerStarMax) { timerStar = 0; star = level_container.falling.attachMovie('star', 'star' + starI, _root.level_container.falling.getNextHighestDepth(), {'_x': Math.random() * 530 + 10, '_y': -10}); if (gameLevel == 1) { if (starI == 0) { star._x = 300; } } star.starSpeed = starSpeed * (Math.random() / 2 + 0.5); star.gotoAndStop(gameLevel); starArray.push(starI); if (gameLevel == 1) { if (starI == 0) { collect = level_container.falling.attachMovie('collectTab', 'collect', _root.level_container.falling.getNextHighestDepth(), {'_x': star - 20, '_y': star}); } } ++starI; if (timerMax > timerMin) { timerMax *= blockRemoverChanger; } else { timerMax = timerMin; } } } function starCollision() { for (i2 in starArray) { star = level_container.falling['star' + starArray[i2]]; star._y += star.starSpeed; if (i2 == 0) { collect._y = star._y; collect._x = star._x - 20; } if (star._y > 420) { removeMovieClip(star); starArray.splice(i2, 1); if (i2 == 0) { removeMovieClip(collect); } } if (level_container.hero.hitTest(star)) { y_pos -= 20; if (y_pos < 0) { y_pos = 0; } removeMovieClip(star); starArray.splice(i2, 1); if (i2 == 0) { removeMovieClip(collect); } if (gameType != 3) { i = 0; while (i <= 26) { --topArray[i]; if (topArray[i] <= 1) { topArray[i] = 1; } ++i; } i = 1; while (i < 16) { level[i] = level[i + 1]; ++i; } level[16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; } else { i = 0; while (i <= 26) { ++topArray[i]; ++i; } i = 16; while (i > 0) { level[i] = level[i - 1]; --i; } } i = 0; while (i < 27) { if (gameType == 1) { if (level[15][i] == 1 || level[15][i - 1] == 1 || level[15][i + 1] == 1) { level[16][i] = 1; } } if (gameType == 2) { if (level[15][i] == 1) { level[16][i] = 1; } } ++i; } y = 0; while (y < level_height) { x = 0; while (x < level_width) { removeMovieClip(level_container['t' + y + '_' + x]); if (level[y][x] != 0) { level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); colouring(); } ++x; } ++y; } } } } function removeBricks() { ++timer; if (timer > timerMax) { randomNumber = 28; while (topArray[randomNumber] > 16) { randomNumber = Math.round(Math.random() * 28 - 0.5); } removeMovieClip(level_container['t' + topArray[randomNumber] + '_' + randomNumber]); level[topArray[randomNumber]][randomNumber] = 0; ++topArray[randomNumber]; timer = 0; y = 0; while (y < level_height) { x = 0; while (x < level_width) { colouring(); ++x; } ++y; } } } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 8: over = 'spikes'; if (!(left_foot == 8 and right_foot == 8)) break; remover(); } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function colouring() { t = level_container['t' + y + '_' + x]; if (level[y][x] == 1) { if (grapicsType == 1) { t.gotoAndStop(1); if (level[y - 1][x] == 1) { t.gotoAndStop(2); } if (level[y - 2][x] == 1) { t.gotoAndStop(3); } if (level[y - 3][x] == 1) { t.gotoAndStop(4); } if (level[y - 4][x] == 1) { t.gotoAndStop(5); } if (level[y - 5][x] == 1) { t.gotoAndStop(6); } if (level[y - 6][x] == 1) { t.gotoAndStop(7); } } } if (grapicsType == 2) { t.gotoAndStop(12); i = 1; while (i < 3) { if (level[y - i][x] == 1) { t.gotoAndStop(i + 12); } if (level[y][x - 1] == 0 && level[y][x + 1] == 0) { t.gotoAndStop(15); i2 = 1; while (i2 <= 3) { if (level[y - i2][x] == 1) { t.gotoAndStop(i2 + 15); } ++i2; } } ++i; } } if (grapicsType == 3) { if (y < 17) { t.gotoAndStop(1); var v1 = new Color('t'); v1.setRGB(Math.round(Math.random() * 16777215)); } } if (grapicsType == 4) { t.gotoAndStop(15); i2 = 1; while (i2 <= 3) { if (level[y - i2][x] == 1) { t.gotoAndStop(i2 + 15); } ++i2; } } if (level[y][x] == 8) { if (y == 17) { t.gotoAndStop(8); } if (y == 18) { t.gotoAndStop(9); } if (y == 19) { t.gotoAndStop(10); } } } function remover() { removeMovieClip(level_container); if (survivalTime >= goalTime) { if (gameLevel == 12) { gotoAndStop(11); removeMovieClip(level_container); } else { if (gameLevel == 6) { if (gameFinish == true) { gotoAndStop(9); } else { gotoAndStop(10); } } else { gotoAndStop(10); } } } else { gotoAndStop(9); } } gameText.gotoAndStop(gameLevel); if (gameFinish == true) { if (gameLevel == 6) { gameText.gotoAndStop(14); } } countertimer = 0; timerStar = 0; starI = 0; starArray = new Array(); timerBomb = 0; bombI = 0; bombArray = new Array(); beforeGameCounter = 0; timer = 0; number = 0; timerMin = 2; blockRemoverChanger = 0.8; starSpeed = 3; timerStarMax = 150; tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 3; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); if (gameLevel == 1) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0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 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 30; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 1; gameType = 1; player = [24, 1]; } if (gameLevel == 2) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 30; timerMax = 40; blockRemoverChanger = 0.85; grapicsType = 4; gameType = 2; timerStarMax = 100; starSpeed = 3; player = [14, 1]; } if (gameLevel == 3) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[9] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[10] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 10; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 2; gameType = 3; timerStarMax = 80; starSpeed = 6; player = [14, 1]; } if (gameLevel == 4) { level[0] = [0, 0, 0, 0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 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0]; level[15] = [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0]; level[16] = [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 60; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 1; gameType = 1; player = [13, 1]; } if (gameLevel == 5) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1]; level[15] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[16] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 30; timerMax = 40; blockRemoverChanger = 0.8; grapicsType = 1; gameType = 1; timerStarMax = 100; starSpeed = 5; player = [14, 1]; } if (gameLevel == 6) { if (gameFinish == true) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0,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8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = '/'; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 3; gameType = 1; player = [24, 1]; } else { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0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 8]; goalTime = 20; timerMax = 80; blockRemoverChanger = 0.96; grapicsType = 2; gameType = 3; timerStarMax = 20; starSpeed = 15; player = [14, 1]; } } if (gameLevel == 7) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[9] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[10] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 40; timerMax = 80; blockRemoverChanger = 0.9; grapicsType = 2; gameType = 2; player = [11, 1]; } if (gameLevel == 8) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 4; timerMax = 40; blockRemoverChanger = 0.9; grapicsType = 1; gameType = 2; player = [10, 1]; } if (gameLevel == 9) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 40; timerMax = 80; blockRemoverChanger = 0.8; timerStarMax = 100; grapicsType = 2; gameType = 2; player = [14, 1]; } if (gameLevel == 10) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] =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8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 21; timerMax = 40; blockRemoverChanger = 0.99; grapicsType = 4; gameType = 3; timerStarMax = 50; starSpeed = 10; player = [14, 1]; } if (gameLevel == 11) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[9] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[10] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 30; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 1; gameType = 1; player = [14, 1]; timerStarMax = 40; starSpeed = 8; } if (gameLevel == 12) { level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0]; level[16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]; level[17] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[18] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; level[19] = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; goalTime = 85; timerMax = 80; blockRemoverChanger = 0.85; grapicsType = 1; gameType = 1; player = [24, 1]; } i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); level_container._alpha = 0; _root.onEnterFrame = function () { if (_root._currentframe == 8) { if (beforeGameCounter == 100) { level_container._alpha = 100; gameText.gotoAndStop(13); } if (beforeGameCounter > 100) { if (survivalTime == goalTime) { remover(); } ++countertimer; if (countertimer >= 45) { countertimer = 0; ++survivalTime; } lowest = 90; i = 0; while (i <= 26) { if (topArray[i] < lowest) { lowest = topArray[i]; } ++i; } if (lowest < 17) { removeBricks(); } starMovement(); starCollision(); ground_under_feet(); walking = false; climbing = false; playerMovement(); } else { ++beforeGameCounter; } } }; } movieClip 113 { } movieClip 121 { } movieClip 138 { } frame 9 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); if (l[y][x] != 1) { t._alpha = 0; } t.gotoAndStop(11); } ++x; } ++y; } place_player(); } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 2: over = 'menu'; remover2(); speed = ground_acceleration; friction = ground_friction; break; case 3: over = 'level'; remover(); speed = ground_acceleration; friction = ground_friction; } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function remover2() { gotoAndStop(5); removeMovieClip(level_container); } function remover() { gotoAndStop(8); removeMovieClip(level_container); } stop(); if (gameFinish == true) { a = 'congratulations'; b = 'you survived for'; c = 'seconds'; missedBy = survivalTime; } else { a = 'you lost'; b = 'you just need'; c = 'seconds more'; missedBy = goalTime - survivalTime; i = 1; while (i <= 20) { this['flower' + i]._alpha = 0; ++i; } } survivalTime = 0; tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 0; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[17] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[18] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[19] = [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1]; player = [14, 2]; coin[0] = [23, 15]; i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); _root.onEnterFrame = function () { if (_root._currentframe == 9) { ground_under_feet(); walking = false; climbing = false; playerMovement(); } }; } frame 10 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); if (l[y][x] != 1) { t._alpha = 0; } t.gotoAndStop(11); } ++x; } ++y; } place_player(); } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 2: over = 'sponsor'; place_player(); speed = ground_acceleration; friction = ground_friction; break; case 3: over = 'level'; remover(); speed = ground_acceleration; friction = ground_friction; } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function remover() { survivalTime = 0; gotoAndStop(8); removeMovieClip(level_container); } stop(); gameLevel += 1; if (unlockedLevel > gameLevel) { } else { unlockedLevel = gameLevel; } tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 0; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[14] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[15] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[16] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[17] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[18] = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]; level[19] = [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1]; player = [14, 2]; coin[0] = [23, 15]; i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); _root.onEnterFrame = function () { if (_root._currentframe == 10) { ground_under_feet(); walking = false; climbing = false; playerMovement(); } }; } frame 11 { function create_level(l) { _root.createEmptyMovieClip('level_container', 1); _root.level_container.createEmptyMovieClip('falling', 1); level_height = l.length; level_width = l[0].length; y = 0; while (y < level_height) { x = 0; while (x < level_width) { if (l[y][x] != 0) { t = level_container.attachMovie('tile', 't' + y + '_' + x, _root.level_container.getNextHighestDepth(), {'_x': x * tile_size, '_y': y * tile_size}); t._alpha = 0; t.gotoAndStop(11); } ++x; } ++y; } place_player(); } function playerMovement() { if (Key.isDown(37)) { xspeed -= speed; walking = true; } if (Key.isDown(39)) { xspeed += speed; walking = true; } if (Key.isDown(38)) { get_edges(); if (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6) { jumping = false; falling = false; climbing = true; climbdir = -1; } } if (Key.isDown(40)) { get_edges(); if (over == 'ladder' or (top_right == 6 or bottom_right == 6 or top_left == 6 or bottom_left == 6)) { jumping = false; falling = false; climbing = true; climbdir = 1; } } if (Key.isDown(32) || Key.isDown(38)) { get_edges(); if (!falling and !jumping) { jumping = true; yspeed = -jump_speed; } } if (!walking) { xspeed *= friction; if (Math.abs(xspeed) < 0.5) { xspeed = 0; } } if (xspeed > max_speed) { xspeed = max_speed; } if (xspeed < max_speed * -1) { xspeed = max_speed * -1; } if (falling or jumping) { yspeed += gravity; } if (climbing) { yspeed = climb_speed * climbdir; } if (!falling and !jumping and !climbing) { yspeed = 0; } if (xspeed > 0) { if (jumping) { level_container.hero.gotoAndStop(5); } else { level_container.hero.gotoAndStop(3); } } else { if (jumping) { level_container.hero.gotoAndStop(4); } else { level_container.hero.gotoAndStop(1); } } if (xspeed == 0) { level_container.hero.gotoAndStop(2); } xspeed += bonus_speed; check_collisions(); level_container.hero._x = x_pos; level_container.hero._y = y_pos; xspeed -= bonus_speed; } function ground_under_feet() { bonus_speed = 0; left_foot_x = Math.floor((x_pos - 6) / tile_size); right_foot_x = Math.floor((x_pos + 5) / tile_size); foot_y = Math.floor((y_pos + 9) / tile_size); left_foot = level[foot_y][left_foot_x]; right_foot = level[foot_y][right_foot_x]; if (left_foot != 0) { current_tile = left_foot; } else { current_tile = right_foot; } switch (current_tile) { case 0: over = 'air'; speed = air_acceleration; friction = air_friction; falling = true; break; case 1: over = 'ground'; speed = ground_acceleration; friction = ground_friction; break; case 2: over = 'level'; remover(); speed = ground_acceleration; friction = ground_friction; } } function check_collisions() { y_pos += yspeed; get_edges(); if (yspeed > 0) { if (bottom_right != 0 and bottom_right != 6 or bottom_left != 0 and bottom_left != 6) { if (bottom_right != 5 and bottom_left != 5) { if ((bottom_right == 7 or bottom_left == 7) and Math.abs(yspeed) > 1) { yspeed *= -1; jumping = true; falling = true; } else { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } else { if (prev_bottom < bottom) { y_pos = bottom * tile_size - 9; yspeed = 0; falling = false; jumping = false; } } } } if (yspeed < 0) { if (top_right != 0 and top_right != 5 and top_right != 6 or top_left != 0 and top_left != 5 and top_left != 6) { y_pos = bottom * tile_size + 1 + 8; yspeed = 0; falling = false; jumping = false; } } x_pos += xspeed; get_edges(); if (xspeed < 0) { if (top_left != 0 and top_left != 5 and top_left != 6 and top_left != 7 or bottom_left != 0 and bottom_left != 5 and bottom_left != 6 and bottom_left != 7) { x_pos = (left + 1) * tile_size + 6; xspeed = 0; } } if (xspeed > 0) { if (top_right != 0 and top_right != 5 and top_right != 6 and top_right != 7 or bottom_right != 0 and bottom_right != 5 and bottom_right != 6 and bottom_right != 7) { x_pos = right * tile_size - 6; xspeed = 0; } } prev_bottom = bottom; } function get_edges() { right = Math.floor((x_pos + 5) / tile_size); left = Math.floor((x_pos - 6) / tile_size); bottom = Math.floor((y_pos + 8) / tile_size); top = Math.floor((y_pos - 9) / tile_size); top_right = level[top][right]; top_left = level[top][left]; bottom_left = level[bottom][left]; bottom_right = level[bottom][right]; } function place_player() { level_container.hero.removeMovieClip(); x_pos = player[0] * tile_size + tile_size / 2; y_pos = player[1] * tile_size + tile_size / 2 + 1; level_container.attachMovie('hero', 'hero', _root.level_container.getNextHighestDepth(), {'_x': x_pos, '_y': y_pos}); } function remover() { gameFinish = true; removeMovieClip(level_container); gotoAndStop(5); } stop(); tile_size = 20; ground_acceleration = 1; ground_friction = 0.8; air_acceleration = 0.5; air_friction = 0.7; ice_acceleration = 0.15; ice_friction = 0.95; treadmill_speed = 2; max_speed = 3; xspeed = 0; yspeed = 0; falling = false; gravity = 0.5; jump_speed = 8; climbing = false; climb_speed = 0.8; level = new Array(); enemy = new Array(); coin = new Array(); topArray = new Array(); level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[2] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[6] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[7] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[8] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[9] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[10] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[11] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[13] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[14] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[15] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; level[16] = [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[17] = [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[18] = [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; level[19] = [1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; player = [15, 0]; coin[0] = [23, 15]; i = 16; while (i >= 0) { i2 = 0; while (i2 <= 27) { if (level[i][i2] == 1) { topArray[i2] = i; } ++i2; } --i; } i2 = 0; while (i2 <= 27) { if (topArray[i2] > 0) { } else { topArray[i2] = 17; } ++i2; } topArray[28] = 20; create_level(level); _root.onEnterFrame = function () { if (_root._currentframe == 11) { ground_under_feet(); walking = false; climbing = false; playerMovement(); } }; } movieClip 153 { }




https://swfchan.com/53/264653/info.shtml
Created: 29/5 -2026 09:24:05 Last modified: 29/5 -2026 09:24:05 Server time: 29/05 -2026 15:05:29