[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (82 B)
_root.gamemode = 2;
var game = (new com.midasplayer.game.quickerklicker.Game());
Symbol 11 MovieClip [clear_animation_bg] Frame 50 (8 B)
stop();
Symbol 22 MovieClip Frame 1 (8 B)
stop();
Symbol 34 MovieClip Frame 1 (8 B)
stop();
Symbol 38 MovieClip [clear_animation] Frame 50 (8 B)
stop();
Symbol 115 MovieClip Frame 1 (8 B)
stop();
Symbol 117 MovieClip [__Packages.com.midasplayer.util.GameBase] Frame 0 (3.3 KiB) ●
class com.midasplayer.util.GameBase
{
static var gameData_, game_, checkGameDataIntervalId_;
function GameBase () {
gameMode_ = GAME_MODE_MONEY;
}
function startGame() {
}
static function setGameMode(gameMode) {
trace(gameMode);
gameMode_ = gameMode;
}
static function getGameMode() {
return(gameMode_);
}
static function setGameType(gameType) {
gameType_ = gameType;
}
static function getGameType() {
return(gameType_);
}
static function getGameData() {
return(gameData_);
}
function reportGameStart() {
com.midasplayer.util.Log.debug("gameStart");
fscommand ("gameStart");
}
function reportGameEnd(score) {
com.midasplayer.util.Log.debug("gameEnd " + String(score));
fscommand ("gameEnd", String(score));
}
function reportGameQuit() {
com.midasplayer.util.Log.debug("gameQuit");
fscommand ("gameQuit");
}
function reportGameOver(score) {
com.midasplayer.util.Log.debug("gameOver " + String(score));
fscommand ("gameOver", String(score));
}
function reportPlayData(pCode, pData, pScore) {
if (gameMode_ != GAME_MODE_MONEY) {
return(undefined);
}
var _local1;
_local1 = String(pCode);
if ((pData != null) && (pData.length > 0)) {
_local1 = _local1 + ("," + pData);
}
if (((pScore != undefined) && (pScore != null)) && (pScore.length > 0)) {
_local1 = _local1 + ("=" + pScore);
}
trace(_local1);
com.midasplayer.util.Log.debug("playData " + _local1);
fscommand ("playData", "" + _local1);
}
static function runsLocal() {
return(_root._URL.substr(0, 5).toLowerCase() == "file:");
}
function init(game) {
game_ = game;
checkGameDataIntervalId_ = setInterval(this, "checkGameData", 200);
}
function checkGameData() {
if (!hasGameData_) {
if (((_root.gameData != null) && (_root.gameData != undefined)) && (_root.gameData != "")) {
hasGameData_ = true;
parseGameData(_root.gameData);
clearInterval(checkGameDataIntervalId_);
game_.startGame();
}
}
}
function parseGameData(myData) {
gameData_ = new com.midasplayer.util.Map();
var _local7 = new XML();
_local7.ignoreWhite = true;
_local7.parseXML(myData);
var _local4 = _local7.firstChild;
if (_local4.nodeName == "gamedata") {
for (var _local6 in _local4.attributes) {
var _local5;
var _local2 = _local4.attributes[_local6];
gameData_.put(_local6, _local2);
}
var _local1 = _local4.firstChild;
while (_local1 != null) {
if (_local1.nodeName == "text") {
com.midasplayer.util.I18n.addTranslation(String(_local1.attributes.id), String(_local1.firstChild));
} else {
var _local3 = "0";
for (var _local6 in _local1.attributes) {
var _local2 = _local1.attributes[_local6];
if (_local6 == "id") {
_local3 = _local2;
} else {
gameData_.put((((_local1.nodeName + ".") + _local3) + ".") + _local6, _local2);
}
}
}
_local1 = _local1.nextSibling;
}
}
}
static var GAME_MODE_DEBUG = 0;
static var GAME_MODE_PRACTICE = 1;
static var GAME_MODE_MONEY = 2;
static var GAME_TYPE_SINGLE = 0;
static var GAME_TYPE_MULTI = 1;
static var gameMode_ = GAME_MODE_DEBUG;
static var gameType_ = GAME_TYPE_SINGLE;
static var hasGameData_ = false;
}
Symbol 118 MovieClip [__Packages.com.midasplayer.util.Map] Frame 0 (1.38 KiB) ●
class com.midasplayer.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var _local3 in init) {
map["@" + _local3] = init[_local3];
}
lastSize = -1;
}
function put(key, value) {
map["@" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["@" + key]);
}
function remove(key) {
var _local2 = map["@" + key];
delete map["@" + key];
lastSize = -1;
return(_local2);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var _local2 in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var _local2 = "";
for (var _local3 in map) {
_local2 = _local2 + (((_local3 + "=>") + map[_local3]) + newline);
}
trace(_local2);
}
function toArray() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = map[_local3];
}
return(_local2);
}
function keySet() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = _local3.substring(1);
}
return(_local2);
}
function foreach(fn) {
do {
if ((in map) == null) {
break;
}
var _local3 = in map;
} while (fn(_local3.substring(1), map[_local3]) != false);
do {
} while ("foreach" != null);
lastSize = -1;
}
}
Symbol 119 MovieClip [__Packages.com.midasplayer.util.ArrayList] Frame 0 (1.75 KiB) ●
class com.midasplayer.util.ArrayList
{
var value;
function ArrayList () {
value = new Array();
}
function insert(obj, pos) {
var _local3 = value.length;
if (pos == undefined) {
value.push(obj);
return(_local3);
}
if (pos > _local3) {
pos = _local3;
}
var _local2 = _local3 - 1;
while (_local2 > (pos - 1)) {
value[_local2 + 1] = value[_local2];
_local2--;
}
value[pos] = obj;
return(pos);
}
function get(pos) {
return(value[pos]);
}
function indexOf(obj) {
var _local2 = 0;
while (_local2 < value.length) {
if (obj == value[_local2]) {
return(_local2);
}
_local2++;
}
return(-1);
}
function remove(obj) {
return(removeByIndex(indexOf(obj)));
}
function removeByIndex(pos) {
var _local5;
var _local3 = value.length;
if ((pos < _local3) && (pos >= 0)) {
_local5 = value[pos];
delete value[pos];
var _local2 = pos;
while (_local2 < (_local3 - 1)) {
value[_local2] = value[_local2 + 1];
_local2++;
}
value.length = _local3 - 1;
}
return(_local5);
}
function size() {
return(value.length);
}
function clear() {
value = new Array();
}
function toArray() {
return(value);
}
function foreach(fn) {
var _local2 = 0;
var _local3 = value.length;
while (_local2 < _local3) {
if (fn(_local2, value[_local2]) == false) {
break;
}
_local2++;
}
}
function sortOn(field) {
value.sortOn(field);
}
function sort() {
value.sort();
}
function subList(from, to) {
if (!to) {
to = value.length;
}
var a = (new com.midasplayer.util.ArrayList());
var i = from;
while (i < to) {
a.insert(eval (i));
i++;
}
return(a);
}
}
Symbol 120 MovieClip [__Packages.com.midasplayer.util.Log] Frame 0 (1.46 KiB) ●
class com.midasplayer.util.Log
{
function Log () {
}
static function setLevel(level) {
level_ = level;
}
static function debug(msg) {
if (level_ <= LEVEL_DEBUG) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_DEBUG, msg));
}
}
static function warning(msg) {
if (level_ <= LEVEL_WARNING) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_WARNING, msg));
}
}
static function error(msg) {
if (level_ <= LEVEL_ERROR) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_ERROR, msg));
}
}
static function getLog() {
if (log_.size() != logStringLastUpdatedSize_) {
logString_ = "";
var _local1 = 0;
while (_local1 < log_.size()) {
var _local2 = com.midasplayer.util.LogEntry(log_.get(_local1));
if (_local1 > 0) {
logString_ = logString_ + newline;
}
logString_ = logString_ + LEVEL_STRINGS[_local2.getLevel()];
logString_ = logString_ + ": ";
logString_ = logString_ + _local2.getMessage();
logStringLastUpdatedSize_ = log_.size();
_local1++;
}
}
return(logString_);
}
static var LEVEL_ALL = -1;
static var LEVEL_NONE = 1000;
static var LEVEL_DEBUG = 0;
static var LEVEL_WARNING = 1;
static var LEVEL_ERROR = 2;
static var LEVEL_STRINGS = ["DEBUG", "WARNING", "ERROR"];
static var level_ = LEVEL_ALL;
static var log_ = new com.midasplayer.util.ArrayList();
static var logString_ = "";
static var logStringLastUpdatedSize_ = 0;
}
Symbol 121 MovieClip [__Packages.com.midasplayer.util.LogEntry] Frame 0 (241 B)
class com.midasplayer.util.LogEntry
{
var level_, message_;
function LogEntry (level, msg) {
level_ = level;
message_ = msg;
}
function getLevel() {
return(level_);
}
function getMessage() {
return(message_);
}
}
Symbol 122 MovieClip [__Packages.com.midasplayer.util.I18n] Frame 0 (832 B)
class com.midasplayer.util.I18n
{
function I18n () {
}
static function addTranslation(name, val) {
val = val.split("\r\n").join(newline);
translations_.put(name, val);
}
static function format(name, replace0, replace1, replace2) {
var _local2 = translations_.get(name);
if (_local2 == undefined) {
return(("{" + name) + "}");
}
var _local1 = _local2.toString();
if (replace1 != undefined) {
var _local4 = _local1.split("{0}");
_local1 = _local4.join(replace0);
if (replace2 != undefined) {
_local4 = _local1.split("{1}");
_local1 = _local4.join(replace1);
if (replace2 != undefined) {
_local4 = _local1.split("{2}");
_local1 = _local4.join(replace2);
}
}
}
return(_local1);
}
static var translations_ = new com.midasplayer.util.Map();
}
Symbol 123 MovieClip [__Packages.com.midasplayer.game.quickerklicker.Game] Frame 0 (7.21 KiB) ● ●
class com.midasplayer.game.quickerklicker.Game extends com.midasplayer.util.GameBase
{
static var clearAnimationBgClip_, board_, clearAnimationClip_, percentCleared_, quitIntervalId_, score_, clockIntervalId_;
var init, reportGameStart, reportPlayData, reportGameEnd, timeLeft_, reportGameQuit;
function Game () {
super();
com.midasplayer.util.GameBase.setGameMode(_root.gamemode);
init(this);
}
function startGame() {
reportGameStart();
_root.attachMovie("board", "board", _root.getNextHighestDepth());
_root.board._x = 210;
_root.board._y = 0;
_root.board.cacheAsBitmap = true;
var _local3 = _root.createEmptyMovieClip("maskClip", _root.getNextHighestDepth());
_local3._x = _root.board._x + 6;
_local3._y = _root.board._y + 6;
_local3.beginFill(0);
_local3.moveTo(0, 0);
_local3.lineTo(198, 0);
_local3.lineTo(198, 198);
_local3.lineTo(0, 198);
_local3.lineTo(0, 0);
_local3.endFill();
clearAnimationBgClip_ = _root.attachMovie("clear_animation_bg", "cabg", _root.getNextHighestDepth());
clearAnimationBgClip_._x = 218;
clearAnimationBgClip_._y = 11;
clearAnimationBgClip_._visible = false;
clearAnimationBgClip_.setMask(_local3);
clearAnimationBgClip_.gotoAndStop(1);
setScore(0);
board_ = new com.midasplayer.game.quickerklicker.Board();
clearAnimationClip_ = _root.attachMovie("clear_animation", "ca", _root.getNextHighestDepth());
clearAnimationClip_._x = 218;
clearAnimationClip_._y = 11;
clearAnimationClip_._visible = false;
clearAnimationClip_.gotoAndStop(1);
var _local4 = Number(com.midasplayer.util.GameBase.gameData_.get("randomseed"));
board_.setSeed(_local4);
_root.panel.txtTimeLeft.text = com.midasplayer.util.I18n.format("timeleft");
_root.panel.txtScore.text = com.midasplayer.util.I18n.format("score");
startLevel(1);
}
function startLevel(level) {
var _local8 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".cols"));
var _local5 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".rows"));
var _local7 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".colors"));
var _local6 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".bomb_percent"));
var _local9 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".multiplier_percent"));
var _local4 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + level) + ".timelimit"));
displayTimeLeft(_local4);
board_.setSize(_local8, _local5);
board_.setNumColors(_local7);
board_.setBombPercent(_local6);
board_.setMultiplierPercent(_local9);
board_.generate();
if (level == 1) {
_root.attachMovie("intro", "intro", _root.getNextHighestDepth());
_root.intro.gotoAndStop(1);
_root.intro._x = 500;
_root.intro._y = (_root.board._y + (_root.board._height / 2)) - 20;
com.midasplayer.util.AnimPlayer.play({playlist:[{obj:this, func:playIntro}], callback:endPlayIntro, callback_scope:this, tps:25});
com.midasplayer.fx.SoundManager.play("countdown");
} else {
reportPlayData(13, "", "0");
board_.start();
startClock(_local4);
}
}
function playIntro(tick, alpha) {
var _local2 = false;
var _local3 = tick;
if (_local3 > _root.intro._totalframes) {
_local3 = _root.intro._totalframes;
_local2 = true;
}
_root.intro.gotoAndStop(tick);
return(_local2);
}
function endPlayIntro() {
_root.intro.removeMovieClip();
var _local4 = 1;
var _local3 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + _local4) + ".timelimit"));
reportPlayData(13, "", "0");
board_.start();
startClock(_local3);
}
function playOutro(tick, alpha) {
var _local2 = false;
var _local1 = tick;
if (_local1 > clearAnimationBgClip_._totalframes) {
_local1 = clearAnimationBgClip_._totalframes;
_local2 = true;
}
var _local3 = Math.round((_local1 / clearAnimationBgClip_._totalframes) * percentCleared_);
clearAnimationBgClip_._visible = true;
clearAnimationClip_._visible = true;
clearAnimationBgClip_.gotoAndStop(tick);
clearAnimationClip_.gotoAndStop(tick);
displayDigital("_root.ca.tween.p", _local3);
displayDigital("_root.ca.tween.s", _local3);
return(_local2);
}
function endPlayOutro() {
quitIntervalId_ = setInterval(this, "quitGame", 2000);
}
function endLevel() {
stopClock();
percentCleared_ = Math.round(board_.getPercentCleared());
var _local2 = ((percentCleared_ * percentCleared_) * 2000) / 10000;
_local2 = Math.round(_local2);
addScore(_local2);
reportPlayData(14, "", "" + _local2);
reportGameEnd(score_);
if (percentCleared_ == 100) {
com.midasplayer.fx.SoundManager.play("end_100_percent");
} else if (timeLeft_ > 0) {
com.midasplayer.fx.SoundManager.play("end_no_more_moves");
}
if ((percentCleared_ >= 10) && (percentCleared_ < 100)) {
clearAnimationClip_._x = clearAnimationClip_._x - 15;
}
if (percentCleared_ < 10) {
clearAnimationClip_._x = clearAnimationClip_._x - 25;
}
com.midasplayer.util.AnimPlayer.play({playlist:[{obj:this, func:playOutro}], callback:endPlayOutro, callback_scope:this, tps:25});
}
function quitGame() {
clearInterval(quitIntervalId_);
reportGameQuit();
}
function restart(numColors, numCols, numRows) {
setScore(0);
var _local3 = 1;
var _local2 = Number(com.midasplayer.util.GameBase.gameData_.get(("level." + _local3) + ".timelimit"));
board_.setSize(numCols, numRows);
board_.setNumColors(numColors);
board_.generate();
board_.start();
startClock(_local2);
}
function getBoard() {
return(board_);
}
function reportRemovedBlocks(num) {
var _local2 = num * num;
}
function startClock(timeLimit) {
timeLeft_ = timeLimit;
setClockTime(timeLeft_);
stopClock();
clockIntervalId_ = setInterval(this, "updateClock", 1000);
}
static function stopClock() {
clearInterval(clockIntervalId_);
com.midasplayer.fx.SoundManager.stop("clock");
clockPlaying_ = false;
}
function updateClock(ref) {
timeLeft_--;
if (timeLeft_ <= 0) {
timeLeft_ = 0;
}
if ((timeLeft_ <= 2) && (!clockPlaying_)) {
clockPlaying_ = true;
com.midasplayer.fx.SoundManager.play("clock", 100, true);
}
setClockTime(timeLeft_);
}
function setClockTime(timeLeft) {
if (timeLeft == 0) {
board_.stop();
}
displayTimeLeft(timeLeft);
}
static function setScore(score) {
score_ = score;
displayScore(score_);
}
static function addScore(score) {
score_ = score_ + score;
if (score_ < 0) {
score_ = 0;
}
displayScore(score_);
}
static function getScore() {
return(score_);
}
static function displayScore(score) {
displayDigital("_root.panel.mcScoreNum", score_);
}
static function displayTimeLeft(timeLeft) {
displayDigital("_root.panel.mcTimeNum", timeLeft);
}
static function displayDigital(mcName, val) {
var stringVal = String(val);
var len = stringVal.length;
var i = 10;
while (i >= 1) {
var mc = eval (mcName + i);
var n = 1;
if (len >= i) {
n = Number(stringVal.charAt(len - i)) + 2;
}
mc.gotoAndStop(n);
i--;
}
}
static var clockPlaying_ = false;
}
Symbol 124 MovieClip [__Packages.com.midasplayer.game.quickerklicker.Board] Frame 0 (18.9 KiB) ● ● ●
class com.midasplayer.game.quickerklicker.Board
{
var boardClip, random_, numColors_, bombPercent_, multiplierPercent_, blocks_, dragList_, topLayer, scoreLayer, setBlockColor_, removeList_, fallBlockFlag_, checkList_;
function Board () {
boardClip = _root.createEmptyMovieClip("boardclip", _root.getNextHighestDepth());
boardClip._x = _root.board._x + 6;
boardClip._y = _root.board._y + 6;
}
function setSeed(seed) {
random_ = new com.midasplayer.util.Random(seed);
}
function setSize(cols, rows) {
if ((cols_ > 0) || (rows_ > 0)) {
clear();
}
cols_ = cols;
rows_ = rows;
}
function setNumColors(numColors) {
numColors_ = numColors;
}
function setBombPercent(bombPercent) {
bombPercent_ = bombPercent;
}
function setMultiplierPercent(multiplierPercent) {
multiplierPercent_ = multiplierPercent;
}
function generateRandomBlock(col, row) {
var _local4 = ["r", "g", "b", "y", "p"];
var _local5 = random_.nextInt(100);
if (_local5 < bombPercent_) {
var _local9 = "x";
var _local3 = boardClip.getNextHighestDepth();
var _local2 = com.midasplayer.game.quickerklicker.Block(boardClip.attachMovie(com.midasplayer.game.quickerklicker.Block.ID, "b" + _local3, _local3, {color:_local9, board:this}));
_local2.setPos(col, row);
return(_local2);
}
if (_local5 < (bombPercent_ + multiplierPercent_)) {
var _local9 = _local4[random_.nextInt(numColors_)];
var _local3 = boardClip.getNextHighestDepth();
var _local2 = com.midasplayer.game.quickerklicker.Block(boardClip.attachMovie(com.midasplayer.game.quickerklicker.Block.ID, "b" + _local3, _local3, {color:_local9, board:this}));
_local2.setPos(col, row);
_local2.setMultiplier(true);
return(_local2);
}
var _local9 = _local4[random_.nextInt(numColors_)];
var _local3 = boardClip.getNextHighestDepth();
var _local2 = com.midasplayer.game.quickerklicker.Block(boardClip.attachMovie(com.midasplayer.game.quickerklicker.Block.ID, "b" + _local3, _local3, {color:_local9, board:this}));
_local2.setPos(col, row);
return(_local2);
}
function generateBottomBlock(col, row) {
var _local5 = "";
var _local3 = boardClip.getNextHighestDepth();
var _local2 = com.midasplayer.game.quickerklicker.Block(boardClip.attachMovie(com.midasplayer.game.quickerklicker.Block.ID, "b" + _local3, _local3, {color:_local5, board:this}));
_local2.setPos(col, row);
return(_local2);
}
function generate() {
blocks_ = new Array();
dragList_ = new Array();
var _local4 = 0;
while (_local4 < rows_) {
blocks_[_local4] = new Array();
var _local2 = 0;
while (_local2 < cols_) {
var _local3 = generateRandomBlock(_local2, _local4);
if (_local3.isDragging()) {
dragList_.push(_local3);
}
setBlock(_local4, _local2, _local3);
_local2++;
}
_local4++;
}
_local4 = rows_;
blocks_[_local4] = new Array();
var _local2 = 0;
while (_local2 < cols_) {
var _local3 = generateBottomBlock(_local2, _local4);
dragList_.push(_local3);
setBlock(_local4, _local2, _local3);
_local2++;
}
topLayer.removeMovieClip();
topLayer = boardClip.createEmptyMovieClip("toplayer", boardClip.getNextHighestDepth());
scoreLayer.removeMovieClip();
scoreLayer = boardClip.createEmptyMovieClip("scorelayer", boardClip.getNextHighestDepth());
}
function start() {
acceptInput_ = true;
activate();
}
function stop() {
acceptInput_ = false;
deactivate();
if (!processing_) {
_root.game.endLevel();
}
}
function activate() {
var _local3 = 0;
while (_local3 <= rows_) {
var _local2 = 0;
while (_local2 < cols_) {
blocks_[_local3][_local2].activate();
_local2++;
}
_local3++;
}
}
function deactivate() {
var _local3 = 0;
while (_local3 <= rows_) {
var _local2 = 0;
while (_local2 < cols_) {
blocks_[_local3][_local2].deactivate();
_local2++;
}
_local3++;
}
}
function setBlock(row, col, block) {
blocks_[row][col] = block;
blocks_[row - 1][col].setBlockUnder(block);
block.setBlockUnder(blocks_[row + 1][col]);
}
function clearBlock(row, col) {
blocks_[row][col].remove();
delete blocks_[row][col];
setBlock(row, col, undefined);
affectedColsList_[col] = true;
}
function clear() {
var _local3 = 0;
while (_local3 <= rows_) {
var _local2 = 0;
while (_local2 < cols_) {
clearBlock(_local3, _local2);
_local2++;
}
_local3++;
}
}
function highlightActiveBlock() {
var _local4 = Math.floor(boardClip._xmouse / com.midasplayer.game.quickerklicker.Block.BLOCK_WIDTH);
var _local3 = Math.floor(boardClip._ymouse / com.midasplayer.game.quickerklicker.Block.BLOCK_HEIGHT);
var _local2 = com.midasplayer.game.quickerklicker.Block(blocks_[_local3][_local4]);
blockRollOver(_local2);
}
function blockRollOver(block) {
if (!processing_) {
markRollOver(block, new Array(), true);
}
}
function blockRollOut(block) {
if (!processing_) {
markRollOver(block, new Array(), false);
}
}
function blockClicked(block) {
if (!acceptInput_) {
return(undefined);
}
if (setBlockColor_ != undefined) {
var _local6 = block.row;
var _local7 = block.col;
var _local9 = boardClip.getNextHighestDepth();
var _local5 = com.midasplayer.game.quickerklicker.Block(boardClip.attachMovie(com.midasplayer.game.quickerklicker.Block.ID, "b" + _local9, _local9, {color:setBlockColor_, board:this}));
_local5.setPos(_local7, _local6);
var _local8 = com.midasplayer.game.quickerklicker.Block(blocks_[_local6][_local7]);
_local8.remove();
setBlock(_local6, _local7, _local5);
if (_local5.isDragging()) {
dragList_.push(_local5);
}
return(undefined);
}
if (!processing_) {
processing_ = true;
var _local11 = block.getX();
var _local10 = block.getY();
var _local4 = 0;
if (block.isBomb()) {
_local4 = bombClicked(block);
} else {
_local4 = markRemove(block, true);
}
_root.game.reportPlayData(651, (block.col + " ") + block.row, "" + _local4);
if (_local4 > 0) {
new com.midasplayer.game.quickerklicker.ScorePopup(this, _local4, _local11, _local10);
}
}
}
function bombClicked(block) {
var _local7 = 0;
var _local5 = block.col;
var _local6 = block.row;
removeList_ = new Array();
if (!blocks_[_local6 + 1][_local5].isRemovable()) {
var _local4 = _local6 - 1;
while (_local4 <= (_local6 + 1)) {
var _local2 = _local5 - 1;
while (_local2 <= (_local5 + 1)) {
block = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local2]);
if (block.isRemovable()) {
removeList_.push(block);
}
_local2++;
}
_local4++;
}
com.midasplayer.fx.SoundManager.play("bombdetonation 2");
_local7 = 300;
} else {
com.midasplayer.fx.SoundManager.play("negative 3");
_local7 = -10;
}
com.midasplayer.game.quickerklicker.Game.addScore(_local7);
remove();
return(_local7);
}
function anyMoreMoves() {
var _local4 = 0;
while (_local4 < rows_) {
var _local2 = 0;
while (_local2 < cols_) {
var _local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local2]);
var _local5 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4 + 1][_local2]);
var _local6 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local2 + 1]);
if (_local3.isBomb()) {
if (!_local5.isRemovable()) {
return(true);
}
} else if (_local3.isRemovable()) {
if (_local3.isSameType(_local6) || (_local3.isSameType(_local5))) {
return(true);
}
}
_local2++;
}
_local4++;
}
return(false);
}
function getPercentCleared() {
var _local5 = 0;
var _local6 = rows_ * cols_;
var _local3 = 0;
while (_local3 < rows_) {
var _local2 = 0;
while (_local2 < cols_) {
var _local4 = com.midasplayer.game.quickerklicker.Block(blocks_[_local3][_local2]);
if (_local4.isRemovable()) {
_local5++;
}
_local2++;
}
_local3++;
}
return(100 - (100 * (_local5 / _local6)));
}
function remove() {
var _local2 = new Array();
getRemoveAnims(_local2);
playRemove(_local2);
}
function playRemove(animList) {
com.midasplayer.util.AnimPlayer.play({playlist:animList, callback:endRemove, callback_scope:this, tps:500});
}
function endRemove() {
fallDown();
}
function getRemoveAnims(animList) {
var _local6 = removeList_.length;
if (_local6 >= 1) {
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = com.midasplayer.game.quickerklicker.Block(removeList_.pop());
animList.push({obj:_local3, func:_local3.removeAnim});
_local2++;
}
}
}
function fallDown() {
var _local2 = new Array();
getFallDownAnims(_local2);
playFallDown(_local2);
}
function playFallDown(animList) {
com.midasplayer.util.AnimPlayer.play({playlist:animList, callback:endFallDown, callback_scope:this, tps:500});
}
function endFallDown() {
dragLeft();
}
function getFallDownAnims(animList) {
var _local7 = new Array();
var _local6 = 0;
while (_local6 < cols_) {
var _local2 = 0;
if (affectedColsList_[_local6]) {
var _local4 = rows_ - 1;
while (_local4 >= 0) {
var _local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local6]);
if (_local3 == undefined) {
_local2++;
} else if (!_local3.isRemovable()) {
_local2 = 0;
} else if (_local2 > 0) {
if (_local3.getFallHeight() == 0) {
_local7.push(_local3);
}
_local3.setFallHeight(_local2);
}
_local4--;
}
affectedColsList_[_local6] = false;
}
_local6++;
}
var _local10 = _local7.length;
var _local5 = 0;
while (_local5 < _local10) {
var _local3 = com.midasplayer.game.quickerklicker.Block(_local7[_local5]);
_local6 = _local3.col;
var _local4 = _local3.row;
setBlock(_local4 + _local3.getFallHeight(), _local6, blocks_[_local4][_local6]);
setBlock(_local4, _local6, undefined);
animList.push({obj:_local3, func:_local3.fallAnim});
_local5++;
}
}
function testFallBlocks() {
var _local5 = 0;
while (_local5 < cols_) {
var _local4 = 0;
if (affectedColsList_[_local5]) {
var _local2 = rows_ - 1;
while (_local2 >= 0) {
var _local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local2][_local5]);
if (_local3 == undefined) {
_local4++;
} else if (!_local3.isRemovable()) {
_local4 = 0;
} else if (_local4 > 0) {
return(true);
}
_local2--;
}
}
_local5++;
}
return(false);
}
function dragLeft() {
var _local2 = new Array();
fallBlockFlag_ = false;
while (getDragLeftAnims(_local2)) {
if (testFallBlocks()) {
fallBlockFlag_ = true;
break;
}
}
playDragLeft(_local2);
}
function playDragLeft(animList) {
com.midasplayer.util.AnimPlayer.play({playlist:animList, callback:endDragLeft, callback_scope:this, tps:500});
}
function endDragLeft() {
if (fallBlockFlag_) {
fallDown();
} else {
if ((!anyMoreMoves()) || (!acceptInput_)) {
processing_ = false;
stop();
}
processing_ = false;
highlightActiveBlock();
}
}
function getDragLeftAnims(animList) {
markId_++;
var _local8 = new Array();
var _local13 = false;
var _local14 = dragList_.length;
var _local10 = 0;
while (_local10 < _local14) {
var _local5 = com.midasplayer.game.quickerklicker.Block(dragList_[_local10]);
var _local6 = _local5.col;
var _local9 = _local5.row;
var _local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local9 - 1][_local6]);
var _local7 = com.midasplayer.game.quickerklicker.Block(blocks_[_local9 - 1][_local6 - 1]);
if (((_local6 > 0) && (_local9 > 0)) && (_local3 == undefined)) {
var _local4 = _local9 - 1;
while (_local4 >= 0) {
_local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local6]);
var _local2 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local6 + 1]);
if (_local3 == undefined) {
if (_local2.isRemovable() && (!_local2.isMarked(markId_))) {
_local2.setDragLength(_local2.getDragLength() + 1);
_local2.mark(markId_);
_local8.push(_local2);
} else {
break;
}
} else {
break;
}
_local4--;
}
} else if (((_local6 > 0) && (_local9 > 0)) && (_local7 == undefined)) {
var _local4 = _local9 - 1;
while (_local4 >= 0) {
_local7 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local6 - 1]);
_local3 = com.midasplayer.game.quickerklicker.Block(blocks_[_local4][_local6]);
if (_local7 == undefined) {
if (_local3.isRemovable() && (!_local3.isMarked(markId_))) {
_local3.setDragLength(_local3.getDragLength() + 1);
_local3.mark(markId_);
_local8.push(_local3);
} else {
break;
}
} else {
break;
}
_local4--;
}
}
_local10++;
}
_local14 = _local8.length;
_local10 = 0;
while (_local10 < _local14) {
var _local5 = com.midasplayer.game.quickerklicker.Block(_local8[_local10]);
var _local6 = _local5.col - (_local5.getDragLength() - 1);
var _local9 = _local5.row;
animList.push({obj:_local5, func:_local5.dragLeftAnim});
_local13 = true;
setBlock(_local9, _local6 - 1, blocks_[_local9][_local6]);
setBlock(_local9, _local6, undefined);
affectedColsList_[_local6 - 1] = true;
affectedColsList_[_local6] = true;
_local10++;
}
return(_local13);
}
function markRemove(block) {
var _local11 = 0;
var _local8 = new Array();
getMarkRemoveAnims(block, _local8);
var _local10 = removeList_.length;
if (_local10 == 1) {
_local11 = -10;
com.midasplayer.fx.SoundManager.play("negative 3");
removeList_ = new Array();
} else {
var _local9 = 0;
var _local3 = 0;
while (_local3 < _local10) {
block = com.midasplayer.game.quickerklicker.Block(removeList_[_local3]);
if (block.isMultiplier()) {
_local9++;
}
_local3++;
}
_local11 = (_local10 * _local10) * 10;
_local11 = _local11 * Math.pow(2, _local9);
com.midasplayer.fx.SoundManager.play("clearblocks");
}
_local10 = _local8.length;
var _local3 = 0;
while (_local3 < _local10) {
var _local4 = _local8[_local3];
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local6 = _local4[_local2];
_local2++;
}
_local3++;
}
playMarkRemove(_local8);
com.midasplayer.game.quickerklicker.Game.addScore(_local11);
return(_local11);
}
function playMarkRemove(animList) {
com.midasplayer.util.AnimPlayer.play({playlist:animList, callback:endMarkRemove, callback_scope:this, tps:1000});
}
function endMarkRemove() {
topLayer.clear();
remove();
}
function getMarkRemoveAnims(initialBlock, animList) {
if (animList.length == 0) {
markId_++;
removeList_ = new Array();
checkList_ = new Array();
initialBlock.mark(markId_);
checkList_.push(initialBlock);
removeList_.push(initialBlock);
}
var _local11 = checkList_.length;
var _local7 = new Array();
var _local8 = 0;
while (_local8 < _local11) {
var _local3 = com.midasplayer.game.quickerklicker.Block(checkList_.shift());
var _local5 = _local3.col;
var _local4 = _local3.row;
var _local2;
if (!_local3.isRemovable()) {
} else {
_local2 = blocks_[_local4 - 1][_local5];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local7.push({obj:_local3, func:_local3.removeUpAnim});
_local2.mark(markId_);
checkList_.push(_local2);
removeList_.push(_local2);
}
_local2 = blocks_[_local4][_local5 + 1];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local7.push({obj:_local3, func:_local3.removeRightAnim});
_local2.mark(markId_);
checkList_.push(_local2);
removeList_.push(_local2);
}
_local2 = blocks_[_local4 + 1][_local5];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local7.push({obj:_local3, func:_local3.removeDownAnim});
_local2.mark(markId_);
checkList_.push(_local2);
removeList_.push(_local2);
}
_local2 = blocks_[_local4][_local5 - 1];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local7.push({obj:_local3, func:_local3.removeLeftAnim});
_local2.mark(markId_);
checkList_.push(_local2);
removeList_.push(_local2);
}
}
_local8++;
}
if (_local7.length > 0) {
animList.push(_local7);
}
if (checkList_.length > 0) {
getMarkRemoveAnims(initialBlock, animList);
}
}
function markRollOver(initialBlock, checkList, switchOn) {
if (checkList.length == 0) {
markId_++;
initialBlock.mark(markId_);
initialBlock.rollOverAction(switchOn);
checkList.push(initialBlock);
}
var _local10 = checkList.length;
var _local9 = 0;
while (_local9 < _local10) {
var _local6 = com.midasplayer.game.quickerklicker.Block(checkList.shift());
var _local4 = _local6.col;
var _local3 = _local6.row;
var _local2;
if (!_local6.isRemovable()) {
} else {
_local2 = blocks_[_local3 - 1][_local4];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local2.mark(markId_);
_local2.rollOverAction(switchOn);
checkList.push(_local2);
}
_local2 = blocks_[_local3][_local4 + 1];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local2.mark(markId_);
_local2.rollOverAction(switchOn);
checkList.push(_local2);
}
_local2 = blocks_[_local3 + 1][_local4];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local2.mark(markId_);
_local2.rollOverAction(switchOn);
checkList.push(_local2);
}
_local2 = blocks_[_local3][_local4 - 1];
if (((_local2 != undefined) && (!_local2.isMarked(markId_))) && (initialBlock.isSameType(_local2))) {
_local2.mark(markId_);
_local2.rollOverAction(switchOn);
checkList.push(_local2);
}
}
_local9++;
}
if (checkList.length > 0) {
markRollOver(initialBlock, checkList, switchOn);
}
}
var cols_ = 0;
var rows_ = 0;
var markId_ = 0;
var affectedColsList_ = new Array();
var processing_ = false;
var acceptInput_ = false;
}
Symbol 125 MovieClip [__Packages.com.midasplayer.util.Random] Frame 0 (2.27 KiB) ●
class com.midasplayer.util.Random
{
var mta, mti, lastSeed;
function Random (aSeed) {
mta = new Array(N);
mti = N + 1;
if (aSeed != undefined) {
init_genrand(aSeed);
}
}
function set seed(s) {
init_genrand(s);
//return(seed);
}
function get seed() {
return(lastSeed);
}
function nextInt(n) {
return((genrand_int32() & 2147483647) % n);
}
function nextFloat() {
return(next(24) / 16777216);
}
function next(bits) {
if (bits < 32) {
return(genrand_int32() & ((1 << bits) - 1));
}
return(genrand_int32());
}
function init_genrand(s) {
var _local5 = getTimer();
lastSeed = s;
mta[0] = s;
var _local2 = s;
var _local3 = new com.midasplayer.util.Integer64();
mti = 1;
while (mti < N) {
_local3.init32((_local2 >>> 30) ^ _local2);
_local3.mulu32(1812433253);
_local2 = (mta[mti] = _local3.lsb + mti);
mti++;
}
var _local6 = getTimer();
}
function genrand_int32() {
var _local3 = 0;
if (mti >= N) {
if (mti == (N + 1)) {
init_genrand(5489);
}
var _local4 = getTimer();
var _local2 = 0;
_local2 = 0;
while (_local2 < (N - M)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + M] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
while (_local2 < (N - 1)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + (M - N)] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
_local3 = (mta[N - 1] & UPPER_MASK) | (mta[0] & LOWER_MASK);
mta[N - 1] = (mta[M - 1] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
mti = 0;
var _local5 = getTimer();
}
_local3 = mta[mti++];
_local3 = _local3 ^ (_local3 >>> 11);
_local3 = _local3 ^ ((_local3 << 7) & 2636928640);
_local3 = _local3 ^ ((_local3 << 15) & 4022730752);
_local3 = _local3 ^ (_local3 >>> 18);
return(_local3);
}
static var N = 624;
static var M = 397;
static var MATRIX_A = 2567483615;
static var UPPER_MASK = 2147483648;
static var LOWER_MASK = 2147483647;
static var mag01 = [0, 2567483615];
}
Symbol 126 MovieClip [__Packages.com.midasplayer.util.Integer64] Frame 0 (5.53 KiB) ● ●
class com.midasplayer.util.Integer64
{
var r, p, s;
function Integer64 (lowInt) {
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (lowInt != undefined) {
merge(lowInt);
}
}
function init(v) {
var _local2 = 0;
while (_local2 < p.length) {
p[_local2] = v.p[_local2];
_local2++;
}
}
function init32(n) {
p[0] = n & 32767;
n = n >>> 15;
p[1] = n & 32767;
n = n >>> 15;
p[2] = n & 3;
p[3] = 0;
p[4] = 0;
}
function get lsb() {
return((p[0] | (p[1] << SH)) | ((p[2] & 3) << 30));
}
function get msb() {
return((((p[2] >> 2) | ((p[3] << SH) >> 2)) | ((p[4] << (SH * 2)) >> 2)) & 2147483647);
}
function binaryShiftLeft(step) {
var _local2 = 0;
while (_local2 < step) {
shl();
_local2++;
}
}
function binaryShiftRight(step) {
var _local4 = (step / SH) >> 0;
var _local5 = step - (_local4 * SH);
var _local2 = p.length - 1;
while (_local2 > 0) {
var _local3 = 0;
while (_local3 < _local4) {
p[_local3] = p[_local3 + 1];
_local3++;
}
p[_local2--] = 0;
}
if (_local5 > 0) {
var _local3 = 0;
while (_local3 < _local5) {
shr();
_local3++;
}
}
}
function binaryNot(o) {
p[0] = p[0] ^ o.p[0];
p[1] = p[1] ^ o.p[1];
p[2] = p[2] ^ o.p[2];
p[3] = p[3] ^ o.p[3];
p[4] = p[4] ^ o.p[4];
}
function add64(o) {
var _local4 = 0;
var _local3 = 1;
var _local2 = 0;
while ((_local3 < p.length) && (o.p[_local2] != 0)) {
_local3++;
}
_local2 = 0;
while (_local2 < _local3) {
_local4 = _local4 + (p[_local2] + o.p[_local2]);
p[_local2] = _local4 & MASK;
_local4 = _local4 >> SH;
_local2++;
}
}
function add32(num) {
var _local2 = 0;
var _local5 = num & MASK;
num = num >> SH;
var _local6 = num & MASK;
num = num >> SH;
var _local4 = num & 3;
_local2 = _local2 + (p[0] + _local5);
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[1] + _local6);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[2] + _local4);
p[2] = _local2 & MASK;
}
function mulu32(num) {
var _local3 = 0;
s[0] = num & MASK;
num = num >>> 15;
s[1] = num & MASK;
num = num >>> 15;
s[2] = num & 3;
var _local2 = 0;
while (_local2 < 3) {
var _local4 = s[_local2];
_local3 = _local4 * p[0];
r[_local2][0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[1]);
r[_local2][1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[2]);
r[_local2][2] = _local3 & 3;
_local2++;
}
_local3 = r[0][0];
p[0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (r[0][1] + r[1][0]);
p[1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local3 & 3;
p[3] = 0;
p[4] = 0;
}
function mul64(o) {
var _local2 = 0;
var _local3 = 0;
while (_local3 < 5) {
var _local4 = o.p[_local3];
_local2 = _local4 * p[0];
r[_local3][0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[1]);
r[_local3][1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[2]);
r[_local3][2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[3]);
r[_local3][3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[4]);
r[_local3][4] = _local2 & MASK;
_local3++;
}
_local2 = r[0][0];
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (r[0][1] + r[1][0]);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]);
p[3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]);
p[4] = _local2 & 7;
}
function mul32(value) {
mul64(new com.midasplayer.util.Integer64(value));
}
function toString() {
return(((((("Integer64[value=0x" + com.midasplayer.util.Numbers.dec2hex(msb)) + ":") + com.midasplayer.util.Numbers.dec2hex(lsb)) + ":(") + p) + ")]");
}
function merge(a) {
var _local2 = 0;
while (_local2 < 3) {
p[_local2] = p[_local2] + (a & 32767);
a = a >>> 15;
_local2++;
}
return(a);
}
function shl() {
var _local5 = 0;
var _local4 = 0;
var _local2 = 0;
var _local3 = p.length;
while (_local2 < _local3) {
_local5 = (p[_local2] & 16384) >> 14;
p[_local2] = p[_local2] << 1;
p[_local2] = (p[_local2] | _local4) & 32767;
_local2++;
_local4 = _local5;
}
}
function shr() {
var _local4 = 0;
var _local3 = 0;
var _local2 = p.length - 1;
while (_local2 >= 0) {
_local4 = (p[_local2] & 1) << 14;
p[_local2] = p[_local2] >> 1;
p[_local2] = (p[_local2] | _local3) & 32767;
_local2--;
_local3 = _local4;
}
}
static var MASK = 32767;
static var SH = 15;
}
Symbol 127 MovieClip [__Packages.com.midasplayer.util.Numbers] Frame 0 (1.58 KiB) ●
class com.midasplayer.util.Numbers
{
function Numbers () {
}
static function dec2hex(iValue, padding) {
var _local1 = "";
while (iValue != 0) {
_local1 = "0123456789abcdef".charAt(iValue & 15) + _local1;
iValue = iValue >>> 4;
}
if (padding) {
if (_local1.length == 0) {
_local1 = "00";
}
if (_local1.length < 2) {
_local1 = "0" + _local1;
}
} else if (_local1.length == 0) {
_local1 = "0";
}
return(_local1);
}
static function itoa(value, numZeroPadding) {
var _local2 = "" + value;
if (numZeroPadding) {
var _local1 = numZeroPadding - 1;
while (_local1 > 0) {
if (value < Math.pow(10, _local1)) {
_local2 = "0" + _local2;
}
_local1--;
}
}
return(_local2);
}
static function asTime(millis, alwaysHours, alwaysMinutes) {
if (alwaysHours) {
alwaysMinutes = true;
}
if (millis < 0) {
millis = 0;
}
millis = millis / 1000;
millis = Math.floor(millis);
var _local3 = Math.floor(millis / 3600);
var _local4 = Math.floor(millis / 60) % 60;
var _local5 = millis % 60;
var _local1 = "";
if (alwaysHours || (_local3 > 0)) {
_local1 = _local1 + itoa(_local3, 2);
}
if (alwaysHours || (_local1.length > 0)) {
_local1 = _local1 + ":";
}
var _local6 = _local1.length;
if ((alwaysMinutes || (_local4 > 0)) || (_local3 > 0)) {
_local1 = _local1 + itoa(_local4, 2);
}
if (alwaysMinutes || (_local1.length != _local6)) {
_local1 = _local1 + ":";
}
return(_local1 + itoa(_local5, 2));
}
}
Symbol 128 MovieClip [__Packages.com.midasplayer.game.quickerklicker.Block] Frame 0 (7.03 KiB) ● ●
class com.midasplayer.game.quickerklicker.Block extends MovieClip
{
static var blockClipNames;
var color, clip_, useHandCursor, attachMovie, col, row, markId_, removeMovieClip, board;
function Block () {
super();
init(color);
deactivate();
clip_.cacheAsBitmap = true;
}
static function staticInitializer(Void) {
blockClipNames = new Array();
blockClipNames.r = "block_red";
blockClipNames.g = "block_green";
blockClipNames.b = "block_blue";
blockClipNames.p = "block_purple";
blockClipNames.y = "block_yellow";
blockClipNames.w = "block_wall";
blockClipNames.x = "block_bomb";
return(true);
}
function activate() {
useHandCursor = true;
clip_.gotoAndStop(currentFrame_);
}
function deactivate() {
useHandCursor = false;
}
function init(type) {
if (type.length > 0) {
clip_ = attachMovie(getBlockClipName(type), "clip", 1);
if (!isMultiplier()) {
currentFrame_ = 1;
clip_.gotoAndStop(currentFrame_);
} else {
currentFrame_ = 3;
clip_.gotoAndStop(currentFrame_);
}
}
}
function setPos(col, row) {
this.col = col;
this.row = row;
clip_._x = col * BLOCK_WIDTH;
clip_._y = row * BLOCK_HEIGHT;
}
function setMultiplier(isMultiplier) {
isMultiplier_ = isMultiplier;
if (isMultiplier_) {
currentFrame_ = 3;
clip_.gotoAndStop(currentFrame_);
}
}
function isMultiplier() {
return(isMultiplier_);
}
function getBlockClipName(name) {
return(blockClipNames[name]);
}
function getType() {
return(color);
}
function getCol() {
return(col);
}
function getRow() {
return(row);
}
function getX() {
return(clip_._x);
}
function getY() {
return(clip_._y);
}
function mark(id) {
markId_ = id;
}
function setBlockUnder(block) {
if (isBomb() && (!block.isRemovable())) {
currentFrame_ = 5;
clip_.gotoAndStop(currentFrame_);
} else if (!isMultiplier()) {
currentFrame_ = 1;
clip_.gotoAndStop(currentFrame_);
} else {
currentFrame_ = 3;
clip_.gotoAndStop(currentFrame_);
}
}
function isMarked(id) {
return(markId_ == id);
}
function isRemovable() {
if ((color == "w") || (color == "")) {
return(false);
}
return(true);
}
function isDragging() {
if (color == "w") {
return(true);
}
return(false);
}
function isBomb() {
if (color == "x") {
return(true);
}
return(false);
}
function isSameType(block) {
if (block == undefined) {
return(false);
}
if (block.getType() == getType()) {
return(true);
}
return(false);
}
function setFallHeight(height) {
fallHeight_ = height;
}
function getFallHeight() {
return(fallHeight_);
}
function setDragLength(length) {
dragLength_ = length;
}
function getDragLength() {
return(dragLength_);
}
function fallAnim(tick, alpha) {
var _local3 = false;
var _local5 = row * BLOCK_HEIGHT;
var _local2 = fallHeight_ * BLOCK_HEIGHT;
var _local4 = (_local2 * tick) / 12;
if (_local4 > _local2) {
_local4 = _local2;
_local3 = true;
}
clip_._y = (row * BLOCK_HEIGHT) + _local4;
if (_local3) {
setPos(col, row + fallHeight_);
fallHeight_ = 0;
}
return(_local3);
}
function dragLeftAnim(tick, alpha) {
var _local2 = false;
var _local3 = col * BLOCK_WIDTH;
var _local4 = dragLength_ * BLOCK_WIDTH;
clip_._x = _local3 - tick;
if (tick > _local4) {
_local2 = true;
}
if (_local2) {
setPos(col - dragLength_, row);
dragLength_ = 0;
}
return(_local2);
}
function remove() {
clip_.removeMovieClip();
removeMovieClip();
}
function removeUpAnim(tick, alpha) {
var _local3 = false;
var _local5 = clip_._x + (clip_._width / 2);
var _local4 = clip_._y + (clip_._height / 2);
var _local2 = tick * 2.2;
if (_local2 > clip_._width) {
_local2 = clip_._width;
_local3 = true;
}
board.topLayer.lineStyle(5, 16777215, 30);
board.topLayer.moveTo(_local5, _local4);
board.topLayer.lineTo(_local5, _local4 - _local2);
return(_local3);
}
function removeRightAnim(tick, alpha) {
var _local3 = false;
var _local5 = clip_._x + (clip_._width / 2);
var _local4 = clip_._y + (clip_._height / 2);
var _local2 = tick * 2.2;
if (_local2 > clip_._width) {
_local2 = clip_._width;
_local3 = true;
}
board.topLayer.lineStyle(5, 16777215, 30);
board.topLayer.moveTo(_local5, _local4);
board.topLayer.lineTo(_local5 + _local2, _local4);
return(_local3);
}
function removeDownAnim(tick, alpha) {
var _local3 = false;
var _local5 = clip_._x + (clip_._width / 2);
var _local4 = clip_._y + (clip_._height / 2);
var _local2 = tick * 2.2;
if (_local2 > clip_._width) {
_local2 = clip_._width;
_local3 = true;
}
board.topLayer.lineStyle(5, 16777215, 30);
board.topLayer.moveTo(_local5, _local4);
board.topLayer.lineTo(_local5, _local4 + _local2);
return(_local3);
}
function removeLeftAnim(tick, alpha) {
var _local3 = false;
var _local5 = clip_._x + (clip_._width / 2);
var _local4 = clip_._y + (clip_._height / 2);
var _local2 = tick * 2.2;
if (_local2 > clip_._width) {
_local2 = clip_._width;
_local3 = true;
}
board.topLayer.lineStyle(5, 16777215, 30);
board.topLayer.moveTo(_local5, _local4);
board.topLayer.lineTo(_local5 - _local2, _local4);
return(_local3);
}
function removeAnim(tick, alpha) {
var _local3 = false;
var _local2 = tick * 5;
if (_local2 > 100) {
_local2 = 100;
board.clearBlock(row, col);
_local3 = true;
}
clip_._alpha = 100 - _local2;
return(_local3);
}
function onRollOver() {
board.blockRollOver(this);
}
function rollOverAction(switchOn) {
if (switchOn) {
if (isRemovable() && (!isBomb())) {
if (!isMultiplier()) {
currentFrame_ = 2;
if (!useHandCursor) {
return(undefined);
}
clip_.gotoAndStop(currentFrame_);
} else {
currentFrame_ = 4;
if (!useHandCursor) {
return(undefined);
}
clip_.gotoAndStop(currentFrame_);
}
}
} else if (isRemovable() && (!isBomb())) {
if (!isMultiplier()) {
currentFrame_ = 1;
if (!useHandCursor) {
return(undefined);
}
clip_.gotoAndStop(currentFrame_);
} else {
currentFrame_ = 3;
if (!useHandCursor) {
return(undefined);
}
clip_.gotoAndStop(currentFrame_);
}
}
}
function onDragOut() {
board.blockRollOut(this);
}
function onRollOut() {
board.blockRollOut(this);
}
function onPress() {
if (useHandCursor == false) {
return(undefined);
}
board.blockRollOut(this);
board.blockClicked(this);
}
static var ID = "__Packages.com.midasplayer.game.quickerklicker.Block";
static var CLASS = Object.registerClass(ID, com.midasplayer.game.quickerklicker.Block);
static var BLOCK_HEIGHT = 22;
static var BLOCK_WIDTH = 22;
var fallHeight_ = 0;
var dragLength_ = 0;
var isMultiplier_ = false;
var currentFrame_ = 1;
static var staticInitialized = staticInitializer();
}
Symbol 129 MovieClip [__Packages.com.midasplayer.game.quickerklicker.ScorePopup] Frame 0 (1.18 KiB) ●
class com.midasplayer.game.quickerklicker.ScorePopup
{
var clip_, y_;
function ScorePopup (board, score, x, y) {
var _local2 = board.scoreLayer.getNextHighestDepth();
clip_ = board.scoreLayer.attachMovie("scorePopup", "s" + _local2, _local2);
clip_._x = x + (com.midasplayer.game.quickerklicker.Block.BLOCK_WIDTH / 2);
clip_._y = y + (com.midasplayer.game.quickerklicker.Block.BLOCK_HEIGHT / 2);
y_ = clip_._y;
clip_._alpha = 0;
clip_.txtScore.text = score;
com.midasplayer.util.AnimPlayer.play({playlist:[{obj:this, func:showScore}], callback:endShowScore, callback_scope:this, tps:100});
}
function showScore(tick, alpha) {
var _local5 = false;
alpha = 0;
var _local3 = 0;
if (tick < 20) {
alpha = (tick * tick) / 4;
_local3 = 10 * (alpha / 100);
} else if (tick < 50) {
alpha = 100;
_local3 = 10;
} else if (tick < 70) {
alpha = ((70 - tick) * (70 - tick)) / 4;
_local3 = 10 + (20 * ((100 - alpha) / 100));
} else {
alpha = 0;
_local3 = 40;
_local5 = true;
}
clip_._alpha = alpha;
clip_._y = y_ - _local3;
return(_local5);
}
function endShowScore() {
clip_.removeMovieClip();
}
}
Symbol 130 MovieClip [__Packages.com.midasplayer.util.AnimPlayer] Frame 0 (1.63 KiB) ●
class com.midasplayer.util.AnimPlayer
{
static var clip_;
function AnimPlayer () {
}
static function staticInitializer(Void) {
clip_ = _root.createEmptyMovieClip("timer", _root.getNextHighestDepth());
clip_.onEnterFrame = function () {
com.midasplayer.util.AnimPlayer.onEnterFrame();
};
return(true);
}
static function play(props) {
animId_++;
var _local3 = props.playlist;
var _local4 = props.callback;
var _local5 = props.callback_scope;
var _local1 = props.tps;
if (_local1 == undefined) {
_local1 = 100;
}
callbacks_.put(animId_, _local4);
callbackScopes_.put(animId_, _local5);
animEntries_.put(animId_, new com.midasplayer.util.AnimEntry(_local3, animId_));
timers_.put(animId_, new com.midasplayer.timing.Timer(com.midasplayer.util.AnimEntry(animEntries_.get(animId_)), _local1));
}
static function end(animId) {
delete eval (timers_.get(animId));
timers_.remove(animId);
delete eval (animEntries_.get(animId));
animEntries_.remove(animId);
var _local2 = callbacks_.get(animId);
callbacks_.remove(animId);
var _local3 = callbackScopes_.get(animId);
callbackScopes_.remove(animId);
_local2.call(_local3);
}
static function onEnterFrame() {
timers_.foreach(function (key, obj) {
com.midasplayer.timing.Timer(obj).advanceTime();
});
}
static var animId_ = 0;
static var animEntries_ = new com.midasplayer.util.Map();
static var timers_ = new com.midasplayer.util.Map();
static var callbacks_ = new com.midasplayer.util.Map();
static var callbackScopes_ = new com.midasplayer.util.Map();
static var staticInitialized = staticInitializer();
}
Symbol 131 MovieClip [__Packages.com.midasplayer.timing.Timeable] Frame 0 (48 B)
interface com.midasplayer.timing.Timeable
{
}
Symbol 132 MovieClip [__Packages.com.midasplayer.util.AnimEntry] Frame 0 (1.22 KiB) ●
class com.midasplayer.util.AnimEntry implements com.midasplayer.timing.Timeable
{
var playList_, animId_;
function AnimEntry (playList, animId) {
playList_ = playList;
animId_ = animId;
}
function tick(tick) {
}
function render(tick, alpha) {
if (baseTick_ == -1) {
baseTick_ = tick;
}
var _local2 = play(playList_, tick - baseTick_, alpha);
if (_local2) {
com.midasplayer.util.AnimPlayer.end(animId_);
}
}
function play(playList, tick, alpha) {
var _local11 = playList.length;
var _local4 = true;
var _local3 = 0;
while (_local3 < _local11) {
var _local2 = playList[_local3];
if (_local2 == undefined) {
} else if (_local2.length == undefined) {
var _local9 = _local2.func;
var _local8 = _local2.obj;
var _local6 = _local9.call(_local8, tick, alpha);
if (_local6) {
playList[_local3] = undefined;
} else {
_local4 = false;
}
} else {
var _local6 = play(_local2, tick, alpha);
if (_local6) {
playList[_local3] = undefined;
baseTick_ = baseTick_ + tick;
_local4 = false;
break;
}
_local4 = false;
break;
}
_local3++;
}
return(_local4);
}
var baseTick_ = -1;
}
Symbol 133 MovieClip [__Packages.com.midasplayer.timing.Timer] Frame 0 (991 B)
class com.midasplayer.timing.Timer
{
var gameTicksPerSecond, timeable;
function Timer (timeable, gameTicksPerSecond) {
this.gameTicksPerSecond = gameTicksPerSecond;
millisPerGameTick = 1000 / gameTicksPerSecond;
this.timeable = timeable;
}
function advanceTime() {
time = getTimer();
var _local3 = time - lastTime;
lastTime = time;
unprocessedTime = unprocessedTime + _local3;
var _local2 = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = unprocessedTime - millisPerGameTick;
timeable.tick(tick);
tick++;
if ((tick % gameTicksPerSecond) == 0) {
fps = frames;
frames = 0;
}
_local2++;
if (_local2 >= 10) {
unprocessedTime = 0;
}
}
var _local4 = unprocessedTime / millisPerGameTick;
timeable.render(tick, _local4);
frames++;
}
var time = 0;
var lastTime = 0;
var unprocessedTime = 0;
var tick = 0;
var millisPerGameTick = 0;
var fps = 0;
var frames = 0;
}
Symbol 134 MovieClip [__Packages.com.midasplayer.fx.SoundManager] Frame 0 (3.53 KiB) ●
class com.midasplayer.fx.SoundManager
{
function SoundManager () {
}
static function isSoundEnabled() {
return(soundEnabled);
}
static function enableSounds(enabled) {
soundEnabled = enabled;
if (!enabled) {
muteAll();
} else {
restoreMuteAll();
}
}
static function stopAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(0);
});
}
static function restoreMuteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(soundEntry.realVol);
});
}
static function stop(resource) {
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
_local1.sound.stop();
_local1.playStatus = false;
}
}
static function getCalibratedVolume(flashVolume) {
flashVolume = Math.min(100, flashVolume);
flashVolume = Math.max(0, flashVolume);
return(Math.ceil(Math.pow(flashVolume / 100, 1.46) * 100));
}
static function setVolume(resource, percent) {
var _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
var _local2 = getCalibratedVolume(percent);
_local1.sound.setVolume(_local2);
_local1.sound.volume = _local2;
}
}
static function getVolume(resource) {
var _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
return(_local1.sound.getVolume());
}
return(0);
}
static function isPlaying(resource) {
var _local1 = sounds.get(resource);
return((_local1 != undefined) && (_local1.playStatus == true));
}
static function initialize(list) {
for (var _local9 in list) {
var resource = list[_local9];
var _local3 = _root.getNextHighestDepth();
var _local2 = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + _local3, _local3));
_local2.attachSound(resource);
_local2.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local1.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:_local2, playStatus:false});
}
}
static function play(resource, volume, isLoop, fn) {
if (volume == undefined) {
volume = 100;
}
if (isLoop == undefined) {
isLoop = false;
}
volume = getCalibratedVolume(volume);
var _local2 = sounds.get(resource);
if (_local2 != undefined) {
_local2.sound.setVolume((soundEnabled ? (volume) : 0));
_local2.realVol = volume;
_local2.playStatus = true;
_local2.onPlayedFn = fn;
_local2.sound.start(0, (isLoop ? 32767 : 1));
} else {
var _local6 = _root.getNextHighestDepth();
var _local4 = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + _local6, _local6));
_local4.attachSound(resource);
_local4.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local1.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(resource);
};
_local4.setVolume((soundEnabled ? (volume) : 0));
_local4.start(0, (isLoop ? 32767 : 1));
sounds.put(resource, {realVol:volume, onPlayedFn:fn, sound:_local4, playStatus:true});
}
}
static function onPlayed_(name) {
var _local1 = sounds.get(name);
if ((_local1 != undefined) && (_local1.onPlayedFn != undefined)) {
_local1.onPlayedFn();
}
}
static var sounds = new com.midasplayer.util.Map();
static var soundEnabled = true;
}