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

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

Stackopolis.swf

This is the info page for
Flash #26102

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


Text
look out for more fiendish
levels in the full version of
Stackopolis

ActionScript [AS1/AS2]

Frame 1
function 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 1
onClipEvent (load) { this._visible = false; this.swapDepths(4999); }
Instance of Symbol 54 MovieClip [render-0] "renders" in Frame 1
onClipEvent (load) { this.swapDepths(5002); }
Instance of Symbol 45 MovieClip [countdown] "countdown" in Frame 1
onClipEvent (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 1
onClipEvent (load) { this._visible = false; }
Symbol 6 Button
on (press) { game.pushBlock(this._name, 0, this.tileX, this.tileY); }
Symbol 9 Button
on (press) { game.pushBlock(this._name, 1, this.tileX, this.tileY); }
Symbol 12 Button
on (press) { game.pushBlock(this._name, 2, this.tileX, this.tileY); }
Symbol 15 Button
on (press) { game.pushBlock(this._name, 3, this.tileX, this.tileY); }
Symbol 18 Button
on (press) { game.pushBlock(this._name, 4, this.tileX, this.tileY); }
Symbol 21 Button
on (press) { game.pushBlock(this._name, 5, this.tileX, this.tileY); }
Symbol 24 Button
on (press) { game.pushBlock(this._name, 6, this.tileX, this.tileY); }
Symbol 27 Button
on (press) { game.pushBlock(this._name, 7, this.tileX, this.tileY); }
Symbol 30 Button
on (press) { game.pushBlock(this._name, 8, this.tileX, this.tileY); }
Symbol 33 Button
on (press) { game.pushBlock(this._name, 9, this.tileX, this.tileY); }
Symbol 34 MovieClip [tile] Frame 1
function initialize() { } this.onLoad = this.initialize();
Symbol 35 MovieClip [player] Frame 1
this.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 Button
on (press) { game.nextLevel(); }
Symbol 45 MovieClip [countdown] Frame 1
stop();
Symbol 45 MovieClip [countdown] Frame 2
play(); trace("countdown loaded"); this._visible = true;
Symbol 45 MovieClip [countdown] Frame 110
this._visible = false; game.begin();
Symbol 54 MovieClip [render-0] Frame 1
stop();
Symbol 54 MovieClip [render-0] Frame 20
game.showNext(); trace("render finished"); stop();
Symbol 54 MovieClip [render-0] Frame 39
game.showNext(); trace("render finished"); stop();
Symbol 54 MovieClip [render-0] Frame 58
game.showNext(); trace("render finished"); stop();
Symbol 61 Button
on (release) { getURL ("http://www.blocmedia.com/", "_blank"); }
Symbol 71 Button
on (release) { _root.countdown.gotoAndPlay(2); gotoAndStop (2); }
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
stop();
Symbol 79 Button
on (press) { gotoAndStop (1); _root.countdown.gotoAndPlay(2); }
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 2
play();
Symbol 80 MovieClip Frame 50
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 2
stop();
Symbol 93 MovieClip Frame 3
stop();
Symbol 93 MovieClip Frame 4
gotoAndStop (1);

Library Items

Symbol 1 Sound [tick]
Symbol 2 Sound [win]
Symbol 3 Sound [choose]
Symbol 4 Sound [change]
Symbol 5 GraphicUsed by:6 9 12 15 18 21 24 27 30 33
Symbol 6 ButtonUses:5Used by:34
Symbol 7 BitmapUsed by:8
Symbol 8 GraphicUses:7Used by:34
Symbol 9 ButtonUses:5Used by:34
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:34
Symbol 12 ButtonUses:5Used by:34
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:34
Symbol 15 ButtonUses:5Used by:34
Symbol 16 BitmapUsed by:17
Symbol 17 GraphicUses:16Used by:34
Symbol 18 ButtonUses:5Used by:34
Symbol 19 BitmapUsed by:20
Symbol 20 GraphicUses:19Used by:34
Symbol 21 ButtonUses:5Used by:34
Symbol 22 BitmapUsed by:23
Symbol 23 GraphicUses:22Used by:34
Symbol 24 ButtonUses:5Used by:34
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:34
Symbol 27 ButtonUses:5Used by:34
Symbol 28 BitmapUsed by:29
Symbol 29 GraphicUses:28Used by:34
Symbol 30 ButtonUses:5Used by:34
Symbol 31 BitmapUsed by:32
Symbol 32 GraphicUses:31Used by:34
Symbol 33 ButtonUses:5Used 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 GraphicUsed by:40
Symbol 38 GraphicUsed by:39 71 79
Symbol 39 ButtonUses:38Used by:40
Symbol 40 MovieClip [nextbutton]Uses:37 39Used by:Timeline
Symbol 41 BitmapUsed by:42
Symbol 42 GraphicUses:41Used by:45
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:45
Symbol 45 MovieClip [countdown]Uses:42 44Used by:Timeline
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46Used by:54
Symbol 48 BitmapUsed by:49
Symbol 49 GraphicUses:48Used by:54
Symbol 50 BitmapUsed by:51
Symbol 51 GraphicUses:50Used by:54
Symbol 52 FontUsed by:53
Symbol 53 TextUses:52Used by:54
Symbol 54 MovieClip [render-0]Uses:47 49 51 53Used by:Timeline
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:62
Symbol 57 GraphicUsed by:61
Symbol 58 GraphicUsed by:61
Symbol 59 GraphicUsed by:61
Symbol 60 GraphicUsed by:61
Symbol 61 ButtonUses:57 58 59 60Used by:62
Symbol 62 MovieClipUses:56 61Used by:Timeline
Symbol 63 BitmapUsed by:64
Symbol 64 GraphicUses:63Used by:65
Symbol 65 MovieClipUses:64Used by:Timeline
Symbol 66 FontUsed by:67 68
Symbol 67 EditableTextUses:66Used by:Timeline
Symbol 68 EditableTextUses:66Used by:Timeline
Symbol 69 BitmapUsed by:70
Symbol 70 GraphicUses:69Used by:72
Symbol 71 ButtonUses:38Used by:72
Symbol 72 MovieClipUses:70 71Used by:Timeline
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:80
Symbol 75 BitmapUsed by:76
Symbol 76 GraphicUses:75Used by:80
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:80
Symbol 79 ButtonUses:38Used by:80
Symbol 80 MovieClipUses:74 76 78 79Used by:Timeline
Symbol 81 BitmapUsed by:84
Symbol 82 BitmapUsed by:84
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:81 82 83Used by:93
Symbol 85 BitmapUsed by:88
Symbol 86 BitmapUsed by:88
Symbol 87 BitmapUsed by:88
Symbol 88 GraphicUses:85 86 87Used by:93
Symbol 89 BitmapUsed by:92
Symbol 90 BitmapUsed by:92
Symbol 91 BitmapUsed by:92
Symbol 92 GraphicUses:89 90 91Used by:93
Symbol 93 MovieClipUses:84 88 92Used by:Timeline

Instance Names

"welldone"Frame 1Symbol 65 MovieClip
"renders"Frame 1Symbol 54 MovieClip [render-0]
"countdown"Frame 1Symbol 45 MovieClip [countdown]
"gameover"Frame 1Symbol 80 MovieClip
"levels"Frame 1Symbol 93 MovieClip
"nextLevel"Frame 1Symbol 40 MovieClip [nextbutton]

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "tick"
ExportAssets (56)Timeline Frame 1Symbol 2 as "win"
ExportAssets (56)Timeline Frame 1Symbol 3 as "choose"
ExportAssets (56)Timeline Frame 1Symbol 4 as "change"
ExportAssets (56)Timeline Frame 1Symbol 34 as "tile"
ExportAssets (56)Timeline Frame 1Symbol 35 as "player"
ExportAssets (56)Timeline Frame 1Symbol 36 as "container"
ExportAssets (56)Timeline Frame 1Symbol 40 as "nextbutton"
ExportAssets (56)Timeline Frame 1Symbol 45 as "countdown"
ExportAssets (56)Timeline Frame 1Symbol 54 as "render-0"
ExportAssets (56)Timeline Frame 1Symbol 54 as "render-0"
ExportAssets (56)Timeline Frame 1Symbol 45 as "countdown"
ExportAssets (56)Timeline Frame 1Symbol 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

timerSymbol 67 EditableText""
timerSymbol 68 EditableText""




http://swfchan.com/6/26102/info.shtml
Created: 23/5 -2019 01:28:45 Last modified: 23/5 -2019 01:28:45 Server time: 14/05 -2024 09:19:41