STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
This is the info page for Flash #26102 |
look out for more fiendish levels in the full version of Stackopolis |
ActionScript [AS1/AS2]
Frame 1function Stack(playerName) { this.playername = playerName; this.intervalID = undefined; this.tileWidth = 96; this.tileHeight = 48; this.alpha = 100; this.run = false; this.createSounds(); this.main(); } Movieclip.prototype.fade = function (ratio, friction, alpha) { if (this._alpha != alpha) { this.ratio = "." + ratio; this.friction = "." + friction; this.alpha = alpha; this.speedX = ((this.alpha - this._alpha) * this.ratio) + (this.speedX * this.friction); this._alpha = this._alpha + this.speedX; } }; Stack.prototype.createSounds = function () { this.tick = new Sound(); this.choose = new Sound(); this.change = new Sound(); this.winsound = new Sound(); this.tick.attachSound("tick"); this.choose.attachSound("choose"); this.change.attachSound("change"); this.winsound.attachSound("win"); }; Stack.prototype.main = function () { this.getMaps(); this.mode = "choose"; this.level = 0; this.moves = 0; this.timer = 60; this.currentTime = 60; _root.levels.gotoAndStop(1); }; Stack.prototype.win = function () { this.show("welldone"); this.winsound.start(0, 0); this.end(); this.displayRender(); }; Stack.prototype.lose = function () { this.main(); this.end(); this.show("gameover"); _root.gameover.gotoAndPlay(2); }; Stack.prototype.showNext = function () { _root.nextLevel._visible = true; }; Stack.prototype.hideNext = function () { _root.nextLevel._visible = false; }; Stack.prototype.displayRender = function () { var tmp_name = ("render" + this.level); _root.renders.gotoAndPlay(tmp_name); trace("display render " + tmp_name); }; Stack.prototype.toggleMode = function () { if (this.mode == "choose") { this.choose.start(0, 0); this.mode = "change"; } else if (this.mode == "change") { this.change.start(0, 0); this.mode = "choose"; } }; Stack.prototype.pushBlock = function (name) { if (this.checkActive()) { var tmp_name = name; var location = tmp_name.split(",", 2); var tmp_i = location[0]; var tmp_j = location[1]; var number = this.currentMap[tmp_i][tmp_j]; if (this.mode == "choose") { if (number == 0) { } else { this.toggleMode(); this.currentMap[tmp_i][tmp_j] = number - 1; _root.container[name].prevFrame(); } } else if ((this.mode == "change") && (number != 9)) { this.currentMap[tmp_i][tmp_j] = number + 1; _root.container[name].nextFrame(); this.moves++; this.toggleMode(); if (this.currentMap.toString() == this.currentWinMap.toString()) { this.win(); } } } }; Stack.prototype.removeBlocks = function () { _root.container.removeMovieClip(); return(true); }; Stack.prototype.resetScreen = function () { if (this.removeBlocks()) { _root.createEmptyMovieClip("container", 100); _root.container._x = 351; _root.container._y = 327; _root.container.onEnterFrame = function () { _root.container.fade(4, 1, game.alpha); }; } }; Stack.prototype.nextLevel = function () { this.hide("welldone"); this.hide("nextLevel"); var maxLevels = this.map.length; if (this.level < (maxLevels - 1)) { this.level++; } else { this.level = 0; } trace("next Level " + this.level); _root.countdown.gotoAndPlay(2); _root.renders.gotoAndStop("empty"); _root.levels.nextFrame(); }; Stack.prototype.buildMap = function () { trace("build Map " + this.level); this.toggle = "choose"; this.getMaps(); this.currentMap = this.map[this.level]; this.currentWinMap = this.winmap[this.level]; var mapWidth = this.currentMap[0].length; var mapHeight = this.currentMap.length; var i = 0; while (i < mapHeight) { var j = 0; while (j < mapHeight) { var tmp_name = ((i + ",") + j); _root.container.attachMovie("tile", tmp_name, ++d); _root.container[tmp_name]._x = (this.tileWidth / 2) * (j - i); _root.container[tmp_name]._y = (this.tileHeight / 2) * (j + i); _root.container[tmp_name].gotoAndStop(this.currentMap[i][j] + 1); j++; } i++; } }; Stack.prototype.begin = function () { trace("begin"); this.resetScreen(); this.buildMap(); this.run = true; this.alpha = 100; this.resetTimer(); this.startTimer(); }; Stack.prototype.end = function () { trace("end"); this.run = false; this.alpha = 0; this.stopTimer(); }; Stack.prototype.checkActive = function () { if (this.run == true) { return(true); } return(false); }; Stack.prototype.getMaps = function () { trace("getting maps!"); this.mastermap = new Array(); this.map = new Array(); this.winmap = new Array(); this.mastermap[0] = [[0, 3, 0, 2, 4, 0], [0, 1, 5, 0, 0, 0], [0, 2, 3, 4, 0, 1], [0, 0, 2, 0, 3, 0], [0, 3, 0, 0, 2, 0], [0, 2, 0, 0, 4, 0], [0, 0, 4, 0, 1, 0]]; this.mastermap[1] = [[0, 9, 0, 1, 0, 0], [0, 1, 0, 9, 0, 0], [0, 5, 0, 5, 0, 0], [0, 5, 0, 5, 0, 0], [0, 5, 0, 5, 0, 0], [0, 9, 0, 1, 0, 0], [0, 1, 0, 9, 0, 0]]; this.mastermap[2] = [[1, 1, 1, 3, 0, 9], [0, 5, 5, 0, 0, 0], [0, 1, 0, 5, 0, 0], [0, 0, 1, 2, 0, 0], [0, 0, 0, 1, 3, 0], [0, 0, 1, 0, 9, 5], [0, 0, 0, 0, 0, 9]]; this.winmap[0] = [[0, 0, 0, 0, 0, 0], [0, 2, 2, 2, 2, 0], [0, 2, 3, 3, 2, 0], [0, 2, 3, 3, 2, 0], [0, 2, 3, 3, 2, 0], [0, 2, 2, 2, 2, 0], [0, 0, 0, 0, 0, 0]]; this.winmap[1] = [[0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 2, 0], [2, 4, 4, 4, 2, 0], [2, 4, 6, 4, 2, 0], [2, 4, 4, 4, 2, 0], [2, 2, 2, 2, 2, 0], [0, 0, 0, 0, 0, 0]]; this.winmap[2] = [[0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 3, 3], [0, 0, 0, 3, 3, 2], [0, 0, 0, 3, 2, 2], [0, 3, 3, 3, 2, 2], [0, 3, 2, 2, 2, 2], [3, 3, 2, 2, 2, 2]]; this.map[0] = this.mastermap[0]; this.map[1] = this.mastermap[1]; this.map[2] = this.mastermap[2]; }; Stack.prototype.resetTimer = function () { trace("reset timer"); this.currentTime = this.timer; this.displayTimer(); }; Stack.prototype.reduceTimer = function () { trace("reduce timer " + game.currentTime); game.currentTime--; game.tick.start(0, 0); if (game.currentTime == 0) { trace("you lose!"); game.stopTimer(); game.lose(); } game.displayTimer(); }; Stack.prototype.displayTimer = function () { trace("display timer"); _root.timer = this.currentTime; }; Stack.prototype.startTimer = function () { trace("start timer"); this.intervalID = setInterval(this.reduceTimer, 1000); trace("interval ID set: " + this.intervalID); }; Stack.prototype.stopTimer = function () { trace("stop timer: " + this.intervalID); clearInterval(this.intervalID); }; Stack.prototype.show = function (clipname) { _root[clipname]._visible = true; }; Stack.prototype.hide = function (clipname) { _root[clipname]._visible = false; }; _global.game = new Stack();Instance of Symbol 65 MovieClip "welldone" in Frame 1onClipEvent (load) { this._visible = false; this.swapDepths(4999); }Instance of Symbol 54 MovieClip [render-0] "renders" in Frame 1onClipEvent (load) { this.swapDepths(5002); }Instance of Symbol 45 MovieClip [countdown] "countdown" in Frame 1onClipEvent (load) { this.swapDepths(900000); }Instance of Symbol 80 MovieClip "gameover" in Frame 1/* no clip actions */Instance of Symbol 40 MovieClip [nextbutton] "nextLevel" in Frame 1onClipEvent (load) { this._visible = false; }Symbol 6 Buttonon (press) { game.pushBlock(this._name, 0, this.tileX, this.tileY); }Symbol 9 Buttonon (press) { game.pushBlock(this._name, 1, this.tileX, this.tileY); }Symbol 12 Buttonon (press) { game.pushBlock(this._name, 2, this.tileX, this.tileY); }Symbol 15 Buttonon (press) { game.pushBlock(this._name, 3, this.tileX, this.tileY); }Symbol 18 Buttonon (press) { game.pushBlock(this._name, 4, this.tileX, this.tileY); }Symbol 21 Buttonon (press) { game.pushBlock(this._name, 5, this.tileX, this.tileY); }Symbol 24 Buttonon (press) { game.pushBlock(this._name, 6, this.tileX, this.tileY); }Symbol 27 Buttonon (press) { game.pushBlock(this._name, 7, this.tileX, this.tileY); }Symbol 30 Buttonon (press) { game.pushBlock(this._name, 8, this.tileX, this.tileY); }Symbol 33 Buttonon (press) { game.pushBlock(this._name, 9, this.tileX, this.tileY); }Symbol 34 MovieClip [tile] Frame 1function initialize() { } this.onLoad = this.initialize();Symbol 35 MovieClip [player] Frame 1this.onLoad = (this.speed = 2); sinY = (cosY = 0.707); cosX = 0.866; this.onLoad = (this.render = function () { _x = (((-ypos) * sinY) + (xpos * cosY)); _y = ((height * cosX) - ((((-ypos) * cosY) - (xpos * sinY)) / 2)); var depth = ((centerY * mapH) + (centerX + 1)); this.swapDepths(depth); }); this.onEnterFrame = (this.control = function () { if (Key.isDown(38)) { ypos = ypos - speed; } if (Key.isDown(40)) { ypos = ypos + speed; } if (Key.isDown(37)) { xpos = xpos - speed; } if (Key.isDown(39)) { xpos = xpos + speed; } var downY = Math.floor((ypos + 7) / tileH); var upY = Math.floor((ypos - 7) / tileH); var leftX = Math.floor((xpos - 7) / tileW); var rightX = Math.floor((xpos + 7) / tileW); centerX = Math.floor(xpos / tileW); centerY = Math.floor(ypos / tileH); if ((cMap[upY][leftX] > 0) || (cMap[upY][rightX] > 0)) { ypos = ypos + speed; } if ((cMap[downY][leftX] > 0) || (cMap[downY][rightX] > 0)) { ypos = ypos - speed; } if ((cMap[downY][leftX] > 0) || (cMap[upY][leftX] > 0)) { xpos = xpos + speed; } if ((cMap[downY][rightX] > 0) || (cMap[upY][rightX] > 0)) { xpos = xpos - speed; } this.render(); });Symbol 39 Buttonon (press) { game.nextLevel(); }Symbol 45 MovieClip [countdown] Frame 1stop();Symbol 45 MovieClip [countdown] Frame 2play(); trace("countdown loaded"); this._visible = true;Symbol 45 MovieClip [countdown] Frame 110this._visible = false; game.begin();Symbol 54 MovieClip [render-0] Frame 1stop();Symbol 54 MovieClip [render-0] Frame 20game.showNext(); trace("render finished"); stop();Symbol 54 MovieClip [render-0] Frame 39game.showNext(); trace("render finished"); stop();Symbol 54 MovieClip [render-0] Frame 58game.showNext(); trace("render finished"); stop();Symbol 61 Buttonon (release) { getURL ("http://www.blocmedia.com/", "_blank"); }Symbol 71 Buttonon (release) { _root.countdown.gotoAndPlay(2); gotoAndStop (2); }Symbol 72 MovieClip Frame 1stop();Symbol 72 MovieClip Frame 2stop();Symbol 79 Buttonon (press) { gotoAndStop (1); _root.countdown.gotoAndPlay(2); }Symbol 80 MovieClip Frame 1stop();Symbol 80 MovieClip Frame 2play();Symbol 80 MovieClip Frame 50stop();Symbol 93 MovieClip Frame 1stop();Symbol 93 MovieClip Frame 2stop();Symbol 93 MovieClip Frame 3stop();Symbol 93 MovieClip Frame 4gotoAndStop (1);
Library Items
Symbol 1 Sound [tick] | ||
Symbol 2 Sound [win] | ||
Symbol 3 Sound [choose] | ||
Symbol 4 Sound [change] | ||
Symbol 5 Graphic | Used by:6 9 12 15 18 21 24 27 30 33 | |
Symbol 6 Button | Uses:5 | Used by:34 |
Symbol 7 Bitmap | Used by:8 | |
Symbol 8 Graphic | Uses:7 | Used by:34 |
Symbol 9 Button | Uses:5 | Used by:34 |
Symbol 10 Bitmap | Used by:11 | |
Symbol 11 Graphic | Uses:10 | Used by:34 |
Symbol 12 Button | Uses:5 | Used by:34 |
Symbol 13 Bitmap | Used by:14 | |
Symbol 14 Graphic | Uses:13 | Used by:34 |
Symbol 15 Button | Uses:5 | Used by:34 |
Symbol 16 Bitmap | Used by:17 | |
Symbol 17 Graphic | Uses:16 | Used by:34 |
Symbol 18 Button | Uses:5 | Used by:34 |
Symbol 19 Bitmap | Used by:20 | |
Symbol 20 Graphic | Uses:19 | Used by:34 |
Symbol 21 Button | Uses:5 | Used by:34 |
Symbol 22 Bitmap | Used by:23 | |
Symbol 23 Graphic | Uses:22 | Used by:34 |
Symbol 24 Button | Uses:5 | Used by:34 |
Symbol 25 Bitmap | Used by:26 | |
Symbol 26 Graphic | Uses:25 | Used by:34 |
Symbol 27 Button | Uses:5 | Used by:34 |
Symbol 28 Bitmap | Used by:29 | |
Symbol 29 Graphic | Uses:28 | Used by:34 |
Symbol 30 Button | Uses:5 | Used by:34 |
Symbol 31 Bitmap | Used by:32 | |
Symbol 32 Graphic | Uses:31 | Used by:34 |
Symbol 33 Button | Uses:5 | Used by:34 |
Symbol 34 MovieClip [tile] | Uses:6 8 9 11 12 14 15 17 18 20 21 23 24 26 27 29 30 32 33 | |
Symbol 35 MovieClip [player] | ||
Symbol 36 MovieClip [container] | ||
Symbol 37 Graphic | Used by:40 | |
Symbol 38 Graphic | Used by:39 71 79 | |
Symbol 39 Button | Uses:38 | Used by:40 |
Symbol 40 MovieClip [nextbutton] | Uses:37 39 | Used by:Timeline |
Symbol 41 Bitmap | Used by:42 | |
Symbol 42 Graphic | Uses:41 | Used by:45 |
Symbol 43 Bitmap | Used by:44 | |
Symbol 44 Graphic | Uses:43 | Used by:45 |
Symbol 45 MovieClip [countdown] | Uses:42 44 | Used by:Timeline |
Symbol 46 Bitmap | Used by:47 | |
Symbol 47 Graphic | Uses:46 | Used by:54 |
Symbol 48 Bitmap | Used by:49 | |
Symbol 49 Graphic | Uses:48 | Used by:54 |
Symbol 50 Bitmap | Used by:51 | |
Symbol 51 Graphic | Uses:50 | Used by:54 |
Symbol 52 Font | Used by:53 | |
Symbol 53 Text | Uses:52 | Used by:54 |
Symbol 54 MovieClip [render-0] | Uses:47 49 51 53 | Used by:Timeline |
Symbol 55 Bitmap | Used by:56 | |
Symbol 56 Graphic | Uses:55 | Used by:62 |
Symbol 57 Graphic | Used by:61 | |
Symbol 58 Graphic | Used by:61 | |
Symbol 59 Graphic | Used by:61 | |
Symbol 60 Graphic | Used by:61 | |
Symbol 61 Button | Uses:57 58 59 60 | Used by:62 |
Symbol 62 MovieClip | Uses:56 61 | Used by:Timeline |
Symbol 63 Bitmap | Used by:64 | |
Symbol 64 Graphic | Uses:63 | Used by:65 |
Symbol 65 MovieClip | Uses:64 | Used by:Timeline |
Symbol 66 Font | Used by:67 68 | |
Symbol 67 EditableText | Uses:66 | Used by:Timeline |
Symbol 68 EditableText | Uses:66 | Used by:Timeline |
Symbol 69 Bitmap | Used by:70 | |
Symbol 70 Graphic | Uses:69 | Used by:72 |
Symbol 71 Button | Uses:38 | Used by:72 |
Symbol 72 MovieClip | Uses:70 71 | Used by:Timeline |
Symbol 73 Bitmap | Used by:74 | |
Symbol 74 Graphic | Uses:73 | Used by:80 |
Symbol 75 Bitmap | Used by:76 | |
Symbol 76 Graphic | Uses:75 | Used by:80 |
Symbol 77 Bitmap | Used by:78 | |
Symbol 78 Graphic | Uses:77 | Used by:80 |
Symbol 79 Button | Uses:38 | Used by:80 |
Symbol 80 MovieClip | Uses:74 76 78 79 | Used by:Timeline |
Symbol 81 Bitmap | Used by:84 | |
Symbol 82 Bitmap | Used by:84 | |
Symbol 83 Bitmap | Used by:84 | |
Symbol 84 Graphic | Uses:81 82 83 | Used by:93 |
Symbol 85 Bitmap | Used by:88 | |
Symbol 86 Bitmap | Used by:88 | |
Symbol 87 Bitmap | Used by:88 | |
Symbol 88 Graphic | Uses:85 86 87 | Used by:93 |
Symbol 89 Bitmap | Used by:92 | |
Symbol 90 Bitmap | Used by:92 | |
Symbol 91 Bitmap | Used by:92 | |
Symbol 92 Graphic | Uses:89 90 91 | Used by:93 |
Symbol 93 MovieClip | Uses:84 88 92 | Used by:Timeline |
Instance Names
"welldone" | Frame 1 | Symbol 65 MovieClip |
"renders" | Frame 1 | Symbol 54 MovieClip [render-0] |
"countdown" | Frame 1 | Symbol 45 MovieClip [countdown] |
"gameover" | Frame 1 | Symbol 80 MovieClip |
"levels" | Frame 1 | Symbol 93 MovieClip |
"nextLevel" | Frame 1 | Symbol 40 MovieClip [nextbutton] |
Special Tags
ExportAssets (56) | Timeline Frame 1 | Symbol 1 as "tick" |
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "win" |
ExportAssets (56) | Timeline Frame 1 | Symbol 3 as "choose" |
ExportAssets (56) | Timeline Frame 1 | Symbol 4 as "change" |
ExportAssets (56) | Timeline Frame 1 | Symbol 34 as "tile" |
ExportAssets (56) | Timeline Frame 1 | Symbol 35 as "player" |
ExportAssets (56) | Timeline Frame 1 | Symbol 36 as "container" |
ExportAssets (56) | Timeline Frame 1 | Symbol 40 as "nextbutton" |
ExportAssets (56) | Timeline Frame 1 | Symbol 45 as "countdown" |
ExportAssets (56) | Timeline Frame 1 | Symbol 54 as "render-0" |
ExportAssets (56) | Timeline Frame 1 | Symbol 54 as "render-0" |
ExportAssets (56) | Timeline Frame 1 | Symbol 45 as "countdown" |
ExportAssets (56) | Timeline Frame 1 | Symbol 40 as "nextbutton" |
Labels
"empty" | Symbol 54 MovieClip [render-0] Frame 1 |
"render0" | Symbol 54 MovieClip [render-0] Frame 2 |
"render1" | Symbol 54 MovieClip [render-0] Frame 21 |
"render2" | Symbol 54 MovieClip [render-0] Frame 40 |
Dynamic Text Variables
timer | Symbol 67 EditableText | "" |
timer | Symbol 68 EditableText | "" |
|