Section 1
//Integer64 (com.Integer64)
package com {
class Integer64 {
private var p:Array;
private var r:Array;
private var s:Array;
function Integer64(_arg1){
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 (_arg1){
merge(_arg1);
};
}
public function binaryShiftRight(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = ((_arg1 / 15) >> 0);
_local3 = (_arg1 - (_local2 * 15));
_local4 = (p.length - 1);
while (_local4 > 0) {
_local5 = 0;
while (_local5 < _local2) {
p[_local5] = p[(_local5 + 1)];
_local5++;
};
var _temp1 = _local4;
_local4 = (_local4 - 1);
var _local7 = _temp1;
p[_local7] = 0;
};
if (_local3 > 0){
_local6 = 0;
while (_local6 < _local3) {
shr();
_local6++;
};
};
}
public function mul32(_arg1:Number):void{
mul64(new Integer64(_arg1));
}
private function merge(_arg1:Number):Number{
var _local2:*;
_local2 = 0;
while (_local2 < 3) {
p[_local2] = (p[_local2] + (_arg1 & 32767));
_arg1 = (_arg1 >>> 15);
_local2++;
};
return (_arg1);
}
public function binaryShiftLeft(_arg1:Number):void{
var _local2:*;
_local2 = 0;
while (_local2 < _arg1) {
shl();
_local2++;
};
}
public function mul64(_arg1:Integer64):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = 0;
while (_local3 < 5) {
_local4 = _arg1.p[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[3]));
r[_local3][3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[4]));
r[_local3][4] = (_local2 & 32767);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]));
p[3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]));
p[4] = (_local2 & 7);
}
private function shr():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
_local2 = 0;
_local3 = (p.length - 1);
while (_local3 >= 0) {
_local1 = ((p[_local3] & 1) << 14);
p[_local3] = (p[_local3] >> 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3--;
_local2 = _local1;
};
}
public function init32(_arg1:Number):void{
p[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[2] = (_arg1 & 3);
p[3] = 0;
p[4] = 0;
}
public function init(_arg1:Integer64):void{
var _local2:*;
_local2 = 0;
while (_local2 < p.length) {
p[_local2] = _arg1.p[_local2];
_local2++;
};
}
public function add32(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
_local3 = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
_local4 = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
_local5 = (_arg1 & 3);
_local2 = (_local2 + (p[0] + _local3));
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[1] + _local4));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[2] + _local5));
p[2] = (_local2 & 32767);
}
public function binaryNot(_arg1:Integer64):void{
p[0] = (p[0] ^ _arg1.p[0]);
p[1] = (p[1] ^ _arg1.p[1]);
p[2] = (p[2] ^ _arg1.p[2]);
p[3] = (p[3] ^ _arg1.p[3]);
p[4] = (p[4] ^ _arg1.p[4]);
}
public function get lsb():Number{
return (((p[0] | (p[1] << 15)) | ((p[2] & 3) << 30)));
}
public function get msb():Number{
return (((((p[2] >> 2) | ((p[3] << 15) >> 2)) | ((p[4] << (15 * 2)) >> 2)) & 2147483647));
}
public function mulu32(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
s[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[2] = (_arg1 & 3);
_local3 = 0;
while (_local3 < 3) {
_local4 = s[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 3);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 3);
p[3] = 0;
p[4] = 0;
}
private function shl():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = p.length;
while (_local3 < _local4) {
_local1 = ((p[_local3] & 0x4000) >> 14);
p[_local3] = (p[_local3] << 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3++;
_local2 = _local1;
};
}
public function add64(_arg1:Integer64):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = 1;
_local4 = 0;
while ((((_local3 < p.length)) && (!((_arg1.p[_local4] == 0))))) {
_local3++;
};
_local4 = 0;
while (_local4 < _local3) {
_local2 = (_local2 + (p[_local4] + _arg1.p[_local4]));
p[_local4] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local4++;
};
}
}
}//package com
Section 2
//Random (com.Random)
package com {
import flash.utils.*;
public class Random {
private var mti:Number;
private var lastSeed:Number;
private var mta:Array;
private static var MATRIX_A:Number = 2567483615;
private static var UPPER_MASK:Number = 2147483648;
private static var LOWER_MASK:Number = 2147483647;
private static var M:Number = 397;
private static var N:Number = 624;
private static var mag01:Array = [0, 2567483615];
public function Random(_arg1:Number){
mta = new Array(N);
mti = (N + 1);
if (_arg1){
init_genrand(_arg1);
};
}
private function init_genrand(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:*;
_arg1 = int(_arg1);
_local2 = getTimer();
lastSeed = _arg1;
mta[0] = _arg1;
_local3 = _arg1;
_local4 = new Integer64(null);
_local5 = N;
mti = 1;
while (mti < _local5) {
_local4.init32(((_local3 >>> 30) ^ _local3));
_local4.mulu32(1812433253);
_local3 = (mta[mti] = int((_local4.lsb + mti)));
mti++;
};
_local6 = getTimer();
}
public function set seed(_arg1:Number){
init_genrand(_arg1);
}
public function nextDouble(){
return ((next(24) / (1 << 24)));
}
public function nextFloat(){
return ((next(24) / (1 << 24)));
}
public function get seed():Number{
return (lastSeed);
}
public function next(_arg1:Number){
if (_arg1 < 32){
return ((genrand_int32() & ((1 << _arg1) - 1)));
};
return (genrand_int32());
}
public function nextInt(_arg1:Number){
return (((genrand_int32() & 2147483647) % _arg1));
}
private function genrand_int32(){
var _local1:Number;
var _local2:Number;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local1 = N;
_local2 = 0;
if (mti >= _local1){
if (mti == (_local1 + 1)){
init_genrand(5489);
};
_local3 = M;
_local4 = UPPER_MASK;
_local5 = LOWER_MASK;
_local6 = mag01;
_local7 = getTimer();
_local8 = 0;
_local9 = (_local1 - _local3);
_local10 = (_local3 - _local1);
_local8 = 0;
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local3)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local9 = (_local1 - 1);
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local10)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local2 = ((mta[(_local1 - 1)] & _local4) | (mta[0] & _local5));
mta[(_local1 - 1)] = ((mta[(_local3 - 1)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
mti = 0;
_local11 = getTimer();
};
_local2 = mta[mti++];
_local2 = (_local2 ^ (_local2 >>> 11));
_local2 = (_local2 ^ ((_local2 << 7) & 2636928640));
_local2 = (_local2 ^ ((_local2 << 15) & 4022730752));
_local2 = (_local2 ^ (_local2 >>> 18));
return (_local2);
}
}
}//package com
Section 3
//GameLevel (gamelevel.GameLevel)
package gamelevel {
import gamestate.*;
import source.*;
public class GameLevel {
public var levelScene;
public var state:uint;
public var allowHolder:Array;
public var m_realParent:GameStatePlay;
public var m_parent:MemoryMatcher;
public function GameLevel(_arg1:MemoryMatcher, _arg2:GameStatePlay){
m_parent = _arg1;
m_realParent = _arg2;
m_parent.animationManager.animObjArray = new Array();
allowHolder = new Array();
}
public function cleanScene(){
m_parent.animationManager.cleanAnimObjArray();
allowHolder = null;
}
public function updateClock(){
var _local1:*;
_local1 = int((100 - (((m_parent.timeLeft / Constants.FPS) / m_parent.levelManager.levelArray[m_parent.currLevel].getTimeLimit()) * 100)));
levelScene.clockPointer.gotoAndStop(_local1);
}
public function updateSound(){
if (m_parent.soundContainer.soundEnabled){
levelScene.soundControl.soundButton.gotoAndStop(1);
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.soundControl.soundText.text = m_parent.m_localizedString["soundTextOff"];
} else {
levelScene.soundControl.soundText.text = "Sound off";
};
} else {
levelScene.soundControl.soundButton.gotoAndStop(2);
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.soundControl.soundText.text = m_parent.m_localizedString["soundTextOn"];
} else {
levelScene.soundControl.soundText.text = "Sound on";
};
};
}
public function update(_arg1:int){
}
public function updateBonusBar(){
var _local1:*;
var _local2:*;
_local1 = (m_parent.memoryCardContainer.comboCounter + 1);
_local2 = levelScene.bonusBar.totalFrames;
if (_local1 > _local2){
_local1 = _local2;
};
levelScene.bonusBar.gotoAndStop(_local1);
}
public function exit(){
}
public function enter(_arg1:int){
}
}
}//package gamelevel
Section 4
//GameLevel1 (gamelevel.GameLevel1)
package gamelevel {
import flash.events.*;
import gamestate.*;
import source.*;
public class GameLevel1 extends GameLevel {
public var timerText:Text;
public var scoreText:Text;
public function GameLevel1(_arg1:MemoryMatcher, _arg2:GameStatePlay){
super(_arg1, _arg2);
m_parent.stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
state = 1;
levelScene = new LevelComplete1();
allowHolder[Constants.ALLOW_TRUE] = new Object();
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL] = new Object();
allowHolder[Constants.ALLOW_COMBOS_4] = new Object();
allowHolder[Constants.ALLOW_COMBOS_5] = new Object();
allowHolder[Constants.ALLOW_LEVEL_COMPLETE] = new Object();
allowHolder[Constants.ALLOW_CRITICAL_TIME] = new Object();
allowHolder[Constants.ALLOW_COMBOS_2] = new Object();
allowHolder[Constants.ALLOW_RANDOM] = new Object();
}
override public function update(_arg1:int){
var _local2:int;
var _local3:int;
var _local4:Number;
_local2 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumStartRowsFilled() + m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows());
_local3 = (_local2 * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local4 = ((m_parent.numBlocksRemoved / _local3) * 100);
levelScene.scoreNum_left.text = String(int(m_parent.score));
levelScene.completeNum.text = String(int(_local4));
levelScene.completeMax.text = "/100";
updateClock();
updateBonusBar();
updateSound();
if (Constants.ALLOW_BANNER == true){
timerText.myTextField.text = String((m_parent.timeLeft / Constants.FPS));
scoreText.myTextField.text = ("Score: " + m_parent.score);
};
allowHolder[Constants.ALLOW_TRUE].allow = true;
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL].allow = m_realParent.advanceToNextLevel;
allowHolder[Constants.ALLOW_COMBOS_2].allow = (m_parent.memoryCardContainer.comboCounter >= 2);
allowHolder[Constants.ALLOW_COMBOS_4].allow = (m_parent.memoryCardContainer.comboCounter >= 4);
allowHolder[Constants.ALLOW_COMBOS_5].allow = (m_parent.memoryCardContainer.comboCounter >= 5);
allowHolder[Constants.ALLOW_LEVEL_COMPLETE].allow = (m_realParent.state == 3);
allowHolder[Constants.ALLOW_CRITICAL_TIME].allow = (m_parent.timeLeft <= (5 * Constants.FPS));
allowHolder[Constants.ALLOW_RANDOM].allow = ((Math.floor((Math.random() * 1000)))<2) ? true : false;
if (m_realParent.advanceToNextLevel){
levelScene.completeNum.textColor = 0xFF00;
};
m_parent.animationManager.update(_arg1);
}
public function basicScene(){
if (Constants.ALLOW_BANNER == true){
timerText = new Text(m_parent, 10, 40, 100, 100, 0xFF0000, "");
m_parent.renderManager.addRenderObject(timerText.myTextField, 10, "timerText.myTextField");
scoreText = new Text(m_parent, 10, 10, 100, 100, 0xFF0000, "");
m_parent.renderManager.addRenderObject(scoreText.myTextField, 10, "scoreText.myTextField");
} else {
m_parent.renderManager.addRenderObject(levelScene.scoreText_left, 100, "levelScene.scoreText_left");
m_parent.renderManager.addRenderObject(levelScene.completeText, 100, "levelScene.completeText");
levelScene.completeNum.textColor = 0xFF0000;
m_parent.renderManager.addRenderObject(levelScene.scoreNum_left, 100, "levelScene.scoreNum_left");
m_parent.renderManager.addRenderObject(levelScene.completeNum, 100, "levelScene.completeNum");
m_parent.renderManager.addRenderObject(levelScene.completeMax, 100, "levelScene.completeMax");
m_parent.renderManager.addRenderObject(levelScene.background.meatBone, 100, "levelScene.background.meatBone");
m_parent.renderManager.addRenderObject(levelScene.background.front, 1000, "levelScene.background.front");
m_parent.renderManager.addRenderObject(levelScene.background.back, 10000, "levelScene.background.back");
m_parent.renderManager.addRenderObject(levelScene.clockPointer, 100, "levelScene.clockPointer");
levelScene.clockPointer.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.bonusBar, 100, "levelScene.bonusBar");
levelScene.bonusBar.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.exitControl, 10, "levelScene.exitControl");
levelScene.exitControl.buttonMode = true;
levelScene.exitControl.quitButton.gotoAndStop(1);
updateSound();
m_parent.renderManager.addRenderObject(levelScene.soundControl, 10, "levelScene.soundControl");
levelScene.soundControl.buttonMode = true;
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_left.text = m_parent.fixStr(m_parent.m_localizedString["scoreLeft"]);
levelScene.completeText.text = m_parent.fixStr(m_parent.m_localizedString["completeLeft"]);
levelScene.exitControl.exitGameText.text = m_parent.fixStr(m_parent.m_localizedString["exitGame"]);
levelScene.getReady.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.start.start.text = m_parent.fixStr(m_parent.m_localizedString["start"]);
};
m_parent.animationManager.addAnimObj(levelScene.background.weatherArrow, Constants.ANIM_REPEAT, 0.05, 100, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.fruit, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.popComplete, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.background.cat, Constants.ANIM_ONCE, 0.05, 500, allowHolder[Constants.ALLOW_COMBOS_4]);
m_parent.animationManager.addAnimObj(levelScene.symbol, Constants.ANIM_REPEAT_TAIL, 0.05, 100, allowHolder[Constants.ALLOW_LEVEL_COMPLETE]);
m_parent.animationManager.addAnimObj(levelScene.sewerLid, Constants.ANIM_ONCE_AND_RESET, 0.0005, 100, allowHolder[Constants.ALLOW_COMBOS_5], true);
m_parent.animationManager.addAnimObj(levelScene.lampFlash, Constants.ANIM_REPEAT, 0.05, 100, allowHolder[Constants.ALLOW_CRITICAL_TIME]);
m_parent.animationManager.addAnimObj(levelScene.clockRed, Constants.ANIM_REPEAT, 0.05, 200, allowHolder[Constants.ALLOW_CRITICAL_TIME]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud1, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud2, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud3, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.aeroplane, Constants.ANIM_REPEAT, 0.05, 5000, allowHolder[Constants.ALLOW_RANDOM]);
m_parent.renderManager.addBottomShape();
};
m_parent.memoryCardContainer.addGirder();
}
public function gameoverPreScene(){
m_parent.animationManager.removeAnimObj(levelScene.lampFlash);
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
m_parent.animationManager.addAnimObj(levelScene.gameOverCloud, Constants.ANIM_REPEAT_TAIL, 0.05, 100, allowHolder[Constants.ALLOW_TRUE]);
}
override public function enter(_arg1:int){
redrawGuibackground();
}
override public function exit(){
cleanScene();
}
public function levelCompletePreScene(){
m_parent.animationManager.removeAnimObj(levelScene.lampFlash);
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
}
public function clickHandler(_arg1:MouseEvent){
if (Constants.ALLOW_BANNER == true){
if (m_realParent.exitGameFlagged){
m_parent.animationManager.cleanAnimObjArray();
m_parent.renderManager.cleanRenderObjectArray();
m_parent.score = 0;
m_realParent.enter(-1);
};
} else {
if (_arg1.target == levelScene.soundControl.hitBox){
m_parent.soundContainer.soundEnable(!(m_parent.soundContainer.soundEnabled));
} else {
if (_arg1.target == levelScene.exitControl.quitButtonHitBox){
if (((!(m_realParent.exitButtonPressed)) && (!(m_realParent.exitGameFlagged)))){
m_parent.sendToProxy("playData", (("90," + m_parent.ticks) + ",0=0"));
m_realParent.enterGameOverState(Constants.REASON_GAME_QUIT);
m_realParent.exitButtonPressed = true;
};
};
};
};
}
public function gameoverScene(){
m_parent.animationManager.removeAnimObj(levelScene.lampFlash);
resultScene();
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.gameOverText.text = m_parent.fixStr(m_parent.m_localizedString["gameoverText"]);
};
m_parent.renderManager.addRenderObject(levelScene.gameOverText, 50, "levelScene.gameOverText");
}
public function levelCompleteScene(){
resultScene();
m_parent.renderManager.addRenderObject(levelScene.levelNumber, 50, "levelScene.levelNumber");
m_parent.renderManager.addRenderObject(levelScene.levelText, 50, "levelScene.levelText");
m_parent.renderManager.addRenderObject(levelScene.completedText, 50, "levelScene.completedText");
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.levelText.text = m_parent.fixStr(m_parent.m_localizedString["level"]);
levelScene.completedText.text = m_parent.fixStr(m_parent.m_localizedString["completed"]);
};
}
public function redrawGuibackground(){
if (state == 1){
basicScene();
} else {
if (state == 2){
levelCompleteScene();
basicScene();
} else {
if (state == 3){
gameoverScene();
basicScene();
};
};
};
}
public function resultScene(){
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_right.text = m_parent.fixStr(m_parent.m_localizedString["scoreText"]);
levelScene.bonusText_right.text = m_parent.fixStr(m_parent.m_localizedString["bonusText"]);
levelScene.totalText_right.text = m_parent.fixStr(m_parent.m_localizedString["totalScoreText"]);
};
m_parent.renderManager.addRenderObject(levelScene.scoreLines, 50, "levelScene.scoreLines");
m_parent.renderManager.addRenderObject(levelScene.scoreText_right, 50, "levelScene.scoreText_right");
m_parent.renderManager.addRenderObject(levelScene.bonusText_right, 50, "levelScene.bonusText_right");
m_parent.renderManager.addRenderObject(levelScene.totalText_right, 50, "levelScene.totalText_right");
m_parent.renderManager.addRenderObject(levelScene.scoreNum_right, 50, "levelScene.scoreNum_right");
m_parent.renderManager.addRenderObject(levelScene.bonusNum_right, 50, "levelScene.bonusNum_right");
m_parent.renderManager.addRenderObject(levelScene.totalNum_right, 50, "levelScene.totalNum_right");
m_parent.renderManager.addRenderObject(levelScene.timeToExitText, 10, "levelScene.timeToExitText");
m_parent.renderManager.addRenderObject(levelScene.timeToExitValue, 10, "levelScene.timeToExitValue");
if (m_realParent.bonusAllowed){
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int((m_realParent.getClearBonus() + m_realParent.getTimeBonus())));
levelScene.totalNum_right.text = String(int(m_parent.score));
} else {
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int(0));
levelScene.totalNum_right.text = String(int(m_parent.score));
};
}
}
}//package gamelevel
Section 5
//GameLevel2 (gamelevel.GameLevel2)
package gamelevel {
import flash.events.*;
import gamestate.*;
import source.*;
public class GameLevel2 extends GameLevel {
public function GameLevel2(_arg1:MemoryMatcher, _arg2:GameStatePlay){
super(_arg1, _arg2);
m_parent.stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
state = 1;
levelScene = new LevelComplete2();
allowHolder[Constants.ALLOW_TRUE] = new Object();
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL] = new Object();
allowHolder[Constants.ALLOW_COMBOS_4] = new Object();
allowHolder[Constants.ALLOW_COMBOS_5] = new Object();
allowHolder[Constants.ALLOW_LEVEL_COMPLETE] = new Object();
allowHolder[Constants.ALLOW_CRITICAL_TIME] = new Object();
allowHolder[Constants.ALLOW_RANDOM] = new Object();
}
override public function update(_arg1:int){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumStartRowsFilled() + m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows());
_local3 = (_local2 * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local4 = ((m_parent.numBlocksRemoved / _local3) * 100);
levelScene.scoreNum_left.text = String(int(m_parent.score));
levelScene.completeNum.text = String(int(_local4));
levelScene.completeMax.text = "/100";
updateClock();
updateBonusBar();
updateSound();
allowHolder[Constants.ALLOW_TRUE].allow = true;
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL].allow = m_realParent.advanceToNextLevel;
allowHolder[Constants.ALLOW_COMBOS_4].allow = (m_parent.memoryCardContainer.comboCounter >= 4);
allowHolder[Constants.ALLOW_COMBOS_5].allow = (m_parent.memoryCardContainer.comboCounter >= 5);
allowHolder[Constants.ALLOW_LEVEL_COMPLETE].allow = (m_realParent.state == 3);
allowHolder[Constants.ALLOW_CRITICAL_TIME].allow = (m_parent.timeLeft <= (5 * Constants.FPS));
allowHolder[Constants.ALLOW_RANDOM].allow = ((Math.floor((Math.random() * 1000)))<2) ? true : false;
if (m_realParent.advanceToNextLevel){
levelScene.completeNum.textColor = 0xFF00;
};
m_parent.animationManager.update(_arg1);
}
public function gameoverPreScene(){
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
m_parent.animationManager.addAnimObj(levelScene.gameOverCloud, Constants.ANIM_REPEAT_TAIL, 0.05, 100, allowHolder[Constants.ALLOW_TRUE]);
}
override public function enter(_arg1:int){
redrawGuibackground();
}
override public function exit(){
cleanScene();
}
public function levelCompletePreScene(){
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
}
public function clickHandler(_arg1:MouseEvent){
if (_arg1.target == levelScene.soundControl.hitBox){
m_parent.soundContainer.soundEnable(!(m_parent.soundContainer.soundEnabled));
} else {
if (_arg1.target == levelScene.exitControl.quitButtonHitBox){
if (((!(m_realParent.exitButtonPressed)) && (!(m_realParent.exitGameFlagged)))){
m_parent.sendToProxy("playData", (("90," + m_parent.ticks) + ",0=0"));
m_realParent.enterGameOverState(Constants.REASON_GAME_QUIT);
m_realParent.exitButtonPressed = true;
};
};
};
}
public function gameoverScene(){
resultScene();
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.gameOverText.text = m_parent.fixStr(m_parent.m_localizedString["gameoverText"]);
};
m_parent.renderManager.addRenderObject(levelScene.gameOverText, 50, "levelScene.gameOverText");
}
public function freeGameScene(){
m_parent.renderManager.addRenderObject(levelScene.freeText, 1, "levelScene.freeText");
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.freeText.freeText.text = m_parent.fixStr(m_parent.m_localizedString["freeText"]);
};
m_parent.renderManager.addRenderObject(levelScene.timeToExitText, 10, "levelScene.timeToExitText");
m_parent.renderManager.addRenderObject(levelScene.timeToExitValue, 10, "levelScene.timeToExitValue");
}
public function levelCompleteScene(){
resultScene();
m_parent.renderManager.addRenderObject(levelScene.levelNumber, 1, "levelScene.levelNumber");
m_parent.renderManager.addRenderObject(levelScene.levelText, 1, "levelScene.levelText");
m_parent.renderManager.addRenderObject(levelScene.completedText, 1, "levelScene.completedText");
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.levelText.text = m_parent.fixStr(m_parent.m_localizedString["level"]);
levelScene.completedText.text = m_parent.fixStr(m_parent.m_localizedString["completed"]);
};
}
public function redrawGuibackground(){
if (state == 1){
basicScene();
} else {
if (state == 2){
levelCompleteScene();
basicScene();
} else {
if (state == 3){
gameoverScene();
basicScene();
};
};
};
}
public function resultScene(){
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_right.text = m_parent.fixStr(m_parent.m_localizedString["scoreText"]);
levelScene.bonusText_right.text = m_parent.fixStr(m_parent.m_localizedString["bonusText"]);
levelScene.totalText_right.text = m_parent.fixStr(m_parent.m_localizedString["totalScoreText"]);
};
m_parent.renderManager.addRenderObject(levelScene.scoreLines, 50, "levelScene.scoreLines");
m_parent.renderManager.addRenderObject(levelScene.scoreText_right, 50, "levelScene.scoreText_right");
m_parent.renderManager.addRenderObject(levelScene.bonusText_right, 50, "levelScene.bonusText_right");
m_parent.renderManager.addRenderObject(levelScene.totalText_right, 50, "levelScene.totalText_right");
m_parent.renderManager.addRenderObject(levelScene.scoreNum_right, 50, "levelScene.scoreNum_right");
m_parent.renderManager.addRenderObject(levelScene.bonusNum_right, 50, "levelScene.bonusNum_right");
m_parent.renderManager.addRenderObject(levelScene.totalNum_right, 50, "levelScene.totalNum_right");
m_parent.renderManager.addRenderObject(levelScene.timeToExitText, 10, "levelScene.timeToExitText");
m_parent.renderManager.addRenderObject(levelScene.timeToExitValue, 10, "levelScene.timeToExitValue");
if (m_realParent.bonusAllowed){
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int((m_realParent.getClearBonus() + m_realParent.getTimeBonus())));
levelScene.totalNum_right.text = String(int(m_parent.score));
} else {
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int(0));
levelScene.totalNum_right.text = String(int(m_parent.score));
};
}
public function basicScene(){
m_parent.renderManager.addRenderObject(levelScene.scoreText_left, 100, "levelScene.exitControl");
m_parent.renderManager.addRenderObject(levelScene.completeText, 100, "levelScene.exitControl");
levelScene.completeNum.textColor = 0xFF0000;
m_parent.renderManager.addRenderObject(levelScene.scoreNum_left, 100, "levelScene.scoreNum_left");
m_parent.renderManager.addRenderObject(levelScene.completeNum, 100, "levelScene.completeNum");
m_parent.renderManager.addRenderObject(levelScene.completeMax, 100, "levelScene.completeMax");
m_parent.renderManager.addRenderObject(levelScene.background.soda, 100, "levelScene.background.soda");
m_parent.renderManager.addRenderObject(levelScene.background.front, 1000, "levelScene.background.front");
m_parent.renderManager.addRenderObject(levelScene.background.back, 10000, "levelScene.background.back");
m_parent.renderManager.addRenderObject(levelScene.clockPointer, 100, "levelScene.clockPointer");
levelScene.clockPointer.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.bonusBar, 100, "levelScene.bonusBar");
levelScene.bonusBar.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.exitControl, 10, "levelScene.exitControl");
levelScene.exitControl.buttonMode = true;
levelScene.exitControl.quitButton.gotoAndStop(1);
updateSound();
m_parent.renderManager.addRenderObject(levelScene.soundControl, 10, "levelScene.soundControl");
levelScene.soundControl.buttonMode = true;
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_left.text = m_parent.fixStr(m_parent.m_localizedString["scoreLeft"]);
levelScene.completeText.text = m_parent.fixStr(m_parent.m_localizedString["completeLeft"]);
levelScene.exitControl.exitGameText.text = m_parent.fixStr(m_parent.m_localizedString["exitGame"]);
levelScene.getReady.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.start.start.text = m_parent.fixStr(m_parent.m_localizedString["start"]);
};
m_parent.animationManager.addAnimObj(levelScene.background.smoke, Constants.ANIM_REPEAT, 0.05, 100, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.fruit, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.popComplete, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.background.rat, Constants.ANIM_ONCE, 0.05, 500, allowHolder[Constants.ALLOW_COMBOS_4]);
m_parent.animationManager.addAnimObj(levelScene.symbol, Constants.ANIM_REPEAT_TAIL, 0.05, 100, allowHolder[Constants.ALLOW_LEVEL_COMPLETE]);
m_parent.animationManager.addAnimObj(levelScene.background.waterDrip, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_COMBOS_5]);
m_parent.animationManager.addAnimObj(levelScene.clockRed, Constants.ANIM_REPEAT, 0.05, 200, allowHolder[Constants.ALLOW_CRITICAL_TIME]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud1, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud2, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud3, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.blimp, Constants.ANIM_REPEAT, 0.05, 5000, allowHolder[Constants.ALLOW_RANDOM]);
m_parent.renderManager.addBottomShape();
m_parent.memoryCardContainer.addGirder();
}
}
}//package gamelevel
Section 6
//GameLevel3 (gamelevel.GameLevel3)
package gamelevel {
import flash.events.*;
import gamestate.*;
import source.*;
public class GameLevel3 extends GameLevel {
public var carriageMovement:Number;
public var carriageObjectArray:Array;
public function GameLevel3(_arg1:MemoryMatcher, _arg2:GameStatePlay){
super(_arg1, _arg2);
m_parent.stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
state = 1;
levelScene = new LevelComplete3();
allowHolder[Constants.ALLOW_TRUE] = new Object();
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL] = new Object();
allowHolder[Constants.ALLOW_COMBOS_4] = new Object();
allowHolder[Constants.ALLOW_COMBOS_5] = new Object();
allowHolder[Constants.ALLOW_LEVEL_COMPLETE] = new Object();
allowHolder[Constants.ALLOW_CRITICAL_TIME] = new Object();
allowHolder[Constants.ALLOW_RANDOM] = new Object();
carriageObjectArray = new Array();
}
override public function update(_arg1:int){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumStartRowsFilled() + m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows());
_local3 = (_local2 * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local4 = ((m_parent.numBlocksRemoved / _local3) * 100);
levelScene.scoreNum_left.text = String(int(m_parent.score));
levelScene.completeNum.text = String(int(_local4));
levelScene.completeMax.text = "/100";
updateClock();
updateBonusBar();
updateSound();
allowHolder[Constants.ALLOW_TRUE].allow = true;
allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL].allow = m_realParent.advanceToNextLevel;
allowHolder[Constants.ALLOW_COMBOS_4].allow = (m_parent.memoryCardContainer.comboCounter >= 4);
allowHolder[Constants.ALLOW_COMBOS_5].allow = (m_parent.memoryCardContainer.comboCounter >= 5);
allowHolder[Constants.ALLOW_LEVEL_COMPLETE].allow = (((m_realParent.state == 3)) || ((m_realParent.state == 5)));
allowHolder[Constants.ALLOW_CRITICAL_TIME].allow = (m_parent.timeLeft <= (5 * Constants.FPS));
allowHolder[Constants.ALLOW_RANDOM].allow = ((Math.floor((Math.random() * 1000)))<2) ? true : false;
if (m_realParent.advanceToNextLevel){
levelScene.completeNum.textColor = 0xFF00;
};
m_parent.animationManager.update(_arg1);
}
public function gameoverPreScene(){
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
m_parent.animationManager.addAnimObj(levelScene.gameOverCloud, Constants.ANIM_REPEAT_TAIL, 0.05, 100, allowHolder[Constants.ALLOW_TRUE]);
}
override public function enter(_arg1:int){
redrawGuibackground();
}
public function addCarriage(){
addCarriageObject(levelScene.carriage.sausage, "levelScene.carriage.sausage", 100);
addCarriageObject(levelScene.carriage.flower, "levelScene.carriage.flower", 80);
addCarriageObject(levelScene.carriage.pinkguy, "levelScene.carriage.pinkguy", 90);
addCarriageObject(levelScene.carriage.dog, "levelScene.carriage.dog", 100);
addCarriageObject(levelScene.carriage.owl, "levelScene.carriage.owl", 90);
addCarriageObject(levelScene.carriage.cactus, "levelScene.carriage.cactus", 80);
addCarriageObject(levelScene.carriage.lavalamp, "levelScene.carriage.lavalamp", 100);
addCarriageObject(levelScene.carriage.eye, "levelScene.carriage.eye", 90);
addCarriageObject(levelScene.carriage.napoleon, "levelScene.carriage.napoleon", 80);
addCarriageObject(levelScene.carriage.octopus, "levelScene.carriage.octopus", 100);
addCarriageObject(levelScene.carriage.ghost, "levelScene.carriage.ghost", 100);
addCarriageObject(levelScene.carriage.bunny, "levelScene.carriage.bunny", 90);
addCarriageObject(levelScene.carriage.king, "levelScene.carriage.king", 100);
addCarriageObject(levelScene.carriage.aristo, "levelScene.carriage.aristo", 100);
addCarriageObject(levelScene.carriage.fish, "levelScene.carriage.fish", 100);
addCarriageObject(levelScene.carriage.greenguy, "levelScene.carriage.greenguy", 90);
addCarriageObject(levelScene.carriage.turtle, "levelScene.carriage.turtle", 80);
addCarriageObject(levelScene.carriage.birdy, "levelScene.carriage.birdy", 100);
addCarriageObject(levelScene.carriage.carriage_back, "levelScene.carriage.carriage_back", 110);
addCarriageObject(levelScene.carriage.carriage_front, "levelScene.carriage.carriage_front", 50);
addCarriageObject(levelScene.carriage.confetti, "levelScene.carriage.confetti", 120);
}
override public function exit(){
cleanScene();
}
public function setCarriagePosition(_arg1, _arg2:Number, _arg3:Number){
_arg1.placedPositionX = (_arg1.originalPositionX + _arg2);
_arg1.placedPositionY = (_arg1.originalPositionY + _arg3);
_arg1.object.x = _arg1.placedPositionX;
_arg1.object.y = _arg1.placedPositionY;
}
public function clickHandler(_arg1:MouseEvent){
if (_arg1.target == levelScene.soundControl.hitBox){
m_parent.soundContainer.soundEnable(!(m_parent.soundContainer.soundEnabled));
} else {
if (_arg1.target == levelScene.exitControl.quitButtonHitBox){
if (((!(m_realParent.exitButtonPressed)) && (!(m_realParent.exitGameFlagged)))){
m_parent.sendToProxy("playData", (("90," + m_parent.ticks) + ",0=0"));
m_realParent.enterGameOverState(Constants.REASON_GAME_QUIT);
m_realParent.exitButtonPressed = true;
};
};
};
}
public function levelCompletePreScene(){
m_parent.animationManager.removeAnimObj(levelScene.clockRed);
m_parent.memoryCardContainer.comboCounter = 0;
}
public function levelCompleteScene(){
resultScene();
m_parent.renderManager.addRenderObject(levelScene.levelNumber, 50, "levelScene.levelNumber");
m_parent.renderManager.addRenderObject(levelScene.levelText, 50, "levelScene.levelText");
m_parent.renderManager.addRenderObject(levelScene.completedText, 50, "levelScene.completedText");
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.levelText.text = m_parent.fixStr(m_parent.m_localizedString["level"]);
levelScene.completedText.text = m_parent.fixStr(m_parent.m_localizedString["completed"]);
};
if (m_realParent.levelPlayfieldCleared){
addCarriage();
};
}
public function redrawGuibackground(){
if (state == 1){
basicScene();
} else {
if (state == 2){
levelCompleteScene();
basicScene();
} else {
if (state == 3){
gameoverScene();
basicScene();
};
};
};
}
public function gameoverScene(){
resultScene();
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.gameOverText.text = m_parent.fixStr(m_parent.m_localizedString["gameoverText"]);
};
m_parent.renderManager.addRenderObject(levelScene.gameOverText, 50, "levelScene.gameOverText");
}
public function resultScene(){
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_right.text = m_parent.fixStr(m_parent.m_localizedString["scoreText"]);
levelScene.bonusText_right.text = m_parent.fixStr(m_parent.m_localizedString["bonusText"]);
levelScene.totalText_right.text = m_parent.fixStr(m_parent.m_localizedString["totalScoreText"]);
};
m_parent.renderManager.addRenderObject(levelScene.scoreLines, 50, "levelScene.scoreLines");
m_parent.renderManager.addRenderObject(levelScene.scoreText_right, 50, "levelScene.scoreText_right");
m_parent.renderManager.addRenderObject(levelScene.bonusText_right, 50, "levelScene.bonusText_right");
m_parent.renderManager.addRenderObject(levelScene.totalText_right, 50, "levelScene.totalText_right");
m_parent.renderManager.addRenderObject(levelScene.scoreNum_right, 50, "levelScene.scoreNum_right");
m_parent.renderManager.addRenderObject(levelScene.bonusNum_right, 50, "levelScene.bonusNum_right");
m_parent.renderManager.addRenderObject(levelScene.totalNum_right, 50, "levelScene.totalNum_right");
m_parent.renderManager.addRenderObject(levelScene.timeToExitText, 10, "levelScene.timeToExitText");
m_parent.renderManager.addRenderObject(levelScene.timeToExitValue, 10, "levelScene.timeToExitValue");
if (m_realParent.bonusAllowed){
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int((m_realParent.getClearBonus() + m_realParent.getTimeBonus())));
levelScene.totalNum_right.text = String(int(m_parent.score));
} else {
levelScene.scoreNum_right.text = String(int(m_parent.scoreWithoutBonus));
levelScene.bonusNum_right.text = String(int(0));
levelScene.totalNum_right.text = String(int(m_parent.score));
};
}
public function pullCarriage(_arg1:int){
var _local2:*;
if (carriageMovement > -550){
carriageMovement = (carriageMovement - 10);
_local2 = 0;
while (_local2 < carriageObjectArray.length) {
carriageObjectArray[_local2].object.x = (carriageObjectArray[_local2].placedPositionX + carriageMovement);
carriageObjectArray[_local2].object.y = carriageObjectArray[_local2].placedPositionY;
_local2++;
};
};
}
public function addCarriageObject(_arg1, _arg2:String, _arg3:uint){
var _local4:*;
_local4 = new Object();
_local4.object = _arg1;
_local4.originalPositionX = _arg1.x;
_local4.originalPositionY = _arg1.y;
carriageMovement = -1;
setCarriagePosition(_local4, 700, 455);
m_parent.animationManager.addAnimObj(_local4.object, Constants.ANIM_REPEAT, 0.05, _arg3, null, false, 0, "", _arg2);
carriageObjectArray.push(_local4);
}
public function basicScene(){
m_parent.renderManager.addRenderObject(levelScene.scoreText_left, 100, "levelScene.scoreText_left");
m_parent.renderManager.addRenderObject(levelScene.completeText, 100, "levelScene.completeText");
levelScene.completeNum.textColor = 0xFF0000;
m_parent.renderManager.addRenderObject(levelScene.scoreNum_left, 100, "levelScene.scoreNum_left");
m_parent.renderManager.addRenderObject(levelScene.completeNum, 100, "levelScene.completeNum");
m_parent.renderManager.addRenderObject(levelScene.completeMax, 100, "levelScene.completeMax");
m_parent.renderManager.addRenderObject(levelScene.background.front, 1000, "levelScene.front");
m_parent.renderManager.addRenderObject(levelScene.background.back3, 3000, "levelScene.back3");
m_parent.renderManager.addRenderObject(levelScene.background.back2, 5000, "levelScene.back2");
m_parent.renderManager.addRenderObject(levelScene.background.back, 10000, "levelScene.back");
m_parent.renderManager.addRenderObject(levelScene.clockPointer, 100, "levelScene.clockPointer");
levelScene.clockPointer.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.bonusBar, 100, "levelScene.bonusBar");
levelScene.bonusBar.gotoAndStop(1);
m_parent.renderManager.addRenderObject(levelScene.exitControl, 10, "levelScene.exitControl");
levelScene.exitControl.buttonMode = true;
levelScene.exitControl.quitButton.gotoAndStop(1);
updateSound();
m_parent.renderManager.addRenderObject(levelScene.soundControl, 10, "levelScene.soundControl");
levelScene.soundControl.buttonMode = true;
if (!Constants.ALLOW_LOCAL_DATA){
levelScene.scoreText_left.text = m_parent.fixStr(m_parent.m_localizedString["scoreLeft"]);
levelScene.completeText.text = m_parent.fixStr(m_parent.m_localizedString["completeLeft"]);
levelScene.exitControl.exitGameText.text = m_parent.fixStr(m_parent.m_localizedString["exitGame"]);
levelScene.getReady.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.getReady.getReady.getReady.text = m_parent.fixStr(m_parent.m_localizedString["getReady"]);
levelScene.start.start.start.text = m_parent.fixStr(m_parent.m_localizedString["start"]);
};
m_parent.animationManager.addAnimObj(levelScene.fruit, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.popComplete, Constants.ANIM_ONCE, 0.05, 100, allowHolder[Constants.ALLOW_ADVANCE_TO_NEXT_LEVEL]);
m_parent.animationManager.addAnimObj(levelScene.symbol, Constants.ANIM_REPEAT_TAIL, 0.05, 130, allowHolder[Constants.ALLOW_LEVEL_COMPLETE]);
m_parent.animationManager.addAnimObj(levelScene.background.agent, Constants.ANIM_ONCE, 0.05, 1500, allowHolder[Constants.ALLOW_COMBOS_4]);
m_parent.animationManager.addAnimObj(levelScene.background.wreckingBall, Constants.ANIM_STAY, 0.05, 100, allowHolder[Constants.ALLOW_COMBOS_5], true);
m_parent.animationManager.addAnimObj(levelScene.clockRed, Constants.ANIM_REPEAT, 0.05, 200, allowHolder[Constants.ALLOW_CRITICAL_TIME]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud1, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud2, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.animationManager.addAnimObj(levelScene.background.cloud3, Constants.ANIM_REPEAT, 0.01, 5000, allowHolder[Constants.ALLOW_TRUE]);
m_parent.renderManager.addBottomShape();
m_parent.memoryCardContainer.addGirder();
}
}
}//package gamelevel
Section 7
//GameState (gamestate.GameState)
package gamestate {
public class GameState {
public function startNextLevel(){
}
public function enter(_arg1:int){
}
public function update(_arg1:int){
}
public function exit(){
}
}
}//package gamestate
Section 8
//GameStateIntro (gamestate.GameStateIntro)
package gamestate {
import flash.events.*;
import flash.display.*;
import source.*;
import flash.text.*;
import flash.utils.*;
public class GameStateIntro extends GameState {
public var introScene;
public var inputFieldContainer:InputFieldContainer;
public var allowHolder:Array;
public var state:uint;
public var soundFadeOut:Boolean;
public var timeToExit:int;
public var soundFadeIn:Boolean;
public var m_parent:MemoryMatcher;
public function GameStateIntro(_arg1:MemoryMatcher){
m_parent = _arg1;
allowHolder = new Array();
allowHolder[Constants.ALLOW_TRUE] = new Object();
m_parent.stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
}
public function cleanScene(){
m_parent.animationManager.cleanAnimObjArray();
m_parent.renderManager.cleanRenderObjectArray();
introScene = null;
}
override public function update(_arg1:int){
if (state == Constants.INTRO_SCENE1_INIT){
addScene1();
state = 1;
if (!Constants.ALLOW_LOCAL_DATA){
introScene.timeToExitText.text = m_parent.fixStr(m_parent.m_localizedString["timeToStart"]);
};
};
if (state == Constants.INTRO_SCENE1_RUN){
updateSoundButton();
timeToExit = (timeToExit - _arg1);
if (timeToExit < 0){
timeToExit = 0;
};
introScene.timeToExitValue.text = String(int((timeToExit / 1000)));
if ((timeToExit / 1000) <= (Constants.TIME_TO_EXIT_INTRO - Constants.TIME_TO_EXIT_INTRO_1)){
state = 2;
};
} else {
if (state == Constants.INTRO_SCENE2_INIT){
cleanScene1();
addScene2();
state = 3;
if (!Constants.ALLOW_LOCAL_DATA){
introScene.timeToExitText.text = m_parent.fixStr(m_parent.m_localizedString["timeToStart"]);
introScene.text1.text = m_parent.fixStr(m_parent.m_localizedString["introText1"]);
introScene.text2.text = m_parent.fixStr(m_parent.m_localizedString["introText2"]);
introScene.text3.text = m_parent.fixStr(m_parent.m_localizedString["introText3"]);
};
} else {
if (state == Constants.INTRO_SCENE2_RUN){
updateSoundButton();
timeToExit = (timeToExit - _arg1);
if (timeToExit < 0){
timeToExit = 0;
};
introScene.timeToExitValue.text = String(int((timeToExit / 1000)));
if ((timeToExit / 1000) <= 0){
state = 4;
};
} else {
if (state == Constants.INTRO_SOUND_FADE_OUT){
timeToExit = (timeToExit - _arg1);
if (timeToExit < 0){
timeToExit = 0;
};
if ((timeToExit / 1000) <= 0){
m_parent.changeGamestate(GameStatePlay, 1);
};
} else {
if (state == Constants.INTRO_SKIP){
m_parent.changeGamestate(GameStatePlay, 1);
} else {
if (state == Constants.INTRO_EXIT){
if (timeToExit < getTimer()){
m_parent.exitGame();
};
};
};
};
};
};
};
allowHolder[Constants.ALLOW_TRUE].allow = true;
m_parent.animationManager.update(_arg1);
}
public function cleanScene1(){
if (!(Constants.ALLOW_BANNER) == true){
m_parent.renderManager.removeRenderObject(introScene.timeToExitValue);
m_parent.renderManager.removeRenderObject(introScene.exitControl);
m_parent.renderManager.removeRenderObject(introScene.soundControl);
m_parent.animationManager.removeAnimObj(introScene.people);
m_parent.renderManager.removeRenderObject(introScene.background);
m_parent.renderManager.removeRenderObject(introScene.beams);
};
}
public function updateSoundButton(){
if (m_parent.soundContainer.soundEnabled){
introScene.soundControl.soundButton.gotoAndStop(1);
if (!Constants.ALLOW_LOCAL_DATA){
introScene.soundControl.soundText.text = m_parent.fixStr(m_parent.m_localizedString["soundTextOff"]);
} else {
introScene.soundControl.soundText.text = "Sound off";
};
} else {
introScene.soundControl.soundButton.gotoAndStop(2);
if (!Constants.ALLOW_LOCAL_DATA){
introScene.soundControl.soundText.text = m_parent.fixStr(m_parent.m_localizedString["soundTextOn"]);
} else {
introScene.soundControl.soundText.text = "Sound on";
};
};
}
override public function enter(_arg1:int){
m_parent.gameState = Constants.GAMESTATE_INTRO;
m_parent.soundContainer.playSound(Constants.SOUND_MEMMATCH_GAMESONG, 0);
if (Constants.ALLOW_INPUT){
inputFieldContainer = new InputFieldContainer(m_parent);
inputFieldContainer.addInputFields(m_parent);
inputFieldContainer.updateFromInputFields(m_parent);
};
if (Constants.ALLOW_INTRO){
if (Constants.ALLOW_BANNER == true){
state = 2;
} else {
state = 0;
};
} else {
state = 5;
};
m_parent.soundContainer.changeVolume(Constants.SOUND_MEMMATCH_GAMESONG, 1);
timeToExit = (Constants.TIME_TO_EXIT_INTRO * 1000);
}
override public function exit(){
if (Constants.ALLOW_INPUT){
inputFieldContainer.updateFromInputFields(m_parent);
inputFieldContainer.cleanUp(m_parent);
};
m_parent.soundContainer.stopSound(Constants.SOUND_MEMMATCH_GAMESONG);
m_parent.stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
if (inputFieldContainer){
inputFieldContainer = null;
};
cleanScene();
}
public function addScene1(){
m_parent.renderManager.renderObjectArray = new Array();
m_parent.animationManager.animObjArray = new Array();
introScene = new IntroScene1();
m_parent.renderManager.addRenderObject(introScene.timeToExitText, 10, "introScene.timeToExitText");
m_parent.renderManager.addRenderObject(introScene.timeToExitValue, 10, "introScene.timeToExitValue");
introScene.timeToExitValue.text = String(int((timeToExit / 1000)));
m_parent.renderManager.addRenderObject(introScene.exitControl, 10, "levelScene.exitControl");
introScene.exitControl.buttonMode = true;
introScene.exitControl.quitButton.gotoAndStop(1);
updateSoundButton();
m_parent.renderManager.addRenderObject(introScene.soundControl, 10, "introScene.soundControl");
introScene.soundControl.buttonMode = true;
if (!Constants.ALLOW_LOCAL_DATA){
introScene.exitControl.exitGameText.text = m_parent.fixStr(m_parent.m_localizedString["exitGame"]);
};
m_parent.animationManager.addAnimObj(introScene.people, Constants.ANIM_REPEAT, 0.05, 60, null);
m_parent.animationManager.addAnimObj(introScene.banner, Constants.ANIM_REPEAT, 0.05, 50, null);
m_parent.renderManager.addRenderObject(introScene.background, 10000, "introScene.background");
m_parent.renderManager.addRenderObject(introScene.beams, 5000, "introScene.beams");
m_parent.renderManager.addBottomShape();
if (Constants.ALLOW_INPUT){
inputFieldContainer.moveAllToFront();
};
}
public function addScene2(){
introScene = new IntroScene2();
m_parent.renderManager.addRenderObject(introScene.background, 10000, "introScene.background");
m_parent.renderManager.addRenderObject(introScene.beams, 5000, "introScene.beams");
m_parent.renderManager.addRenderObject(introScene.backgroundPink, 1000, "introScene.backgroundPink");
m_parent.renderManager.addRenderObject(introScene.people, 1500, "introScene.people");
m_parent.renderManager.addRenderObject(introScene.right, 100, "introScene.right");
m_parent.renderManager.addRenderObject(introScene.wrong, 100, "introScene.wrong");
m_parent.renderManager.addRenderObject(introScene.bulb, 100, "introScene.bulb");
m_parent.renderManager.addRenderObject(introScene.x2, 100, "introScene.x2");
m_parent.renderManager.addRenderObject(introScene.bricks, 800, "introScene.bricks");
m_parent.renderManager.addRenderObject(introScene.lines, 700, "introScene.lines");
m_parent.renderManager.addRenderObject(introScene.houseSide, 200, "introScene.houseSide");
if (!Constants.ALLOW_LOCAL_DATA){
introScene.exitControl.exitGameText.text = m_parent.fixStr(m_parent.m_localizedString["exitGame"]);
};
m_parent.renderManager.addRenderObject(introScene.text1, 100, "introScene.text1");
m_parent.renderManager.addRenderObject(introScene.text2, 100, "introScene.text2");
m_parent.renderManager.addRenderObject(introScene.text3, 100, "introScene.text3");
m_parent.renderManager.addRenderObject(introScene.timeToExitValue, 10, "introScene.timeToExitValue");
introScene.timeToExitValue.text = String(int((timeToExit / 1000)));
m_parent.renderManager.addRenderObject(introScene.exitControl, 10, "levelScene.exitControl");
introScene.exitControl.buttonMode = true;
introScene.exitControl.quitButton.gotoAndStop(1);
updateSoundButton();
m_parent.renderManager.addRenderObject(introScene.soundControl, 10, "introScene.soundControl");
introScene.soundControl.buttonMode = true;
if (Constants.ALLOW_INPUT){
inputFieldContainer.moveAllToFront();
};
}
public function clickHandler(_arg1:MouseEvent){
if (_arg1.target == introScene.soundControl.hitBox){
m_parent.soundContainer.soundEnable(!(m_parent.soundContainer.soundEnabled));
} else {
if (_arg1.target == introScene.exitControl.quitButtonHitBox){
m_parent.changeGamestate(GameStatePlay, 2);
} else {
if (state == 1){
state = 2;
} else {
state = 4;
timeToExit = 500;
};
};
};
}
}
}//package gamestate
Section 9
//GameStatePlay (gamestate.GameStatePlay)
package gamestate {
import source.*;
import gamelevel.*;
import flash.utils.*;
public class GameStatePlay extends GameState {
public var bonusAllowed:Boolean;
public var exitGameFlagged:Boolean;
public var state:uint;
public var exitButtonPressed:Boolean;
public var levelPlayfieldCleared:Boolean;
public var advanceToNextLevel:Boolean;
public var currentGameLevel;
public var m_parent:MemoryMatcher;
public var allowedToStartNextLevel:Boolean;
public var timeToExit:int;
public var miniState:uint;
public function GameStatePlay(_arg1:MemoryMatcher){
m_parent = _arg1;
}
public function updateGameOverState(_arg1:int){
timeToExit--;
if (!Constants.ALLOW_LOCAL_DATA){
currentGameLevel.levelScene.timeToExitText.text = m_parent.fixStr(m_parent.m_localizedString["timeToExit"]);
};
currentGameLevel.levelScene.timeToExitValue.text = String(int((timeToExit / Constants.FPS)));
if (Constants.ALLOW_BANNER == true){
m_parent.memoryCardContainer.animateGirder(_arg1, true);
} else {
m_parent.memoryCardContainer.animateGirder(_arg1);
if (miniState == 0){
if (timeToExit <= (8 * Constants.FPS)){
m_parent.renderManager.removeRenderObject(m_parent.memoryCardContainer.balkAnim);
m_parent.memoryCardContainer.cleanMemoryCards();
m_parent.memoryCardContainer.cleanMemoryMiniCards();
if ((((m_parent.currLevel == 1)) && (m_parent.freeGame))){
currentGameLevel.freeGameScene();
} else {
currentGameLevel.gameoverPreScene();
};
miniState = 1;
};
} else {
if (miniState == 1){
if (timeToExit <= (6 * Constants.FPS)){
m_parent.score = (m_parent.score + m_parent.bonus);
if ((((m_parent.currLevel == 1)) && (m_parent.freeGame))){
currentGameLevel.freeGameScene();
} else {
currentGameLevel.gameoverScene();
};
miniState = 2;
allowedToStartNextLevel = true;
};
};
};
if (timeToExit <= 0){
exit();
};
};
}
public function enterFlashCardsState(){
miniState = 0;
state = Constants.GAMESTATEPLAY_FLASH_CARDS;
}
override public function startNextLevel(){
if (allowedToStartNextLevel){
m_parent.gameState = Constants.GAMESTATE_PLAYING;
cleanUp();
m_parent.currLevel++;
startLevel(1);
exitGameFlagged = false;
currentGameLevel.levelScene.exitControl.visible = true;
};
}
public function changeGamelevel(_arg1:Class, _arg2:int){
if (currentGameLevel){
currentGameLevel.exit();
};
currentGameLevel = new _arg1(m_parent, this);
currentGameLevel.enter(_arg2);
}
public function getTimeBonus():int{
var _local1:int;
if (exitButtonPressed){
return (0);
};
_local1 = int((((m_parent.timeLeft * 1) / (m_parent.levelManager.levelArray[m_parent.currLevel].getTimeLimit() * Constants.FPS)) * 500));
return (_local1);
}
override public function exit(){
if (allowedToStartNextLevel){
cleanUp();
m_parent.state = 1;
state = 1000;
};
}
public function getTotalScore():int{
var _local1:int;
_local1 = ((m_parent.score + getTimeBonus()) + getClearBonus());
return (_local1);
}
public function updatePlayGameState(_arg1:int){
m_parent.checkKeyboard();
if (((!(m_parent.soundContainer.isPlaying(Constants.SOUND_START))) && (!(m_parent.soundContainer.isPlaying(Constants.SOUND_MEMMATCH_LOOP))))){
m_parent.soundContainer.stopSound(Constants.SOUND_START);
m_parent.soundContainer.playSound(Constants.SOUND_MEMMATCH_LOOP, 9999, true);
};
m_parent.timeLeft = (m_parent.timeLeft - 1);
m_parent.memoryCardContainer.update(_arg1, m_parent.levelManager.levelArray[m_parent.currLevel]);
m_parent.memoryCardContainer.spawnNewCardOnTime(_arg1, m_parent.levelManager.levelArray[m_parent.currLevel]);
m_parent.memoryCardContainer.manageChosenCards(m_parent.levelManager.levelArray[m_parent.currLevel]);
levelAdvanceCheck();
if (!levelCompleteCheck()){
if (!outOfTimeCheck()){
gameoverCheck();
};
};
}
public function enterLevelCompleteState(_arg1:uint){
var _local2:*;
exitGameFlagged = true;
currentGameLevel.levelScene.exitControl.visible = false;
bonusAllowed = true;
if (_arg1 == Constants.REASON_NEXT_LEVEL_ACCESS){
bonusAllowed = false;
};
allowedToStartNextLevel = false;
miniState = 0;
state = Constants.GAMESTATEPLAY_LEVEL_COMPLETE;
_local2 = 0;
while (_local2 < m_parent.memoryCardContainer.memoryCards.length) {
m_parent.memoryCardContainer.memoryCards[_local2].buttonMode = false;
_local2++;
};
m_parent.soundContainer.stopSound(Constants.SOUND_MEMMATCH_LOOP);
updateBonus();
if (m_parent.currLevel < 2){
m_parent.gameState = Constants.GAMESTATE_LEVELCOMPLETE;
m_parent.soundContainer.playSound(Constants.SOUND_MEM_LEVEL_CLEAR, 0);
timeToExit = (Constants.TIME_TO_EXIT_LEVEL_COMLETE * Constants.FPS);
} else {
m_parent.gameState = Constants.GAMESTATE_GAMEOVER;
m_parent.soundContainer.playSound(Constants.SOUND_MEM_GAMEOVER_POS, 0);
m_parent.endGame((m_parent.score + m_parent.bonus));
timeToExit = (Constants.TIME_TO_EXIT_GAME_COMPLETE * Constants.FPS);
};
}
public function getTotalBonus():int{
var _local1:int;
_local1 = (getTimeBonus() + getClearBonus());
return (_local1);
}
public function enterGetReadyAnimationState(){
var _local1:int;
state = Constants.GAMESTATEPLAY_GET_READY_ANIMATION;
miniState = 0;
if (Constants.ALLOW_START_DELAY){
if (!(Constants.ALLOW_BANNER) == true){
m_parent.animationManager.addAnimObj(currentGameLevel.levelScene.getReady, Constants.ANIM_STAY, 0.02, 10, null);
};
};
_local1 = 0;
while (_local1 < m_parent.memoryCardContainer.memoryCards.length) {
m_parent.memoryCardContainer.memoryCards[_local1].buttonMode = false;
_local1++;
};
}
public function levelCompleteCheck():Boolean{
var _local1:Boolean;
var _local2:uint;
_local1 = (m_parent.memoryCardContainer.getNumCards() == (m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows() * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide()));
_local2 = m_parent.memoryCardContainer.getNumMemoryCards();
if (((_local1) && ((_local2 == 0)))){
enterLevelCompleteState(Constants.REASON_ALL_BLOCKS_CLEARED);
levelPlayfieldCleared = true;
return (true);
};
return (false);
}
public function startLevel(_arg1:uint){
levelPlayfieldCleared = false;
advanceToNextLevel = false;
m_parent.numBlocksRemoved = 0;
m_parent.timeLeft = (m_parent.levelManager.levelArray[m_parent.currLevel].getTimeLimit() * Constants.FPS);
m_parent.renderManager.renderObjectArray = new Array();
m_parent.memoryCardContainer = new MemoryCardContainer(m_parent, m_parent.levelManager.levelArray[m_parent.currLevel]);
m_parent.soundContainer.stopAllSounds();
if (m_parent.currLevel == 0){
changeGamelevel(GameLevel1, -1);
} else {
if (m_parent.currLevel == 1){
changeGamelevel(GameLevel2, -1);
} else {
if (m_parent.currLevel == 2){
changeGamelevel(GameLevel3, -1);
};
};
};
if (_arg1 == 2){
enterGameOverState(Constants.REASON_GAME_QUIT);
} else {
m_parent.soundContainer.playSound(Constants.SOUND_MEM_LEVEL_START, 0);
enterGetReadyAnimationState();
};
}
public function addStartAnimation(){
timeToExit = 0;
if (Constants.ALLOW_START_DELAY){
if (!(Constants.ALLOW_BANNER) == true){
m_parent.animationManager.addAnimObj(currentGameLevel.levelScene.start, Constants.ANIM_ONCE, 0.02, 10, null, true);
};
m_parent.animationManager.removeAnimObj(currentGameLevel.levelScene.getReady);
};
}
public function cleanUp(){
currentGameLevel.cleanScene();
if (m_parent.memoryCardContainer){
m_parent.memoryCardContainer.cleanUpGame();
m_parent.memoryCardContainer = null;
};
m_parent.renderManager.cleanRenderObjectArray();
}
public function getClearBonus():int{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:Number;
if (exitButtonPressed){
return (0);
};
_local1 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumStartRowsFilled() + m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows());
_local2 = (_local1 * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local3 = m_parent.numBlocksRemoved;
_local4 = (_local3 / _local2);
return (int((_local4 * m_parent.levelManager.levelArray[m_parent.currLevel].getClearBonus())));
}
override public function update(_arg1:int){
currentGameLevel.update(_arg1);
if (state == Constants.GAMESTATEPLAY_GET_READY_ANIMATION){
updateGetReadyAnimationState(_arg1);
};
if (state == Constants.GAMESTATEPLAY_FLASH_CARDS){
updateFlashCardsState(_arg1);
};
if (state == Constants.GAMESTATEPLAY_START_ANIMATION){
updateStartAnimationState(_arg1);
} else {
if (state == Constants.GAMESTATEPLAY_PLAY_GAME){
updatePlayGameState(_arg1);
} else {
if (state == Constants.GAMESTATEPLAY_LEVEL_COMPLETE){
updateLevelCompleteState(_arg1);
} else {
if (state == Constants.GAMESTATEPLAY_GAME_OVER){
updateGameOverState(_arg1);
} else {
if (state == 1000){
};
};
};
};
};
}
public function levelAdvanceCheck(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:Boolean;
var _local5:Boolean;
_local1 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumStartRowsFilled() + m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows());
_local2 = (_local1 * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local3 = m_parent.memoryCardContainer.getNumMemoryCards();
_local4 = ((_local3 * 100) <= (_local2 * (100 - m_parent.levelManager.levelArray[m_parent.currLevel].getPercentageCleared())));
_local5 = (m_parent.memoryCardContainer.getNumCards() == (m_parent.levelManager.levelArray[m_parent.currLevel].getNumFillRows() * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide()));
if (((_local5) && (_local4))){
advanceToNextLevel = true;
};
}
public function enterGameOverState(_arg1:uint){
var _local2:*;
bonusAllowed = false;
exitGameFlagged = true;
currentGameLevel.levelScene.exitControl.visible = false;
allowedToStartNextLevel = false;
if (_arg1 == Constants.REASON_GAME_QUIT){
exitButtonPressed = true;
m_parent.soundContainer.stopAllSounds();
if (m_parent.contains(currentGameLevel.levelScene.symbol)){
m_parent.renderManager.removeRenderObject(currentGameLevel.levelScene.symbol);
};
};
m_parent.gameState = Constants.GAMESTATE_GAMEOVER;
state = Constants.GAMESTATEPLAY_GAME_OVER;
miniState = 0;
m_parent.soundContainer.stopSound(Constants.SOUND_MEMMATCH_LOOP);
if (m_parent.animationManager.exist(currentGameLevel.levelScene.getReady)){
m_parent.animationManager.removeAnimObj(currentGameLevel.levelScene.getReady);
};
if (m_parent.animationManager.exist(currentGameLevel.levelScene.start)){
m_parent.animationManager.removeAnimObj(currentGameLevel.levelScene.start);
};
_local2 = 0;
while (_local2 < m_parent.memoryCardContainer.memoryCards.length) {
m_parent.memoryCardContainer.memoryCards[_local2].buttonMode = false;
_local2++;
};
m_parent.soundContainer.playSound(Constants.SOUND_MEM_GAMEOVER_NEG, 0);
updateBonus();
m_parent.endGame((m_parent.score + m_parent.bonus));
timeToExit = (Constants.TIME_TO_EXIT * Constants.FPS);
}
public function updateBonus(){
var _local1:int;
if (bonusAllowed){
_local1 = getTotalBonus();
} else {
_local1 = 0;
};
if (Constants.ALLOW_BANNER == true){
_local1 = 0;
};
m_parent.scoreWithoutBonus = m_parent.score;
m_parent.bonus = _local1;
m_parent.sendToProxy("playData", (((((("65," + m_parent.ticks) + ",") + _local1) + ",") + m_parent.timeLeft) + ",0=0"));
}
override public function enter(_arg1:int){
m_parent.gameState = Constants.GAMESTATE_PLAYING;
state = Constants.GAMESTATEPLAY_GET_READY_ANIMATION;
miniState = 0;
exitButtonPressed = false;
exitGameFlagged = false;
if (Constants.ALLOW_PROXY){
m_parent.sendToProxy("gameStart", "");
};
if (Constants.ALLOW_PROXY){
m_parent.sendToProxy("playData", (((("11," + m_parent.ticks) + ",0,") + Constants.GAME_VERSION) + ",0=0"));
};
startLevel(_arg1);
}
public function updateLevelCompleteState(_arg1:int){
timeToExit--;
if (!Constants.ALLOW_LOCAL_DATA){
if (m_parent.currLevel < 2){
currentGameLevel.levelScene.timeToExitText.text = m_parent.fixStr(m_parent.m_localizedString["timeToStart"]);
} else {
currentGameLevel.levelScene.timeToExitText.text = m_parent.fixStr(m_parent.m_localizedString["timeToExit"]);
};
};
currentGameLevel.levelScene.timeToExitValue.text = String(int((timeToExit / Constants.FPS)));
if (Constants.ALLOW_BANNER == true){
m_parent.memoryCardContainer.animateGirder(_arg1, true);
} else {
m_parent.memoryCardContainer.animateGirder(_arg1);
if (miniState == 0){
if (timeToExit <= (8 * Constants.FPS)){
m_parent.renderManager.removeRenderObject(m_parent.memoryCardContainer.balkAnim);
m_parent.memoryCardContainer.cleanMemoryCards();
m_parent.memoryCardContainer.cleanMemoryMiniCards();
currentGameLevel.levelCompletePreScene();
miniState = 1;
};
} else {
if (miniState == 1){
if ((((timeToExit <= (6 * Constants.FPS))) || ((((timeToExit <= (8 * Constants.FPS))) && ((m_parent.currLevel > 1)))))){
miniState = 2;
m_parent.score = (m_parent.score + m_parent.bonus);
currentGameLevel.levelCompleteScene();
allowedToStartNextLevel = true;
};
} else {
if ((((miniState == 2)) && (!((m_parent.currLevel < 2))))){
currentGameLevel.pullCarriage(_arg1);
};
};
};
if (timeToExit <= 0){
if (m_parent.currLevel < 2){
exitLevelCompleteState();
} else {
exit();
};
};
};
}
public function gameoverCheck():Boolean{
var _local1:int;
var _local2:int;
var _local3:int;
_local1 = (m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksHigh() * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local2 = ((m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksHigh() + 1) * m_parent.levelManager.levelArray[m_parent.currLevel].getNumBlocksWide());
_local3 = _local1;
while (_local3 < _local2) {
if (m_parent.memoryCardContainer.getPlayfieldArray(_local3) == 1){
enterGameOverState(Constants.REASON_BUILT_TO_HIGH);
return (true);
};
_local3++;
};
return (false);
}
public function updateGetReadyAnimationState(_arg1:int){
if (Constants.ALLOW_START_DELAY){
enterFlashCardsState();
} else {
enterFlashCardsState();
};
}
public function updateStartAnimationState(_arg1:int){
var _local2:int;
if (miniState == 0){
timeToExit--;
if (timeToExit <= 0){
timeToExit = (timeToExit + 100000);
m_parent.soundContainer.stopAllSounds();
m_parent.soundContainer.playSound(Constants.SOUND_START, 0);
};
if (Constants.ALLOW_FLASHING){
_local2 = 0;
while (_local2 < m_parent.memoryCardContainer.memoryCards.length) {
m_parent.memoryCardContainer.memoryCards[_local2].myWindow.updateCurtain(_arg1);
_local2++;
};
};
if (Constants.ALLOW_START_DELAY){
if (!m_parent.animationManager.exist(currentGameLevel.levelScene.start)){
miniState = 1;
};
} else {
miniState = 1;
};
} else {
if (miniState == 1){
m_parent.sendToProxy("playData", (("5," + m_parent.ticks) + ",0=0"));
exitStartAnimationState();
};
};
}
public function exitStartAnimationState(){
if (Constants.ALLOW_START_DELAY){
m_parent.renderManager.removeRenderObject(currentGameLevel.levelScene.start);
};
enterPlayGameState();
}
public function exitLevelCompleteState(){
m_parent.sendToProxy("playData", (((("1," + m_parent.ticks) + ",") + "exitLevelCompleteState") + ",0=0"));
startNextLevel();
}
public function enterPlayGameState(){
var _local1:int;
if ((((m_parent.currLevel == 1)) && (m_parent.freeGame))){
enterGameOverState(Constants.REASON_FREEGAME);
} else {
_local1 = 0;
while (_local1 < m_parent.memoryCardContainer.memoryCards.length) {
m_parent.memoryCardContainer.memoryCards[_local1].buttonMode = true;
_local1++;
};
m_parent.memoryCardContainer.setTimeToSpawnCard(0);
state = Constants.GAMESTATEPLAY_PLAY_GAME;
};
}
public function updateFlashCardsState(_arg1:int){
if (Constants.ALLOW_FLASHING){
if (m_parent.memoryCardContainer.flashThroughAllBlocks(m_parent.levelManager.levelArray[m_parent.currLevel], _arg1) == 1){
enterStartAnimationState();
};
} else {
addStartAnimation();
enterStartAnimationState();
};
}
public function outOfTimeCheck():Boolean{
if (m_parent.timeLeft < 0){
m_parent.timeLeft = 0;
if (advanceToNextLevel){
enterLevelCompleteState(Constants.REASON_NEXT_LEVEL_ACCESS);
} else {
enterGameOverState(Constants.REASON_OUT_OF_TIME);
};
return (true);
} else {
if ((((m_parent.timeLeft <= (5 * Constants.FPS))) && (!(m_parent.playedTimeRunningOut)))){
m_parent.playedTimeRunningOut = true;
m_parent.soundContainer.playSound(Constants.SOUND_TIME_IS_RUNNING_OUT, 0);
};
};
return (false);
}
public function enterStartAnimationState(){
m_parent.soundContainer.stopAllSounds();
miniState = 0;
state = Constants.GAMESTATEPLAY_START_ANIMATION;
}
}
}//package gamestate
Section 10
//GameStateReceiveGameData (gamestate.GameStateReceiveGameData)
package gamestate {
import source.*;
public class GameStateReceiveGameData extends GameState {
public var m_parent:MemoryMatcher;
public function GameStateReceiveGameData(_arg1:MemoryMatcher){
m_parent = _arg1;
}
override public function enter(_arg1:int){
m_parent.gameState = Constants.GAMESTATE_WAITING_FOR_GAMEDATA;
}
override public function update(_arg1:int){
m_parent.receiveGameData();
}
override public function exit(){
}
}
}//package gamestate
Section 11
//balk_anim_getReady_long_568 (memoryMatcher_fla.balk_anim_getReady_long_568)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class balk_anim_getReady_long_568 extends MovieClip {
public var getReady:MovieClip;
}
}//package memoryMatcher_fla
Section 12
//balk_anim_start_509 (memoryMatcher_fla.balk_anim_start_509)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class balk_anim_start_509 extends MovieClip {
public var start:MovieClip;
public var getReady:MovieClip;
}
}//package memoryMatcher_fla
Section 13
//balk_anim_start_long_541 (memoryMatcher_fla.balk_anim_start_long_541)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class balk_anim_start_long_541 extends MovieClip {
public var start:MovieClip;
public var getReady:MovieClip;
}
}//package memoryMatcher_fla
Section 14
//carriage_545 (memoryMatcher_fla.carriage_545)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class carriage_545 extends MovieClip {
public var sausage:Sausage_anim;
public var pinkguy:Pinkguy_anim;
public var napoleon:Napoleon_anim;
public var carriage_back:MovieClip;
public var eye:Eye_anim;
public var cactus:Cactus_anim;
public var carriage_front:MovieClip;
public var dog:Dog_anim;
public var flower:Flower_anim;
public var octopus:Octopus_anim;
public var fish:Fish_anim;
public var turtle:Turtle_anim;
public var greenguy:Greenguy_anim;
public var owl:Owl_anim;
public var bunny:Bunny_anim;
public var king:King_anim;
public var ghost:Ghost_anim;
public var confetti:MovieClip;
public var aristo:Aristo_anim;
public var lavalamp:Lavalamp_anim;
public var birdy:Birdy_anim;
}
}//package memoryMatcher_fla
Section 15
//exitControl_222 (memoryMatcher_fla.exitControl_222)
package memoryMatcher_fla {
import flash.display.*;
import flash.text.*;
public dynamic class exitControl_222 extends MovieClip {
public var quitButton:MovieClip;
public var exitGameText:TextField;
public var quitButtonHitBox:MovieClip;
}
}//package memoryMatcher_fla
Section 16
//freeTextMC_539 (memoryMatcher_fla.freeTextMC_539)
package memoryMatcher_fla {
import flash.display.*;
import flash.text.*;
public dynamic class freeTextMC_539 extends MovieClip {
public var freeText:TextField;
}
}//package memoryMatcher_fla
Section 17
//getready_anim_511 (memoryMatcher_fla.getready_anim_511)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class getready_anim_511 extends MovieClip {
public var getReady:MovieClip;
}
}//package memoryMatcher_fla
Section 18
//getready_txt_512 (memoryMatcher_fla.getready_txt_512)
package memoryMatcher_fla {
import flash.display.*;
import flash.text.*;
public dynamic class getready_txt_512 extends MovieClip {
public var getReady:TextField;
}
}//package memoryMatcher_fla
Section 19
//soundControl_219 (memoryMatcher_fla.soundControl_219)
package memoryMatcher_fla {
import flash.display.*;
import flash.text.*;
public dynamic class soundControl_219 extends MovieClip {
public var soundText:TextField;
public var soundButton:MovieClip;
public var hitBox:MovieClip;
}
}//package memoryMatcher_fla
Section 20
//start_txt_510 (memoryMatcher_fla.start_txt_510)
package memoryMatcher_fla {
import flash.display.*;
import flash.text.*;
public dynamic class start_txt_510 extends MovieClip {
public var start:TextField;
}
}//package memoryMatcher_fla
Section 21
//wreckingball_anim_164 (memoryMatcher_fla.wreckingball_anim_164)
package memoryMatcher_fla {
import flash.display.*;
public dynamic class wreckingball_anim_164 extends MovieClip {
public var wreckingBallAnim:MovieClip;
}
}//package memoryMatcher_fla
Section 22
//AnimationManager (source.AnimationManager)
package source {
import flash.utils.*;
public class AnimationManager {
public var animObjArray:Array;
public var m_parent;
public function AnimationManager(_arg1:MemoryMatcher){
m_parent = _arg1;
}
public function animate(_arg1, _arg2){
var _local3:*;
var _local4:uint;
var _local5:*;
if ((((((((((_arg2.allow == null)) || (_arg2.allow.allow))) && ((_arg2.startTime < getTimer())))) || (_arg2.running))) && (!((_arg2.state == 2))))){
_arg2.running = true;
if (_arg2.state == 0){
m_parent.renderManager.addRenderObject(_arg2.object, _arg2.zbuffer, _arg2.id, _arg2.scale);
_arg2.object.gotoAndStop(_arg2.frame);
_arg2.state = 1;
} else {
if (_arg2.state == 1){
_local3 = _arg2.object.totalFrames;
if (_arg2.type == Constants.ANIM_MARKER){
_local3 = 28;
};
if (_arg2.object.textscore){
_arg2.object.textscore.text = _arg2.text;
};
_arg2.frame = (_arg2.frame + (_arg2.speed * _arg1));
_local4 = Math.round(_arg2.frame);
if (_arg2.frame > _local3){
_arg2.frame = _local3;
};
_arg2.object.gotoAndStop(_local4);
_local5 = false;
if (_local3 == _arg2.frame){
_local5 = true;
};
if (_local5){
if (_arg2.type == Constants.ANIM_ONCE){
_arg2.state = 2;
removeAnimObj(_arg2.object);
_arg2.running = false;
} else {
if (_arg2.type == Constants.ANIM_STAY){
_arg2.state = 2;
_arg2.running = false;
} else {
if (_arg2.type == Constants.ANIM_REPEAT){
_arg2.state = 1;
_arg2.frame = 1;
_arg2.running = false;
} else {
if (_arg2.type == Constants.ANIM_ONCE_AND_RESET){
_arg2.frame = 1;
_arg2.object.gotoAndStop(_arg2.frame);
_arg2.state = 2;
_arg2.running = false;
} else {
if (_arg2.type == Constants.ANIM_REPEAT_TAIL){
_arg2.state = 1;
_arg2.frame = (_local3 - 30);
} else {
if (_arg2.type == Constants.ANIM_MARKER){
_arg2.state = 1;
_arg2.frame = 8;
} else {
trace("ERROR: animate type");
};
};
};
};
};
};
};
};
};
};
}
public function removeAnimObj(_arg1){
var _local2:*;
m_parent.renderManager.removeRenderObject(_arg1);
if (_arg1){
if (animObjArray){
_local2 = 0;
while (_local2 < animObjArray.length) {
if (animObjArray[_local2]){
if (animObjArray[_local2].object){
if (animObjArray[_local2].object == _arg1){
animObjArray.splice(_local2, 1);
};
};
};
_local2++;
};
};
};
}
public function cleanAnimObjArray(){
var _local1:*;
if (animObjArray){
_local1 = (animObjArray.length - 1);
while (_local1 >= 0) {
if (animObjArray[_local1]){
if (animObjArray[_local1].object){
if (m_parent.contains(animObjArray[_local1].object)){
m_parent.removeChild(animObjArray[_local1].object);
};
};
animObjArray[_local1] = null;
};
animObjArray.pop();
_local1--;
};
animObjArray = null;
};
}
public function addAnimObj(_arg1, _arg2:uint, _arg3:Number, _arg4:uint, _arg5, _arg6:Boolean=false, _arg7:Number=0, _arg8:String="", _arg9:String="animation not named yet!", _arg10=true){
var _local11:*;
_local11 = new Object();
_local11.object = _arg1;
_local11.allow = _arg5;
_local11.state = 0;
_local11.frame = 1;
_local11.type = _arg2;
_local11.speed = _arg3;
_local11.zbuffer = _arg4;
_local11.running = false;
_local11.startTime = _arg7;
_local11.text = _arg8;
_local11.id = _arg9;
_local11.scale = _arg10;
animObjArray.push(_local11);
if (_arg6){
m_parent.renderManager.addRenderObject(_local11.object, _local11.zbuffer, _local11.id, _local11.scale);
_local11.object.gotoAndStop(_local11.frame);
_local11.state = 1;
};
}
public function update(_arg1:int){
var _local2:*;
if (animObjArray){
_local2 = 0;
while (_local2 < animObjArray.length) {
animate(_arg1, animObjArray[_local2]);
_local2++;
};
};
}
public function exist(_arg1){
var _local2:*;
if (_arg1){
if (animObjArray){
_local2 = 0;
while (_local2 < animObjArray.length) {
if (animObjArray[_local2]){
if (animObjArray[_local2].object){
if (animObjArray[_local2].object == _arg1){
return (true);
};
};
};
_local2++;
};
};
};
return (false);
}
}
}//package source
Section 23
//BulbAnim (source.BulbAnim)
package source {
import flash.display.*;
public dynamic class BulbAnim extends MovieClip {
}
}//package source
Section 24
//Constants (source.Constants)
package source {
public class Constants {
public static const GAMESTATEPLAY_LEVEL_COMPLETE:uint = 3;
public static const TEXT_TIME_NEXT_ROW:uint = 2;
public static const SOUND_TYPE_MUSIC:uint = 1;
public static const SETT_PERCENTAGE_FACEUPLOCKED_BLOCKS:uint = 0;
public static const GAMESTATEPLAY_LAST_LEVEL_CLEARED:uint = 5;
public static const GAMESTATE_LEVELCOMPLETE:uint = 3;
public static const CARD_SPEED_FALL_BOOST:Number = 0.05;
public static const PLAYGROUND_HEIGHT:uint = 475;
public static const REASON_ALL_BLOCKS_CLEARED:uint = 2;
public static const SETT_PERCENTAGE_PEEKABOO:uint = 8;
public static const ANIM_MARKER:uint = 5;
public static const JOKER_NEUTRAL:uint = 1000;
public static const TIME_TO_EXIT_INTRO:uint = 20;
public static const REASON_GAME_QUIT:uint = 6;
public static const INTRO_SCENE1_RUN:uint = 1;
public static const GAMESTATE_GAMEOVER:uint = 2;
public static const ALLOW_FLASHING:Boolean = true;
public static const REASON_NO_MORE_COMBINATIONS:uint = 3;
public static const SCENE_BANNER_300x200:int = 3;
public static const SETT_NUM_FILL_ROWS:uint = 1;
public static const GAMESTATEPLAY_PLAY_GAME:uint = 2;
public static const CARD_BACKSIDE_GOLD:uint = 2;
public static const INTRO_SCENE1_INIT:uint = 0;
public static const ALLOW_SOUND:Boolean = true;
public static const CARD_BACKSIDE_NORMAL:uint = 0;
public static const CARD_WAIT_MULTI:int = 1000;
public static const ANIM_ONCE_AND_RESET:uint = 3;
public static const POP_SCORE_POS:uint = 0;
public static const TEXT_BONUS:uint = 3;
public static const SETT_FALL_SPEED:uint = 4;
public static const GOLD_GAME = true;
public static const ANIM_BULB:uint = 1;
public static const ALLOW_CHEAT_MODE:Boolean = false;
public static const SCENE_BANNER_160x600:int = 2;
public static const ANIM_POP_PAIR_STARBONUS:uint = 3;
public static const INTRO_SOUND_FADE_OUT:uint = 4;
public static const ALLOW_TRACE = false;
public static const ALLOW_SCALE = false;
public static const CARD_BACKSIDE_PEEKABOO:uint = 1;
public static const ALLOW_RANDOM:uint = 8;
public static const ANIM_POP_PAIR:uint = 2;
public static const TEXT_TIME:uint = 0;
public static const REASON_GAME_END:uint = 5;
public static const REASON_OUT_OF_TIME:uint = 0;
public static const SETT_NUM_DIFFERENT_BLOCK_FACES:uint = 6;
public static const TIME_TO_EXIT_INTRO_1:uint = 5;
public static const PLAYGROUND_TOP:uint = 0;
public static const CURTAIN_CLOSE_SPEED:Number = 0.05;
public static const SOUND_MEM_LEVEL_CLEAR:uint = 7;
public static const JOKER_CARD_ADD:uint = 1000;
public static const GAMESTATE_WAITING_FOR_GAMEDATA:uint = 8;
public static const FPS:uint = 25;
public static const SOUND_MEM_LEVEL_START:uint = 8;
public static const ALLOW_CRITICAL_TIME:uint = 5;
public static const GAMESTATEPLAY_START_ANIMATION:uint = 6;
public static const ALLOW_TRUE:uint = 1;
public static const BACKGROUND_LEVEL_COMPLETE:uint = 1;
public static const SOUND_TYPE_EFFECT:uint = 0;
public static const SCENE_BANNER_300x250:int = 0;
public static const TIME_TO_EXIT:uint = 10;
public static const INIT_STARTLEVEL:uint = 0;
public static const SOUND_START:uint = 13;
public static const ALLOW_LOCAL_DATA:Boolean = false;
public static const INTRO_SCENE2_INIT:uint = 2;
public static const SOUND_NO_MATCH:uint = 11;
public static const ANIM_HORN:uint = 0;
public static const CARD_BACKSIDE_BULB:uint = 3;
public static const SETT_PERCENTAGE_GOLD:uint = 9;
public static const ALLOW_BANNER = false;
public static const SOUND_MEMMATCH_GAMESONG:uint = 9;
public static const ALLOW_START_DELAY:Boolean = true;
public static const SOUND_MEM_GAMEOVER_NEG:uint = 5;
public static const ALLOW_INPUT:Boolean = false;
public static const BACKGROUND_PLAYGAME:uint = 0;
public static const SOUND_CARDMATCH_GOLD:uint = 4;
public static const CARD_SPEED_FALL_REARRANGE:Number = 0.5;
public static const BANNER:int = SCENE_BANNER_300x250;
public static const REASON_NEXT_LEVEL_ACCESS:uint = 4;
public static const INTRO_EXIT:uint = 6;
public static const CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED:int = 1;
public static const CARD_SCALE:Number = 0.9;
public static const GAMESTATEPLAY_GAME_OVER:uint = 4;
public static const CARD_BACK_SIDE:int = 0;
public static const CARD_FRONT_SIDE_JOKER_SPECIFIED:int = 2;
public static const ALLOW_LEVEL_PLAYFIELD_CLEARED:uint = 7;
public static const ANIM_REPEAT_TAIL:uint = 4;
public static const GAMESTATEPLAY_FLASH_CARDS:uint = 1;
public static const REASON_BUILT_TO_HIGH:uint = 1;
public static const CARD_CURRENT_SIDE:int = 3;
public static const TEXT_LINES:uint = 1;
public static const SOUND_MEMMATCH_LOOP:uint = 10;
public static const SETT_NUM_START_ROWS_FILLED:uint = 7;
public static const SOUND_TIME_IS_RUNNING_OUT:uint = 12;
public static const SETT_CURR_LEVEL:uint = 11;
public static const TIME_MINUTE_IN_SECONDS:uint = 60;
public static const BACKGROUND_PAUSED:uint = 3;
public static const ALLOW_DT:Boolean = false;
public static const GAME_VERSION:Number = 1.03061225;
public static const GAMESTATE_RESTART:uint = 10;
public static const ALLOW_COMBOS_5:uint = 4;
public static const SETT_NEW_ROW_DELAY:uint = 3;
public static const ALLOW_COMBOS_2:uint = 6;
public static const ALLOW_COMBOS_4:uint = 3;
public static const TICKS_PER_SECOND:Number = 25;
public static const ANIM_REPEAT:uint = 2;
public static const GAMESTATE_PLAYING:uint = 7;
public static const ALLOW_LEVEL_COMPLETE:uint = 0;
public static const SCENE_BANNER_728x90:int = 1;
public static const POP_SCORE_NEG:uint = 1;
public static const INTRO_SKIP:uint = 5;
public static const TIME_TO_EXIT_LEVEL_COMLETE:uint = 10;
public static const ALLOW_ADVANCE_TO_NEXT_LEVEL:uint = 2;
public static const ALLOW_INTRO:Boolean = true;
public static const ALLOW_PROXY:Boolean = true;
public static const SETT_PERCENTAGE_BULB:uint = 10;
public static const SOUND_CARDMATCH_5:uint = 14;
public static const CARD_WAIT_NO_MULTI:int = 400;
public static const SOUND_CARDMATCH_2:uint = 1;
public static const SOUND_CARDMATCH_3:uint = 2;
public static const SOUND_CARDMATCH_4:uint = 3;
public static const INTRO_SCENE2_RUN:uint = 3;
public static const GAMESTATE_PAUSED:uint = 1;
public static const ANIM_STAY:uint = 1;
public static const GAMESTATE_INTRO:uint = 5;
public static const BACKGROUND_GAMEOVER:uint = 2;
public static const GAMESTATEPLAY_GET_READY_ANIMATION:uint = 0;
public static const SOUND_MEM_GAMEOVER_POS:uint = 6;
public static const TIME_TO_EXIT_GAME_COMPLETE:uint = 12;
public static const JOKER_START_CARD:uint = 1000;
public static const CARD_SEPARATION_SPAWN_TIME:uint = 200;
public static const GAMESTATE_SETUP:uint = 6;
public static const CURTAIN_OPEN_SPEED:Number = 0.05;
public static const SETT_TIME_LIMIT:uint = 2;
public static const SOUND_CARDMATCH_1:uint = 0;
public static const ANIM_ONCE:uint = 0;
public static const SETT_PERCENTAGE_CLEARED:uint = 5;
public static const REASON_FREEGAME:uint = 7;
public static var PLAYGROUND_LEFT:uint = 0;
public static var allow_multiple_selection:Boolean = false;
public static var PLAYGROUND_BOTTOM:uint = 0;
public static var CARD_HEIGHT:uint = 0;
public static var SCENE_SCALE_X:Number = 0;
public static var SCENE_SCALE_Y:Number = 0;
public static var CARD_WIDTH:uint = 0;
if (ALLOW_BANNER == true){
if (BANNER == SCENE_BANNER_300x250){
SCENE_SCALE_X = 0.7;
SCENE_SCALE_Y = 0.7;
CARD_WIDTH = int(((60 * CARD_SCALE) * SCENE_SCALE_X));
CARD_HEIGHT = int(((60 * CARD_SCALE) * SCENE_SCALE_Y));
PLAYGROUND_LEFT = ((240 + (CARD_WIDTH / 2)) - 210);
PLAYGROUND_BOTTOM = ((510 - (CARD_HEIGHT / 2)) - 290);
} else {
if (BANNER == SCENE_BANNER_728x90){
SCENE_SCALE_X = 1;
SCENE_SCALE_Y = 1;
CARD_WIDTH = int(((60 * CARD_SCALE) * SCENE_SCALE_X));
CARD_HEIGHT = int(((60 * CARD_SCALE) * SCENE_SCALE_Y));
PLAYGROUND_LEFT = ((240 + (CARD_WIDTH / 2)) - 200);
PLAYGROUND_BOTTOM = ((510 - (CARD_HEIGHT / 2)) - 430);
} else {
if (BANNER == SCENE_BANNER_160x600){
SCENE_SCALE_X = 1;
SCENE_SCALE_Y = 1;
CARD_WIDTH = int(((60 * CARD_SCALE) * SCENE_SCALE_X));
CARD_HEIGHT = int(((60 * CARD_SCALE) * SCENE_SCALE_Y));
PLAYGROUND_LEFT = ((240 + (CARD_WIDTH / 2)) - 240);
PLAYGROUND_BOTTOM = (510 - (CARD_HEIGHT / 2));
} else {
if (BANNER == SCENE_BANNER_300x200){
SCENE_SCALE_X = 0.7;
SCENE_SCALE_Y = 0.7;
CARD_WIDTH = int(((60 * CARD_SCALE) * SCENE_SCALE_X));
CARD_HEIGHT = int(((60 * CARD_SCALE) * SCENE_SCALE_Y));
PLAYGROUND_LEFT = ((240 + (CARD_WIDTH / 2)) - 210);
PLAYGROUND_BOTTOM = ((510 - (CARD_HEIGHT / 2)) - 290);
};
};
};
};
} else {
CARD_WIDTH = int((60 * CARD_SCALE));
CARD_HEIGHT = int((60 * CARD_SCALE));
PLAYGROUND_LEFT = (240 + (CARD_WIDTH / 2));
PLAYGROUND_BOTTOM = (510 - (CARD_HEIGHT / 2));
};
}
}//package source
Section 25
//Curtains (source.Curtains)
package source {
import flash.display.*;
public class Curtains extends MovieClip {
private var curtainFrame:Number;
public function Curtains(_arg1:int, _arg2:Boolean){
setupStartFrame(_arg1, _arg2);
}
public function setCurtainFrame(_arg1:uint):void{
curtainFrame = _arg1;
}
public function updateCurtain(_arg1:int, _arg2:int, _arg3:int, _arg4:Array, _arg5:Number, _arg6:Boolean, _arg7:Number):Boolean{
if (_arg2 == _arg4[Constants.CARD_BACK_SIDE]){
_arg6 = closeCurtain(_arg3, _arg5, _arg1, _arg6);
} else {
_arg6 = openCurtain(_arg3, _arg7, _arg1, _arg6);
};
return (_arg6);
}
public function setupStartFrame(_arg1:int, _arg2:Boolean){
var _local3:uint;
var _local4:uint;
_local3 = (1 + (20 * _arg1));
_local4 = (20 + (20 * _arg1));
if (_arg2){
if (_arg1 == Constants.CARD_BACKSIDE_BULB){
curtainFrame = 1;
} else {
curtainFrame = _local3;
};
} else {
if (_arg1 == Constants.CARD_BACKSIDE_BULB){
curtainFrame = 20;
} else {
curtainFrame = _local4;
};
};
this.gotoAndStop(curtainFrame);
}
public function closeCurtain(_arg1:int, _arg2:Number, _arg3:int, _arg4:Boolean):Boolean{
var _local5:uint;
var _local6:uint;
_local5 = (20 + (20 * _arg1));
if (_arg1 == Constants.CARD_BACKSIDE_BULB){
_local5 = 20;
};
if (curtainFrame < _local5){
if (curtainFrame <= (_local5 - (_arg2 * _arg3))){
curtainFrame = (curtainFrame + (_arg2 * _arg3));
} else {
curtainFrame = _local5;
};
} else {
_arg2 = Constants.CURTAIN_CLOSE_SPEED;
_arg4 = true;
};
_local6 = Math.floor(curtainFrame);
this.gotoAndStop(_local6);
return (_arg4);
}
public function openCurtain(_arg1:int, _arg2:Number, _arg3:int, _arg4:Boolean):Boolean{
var _local5:uint;
var _local6:uint;
_local5 = (1 + (20 * _arg1));
if (_arg1 == Constants.CARD_BACKSIDE_BULB){
_local5 = 1;
};
_arg4 = false;
if (curtainFrame > _local5){
if (curtainFrame >= (_local5 + (_arg2 * _arg3))){
curtainFrame = (curtainFrame - (_arg2 * _arg3));
} else {
curtainFrame = _local5;
};
} else {
_arg2 = Constants.CURTAIN_OPEN_SPEED;
};
_local6 = Math.floor(curtainFrame);
this.gotoAndStop(_local6);
return (_arg4);
}
}
}//package source
Section 26
//HornAnim (source.HornAnim)
package source {
import flash.display.*;
public dynamic class HornAnim extends MovieClip {
}
}//package source
Section 27
//InputFieldContainer (source.InputFieldContainer)
package source {
import flash.display.*;
public class InputFieldContainer {
public var m_parent;
private var inputFieldArray:Array;
public var background:Shape;
public function InputFieldContainer(_arg1){
m_parent = _arg1;
}
public function addInputFields(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
addbackGround(_arg1);
_local2 = 120;
_local3 = 30;
_local4 = 510;
_local5 = 200;
_local6 = 0;
inputFieldArray = new Array();
inputFieldArray[Constants.SETT_PERCENTAGE_FACEUPLOCKED_BLOCKS] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Faceup blocks(%): ", 3);
_local6++;
inputFieldArray[Constants.SETT_NUM_FILL_ROWS] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Fill rows: ", 3);
_local6++;
inputFieldArray[Constants.SETT_TIME_LIMIT] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Time limit(sek): ", 3);
_local6++;
inputFieldArray[Constants.SETT_NEW_ROW_DELAY] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Row delay(sek): ", 3);
_local6++;
inputFieldArray[Constants.SETT_FALL_SPEED] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Fall speed: ", 3);
_local6++;
inputFieldArray[Constants.SETT_PERCENTAGE_CLEARED] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Clean limit(%): ", 3);
_local6++;
inputFieldArray[Constants.SETT_NUM_DIFFERENT_BLOCK_FACES] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Different cards(1-6): ", 3);
_local6++;
inputFieldArray[Constants.SETT_NUM_START_ROWS_FILLED] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Fill rows from start: ", 3);
_local6++;
inputFieldArray[Constants.SETT_PERCENTAGE_PEEKABOO] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Peekaboo(%): ", 3);
_local6++;
inputFieldArray[Constants.SETT_PERCENTAGE_GOLD] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Gold(%): ", 3);
_local6++;
inputFieldArray[Constants.SETT_PERCENTAGE_BULB] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Bulb(%): ", 3);
_local6++;
inputFieldArray[Constants.SETT_CURR_LEVEL] = new InputText(_arg1, _local4, ((_local6 * _local3) + _local5), _local2, 20, 0xFF0000, "Level(1-3): ", 1);
_local6++;
readStoredInputFieldParams(_arg1);
updateToInputFields(_arg1);
}
public function cleanUp(_arg1){
var _local2:int;
if (inputFieldArray){
_local2 = (inputFieldArray.length - 1);
while (_local2 >= 0) {
inputFieldArray[_local2].clean(_arg1);
inputFieldArray[_local2] = null;
inputFieldArray.pop();
_local2--;
};
};
inputFieldArray = null;
if (background){
_arg1.removeChild(background);
background = null;
};
}
public function moveAllToFront(){
var _local1:int;
_local1 = (inputFieldArray.length - 1);
while (_local1 >= 0) {
inputFieldArray[_local1].moveAllToFront(m_parent);
_local1--;
};
}
public function addbackGround(_arg1){
background = new Shape();
background.graphics.beginFill(0xCCCCCC);
background.graphics.drawRect(500, 190, 250, 370);
background.graphics.endFill();
background.alpha = 0.5;
_arg1.addChild(background);
}
public function updateFromInputFields(_arg1){
var _local2:*;
var _local3:Array;
var _local4:*;
var _local5:*;
var _local6:*;
_arg1.myLocalData.data.setupSettings = new Array();
if (inputFieldArray[Constants.SETT_CURR_LEVEL].myInputField[0].length > 0){
_arg1.currLevel = int((inputFieldArray[Constants.SETT_CURR_LEVEL].myInputField[0].text - 1));
_arg1.myLocalData.data.currLevel = _arg1.currLevel;
};
_local2 = 0;
while (_local2 < (inputFieldArray.length - 1)) {
_local3 = new Array();
_local4 = 0;
while (_local4 < inputFieldArray[_local2].numInputFields) {
_local5 = inputFieldArray[_local2];
if (_local5.myInputField[_local4].length > 0){
_local6 = int(_local5.myInputField[_local4].text);
_arg1.levelManager.levelArray[_local4].setSetting(_local2, _local6);
_local3[_local4] = _local6;
};
_local4++;
};
_arg1.myLocalData.data.setupSettings[_local2] = _local3;
_local2++;
};
}
public function readStoredInputFieldParams(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
if (_arg1.myLocalData.data.currLevel){
_arg1.currLevel = _arg1.myLocalData.data.currLevel;
};
_local2 = 0;
while (_local2 < (inputFieldArray.length - 1)) {
if (((inputFieldArray) && (inputFieldArray[_local2]))){
_local3 = 0;
while (_local3 < inputFieldArray[_local2].numInputFields) {
if (((((((_arg1.myLocalData.data.setupSettings) && (_arg1.myLocalData.data.setupSettings))) && (_arg1.myLocalData.data.setupSettings[_local2]))) && (_arg1.myLocalData.data.setupSettings[_local2][_local3]))){
_local4 = _arg1.myLocalData.data.setupSettings[_local2][_local3];
_arg1.levelManager.levelArray[_local3].setSetting(_local2, _local4);
};
_local3++;
};
};
_local2++;
};
}
public function updateToInputFields(_arg1){
var _local2:*;
var _local3:*;
_local2 = 3;
_local3 = 0;
while (_local3 < _local2) {
inputFieldArray[Constants.SETT_PERCENTAGE_FACEUPLOCKED_BLOCKS].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getChanceOfFaceupBlock();
inputFieldArray[Constants.SETT_NUM_FILL_ROWS].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getNumFillRows();
inputFieldArray[Constants.SETT_TIME_LIMIT].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getTimeLimit();
inputFieldArray[Constants.SETT_NEW_ROW_DELAY].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getNewRowDelay();
inputFieldArray[Constants.SETT_FALL_SPEED].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getFallSpeed();
inputFieldArray[Constants.SETT_PERCENTAGE_CLEARED].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getPercentageCleaned();
inputFieldArray[Constants.SETT_NUM_DIFFERENT_BLOCK_FACES].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getNumDifferentBlockFaces();
inputFieldArray[Constants.SETT_NUM_START_ROWS_FILLED].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getNumStartRowsFilled();
inputFieldArray[Constants.SETT_PERCENTAGE_PEEKABOO].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getPercentagePeekaboo();
inputFieldArray[Constants.SETT_PERCENTAGE_GOLD].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getPercentageGold();
inputFieldArray[Constants.SETT_PERCENTAGE_BULB].myInputField[_local3].text = _arg1.levelManager.levelArray[_local3].getPercentageBulb();
_local3++;
};
inputFieldArray[Constants.SETT_CURR_LEVEL].myInputField[0].text = (_arg1.currLevel + 1);
}
}
}//package source
Section 28
//InputText (source.InputText)
package source {
import flash.text.*;
public class InputText {
public var myLabel:TextField;
private var myLabelText:String;
public var inputFieldsCounter:uint;
public var myInputField:Array;
public var numInputFields:uint;
public function InputText(_arg1:MemoryMatcher, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:uint, _arg6, _arg7:String, _arg8:uint){
var _local9:uint;
super();
inputFieldsCounter = 0;
myInputField = new Array();
addLabel(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
updateLabelText(_arg7);
_local9 = 0;
while (_local9 < _arg8) {
addInputField(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
_local9++;
};
numInputFields = _arg8;
}
public function addLabel(_arg1:MemoryMatcher, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:uint){
myLabel = new TextField();
_arg1.addChild(myLabel);
myLabel.x = _arg2;
myLabel.y = _arg3;
myLabel.width = _arg4;
myLabel.height = _arg5;
myLabel.textColor = _arg6;
myLabel.selectable = false;
}
public function moveToFront(_arg1, _arg2):void{
_arg2.setChildIndex(_arg1, (_arg2.numChildren - 1));
}
public function clean(_arg1){
var _local2:int;
_arg1.removeChild(myLabel);
myLabel = null;
if (myInputField){
_local2 = (myInputField.length - 1);
while (_local2 >= 0) {
_arg1.removeChild(myInputField[_local2]);
myInputField[_local2] = null;
myInputField.pop();
_local2--;
};
myInputField = null;
};
}
private function updateLabel():void{
myLabel.text = myLabelText;
}
public function showText(_arg1:MemoryMatcher, _arg2:Boolean):void{
var _local3:uint;
_local3 = 0;
while (_local3 < myInputField.length) {
myInputField[_local3].visible = _arg2;
if (_arg2){
moveToFront(myInputField[_local3], _arg1);
};
_local3++;
};
myLabel.visible = _arg2;
if (_arg2){
moveToFront(myLabel, _arg1);
};
}
public function addInputField(_arg1:MemoryMatcher, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:uint){
myInputField.push(new TextField());
_arg1.addChild(myInputField[inputFieldsCounter]);
myInputField[inputFieldsCounter].x = ((_arg2 + 120) + (inputFieldsCounter * 40));
myInputField[inputFieldsCounter].y = _arg3;
myInputField[inputFieldsCounter].width = 30;
myInputField[inputFieldsCounter].height = _arg5;
myInputField[inputFieldsCounter].textColor = _arg6;
myInputField[inputFieldsCounter].type = TextFieldType.INPUT;
myInputField[inputFieldsCounter].selectable = true;
myInputField[inputFieldsCounter].border = true;
inputFieldsCounter++;
}
public function setVisible(_arg1:Boolean):void{
myLabel.visible = _arg1;
myInputField.visible = _arg1;
}
public function moveAllToFront(_arg1){
var _local2:uint;
_local2 = 0;
while (_local2 < myInputField.length) {
moveToFront(myInputField[_local2], _arg1);
_local2++;
};
moveToFront(myLabel, _arg1);
}
public function updateLabelText(_arg1:String):void{
myLabelText = _arg1;
updateLabel();
}
}
}//package source
Section 29
//KeyboardHandler (source.KeyboardHandler)
package source {
import flash.events.*;
public class KeyboardHandler {
public var keyState:Array;
public var parent:MemoryMatcher;
public function KeyboardHandler(_arg1, _arg2:MemoryMatcher){
var _local3:*;
super();
keyState = new Array();
_arg2.stage.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
_arg2.stage.addEventListener(KeyboardEvent.KEY_UP, reportKeyUp);
this.parent = _arg2;
_local3 = 0;
while (_local3 < 0xFF) {
keyState[_local3] = false;
_local3++;
};
}
private function reportKeyUp(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = false;
}
public function getDown(_arg1):Number{
return (keyState[_arg1]);
}
public function cleanUp(_arg1){
var _local2:int;
if (keyState){
_local2 = (keyState.length - 1);
while (_local2 >= 0) {
keyState[_local2] = null;
keyState.pop();
_local2--;
};
keyState = null;
};
_arg1.removeEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
_arg1.removeEventListener(KeyboardEvent.KEY_UP, reportKeyUp);
parent = null;
}
private function reportKeyDown(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = true;
}
}
}//package source
Section 30
//Level (source.Level)
package source {
public class Level {
private var level:uint;
private var newRowDelay:uint;
private var chanceOfFaceupBlock:uint;
public var cardSeparationDistance:uint;
private var fallSpeed:uint;
private var percentageJokers:uint;
private var numBlocksWide:uint;
private var numFillRows:uint;
private var percentageCleared:uint;
private var numStartRowsFilled:uint;
public var chanceGold:uint;
public var cardStartDistance:uint;
private var clearBonus:uint;
public var chanceBulb:uint;
private var numDifferentBlockFaces:uint;
private var numBlocksHigh:uint;
public var chancePeekaboo:uint;
private var timeLimit:uint;
public function Level(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:uint, _arg7:uint, _arg8:uint, _arg9:uint, _arg10:uint, _arg11:uint, _arg12:uint, _arg13:uint, _arg14:uint, _arg15:uint, _arg16:uint, _arg17:uint, _arg18:uint){
level = _arg1;
timeLimit = _arg2;
numBlocksWide = _arg3;
numBlocksHigh = _arg4;
numStartRowsFilled = _arg5;
numFillRows = _arg6;
newRowDelay = _arg7;
numDifferentBlockFaces = _arg8;
chanceOfFaceupBlock = _arg9;
percentageJokers = _arg10;
percentageCleared = _arg11;
clearBonus = _arg12;
fallSpeed = _arg13;
chancePeekaboo = _arg14;
chanceGold = _arg15;
chanceBulb = _arg16;
cardSeparationDistance = _arg17;
cardStartDistance = _arg18;
}
public function getPercentageJokers():uint{
return (percentageJokers);
}
public function setSetting(_arg1:uint, _arg2:uint):void{
switch (_arg1){
case Constants.SETT_PERCENTAGE_FACEUPLOCKED_BLOCKS:
chanceOfFaceupBlock = _arg2;
break;
case Constants.SETT_NUM_FILL_ROWS:
numFillRows = _arg2;
break;
case Constants.SETT_TIME_LIMIT:
timeLimit = _arg2;
break;
case Constants.SETT_NEW_ROW_DELAY:
newRowDelay = _arg2;
break;
case Constants.SETT_FALL_SPEED:
fallSpeed = _arg2;
break;
case Constants.SETT_PERCENTAGE_CLEARED:
percentageCleared = _arg2;
break;
case Constants.SETT_NUM_DIFFERENT_BLOCK_FACES:
numDifferentBlockFaces = _arg2;
break;
case Constants.SETT_NUM_START_ROWS_FILLED:
numStartRowsFilled = _arg2;
break;
case Constants.SETT_PERCENTAGE_PEEKABOO:
chancePeekaboo = _arg2;
break;
case Constants.SETT_PERCENTAGE_GOLD:
chanceGold = _arg2;
break;
case Constants.SETT_PERCENTAGE_BULB:
chanceBulb = _arg2;
break;
default:
trace("ERROR: unknown setting");
break;
};
}
public function getPercentageGold():uint{
return (chanceGold);
}
public function setPercentageJokers(_arg1:uint):void{
percentageJokers = _arg1;
}
public function setPercentageGold(_arg1:uint):void{
chanceGold = _arg1;
}
public function setTimeLimit(_arg1:uint):void{
timeLimit = _arg1;
}
public function getNumStartRowsFilled():uint{
return (numStartRowsFilled);
}
public function setNumBlocksHigh(_arg1:uint):void{
numBlocksHigh = _arg1;
}
public function getNumBlocksHigh():uint{
return (numBlocksHigh);
}
public function setNumStartRowsFilled(_arg1:uint):void{
numStartRowsFilled = _arg1;
}
public function getPercentageBulb():uint{
return (chanceBulb);
}
public function setLevel(_arg1:uint):void{
level = _arg1;
}
public function setPercentageBulb(_arg1:uint):void{
chanceBulb = _arg1;
}
public function setChanceOfFaceupBlock(_arg1:uint):void{
chanceOfFaceupBlock = _arg1;
}
public function setFallSpeed(_arg1:uint):void{
fallSpeed = _arg1;
}
public function getPercentagePeekaboo():uint{
return (chancePeekaboo);
}
public function getLevel():uint{
return (level);
}
public function getClearBonus():uint{
return (clearBonus);
}
public function getTimeLimit():uint{
return (timeLimit);
}
public function getNewRowDelay():uint{
return (newRowDelay);
}
public function getChanceOfFaceupBlock():uint{
return (chanceOfFaceupBlock);
}
public function setNewRowDelay(_arg1:uint):void{
newRowDelay = _arg1;
}
public function setPercentagePeekaboo(_arg1:uint):void{
chancePeekaboo = _arg1;
}
public function getNumDifferentBlockFaces():uint{
return (numDifferentBlockFaces);
}
public function setClearBonus(_arg1:uint):void{
clearBonus = _arg1;
}
public function setNumDifferentBlockFaces(_arg1:uint):void{
numDifferentBlockFaces = _arg1;
}
public function getFallSpeed():uint{
return (fallSpeed);
}
public function setNumFillRows(_arg1:uint):void{
numFillRows = _arg1;
}
public function getNumBlocksWide():uint{
return (numBlocksWide);
}
public function getNumFillRows():uint{
return (numFillRows);
}
public function setNumBlocksWide(_arg1:uint):void{
numBlocksWide = _arg1;
}
public function setPercentageCleared(_arg1:uint):void{
percentageCleared = _arg1;
}
public function getPercentageCleared():uint{
return (percentageCleared);
}
}
}//package source
Section 31
//LevelManager (source.LevelManager)
package source {
public class LevelManager {
public var levelArray:Array;
public function LevelManager(){
addLevels();
}
private function addLevels(){
levelArray = new Array();
if (Constants.ALLOW_BANNER == true){
if (Constants.BANNER == Constants.SCENE_BANNER_300x250){
levelArray[0] = new Level(1, 15, 6, 7, 2, 0, 6, 4, 5, 0, 100, 0, 10, 0, 5, 10, 8, 5);
} else {
if (Constants.BANNER == Constants.SCENE_BANNER_728x90){
levelArray[0] = new Level(1, 15, 12, 7, 1, 0, 6, 4, 5, 0, 100, 0, 10, 0, 5, 10, 8, 5);
} else {
if (Constants.BANNER == Constants.SCENE_BANNER_160x600){
levelArray[0] = new Level(1, 15, 2, 7, 6, 0, 6, 4, 5, 0, 100, 0, 10, 0, 5, 10, 8, 5);
} else {
if (Constants.BANNER == Constants.SCENE_BANNER_300x200){
levelArray[0] = new Level(1, 15, 6, 7, 2, 0, 6, 4, 5, 0, 100, 0, 10, 0, 5, 10, 8, 5);
};
};
};
};
} else {
levelArray[0] = new Level(1, 80, 5, 7, 3, 5, 6, 4, 5, 0, 80, 1500, 10, 0, 5, 10, 8, 5);
};
levelArray[1] = new Level(2, 100, 6, 7, 3, 5, 8, 5, 10, 0, 85, 3000, 10, 0, 7, 10, 7, 5);
levelArray[2] = new Level(3, 120, 7, 7, 3, 5, 10, 6, 15, 0, 90, 4000, 10, 0, 9, 15, 7, 4);
}
public function removeLevels(){
var _local1:int;
if (levelArray){
_local1 = (levelArray.length - 1);
while (_local1 >= 0) {
levelArray[_local1] = null;
levelArray.pop();
_local1--;
};
levelArray = null;
};
}
}
}//package source
Section 32
//MemoryCard2 (source.MemoryCard2)
package source {
import flash.display.*;
public class MemoryCard2 extends MovieClip {
public var m_realParent:MemoryCardContainer;
public var slot:uint;
public var windowThingsAnim:MovieClip;
public var winClosedState:Boolean;
public var openSpeed:Number;
public var showTimeStart:int;
public var closeSpeed:Number;
public var column:uint;
public var showTime:int;
public var windowThings:MovieClip;
private var cardState:uint;
public var showDelayTime:int;
public var cardSide:Array;
public var thingsAnimationLoaded:Boolean;
public var speedBoost:uint;
public var myWindow:MyWindow;
public var m_parent:MemoryMatcher;
public var selectionMark2:SelectionMark;
public var tinted:Boolean;
public var backSide:int;
public var faceupLocked:Boolean;
public function MemoryCard2(_arg1:MemoryMatcher, _arg2:MemoryCardContainer, _arg3:int, _arg4:int, _arg5:uint, _arg6:uint, _arg7:int, _arg8:Boolean, _arg9:Boolean, _arg10:uint, _arg11:uint){
if (Constants.ALLOW_CHEAT_MODE){
this.alpha = 0.5;
};
m_parent = _arg1;
m_realParent = _arg2;
cleanUp();
thingsAnimationLoaded = false;
winClosedState = true;
openSpeed = Constants.CURTAIN_OPEN_SPEED;
closeSpeed = Constants.CURTAIN_CLOSE_SPEED;
showTime = 0;
showDelayTime = 0;
showTimeStart = 0;
slot = 10000;
cardState = 0;
column = _arg5;
speedBoost = _arg10;
faceupLocked = _arg8;
if (!Constants.ALLOW_FLASHING){
tinted = false;
} else {
tinted = true;
};
selectionMark2 = new SelectionMark(m_parent, this);
backSide = _arg7;
myWindow = new MyWindow(_arg1, this, _arg6, backSide, _arg9);
this.addChild(myWindow);
setPosition(_arg3, _arg4);
cardSide = new Array();
cardSide[Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED] = _arg6;
cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED] = _arg6;
cardSide[Constants.CARD_BACK_SIDE] = -1;
if (_arg11 == Constants.CARD_BACK_SIDE){
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_BACK_SIDE];
} else {
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED];
};
}
public function flipCardSide(_arg1:int){
if (_arg1 == Constants.CARD_BACK_SIDE){
if (!faceupLocked){
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_BACK_SIDE];
};
} else {
if ((((_arg1 == Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED)) || ((_arg1 == Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED)))){
if (tinted){
endTint();
};
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED];
} else {
if (cardSide[Constants.CARD_CURRENT_SIDE] == cardSide[Constants.CARD_BACK_SIDE]){
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED];
} else {
if (!faceupLocked){
cardSide[Constants.CARD_CURRENT_SIDE] = cardSide[Constants.CARD_BACK_SIDE];
};
};
};
};
}
public function cleanUp(){
var _local1:int;
if (selectionMark2){
selectionMark2.cleanUp();
if (this.contains(selectionMark2)){
this.removeChild(selectionMark2);
};
selectionMark2 = null;
};
if (myWindow){
myWindow.cleanUp(m_parent);
if (this.contains(myWindow)){
this.removeChild(myWindow);
};
myWindow = null;
};
if (cardSide){
_local1 = (cardSide.length - 1);
while (_local1 >= 0) {
cardSide[_local1] = null;
cardSide.pop();
_local1--;
};
cardSide = null;
};
}
public function setCardState(_arg1:uint):void{
cardState = _arg1;
}
public function checkForPlacement(_arg1:Array, _arg2:Level, _arg3:MemoryCard2){
var _local4:uint;
var _local5:int;
_local4 = 0;
while (((_arg1[(column + (_local4 * _arg2.getNumBlocksWide()))]) && (((column + (_local4 * _arg2.getNumBlocksWide())) < (_arg2.getNumBlocksWide() * _arg2.getNumBlocksHigh()))))) {
_local4++;
};
if (Constants.ALLOW_BANNER == true){
_local5 = (Constants.CARD_HEIGHT + (_arg2.cardSeparationDistance * Constants.SCENE_SCALE_Y));
} else {
_local5 = (Constants.CARD_HEIGHT + _arg2.cardSeparationDistance);
};
if (((((column + (_local4 * _arg2.getNumBlocksWide())) < (_arg2.getNumBlocksWide() * (_arg2.getNumBlocksHigh() + 1)))) && ((y >= (Constants.PLAYGROUND_BOTTOM - (_local4 * _local5)))))){
m_parent.sendToProxy("playData", (("2," + m_parent.ticks) + ",0=0"));
if (cardState != 2){
flipCardSide(Constants.CARD_BACK_SIDE);
myWindow.showSymbol();
};
this.buttonMode = true;
if (Constants.ALLOW_BANNER == true){
_local5 = (Constants.CARD_HEIGHT + (_arg2.cardSeparationDistance * Constants.SCENE_SCALE_Y));
} else {
_local5 = (Constants.CARD_HEIGHT + _arg2.cardSeparationDistance);
};
y = (Constants.PLAYGROUND_BOTTOM - (_local4 * _local5));
cardState = 1;
slot = (column + (_local4 * _arg2.getNumBlocksWide()));
_arg1[(column + (_local4 * _arg2.getNumBlocksWide()))] = 1;
};
_local4 = 0;
}
public function checkForReleaseSlot(_arg1:Array, _arg2:Level){
var _local3:int;
var _local4:int;
_local3 = int((Math.floor((slot / _arg2.getNumBlocksWide())) - 1));
_local4 = (column + (_local3 * _arg2.getNumBlocksWide()));
if ((((((_local3 >= 0)) && ((_arg1[_local4] == 0)))) && ((y < (Constants.PLAYGROUND_BOTTOM - (_local3 * Constants.CARD_HEIGHT)))))){
cardState = 2;
_arg1[slot] = 0;
slot = 10000;
};
}
public function flashCards(){
var _local1:int;
_local1 = m_parent.ticks;
if (((!((showTime == 0))) && ((_local1 > showTime)))){
myWindow.orderWinTint();
if (_local1 > (showTime + showDelayTime)){
if (((tinted) && (winClosedState))){
endTint();
};
};
};
}
public function getSlot():uint{
return (slot);
}
public function checkForMouseClick(_arg1:int, _arg2:int):Boolean{
var _local3:int;
var _local4:int;
_local3 = (x - (Constants.CARD_WIDTH / 2));
_local4 = (y - (Constants.CARD_HEIGHT / 2));
if ((((((((_arg1 >= _local3)) && ((_arg1 <= (_local3 + Constants.CARD_WIDTH))))) && ((_arg2 >= _local4)))) && ((_arg2 <= (_local4 + Constants.CARD_HEIGHT))))){
m_realParent.clickMemorycard(this);
return (true);
};
return (false);
}
public function updateCard(_arg1:Number, _arg2:Level, _arg3:Array){
switch (cardState){
case 0:
if (speedBoost != 0){
if (Constants.ALLOW_DT){
y = (y + (_arg1 * (Constants.CARD_SPEED_FALL_BOOST * speedBoost)));
} else {
y = (y + (50 * (Constants.CARD_SPEED_FALL_BOOST * speedBoost)));
};
} else {
if (Constants.ALLOW_DT){
y = (y + (_arg1 * (0.01 * _arg2.getFallSpeed())));
} else {
y = (y + (50 * (0.01 * _arg2.getFallSpeed())));
};
};
checkForPlacement(_arg3, _arg2, this);
break;
case 1:
checkForReleaseSlot(_arg3, _arg2);
break;
case 2:
if (Constants.ALLOW_DT){
y = (y + (_arg1 * Constants.CARD_SPEED_FALL_REARRANGE));
} else {
y = (y + (50 * Constants.CARD_SPEED_FALL_REARRANGE));
};
checkForPlacement(_arg3, _arg2, this);
selectionMark2.updateSelectionMark(y);
break;
default:
trace("ERROR: unknown cardState");
break;
};
}
public function endTint(){
myWindow.changeThingsAnim(cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED]);
tinted = false;
showTime = 0;
}
public function getCardState():uint{
return (cardState);
}
public function update(_arg1:int, _arg2:Array, _arg3:Level, _arg4:Boolean){
if (_arg4){
myWindow.gotoThingsFrame(1);
} else {
flashCards();
myWindow.update(_arg1, this);
selectionMark2.update(_arg1);
updateCard(_arg1, _arg3, _arg2);
};
}
public function getY():Number{
return (y);
}
public function setPosition(_arg1:int, _arg2:int){
x = _arg1;
y = _arg2;
}
public function getSelectionMark():SelectionMark{
return (selectionMark2);
}
public function getCardSide(_arg1:int):int{
return (cardSide[_arg1]);
}
}
}//package source
Section 33
//MemoryCardContainer (source.MemoryCardContainer)
package source {
import flash.display.*;
import flash.utils.*;
public class MemoryCardContainer extends MovieClip {
public var barState:uint;
public var comboCounter:uint;
private var cardsFlipped:uint;
public var flashPatternArray:Array;
public var m_parent:MemoryMatcher;
public var validPatternArray:Array;
public var memoryCards:Array;
public var timeToShowNextCard:int;
private var blockrowHighlight:Array;
private var chosenCards:Array;
public var numCardsSpawned:uint;
public var balkAnim;
private var timeToFlipBack:int;
private var memoryMiniCards:Array;
private var numCards:uint;
public var wrongCounter:uint;
private var timeRowSpawnTime:int;
private var usedCards:Array;
public var girderFrame:int;
private var playfieldArray:Array;
public var currentCardToFlash:uint;
private var shuffledDeck:Array;
private var currentCardColumnToSpawn:uint;
public var waitTime:int;
private var timeToSpawnCard:int;
public function MemoryCardContainer(_arg1:MemoryMatcher, _arg2:Level){
m_parent = _arg1;
startUpGame(_arg2);
}
public function setTimeRowSpawnTime(_arg1:int){
timeRowSpawnTime = _arg1;
}
public function pullUpGirder(_arg1:Number):Boolean{
balkAnim.y = (balkAnim.y - 20);
if (balkAnim.y < -500){
return (true);
};
return (false);
}
public function startUpGame(_arg1:Level){
playfieldArray = new Array();
chosenCards = new Array();
flashPatternArray = new Array();
memoryCards = new Array();
memoryMiniCards = new Array();
blockrowHighlight = new Array();
shuffledDeck = new Array();
usedCards = new Array();
currentCardToFlash = 0;
timeToShowNextCard = 0;
currentCardColumnToSpawn = 0;
cardsFlipped = 0;
numCards = 0;
comboCounter = 0;
wrongCounter = 0;
barState = 1000;
numCardsSpawned = 0;
timeRowSpawnTime = 0;
calculatedeck(_arg1);
addStartCards(_arg1);
buildFlashpattern(_arg1);
}
public function showBulbNeighbours(_arg1:MemoryCard2, _arg2:Level){
var _local3:Array;
var _local4:uint;
var _local5:int;
var _local6:int;
_local3 = new Array();
_local4 = _arg1.slot;
_local3[0] = -1;
_local3[1] = -1;
_local3[2] = -1;
_local3[3] = -1;
if ((_local4 % _arg2.getNumBlocksWide()) != (_arg2.getNumBlocksWide() - 1)){
_local3[0] = (_local4 + 1);
};
if ((_local4 % _arg2.getNumBlocksWide()) != 0){
_local3[1] = (_local4 - 1);
};
if (_local4 >= _arg2.getNumBlocksWide()){
_local3[3] = (_local4 - _arg2.getNumBlocksWide());
};
_local3[2] = (_local4 + _arg2.getNumBlocksWide());
_local5 = 0;
while (_local5 < memoryCards.length) {
_local6 = 0;
while (_local6 < 4) {
if ((((((memoryCards[_local5].slot == _local3[_local6])) && (!(memoryCards[_local5].faceupLocked)))) && ((_local3[_local6] >= 0)))){
memoryCards[_local5].showTime = m_parent.ticks;
memoryCards[_local5].showDelayTime = (2 * Constants.FPS);
memoryCards[_local5].openSpeed = 2;
memoryCards[_local5].myWindow.changeThingsAnim((memoryCards[_local5].cardSide[Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED] + 19));
memoryCards[_local5].tinted = true;
};
_local6++;
};
_local5++;
};
}
public function addGirder(){
girderFrame = 100;
balkAnim = m_parent.currentGameState.currentGameLevel.levelScene.miniCardBar;
m_parent.renderManager.addRenderObject(balkAnim, 80, "levelScene.miniCardBar");
balkAnim.gotoAndStop(girderFrame);
balkAnim.y = -100;
if (Constants.ALLOW_BANNER == true){
balkAnim.x = 10;
balkAnim.y = 200;
};
}
public function calculateCurtain(_arg1:Level):uint{
var _local2:int;
var _local3:int;
_local2 = Constants.CARD_BACKSIDE_NORMAL;
_local3 = int((Math.floor((m_parent.m_rng.nextDouble() * 100)) + 1));
if (_local3 <= _arg1.chanceGold){
_local2 = Constants.CARD_BACKSIDE_GOLD;
} else {
if (_local3 <= (_arg1.chanceGold + _arg1.chancePeekaboo)){
_local2 = Constants.CARD_BACKSIDE_PEEKABOO;
} else {
if (_local3 <= ((_arg1.chanceGold + _arg1.chancePeekaboo) + _arg1.chanceBulb)){
_local2 = Constants.CARD_BACKSIDE_BULB;
};
};
};
return (_local2);
}
public function addScorepop(_arg1:int, _arg2:int, _arg3:int){
if (_arg3 >= 0){
addAnim(_arg1, _arg2, new Scorepop_positive(), 0, 0.2, String(_arg3));
} else {
addAnim(_arg1, _arg2, new Scorepop_negative(), 0, 0.03, String(_arg3));
};
}
public function addAnim(_arg1:uint, _arg2:uint, _arg3:DisplayObject, _arg4:Number, _arg5:Number, _arg6:String){
var _local7:Number;
var _local8:Number;
_local7 = 200;
_arg3.x = _arg1;
_arg3.y = _arg2;
_local8 = (getTimer() + (_arg4 * _local7));
m_parent.animationManager.addAnimObj(_arg3, Constants.ANIM_ONCE, _arg5, 10, null, false, _local8, _arg6, "addAnim", false);
}
public function findClickedCard(_arg1:int, _arg2:int){
var _local3:int;
_local3 = 0;
while (_local3 < memoryCards.length) {
if (memoryCards[_local3].checkForMouseClick(_arg1, _arg2)){
break;
};
_local3++;
};
}
public function manageChosenCards(_arg1:Level){
var _local2:int;
var _local3:int;
var _local4:*;
var _local5:int;
var _local6:Boolean;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:uint;
var _local11:uint;
var _local12:Number;
_local2 = 0;
_local3 = 0;
while (_local3 < usedCards.length) {
_local4 = usedCards[_local3][0];
usedCards[_local3][1] = (usedCards[_local3][1] - 1);
_local5 = usedCards[_local3][1];
if (((!((_local5 == 0))) && ((_local5 < 0)))){
_local6 = true;
_local7 = 0;
while (_local7 < (_local4.length - 1)) {
if (_local4[_local7].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) != _local4[(_local7 + 1)].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED)){
_local6 = false;
};
_local7++;
};
_local8 = _local4[1].x;
_local9 = _local4[1].y;
_local10 = 0;
_local11 = 0;
if (_local6){
_local7 = 0;
while (_local7 < _local4.length) {
if (_local4[_local7].backSide == Constants.CARD_BACKSIDE_GOLD){
_local11++;
};
_local4[_local7].getSelectionMark().removeSelectionMark(_local4[_local7].winClosedState);
m_parent.numBlocksRemoved++;
removeCard(_local4[_local7], _local7, _arg1);
_local7++;
};
_local12 = 1;
if (comboCounter > 0){
_local12 = (_local12 + (comboCounter * 0.1));
};
if (_local11 > 0){
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_GOLD, 0);
} else {
if (comboCounter > 0){
if (comboCounter == 1){
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_2, 0);
} else {
if (comboCounter == 2){
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_3, 0);
} else {
if (comboCounter == 3){
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_4, 0);
} else {
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_5, 0);
};
};
};
} else {
m_parent.soundContainer.playSound(Constants.SOUND_CARDMATCH_1, 0);
};
};
_local2 = 0;
_local2 = int(Math.round((100 * _local12)));
if (_local11 == 2){
_local2 = (_local2 * 4);
} else {
if (_local11 == 1){
_local2 = (_local2 * 2);
};
};
m_parent.score = (m_parent.score + _local2);
comboCounter++;
wrongCounter = 0;
} else {
m_parent.soundContainer.playSound(Constants.SOUND_NO_MATCH, 0);
_local7 = 0;
while (_local7 < _local4.length) {
_local4[_local7].flipCardSide(Constants.CARD_BACK_SIDE);
_local7++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local4[_local7].getSelectionMark().removeSelectionMark(_local4[_local7].winClosedState);
_local7++;
};
_local2 = (-30 * (wrongCounter + 1));
if ((m_parent.score + _local2) >= 0){
m_parent.score = (m_parent.score + _local2);
} else {
_local2 = -(m_parent.score);
m_parent.score = (m_parent.score + _local2);
};
comboCounter = 0;
wrongCounter++;
};
m_parent.sendToProxy("playData", (((((((("75," + m_parent.ticks) + ",") + m_parent.score) + ",") + _local2) + ",") + _local11) + ",0=0"));
if (_local2 != 0){
addScorepop(_local8, _local9, _local2);
};
usedCards.splice(_local3, 1);
};
_local3++;
};
}
public function getNumMemoryCards():uint{
return (memoryCards.length);
}
public function spawnNewCardOnTime(_arg1:Number, _arg2:Level){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:int;
_local3 = 0;
if (numCards < (_arg2.getNumFillRows() * _arg2.getNumBlocksWide())){
if (barState == 1000){
barState = 0;
} else {
if (barState == 0){
addMemoryMiniatureCards(_local3, _arg2);
waitTime = Constants.FPS;
barState = 1;
girderFrame = 100;
balkAnim.gotoAndStop(girderFrame);
timeRowSpawnTime = (_arg2.getNewRowDelay() * Constants.FPS);
} else {
if (barState == 1){
_local4 = (waitTime * 4);
_local5 = (50 - _local4);
balkAnim.y = int(_local5);
_local6 = 0;
while (_local6 < memoryMiniCards.length) {
memoryMiniCards[_local6].y = int((_local5 - 20));
_local6++;
};
if (waitTime <= 0){
balkAnim.y = 51;
barState = 2;
_local6 = 0;
while (_local6 < memoryMiniCards.length) {
memoryMiniCards[_local6].y = (51 - 20);
_local6++;
};
m_parent.sendToProxy("playData", (("51," + m_parent.ticks) + ",0=0"));
};
waitTime--;
} else {
if (barState == 2){
if (timeRowSpawnTime <= 0){
animateGirder(_arg1);
if (timeToSpawnCard <= 0){
spawnCard();
timeToSpawnCard = 5;
if (numCardsSpawned == _arg2.getNumBlocksWide()){
barState = 3;
numCardsSpawned = 0;
};
};
};
};
};
};
};
} else {
if (barState == 0){
waitTime = Constants.FPS;
barState = 1;
girderFrame = 100;
balkAnim.gotoAndStop(girderFrame);
timeRowSpawnTime = (_arg2.getNewRowDelay() * Constants.FPS);
} else {
if (barState == 1){
_local4 = (waitTime * 4);
_local5 = (50 - _local4);
balkAnim.y = int(_local5);
if (waitTime <= 0){
balkAnim.y = 51;
barState = 2;
};
waitTime--;
};
};
};
if (barState == 3){
if (animateGirder(_arg1)){
barState = 0;
};
};
timeRowSpawnTime--;
timeToSpawnCard--;
}
public function animateGirder(_arg1:Number, _arg2=false):Boolean{
var _local3:int;
var _local4:uint;
var _local5:int;
_local3 = 145;
if (Constants.ALLOW_DT){
girderFrame = (girderFrame + 0.05);
} else {
girderFrame = (girderFrame + (50 * 0.05));
};
if (girderFrame <= (_local3 + 0.99)){
_local4 = Math.floor(girderFrame);
balkAnim.gotoAndStop(_local4);
if (_arg2 == true){
_local5 = 0;
while (_local5 < memoryCards.length) {
if ((memoryCards[_local5].column * 2) < (girderFrame - 100)){
memoryCards[_local5].y = (memoryCards[_local5].y + 10);
};
_local5++;
};
};
} else {
balkAnim.gotoAndStop(145);
return (pullUpGirder(_arg1));
};
return (false);
}
public function cleanFlashpattern(){
var _local1:int;
if (flashPatternArray){
_local1 = (flashPatternArray.length - 1);
while (_local1 >= 0) {
flashPatternArray[_local1] = null;
flashPatternArray.pop();
_local1--;
};
flashPatternArray = null;
};
}
public function getPlayfieldArray(_arg1:uint):uint{
return (playfieldArray[_arg1]);
}
public function cleanShuffledDeck(){
var _local1:int;
if (shuffledDeck){
_local1 = (shuffledDeck.length - 1);
while (_local1 >= 0) {
shuffledDeck[_local1] = null;
shuffledDeck.pop();
_local1--;
};
shuffledDeck = null;
};
}
public function update(_arg1:int, _arg2:Level){
var _local3:*;
_local3 = 0;
_local3 = 0;
while (_local3 < memoryCards.length) {
memoryCards[_local3].update(_arg1, playfieldArray, _arg2, false);
_local3++;
};
_local3 = 0;
while (_local3 < memoryMiniCards.length) {
memoryMiniCards[_local3].update(_arg1, playfieldArray, _arg2, true);
_local3++;
};
checkHighStack(_arg2);
}
public function cleanUpGame(){
cleanPlayfield();
cleanFlashpattern();
cleanMemoryCards();
cleanMemoryMiniCards();
cleanShuffledDeck();
cleanChosenCards();
cleanBlockrowHighlight();
cleanUsedCards();
}
public function cleanMemoryCards(){
var _local1:int;
if (memoryCards){
_local1 = (memoryCards.length - 1);
while (_local1 >= 0) {
memoryCards[_local1].cleanUp();
memoryCards[_local1] = null;
m_parent.renderManager.removeRenderObject(memoryCards[_local1]);
memoryCards.pop();
_local1--;
};
memoryCards = null;
};
}
public function getNumCards():uint{
return (numCards);
}
public function cleanChosenCards(){
var _local1:int;
if (chosenCards){
_local1 = (chosenCards.length - 1);
while (_local1 >= 0) {
chosenCards[_local1] = null;
chosenCards.pop();
_local1--;
};
chosenCards = null;
};
}
public function getTimeRowSpawnTime():int{
return (timeRowSpawnTime);
}
public function spawnCard(){
m_parent.sendToProxy("playData", (("50," + m_parent.ticks) + ",0=0"));
numCardsSpawned++;
makeCardAlive();
numCards++;
}
public function buildFlashpattern(_arg1:Level){
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:int;
var _local7:int;
var _local8:int;
_local2 = _arg1.getNumBlocksWide();
_local3 = _arg1.getNumStartRowsFilled();
_local4 = int(Math.floor((Math.random() * 6)));
_local5 = 0;
while (_local5 < memoryCards.length) {
if (_local4 == 0){
_local7 = (_local5 % _local2);
_local8 = int((((_local3 - 1) - Math.floor((_local5 / _local2))) * _local2));
_local6 = (_local7 + _local8);
} else {
if (_local4 == 1){
_local7 = int(Math.floor((_local5 / _local3)));
_local8 = (((_local3 - (_local5 % _local3)) - 1) * _local2);
_local6 = (_local7 + _local8);
} else {
if (_local4 == 2){
_local7 = int(Math.abs((((Math.floor((_local5 / _local2)) % 2) * (_local2 - 1)) - (_local5 % _local2))));
_local8 = int((((_local3 - 1) - Math.floor((_local5 / _local2))) * _local2));
_local6 = (_local7 + _local8);
} else {
if (_local4 == 3){
_local7 = ((_local2 - (_local5 % _local2)) - 1);
_local8 = int((Math.floor((_local5 / _local2)) * _local2));
_local6 = (_local7 + _local8);
} else {
if (_local4 == 4){
_local7 = int(((_local2 - Math.floor((_local5 / _local3))) - 1));
_local8 = ((_local5 % _local3) * _local2);
_local6 = (_local7 + _local8);
} else {
if (_local4 == 5){
_local7 = int(Math.abs((((Math.floor(((_local5 + _local2) / _local2)) % 2) * (_local2 - 1)) - (_local5 % _local2))));
_local8 = int((Math.floor((_local5 / _local2)) * _local2));
_local6 = (_local7 + _local8);
} else {
_local7 = (_local5 % _local2);
_local8 = int((Math.floor((_local5 / _local2)) * _local2));
_local6 = (_local7 + _local8);
};
};
};
};
};
};
flashPatternArray.push(_local6);
_local5++;
};
}
public function setTimeToSpawnCard(_arg1:int){
timeToSpawnCard = _arg1;
}
public function calculatedeck(_arg1:Level){
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:int;
calculateValidPatterns(_arg1);
_local2 = new Array();
_local3 = (_arg1.getNumStartRowsFilled() + _arg1.getNumFillRows());
_local4 = (_local3 * _arg1.getNumBlocksWide());
_local5 = 0;
while (_local5 < _local4) {
if ((_local5 == (_local4 - 1))){
trace("ERROR: dont use uneven pairs!");
_local6 = calculatePattern(_arg1);
_local2.push(_local6);
} else {
_local6 = calculatePattern(_arg1);
_local2.push(_local6);
_local2.push(_local6);
};
_local5 = (_local5 + 2);
};
while (_local2.length > 0) {
_local7 = Math.floor((m_parent.m_rng.nextDouble() * _local2.length));
shuffledDeck.push(_local2[_local7]);
_local2.splice(_local7, 1);
};
}
public function calculateValidPatterns(_arg1:Level){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Boolean;
var _local9:int;
validPatternArray = new Array();
_local2 = 4;
_local3 = 5;
_local4 = 6;
_local5 = 10;
if (_arg1.getLevel() == 1){
_local7 = 0;
while (_local7 < _local2) {
validPatternArray.push(_local7);
_local7++;
};
} else {
if (_arg1.getLevel() == 2){
_local7 = 0;
while (_local7 < _local3) {
validPatternArray.push((_local7 + _local2));
_local7++;
};
} else {
if (_arg1.getLevel() == 3){
_local7 = 0;
while (_local7 < _local4) {
_local8 = true;
while (_local8) {
_local8 = false;
_local6 = ((_local2 + _local3) + int(Math.floor((m_parent.m_rng.nextDouble() * _local5))));
_local9 = 0;
while (_local9 < validPatternArray.length) {
if (validPatternArray[_local9] == _local6){
_local8 = true;
};
_local9++;
};
};
validPatternArray.push(_local6);
trace(("push: " + _local6));
_local7++;
};
};
};
};
}
public function addMemoryMiniatureCards(_arg1:int, _arg2:Level){
var _local3:uint;
var _local4:Boolean;
var _local5:uint;
var _local6:int;
var _local7:MemoryCard2;
_local3 = 0;
while (_local3 < _arg2.getNumBlocksWide()) {
_local5 = shuffledDeck[(shuffledDeck.length - 1)];
shuffledDeck.pop();
if (_local5 == Constants.JOKER_NEUTRAL){
_local4 = true;
} else {
_local4 = (Math.round((m_parent.m_rng.nextDouble() * 100)) < _arg2.getChanceOfFaceupBlock());
};
_local6 = Constants.CARD_BACKSIDE_NORMAL;
if (!_local4){
_local6 = calculateCurtain(_arg2);
};
if (Constants.ALLOW_BANNER == true){
_local7 = new MemoryCard2(m_parent, this, ((Constants.PLAYGROUND_LEFT + (_arg2.cardStartDistance * Constants.SCENE_SCALE_X)) + (currentCardColumnToSpawn * (Constants.CARD_WIDTH + (_arg2.cardSeparationDistance * Constants.SCENE_SCALE_X)))), -100, currentCardColumnToSpawn, _local5, _local6, _local4, true, _arg1, Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED);
} else {
_local7 = new MemoryCard2(m_parent, this, ((Constants.PLAYGROUND_LEFT + _arg2.cardStartDistance) + (currentCardColumnToSpawn * (Constants.CARD_WIDTH + _arg2.cardSeparationDistance))), -100, currentCardColumnToSpawn, _local5, _local6, _local4, true, _arg1, Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED);
};
m_parent.renderManager.addRenderObject(_local7, 200, "card", false);
_local7.myWindow.myScale(Constants.CARD_SCALE, Constants.CARD_SCALE);
memoryMiniCards.push(_local7);
if (currentCardColumnToSpawn >= (_arg2.getNumBlocksWide() - 1)){
currentCardColumnToSpawn = 0;
} else {
currentCardColumnToSpawn++;
};
_local3++;
};
}
public function clickMemorycard(_arg1:MemoryCard2){
var _local2:Boolean;
var _local3:int;
var _local4:Boolean;
var _local5:Boolean;
var _local6:int;
var _local7:Array;
var _local8:Array;
var _local9:int;
_local2 = true;
_local3 = 0;
while (_local3 < cardsFlipped) {
if (chosenCards[_local3] == _arg1){
_local2 = false;
};
_local3++;
};
_local4 = true;
_local3 = 0;
while (_local3 < (cardsFlipped - 1)) {
if (chosenCards[_local3].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) != chosenCards[(_local3 + 1)].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED)){
_local4 = false;
};
_local3++;
};
_local5 = (((_arg1.getCardState() == 1)) || ((_arg1.getCardState() == 2)));
if (((((((((_local5) && (_local2))) && (_local4))) && ((((Constants.allow_multiple_selection == true)) || ((cardsFlipped < 2)))))) && (!(_arg1.getSelectionMark().locked)))){
_arg1.flipCardSide(1);
chosenCards[cardsFlipped] = _arg1;
cardsFlipped++;
_arg1.getSelectionMark().addSelectionMark(_arg1.winClosedState);
if (cardsFlipped >= 2){
_local4 = true;
_local3 = (cardsFlipped - 2);
while (_local3 >= 0) {
if (chosenCards[_local3].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) != chosenCards[(_local3 + 1)].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED)){
if ((((chosenCards[(_local3 + 1)].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) == Constants.JOKER_NEUTRAL)) && (!((chosenCards[_local3].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) == Constants.JOKER_NEUTRAL))))){
} else {
if ((((chosenCards[_local3].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) == Constants.JOKER_NEUTRAL)) && (!((chosenCards[(_local3 + 1)].getCardSide(Constants.CARD_FRONT_SIDE_NOT_JOKER_SPECIFIED) == Constants.JOKER_NEUTRAL))))){
} else {
_local4 = false;
};
};
};
_local3--;
};
_local6 = Constants.CARD_WAIT_NO_MULTI;
if (Constants.allow_multiple_selection){
_local6 = Constants.CARD_WAIT_MULTI;
};
if (_local4){
timeToFlipBack = 10;
} else {
timeToFlipBack = 10;
};
_local7 = new Array();
_local7[0] = chosenCards[0];
_local7[1] = chosenCards[1];
_local8 = new Array();
_local8[0] = _local7;
_local8[1] = timeToFlipBack;
usedCards.push(_local8);
chosenCards[0].getSelectionMark().lockSelectionMark(_local4);
chosenCards[1].getSelectionMark().lockSelectionMark(_local4);
cardsFlipped = 0;
};
};
}
public function makeCardAlive(){
memoryMiniCards[0].myWindow.myScale(Constants.CARD_SCALE, Constants.CARD_SCALE);
memoryMiniCards[0].y = 60;
memoryCards.push(memoryMiniCards.shift());
}
public function cleanUsedCards(){
var _local1:int;
if (usedCards){
_local1 = (usedCards.length - 1);
while (_local1 >= 0) {
usedCards[_local1] = null;
usedCards.pop();
_local1--;
};
usedCards = null;
};
}
public function calculatePattern(_arg1:Level):uint{
var _local2:int;
_local2 = int(Math.floor((m_parent.m_rng.nextDouble() * _arg1.getNumDifferentBlockFaces())));
if (_arg1.getLevel() == 2){
_local2 = (_local2 + 4);
} else {
if (_arg1.getLevel() == 3){
_local2 = validPatternArray[_local2];
};
};
return (_local2);
}
public function flashThroughAllBlocks(_arg1:Level, _arg2:Number):int{
var _local3:*;
var _local4:uint;
var _local5:uint;
_local3 = 0;
if ((((timeToShowNextCard <= 0)) && ((currentCardToFlash < memoryCards.length)))){
memoryCards[flashPatternArray[currentCardToFlash]].flipCardSide(Constants.CARD_FRONT_SIDE_JOKER_SPECIFIED);
memoryCards[flashPatternArray[currentCardToFlash]].showTimeStart = getTimer();
currentCardToFlash++;
timeToShowNextCard = 5;
if (currentCardToFlash == 10){
m_parent.currentGameState.addStartAnimation();
};
};
_local4 = 500;
_local5 = 0;
while (_local5 < memoryCards.length) {
memoryCards[_local5].myWindow.updateCurtain(_arg2);
if (((((memoryCards[_local5].showTimeStart + _local4) < getTimer())) && (!((memoryCards[_local5].showTimeStart == 0))))){
memoryCards[_local5].flipCardSide(Constants.CARD_BACK_SIDE);
if ((_local5 == flashPatternArray[(memoryCards.length - 1)])){
return (1);
};
};
_local5++;
};
timeToShowNextCard--;
return (_local3);
}
public function addStartCards(_arg1:Level){
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:MemoryCard2;
_local2 = 0;
_local3 = (_arg1.getNumStartRowsFilled() * _arg1.getNumBlocksWide());
_local4 = 0;
while (_local4 < _local3) {
_local6 = shuffledDeck[(shuffledDeck.length - 1)];
shuffledDeck.pop();
if (_local6 == Constants.JOKER_NEUTRAL){
_local5 = true;
} else {
_local5 = (Math.round((m_parent.m_rng.nextDouble() * 100)) < _arg1.getChanceOfFaceupBlock());
};
_local7 = Constants.CARD_BACKSIDE_NORMAL;
if (!_local5){
_local7 = calculateCurtain(_arg1);
};
if (Constants.ALLOW_BANNER == true){
_local8 = new MemoryCard2(m_parent, this, ((Constants.PLAYGROUND_LEFT + (_arg1.cardStartDistance * Constants.SCENE_SCALE_X)) + (currentCardColumnToSpawn * (Constants.CARD_WIDTH + (_arg1.cardSeparationDistance * Constants.SCENE_SCALE_X)))), 1000, currentCardColumnToSpawn, _local6, _local7, _local5, false, _local2, Constants.CARD_BACK_SIDE);
} else {
_local8 = new MemoryCard2(m_parent, this, ((Constants.PLAYGROUND_LEFT + _arg1.cardStartDistance) + (currentCardColumnToSpawn * (Constants.CARD_WIDTH + _arg1.cardSeparationDistance))), 1000, currentCardColumnToSpawn, _local6, _local7, _local5, false, _local2, Constants.CARD_BACK_SIDE);
};
m_parent.renderManager.addRenderObject(_local8, 200, "card", false);
memoryCards.push(_local8);
_local8.myWindow.myScale(Constants.CARD_SCALE, Constants.CARD_SCALE);
_local8.checkForPlacement(playfieldArray, _arg1, _local8);
if (currentCardColumnToSpawn >= (_arg1.getNumBlocksWide() - 1)){
currentCardColumnToSpawn = 0;
} else {
currentCardColumnToSpawn++;
};
_local4++;
};
}
public function removeCard(_arg1:MemoryCard2, _arg2:Number, _arg3:Level){
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = 0;
while (_local4 < memoryCards.length) {
if (memoryCards[_local4] == _arg1){
if (memoryCards[_local4].backSide == Constants.CARD_BACKSIDE_PEEKABOO){
addAnim(_arg1.x, _arg1.y, new HornAnim(), _arg2, 0.05, "");
} else {
if (memoryCards[_local4].backSide == Constants.CARD_BACKSIDE_BULB){
showBulbNeighbours(memoryCards[_local4], _arg3);
addAnim(_arg1.x, _arg1.y, new BulbAnim(), _arg2, 0.05, "");
};
};
if (memoryCards[_local4].backSide == Constants.CARD_BACKSIDE_GOLD){
addAnim(_arg1.x, _arg1.y, new PopPairStarbonus(), _arg2, 0.05, "");
} else {
addAnim(_arg1.x, _arg1.y, new PopPair(), _arg2, 0.05, "");
};
_local5 = memoryCards[_local4].getSlot();
if (_local5 != 10000){
playfieldArray[_local5] = 0;
};
m_parent.renderManager.removeRenderObject(memoryCards[_local4]);
_local6 = _local4;
while (_local6 < (memoryCards.length - 1)) {
memoryCards[_local6] = memoryCards[(_local6 + 1)];
_local6++;
};
memoryCards.pop();
return;
};
_local4++;
};
}
public function cleanBlockrowHighlight(){
var _local1:int;
if (blockrowHighlight){
_local1 = (blockrowHighlight.length - 1);
while (_local1 >= 0) {
blockrowHighlight[_local1] = null;
blockrowHighlight.pop();
_local1--;
};
blockrowHighlight = null;
};
}
public function cleanMemoryMiniCards(){
var _local1:int;
if (memoryMiniCards){
_local1 = (memoryMiniCards.length - 1);
while (_local1 >= 0) {
memoryMiniCards[_local1].cleanUp();
m_parent.renderManager.removeRenderObject(memoryMiniCards[_local1]);
memoryMiniCards[_local1] = null;
memoryMiniCards.pop();
_local1--;
};
memoryMiniCards = null;
};
}
public function checkHighStack(_arg1:Level){
var _local2:int;
var _local3:uint;
var _local4:int;
_local2 = 0;
while (_local2 < _arg1.getNumBlocksWide()) {
_local3 = 0;
_local4 = 0;
while (_local4 < memoryCards.length) {
if (memoryCards[_local4].column == _local2){
_local3++;
};
_local4++;
};
if (_local3 > 6){
blockrowHighlight[_local2] = true;
} else {
blockrowHighlight[_local2] = false;
};
_local2++;
};
updateHighlight();
}
public function updateHighlight(){
var _local1:int;
_local1 = 0;
while (_local1 < memoryCards.length) {
if (blockrowHighlight[memoryCards[_local1].column]){
memoryCards[_local1].myWindow.showWarning(true);
} else {
memoryCards[_local1].myWindow.showWarning(false);
};
_local1++;
};
}
public function cleanPlayfield(){
var _local1:int;
if (playfieldArray){
_local1 = 0;
while (_local1 < playfieldArray.length) {
playfieldArray[_local1] = null;
playfieldArray.pop();
_local1++;
};
playfieldArray = null;
};
}
}
}//package source
Section 34
//MyWindow (source.MyWindow)
package source {
import flash.display.*;
import flash.geom.*;
public class MyWindow extends MovieClip {
public var m_realParent;
public var frontSide:int;
public var windowBorder:WindowBorder;
public var warningsquareAnim:WarningsquareAnim;
private var symbol:MovieClip;
private var matrix:Matrix;
public var windowHolder:WindowHolder;
public var curtainAnim:Curtains;
public var thingsHolderObj:Object;
public function MyWindow(_arg1:MemoryMatcher, _arg2:MemoryCard2, _arg3:uint, _arg4:int, _arg5:Boolean){
m_realParent = _arg2;
warningsquareAnim = null;
thingsHolderObj = new Object();
symbol = null;
matrix = new Matrix();
addParts(_arg1, _arg3, _arg4, _arg5);
}
public function showSymbol(){
if (symbol){
symbol.visible = true;
};
}
public function myScale(_arg1:Number, _arg2:Number){
myScale2(windowHolder, _arg1, _arg2);
myScale2(thingsHolderObj.thingsAnim, _arg1, _arg2);
myScale2(windowBorder, _arg1, _arg2);
myScale2(curtainAnim, _arg1, _arg2);
if (symbol){
myScale2(symbol, _arg1, _arg2);
};
}
public function myScale2(_arg1:DisplayObject, _arg2:Number, _arg3:Number){
matrix.identity();
matrix.scale(_arg2, _arg3);
matrix.translate(_arg1.x, _arg1.y);
_arg1.transform.matrix = matrix;
}
public function moveToFront(_arg1){
this.setChildIndex(_arg1, (this.numChildren - 1));
}
public function updateThings(_arg1:int, _arg2:MemoryCard2){
if ((((frontSide >= 19)) || (((!(_arg2.winClosedState)) && (((!(_arg2.faceupLocked)) || (_arg2.selectionMark2.marked))))))){
updateAnimation(_arg1);
} else {
thingsHolderObj.thingsAnim.gotoAndStop(1);
};
}
public function addSymbolAnim(_arg1:int){
switch (_arg1){
case Constants.CARD_BACKSIDE_NORMAL:
break;
case Constants.CARD_BACKSIDE_GOLD:
break;
case Constants.CARD_BACKSIDE_PEEKABOO:
symbol = new HornAnim();
break;
case Constants.CARD_BACKSIDE_BULB:
symbol = new BulbAnim();
break;
default:
trace("ERROR: unknown symbol");
break;
};
if (symbol){
this.addChild(symbol);
symbol.gotoAndStop(1);
symbol.visible = false;
};
}
public function updateCurtain(_arg1:int){
m_realParent.winClosedState = curtainAnim.updateCurtain(_arg1, m_realParent.cardSide[Constants.CARD_CURRENT_SIDE], m_realParent.backSide, m_realParent.cardSide, m_realParent.closeSpeed, m_realParent.winClosedState, m_realParent.openSpeed);
}
public function addThingsAnim(_arg1:uint){
var _local2:int;
var _local3:*;
frontSide = _arg1;
_local2 = 19;
thingsHolderObj.frame = 1;
switch (_arg1){
case 0:
thingsHolderObj.thingsAnim = new Aristo_anim();
thingsHolderObj.speed = 0.03;
break;
case 1:
thingsHolderObj.thingsAnim = new Birdy_anim();
thingsHolderObj.speed = 0.03;
break;
case 2:
thingsHolderObj.thingsAnim = new Bunny_anim();
thingsHolderObj.speed = 0.03;
break;
case 3:
thingsHolderObj.thingsAnim = new Butterfly_anim();
thingsHolderObj.speed = 0.03;
break;
case 4:
thingsHolderObj.thingsAnim = new Cactus_anim();
thingsHolderObj.speed = 0.03;
break;
case 5:
thingsHolderObj.thingsAnim = new Dog_anim();
thingsHolderObj.speed = 0.03;
break;
case 6:
thingsHolderObj.thingsAnim = new Eye_anim();
thingsHolderObj.speed = 0.03;
break;
case 7:
thingsHolderObj.thingsAnim = new Fish_anim();
thingsHolderObj.speed = 0.03;
break;
case 8:
thingsHolderObj.thingsAnim = new Flower_anim();
thingsHolderObj.speed = 0.03;
break;
case 9:
thingsHolderObj.thingsAnim = new Ghost_anim();
thingsHolderObj.speed = 0.03;
break;
case 10:
thingsHolderObj.thingsAnim = new Greenguy_anim();
thingsHolderObj.speed = 0.03;
break;
case 11:
thingsHolderObj.thingsAnim = new King_anim();
thingsHolderObj.speed = 0.03;
break;
case 12:
thingsHolderObj.thingsAnim = new Lavalamp_anim();
thingsHolderObj.speed = 0.03;
break;
case 13:
thingsHolderObj.thingsAnim = new Napoleon_anim();
thingsHolderObj.speed = 0.03;
break;
case 14:
thingsHolderObj.thingsAnim = new Octopus_anim();
thingsHolderObj.speed = 0.03;
break;
case 15:
thingsHolderObj.thingsAnim = new Owl_anim();
thingsHolderObj.speed = 0.03;
break;
case 16:
thingsHolderObj.thingsAnim = new Pinkguy_anim();
thingsHolderObj.speed = 0.03;
break;
case 17:
thingsHolderObj.thingsAnim = new Sausage_anim();
thingsHolderObj.speed = 0.03;
break;
case 18:
thingsHolderObj.thingsAnim = new Turtle_anim();
thingsHolderObj.speed = 0.03;
break;
case (0 + _local2):
thingsHolderObj.thingsAnim = new Aristo_tint();
thingsHolderObj.speed = 0.03;
break;
case (1 + _local2):
thingsHolderObj.thingsAnim = new Birdy_tint();
thingsHolderObj.speed = 0.03;
break;
case (2 + _local2):
thingsHolderObj.thingsAnim = new Bunny_tint();
thingsHolderObj.speed = 0.03;
break;
case (3 + _local2):
thingsHolderObj.thingsAnim = new Butterfly_tint();
thingsHolderObj.speed = 0.03;
break;
case (4 + _local2):
thingsHolderObj.thingsAnim = new Cactus_tint();
thingsHolderObj.speed = 0.03;
break;
case (5 + _local2):
thingsHolderObj.thingsAnim = new Dog_tint();
thingsHolderObj.speed = 0.03;
break;
case (6 + _local2):
thingsHolderObj.thingsAnim = new Eye_tint();
thingsHolderObj.speed = 0.03;
break;
case (7 + _local2):
thingsHolderObj.thingsAnim = new Fish_tint();
thingsHolderObj.speed = 0.03;
break;
case (8 + _local2):
thingsHolderObj.thingsAnim = new Flower_tint();
thingsHolderObj.speed = 0.03;
break;
case (9 + _local2):
thingsHolderObj.thingsAnim = new Ghost_tint();
thingsHolderObj.speed = 0.03;
break;
case (10 + _local2):
thingsHolderObj.thingsAnim = new Greenguy_tint();
thingsHolderObj.speed = 0.03;
break;
case (11 + _local2):
thingsHolderObj.thingsAnim = new King_tint();
thingsHolderObj.speed = 0.03;
break;
case (12 + _local2):
thingsHolderObj.thingsAnim = new Lavalamp_tint();
thingsHolderObj.speed = 0.03;
break;
case (13 + _local2):
thingsHolderObj.thingsAnim = new Napoleon_tint();
thingsHolderObj.speed = 0.03;
break;
case (14 + _local2):
thingsHolderObj.thingsAnim = new Octopus_tint();
thingsHolderObj.speed = 0.03;
break;
case (15 + _local2):
thingsHolderObj.thingsAnim = new Owl_tint();
thingsHolderObj.speed = 0.03;
break;
case (16 + _local2):
thingsHolderObj.thingsAnim = new Pinkguy_tint();
thingsHolderObj.speed = 0.03;
break;
case (17 + _local2):
thingsHolderObj.thingsAnim = new Sausage_tint();
thingsHolderObj.speed = 0.03;
break;
case (18 + _local2):
thingsHolderObj.thingsAnim = new Turtle_tint();
thingsHolderObj.speed = 0.03;
break;
default:
trace("Error: thingsanim not found");
break;
};
if (thingsHolderObj.thingsAnim){
this.addChild(thingsHolderObj.thingsAnim);
if (_arg1 >= _local2){
_local3 = thingsHolderObj.thingsAnim.getChildAt(0);
_local3.gotoAndStop(thingsHolderObj.frame);
} else {
thingsHolderObj.thingsAnim.gotoAndStop(thingsHolderObj.frame);
};
} else {
trace("Error: thingsanim not found", _arg1);
};
}
public function orderWin(){
if (thingsHolderObj.thingsAnim){
moveToFront(thingsHolderObj.thingsAnim);
} else {
trace("no thingsAnim");
};
if (windowBorder){
moveToFront(windowBorder);
} else {
trace("no thingsAnim");
};
if (curtainAnim){
moveToFront(curtainAnim);
} else {
trace("no curtainAnim");
};
if (symbol){
moveToFront(symbol);
};
if (warningsquareAnim){
moveToFront(warningsquareAnim);
};
}
public function updateAnimation(_arg1:Number){
var _local2:uint;
var _local3:*;
if (frontSide >= 19){
_local3 = thingsHolderObj.thingsAnim.getChildAt(0);
thingsHolderObj.frame = (thingsHolderObj.frame + (_arg1 * thingsHolderObj.speed));
if (thingsHolderObj.frame > (_local3.totalFrames + 0.99)){
thingsHolderObj.frame = 1;
};
_local2 = Math.floor(thingsHolderObj.frame);
_local3.gotoAndStop(_local2);
} else {
thingsHolderObj.frame = (thingsHolderObj.frame + (_arg1 * thingsHolderObj.speed));
if (thingsHolderObj.frame > (thingsHolderObj.thingsAnim.totalFrames + 0.99)){
thingsHolderObj.frame = 1;
};
_local2 = Math.floor(thingsHolderObj.frame);
thingsHolderObj.thingsAnim.gotoAndStop(_local2);
};
}
public function gotoThingsFrame(_arg1:uint){
thingsHolderObj.frame = _arg1;
thingsHolderObj.thingsAnim.gotoAndStop(thingsHolderObj.frame);
}
public function update(_arg1:int, _arg2:MemoryCard2){
updateCurtain(_arg1);
updateThings(_arg1, _arg2);
}
public function changeThingsAnim(_arg1:uint){
if (thingsHolderObj.thingsAnim){
if (this.contains(thingsHolderObj.thingsAnim)){
this.removeChild(thingsHolderObj.thingsAnim);
};
addThingsAnim(_arg1);
myScale2(thingsHolderObj.thingsAnim, 0.9, 0.9);
orderWin();
} else {
trace("Error: thingsanim could not be changed");
};
}
public function addParts(_arg1:MemoryMatcher, _arg2:uint, _arg3:int, _arg4:Boolean){
windowHolder = new WindowHolder();
this.addChild(windowHolder);
addThingsAnim(_arg2);
windowBorder = new WindowBorder();
this.addChild(windowBorder);
curtainAnim = new Curtains(_arg3, _arg4);
this.addChild(curtainAnim);
addSymbolAnim(_arg3);
}
public function orderWinTint(){
if (curtainAnim){
moveToFront(curtainAnim);
} else {
trace("no curtainAnim");
};
if (thingsHolderObj.thingsAnim){
moveToFront(thingsHolderObj.thingsAnim);
} else {
trace("no thingsAnim");
};
if (windowBorder){
moveToFront(windowBorder);
} else {
trace("no thingsAnim");
};
if (symbol){
moveToFront(symbol);
};
if (warningsquareAnim){
moveToFront(warningsquareAnim);
};
}
public function cleanUp(_arg1:MemoryMatcher){
if (windowHolder){
removeChild(windowHolder);
windowHolder = null;
};
if (curtainAnim){
removeChild(curtainAnim);
curtainAnim = null;
};
if (thingsHolderObj){
removeChild(thingsHolderObj.thingsAnim);
thingsHolderObj.thingsAnim = null;
thingsHolderObj = null;
};
if (symbol){
removeChild(symbol);
symbol = null;
};
if (matrix){
matrix = null;
};
if (windowBorder){
windowBorder = null;
};
}
public function showWarning(_arg1:Boolean){
if (_arg1){
if (warningsquareAnim == null){
warningsquareAnim = new WarningsquareAnim();
this.addChild(warningsquareAnim);
};
} else {
if (warningsquareAnim != null){
if (this.contains(warningsquareAnim)){
this.removeChild(warningsquareAnim);
};
warningsquareAnim = null;
};
};
}
}
}//package source
Section 35
//PopPair (source.PopPair)
package source {
import flash.display.*;
public dynamic class PopPair extends MovieClip {
}
}//package source
Section 36
//PopPairStarbonus (source.PopPairStarbonus)
package source {
import flash.display.*;
public dynamic class PopPairStarbonus extends MovieClip {
}
}//package source
Section 37
//RenderManager (source.RenderManager)
package source {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class RenderManager {
public var renderObjectArray:Array;
private var matrix:Matrix;
public var bottomShape:Shape;
public var m_parent:MemoryMatcher;
public function RenderManager(_arg1:MemoryMatcher){
m_parent = _arg1;
renderObjectArray = new Array();
matrix = new Matrix();
}
public function addBottomShape(){
}
public function removeRenderObject(_arg1:DisplayObject){
var _local2:int;
if (_arg1){
if (renderObjectArray){
_local2 = 0;
while (_local2 < renderObjectArray.length) {
if (renderObjectArray[_local2]){
if (renderObjectArray[_local2].object){
if (renderObjectArray[_local2].object == _arg1){
renderObjectArray.splice(_local2, 1);
};
};
};
_local2++;
};
};
if (m_parent.contains(_arg1)){
m_parent.removeChild(_arg1);
};
};
}
public function cleanRenderObjectArray(){
var _local1:int;
if (renderObjectArray){
_local1 = (renderObjectArray.length - 1);
while (_local1 >= 0) {
if (renderObjectArray[_local1]){
if (renderObjectArray[_local1].object){
if (m_parent.contains(renderObjectArray[_local1].object)){
m_parent.removeChild(renderObjectArray[_local1].object);
};
};
renderObjectArray[_local1] = null;
};
renderObjectArray.pop();
_local1--;
};
renderObjectArray = null;
};
}
public function addRenderObject(_arg1:DisplayObject, _arg2:uint, _arg3:String, _arg4=true){
var _local5:Object;
var _local6:uint;
var _local7:int;
var _local8:int;
if (_arg1){
if (Constants.ALLOW_BANNER == true){
if (!_arg4){
myScale(_arg1, Constants.SCENE_SCALE_X, Constants.SCENE_SCALE_Y);
};
};
_local5 = new Object();
_local5.object = _arg1;
_local5.id = _arg3;
_local5.zbuffer = _arg2;
m_parent.addChild(_local5.object);
if (renderObjectArray){
_local6 = (m_parent.numChildren - 1);
_local7 = 0;
while (_local7 < renderObjectArray.length) {
if (renderObjectArray[_local7]){
if (_local5.zbuffer >= renderObjectArray[_local7].zbuffer){
_local8 = 0;
if (m_parent.contains(renderObjectArray[_local7].object)){
_local8 = m_parent.getChildIndex(renderObjectArray[_local7].object);
m_parent.setChildIndex(_local5.object, _local8);
_local6 = _local7;
break;
} else {
trace((("ERROR: addRenderObject: " + _local5.id) + " - is not in display list!"));
};
};
} else {
trace((("ERROR: addRenderObject: " + _local5.id) + " - no such object in array!"));
};
_local7++;
};
renderObjectArray.splice(_local6, 0, _local5);
} else {
trace("ERROR: addRenderObject: array not found");
};
} else {
trace((("ERROR: addRenderObject: " + _arg3) + " - object dont exist!"));
};
}
public function myScale(_arg1:DisplayObject, _arg2:Number, _arg3:Number){
matrix.identity();
matrix.scale(_arg2, _arg3);
matrix.translate(_arg1.x, _arg1.y);
_arg1.transform.matrix = matrix;
}
}
}//package source
Section 38
//Scorepop_negative (source.Scorepop_negative)
package source {
import flash.display.*;
import flash.text.*;
public dynamic class Scorepop_negative extends MovieClip {
public var textscore:TextField;
}
}//package source
Section 39
//Scorepop_positive (source.Scorepop_positive)
package source {
import flash.display.*;
import flash.text.*;
public dynamic class Scorepop_positive extends MovieClip {
public var textscore:TextField;
}
}//package source
Section 40
//SelectionMark (source.SelectionMark)
package source {
import flash.display.*;
public class SelectionMark extends MovieClip {
public var m_realParent:MemoryCard2;
public var locked:Boolean;
public var marked:Boolean;
public var markerAnim;
public var m_parent:MemoryMatcher;
public function SelectionMark(_arg1:MemoryMatcher, _arg2:MemoryCard2){
m_parent = _arg1;
m_realParent = _arg2;
marked = false;
locked = false;
}
public function lockSelectionMark(_arg1:Boolean):void{
m_parent.animationManager.removeAnimObj(markerAnim.marker);
if (_arg1){
markerAnim = new MarkerGreen();
} else {
markerAnim = new MarkerRed();
};
markerAnim.marker.x = m_realParent.x;
markerAnim.marker.y = m_realParent.y;
m_parent.animationManager.addAnimObj(markerAnim.marker, Constants.ANIM_MARKER, 0.03, 50, null, false, 0, "", "markerAnim.marker", false);
locked = true;
}
public function updateSelectionMark(_arg1:Number):void{
if (markerAnim){
markerAnim.marker.y = _arg1;
};
}
public function removeSelectionMark(_arg1:Boolean):void{
m_parent.animationManager.removeAnimObj(markerAnim.marker);
_arg1 = true;
locked = false;
marked = false;
}
public function addSelectionMark(_arg1:Boolean):void{
markerAnim = new Marker();
markerAnim.marker.x = m_realParent.x;
markerAnim.marker.y = m_realParent.y;
m_parent.animationManager.addAnimObj(markerAnim.marker, Constants.ANIM_MARKER, 0.03, 50, null, false, 0, "", "markerAnim.marker", false);
_arg1 = false;
marked = true;
}
public function update(_arg1:int){
}
public function cleanUp(){
if (markerAnim){
m_parent.animationManager.removeAnimObj(markerAnim.marker);
};
}
}
}//package source
Section 41
//SoundContainer (source.SoundContainer)
package source {
public class SoundContainer {
private var soundObjectArray:Array;
public var soundEnabled:Boolean;
public var volume:Number;
public function SoundContainer(){
addSounds();
soundEnabled = true;
volume = 1;
}
public function stopAllSounds(){
var _local1:int;
if (Constants.ALLOW_SOUND){
if (soundObjectArray){
_local1 = (soundObjectArray.length - 1);
while (_local1 >= 0) {
soundObjectArray[_local1].stopSound();
_local1--;
};
};
};
}
public function addSounds(){
soundObjectArray = new Array();
}
public function changeAllVolumes(_arg1:Number){
var _local2:int;
volume = _arg1;
if (Constants.ALLOW_SOUND){
if (soundObjectArray){
_local2 = 0;
while (_local2 < soundObjectArray.length) {
soundObjectArray[_local2].changeVolume(volume);
trace(("changeVolume: " + volume));
_local2++;
};
};
};
}
public function update(_arg1:int){
var _local2:int;
if (Constants.ALLOW_SOUND){
if (soundObjectArray){
_local2 = (soundObjectArray.length - 1);
while (_local2 >= 0) {
soundObjectArray[_local2].update(_arg1);
if (!soundObjectArray[_local2].isPlaying){
soundObjectArray[_local2].clean();
soundObjectArray.splice(_local2, 1);
};
_local2--;
};
};
};
}
public function changeVolume(_arg1:int, _arg2:Number){
var _local3:int;
if (Constants.ALLOW_SOUND){
while (_local3 < soundObjectArray.length) {
if (soundObjectArray[_local3].type == _arg1){
soundObjectArray[_local3].changeVolume(_arg2);
};
_local3++;
};
};
}
public function stopSound(_arg1:uint){
var _local2:int;
if (Constants.ALLOW_SOUND){
while (_local2 < soundObjectArray.length) {
if (soundObjectArray[_local2].type == _arg1){
soundObjectArray[_local2].clean();
soundObjectArray.splice(_local2, 1);
};
_local2++;
};
};
}
public function removeSounds(){
var _local1:int;
if (soundObjectArray){
_local1 = (soundObjectArray.length - 1);
while (_local1 >= 0) {
soundObjectArray[_local1].clean();
soundObjectArray[_local1] = null;
soundObjectArray.pop();
_local1--;
};
soundObjectArray = null;
};
}
public function soundEnable(_arg1){
if (_arg1){
trace("sound on");
soundEnabled = true;
changeAllVolumes(1);
} else {
trace("sound off");
soundEnabled = false;
changeAllVolumes(0);
};
}
public function playSound(_arg1:uint, _arg2:int, _arg3=false, _arg4=false){
if (Constants.ALLOW_SOUND){
switch (_arg1){
case Constants.SOUND_CARDMATCH_1:
soundObjectArray.push(new SoundObject(this, CardMatch1, Constants.SOUND_CARDMATCH_1, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_CARDMATCH_2:
soundObjectArray.push(new SoundObject(this, CardMatch2, Constants.SOUND_CARDMATCH_2, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_CARDMATCH_3:
soundObjectArray.push(new SoundObject(this, CardMatch3, Constants.SOUND_CARDMATCH_3, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_CARDMATCH_4:
soundObjectArray.push(new SoundObject(this, CardMatch4, Constants.SOUND_CARDMATCH_4, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_CARDMATCH_5:
soundObjectArray.push(new SoundObject(this, CardMatch5, Constants.SOUND_CARDMATCH_5, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_CARDMATCH_GOLD:
soundObjectArray.push(new SoundObject(this, GoldCardMatch, Constants.SOUND_CARDMATCH_GOLD, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_MEM_GAMEOVER_NEG:
soundObjectArray.push(new SoundObject(this, MemoryGameoverNeg, Constants.SOUND_MEM_GAMEOVER_NEG, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_MEM_GAMEOVER_POS:
soundObjectArray.push(new SoundObject(this, MemoryGameoverPos, Constants.SOUND_MEM_GAMEOVER_POS, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_MEM_LEVEL_CLEAR:
soundObjectArray.push(new SoundObject(this, MemoryLevelClear, Constants.SOUND_MEM_LEVEL_CLEAR, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_MEM_LEVEL_START:
soundObjectArray.push(new SoundObject(this, MemoryLevelStart, Constants.SOUND_MEM_LEVEL_START, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_MEMMATCH_GAMESONG:
soundObjectArray.push(new SoundObject(this, MemoryMatcherGamesong, Constants.SOUND_MEMMATCH_GAMESONG, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_MEMMATCH_LOOP:
soundObjectArray.push(new SoundObject(this, MemoryMatcherLoop, Constants.SOUND_MEMMATCH_LOOP, volume, Constants.SOUND_TYPE_MUSIC, 0.5));
break;
case Constants.SOUND_NO_MATCH:
soundObjectArray.push(new SoundObject(this, NoMatch, Constants.SOUND_NO_MATCH, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_TIME_IS_RUNNING_OUT:
soundObjectArray.push(new SoundObject(this, TimeIsRunningOut, Constants.SOUND_TIME_IS_RUNNING_OUT, volume, Constants.SOUND_TYPE_EFFECT, 1));
break;
case Constants.SOUND_START:
soundObjectArray.push(new SoundObject(this, StartSound, Constants.SOUND_START, volume, Constants.SOUND_TYPE_EFFECT, 0.5));
break;
};
soundObjectArray[(soundObjectArray.length - 1)].playSound(_arg2, _arg3, _arg4);
};
}
public function isPlaying(_arg1:uint){
var _local2:int;
if (Constants.ALLOW_SOUND){
while (_local2 < soundObjectArray.length) {
if (soundObjectArray[_local2].type == _arg1){
if (soundObjectArray[_local2].isPlaying){
return (true);
};
};
_local2++;
};
};
return (false);
}
}
}//package source
Section 42
//SoundObject (source.SoundObject)
package source {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class SoundObject extends MovieClip {
public var m_realParent:SoundContainer;
public var volume:Number;
public var sound;
public var fadeOut:Boolean;
private var soundChannel:SoundChannel;
public var type:int;
public var maxVolume:Number;
public var isPlaying:Boolean;
public var fadeIn:Boolean;
public var soundType:uint;
public function SoundObject(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
m_realParent = _arg1;
sound = new (_arg2);
soundChannel = new SoundChannel();
isPlaying = false;
soundType = _arg5;
maxVolume = _arg6;
changeVolume(_arg4);
fadeIn = false;
fadeOut = false;
type = _arg3;
}
public function stopSound(){
if (isPlaying){
soundChannel.stop();
isPlaying = false;
soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
public function clean(){
stopSound();
sound = null;
soundChannel = null;
}
public function playSound(_arg1, _arg2, _arg3){
if (!isPlaying){
soundChannel = sound.play(0, _arg1);
soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
isPlaying = true;
fadeIn = _arg2;
fadeOut = _arg3;
if (fadeIn){
volume = 0;
};
changeVolume(volume);
};
}
public function soundCompleteHandler(_arg1:Event){
isPlaying = false;
soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
public function update(_arg1:int){
if (m_realParent.soundEnabled){
if (fadeIn){
fadeInSound();
};
if (fadeOut){
fadeOutSound();
};
} else {
fadeIn = false;
};
}
public function fadeInSound(){
var _local1:*;
_local1 = (volume + 0.05);
if (_local1 < maxVolume){
changeVolume(_local1, true);
} else {
changeVolume(maxVolume, true);
fadeIn = false;
};
}
public function changeVolume(_arg1, _arg2=false){
var _local3:SoundTransform;
volume = _arg1;
if (volume > maxVolume){
volume = maxVolume;
};
_local3 = soundChannel.soundTransform;
_local3.volume = volume;
soundChannel.soundTransform = _local3;
}
public function fadeOutSound(){
var _local1:*;
_local1 = (volume - 0.1);
if (_local1 > 0){
changeVolume(_local1, true);
} else {
changeVolume(0, true);
fadeOut = false;
};
}
}
}//package source
Section 43
//TestGameData (source.TestGameData)
package source {
public class TestGameData {
public var m_parent:MemoryMatcher;
public function TestGameData(_arg1:MemoryMatcher){
m_parent = _arg1;
}
public function initialize(){
}
public function insertGameData(){
var _local1:*;
_local1 = Math.round((Math.random() * 2147483647));
m_parent.gameData = ((((((((((((((("<gamedata randomseed=\"" + _local1) + "\" lang=\"en\">") + "<userType id=\"0\">1</userType>") + "<text id=\"btn_quit_game\">QUIT</text>") + "<text id=\"btn_sound_off\">SOUND OFF</text>") + "<text id=\"btn_sound_on\">SOUND ON</text>") + "<text id=\"score\">SCORE: {0}</text>") + "<text id=\"time_left\">TIME LEFT: {0}</text>") + "<text id=\"instructions_title\">INSTRUCTIONS</text>") + "<text id=\"instructions_center\">Try to click the flashing box as many times possible before the time is up! It's not that hard.</text>") + "<text id=\"instructions_bottom\">The game will start in {0} seconds ...</text>") + "<text id=\"gameover_title\">GAME OVER</text>") + "<text id=\"gameover_center\">FINAL SCORE: {0}</text>") + "<text id=\"gameover_bottom\">The game will end in {0} seconds ...</text>") + "</gamedata>");
m_parent.print("insertGameData(): gameData has been planted.");
}
}
}//package source
Section 44
//Text (source.Text)
package source {
import flash.text.*;
public class Text {
public var myTextField:TextField;
private var myText:String;
public function Text(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7=""):void{
myTextField = new TextField();
myTextField.x = _arg2;
myTextField.y = _arg3;
myTextField.width = _arg4;
myTextField.height = _arg5;
myTextField.textColor = _arg6;
myTextField.selectable = false;
updateText(_arg7);
}
private function updateTextField():void{
myTextField.text = myText;
}
public function clean(_arg1:MemoryMatcher):void{
_arg1.removeChild(myTextField);
myTextField = null;
}
public function setPos(_arg1, _arg2):void{
myTextField.x = _arg1;
myTextField.y = _arg2;
}
public function setVisible(_arg1:Boolean):void{
myTextField.visible = _arg1;
}
public function updateText(_arg1:String):void{
myText = _arg1;
updateTextField();
}
public function addToText(_arg1:String):void{
myText = (myText + _arg1);
updateTextField();
}
}
}//package source
Section 45
//Timer (source.Timer)
package source {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;
private var lastTime:Number;
public var fps:Number;
public var currentTime:Number;
private var msPerTick:Number;
private var ticksPerSecond:Number;
public var passedTime:Number;
public function Timer(_arg1:Number){
ticksPerSecond = _arg1;
msPerTick = (1000 / ticksPerSecond);
lastTime = -1;
unprocessedTime = 0;
passedTime = 0;
currentTime = 0;
}
public function advanceTime(){
var _local1:int;
var _local2:int;
if (lastTime == -1){
lastTime = getTimer();
};
_local1 = getTimer();
passedTime = (_local1 - lastTime);
lastTime = _local1;
unprocessedTime = (unprocessedTime + passedTime);
currentTime = (currentTime + passedTime);
_local2 = int((unprocessedTime / msPerTick));
unprocessedTime = (unprocessedTime - (_local2 * msPerTick));
return (_local2);
}
}
}//package source
Section 46
//Aristo_anim (Aristo_anim)
package {
import flash.display.*;
public dynamic class Aristo_anim extends MovieClip {
}
}//package
Section 47
//Aristo_tint (Aristo_tint)
package {
import flash.display.*;
public dynamic class Aristo_tint extends MovieClip {
}
}//package
Section 48
//Back_01 (Back_01)
package {
import flash.display.*;
public dynamic class Back_01 extends MovieClip {
public var front:MovieClip;
public var meatBone:MovieClip;
public var weatherArrow:MovieClip;
public var cloud2:MovieClip;
public var aeroplane:MovieClip;
public var cloud1:MovieClip;
public var cat:MovieClip;
public var cloud3:MovieClip;
public var back:MovieClip;
}
}//package
Section 49
//Back_02 (Back_02)
package {
import flash.display.*;
public dynamic class Back_02 extends MovieClip {
public var waterDrip:MovieClip;
public var rat:MovieClip;
public var front:MovieClip;
public var smoke:MovieClip;
public var blimp:MovieClip;
public var cloud2:MovieClip;
public var cloud1:MovieClip;
public var cloud3:MovieClip;
public var soda:MovieClip;
public var back:MovieClip;
}
}//package
Section 50
//Back_03 (Back_03)
package {
import flash.display.*;
public dynamic class Back_03 extends MovieClip {
public var agent:MovieClip;
public var front:MovieClip;
public var back2:MovieClip;
public var back3:MovieClip;
public var cloud2:MovieClip;
public var cloud1:MovieClip;
public var cloud3:MovieClip;
public var back:MovieClip;
public var wreckingBall:MovieClip;
}
}//package
Section 51
//BalkAnim (BalkAnim)
package {
import flash.display.*;
public dynamic class BalkAnim extends MovieClip {
}
}//package
Section 52
//BalkAnimLong (BalkAnimLong)
package {
import flash.display.*;
public dynamic class BalkAnimLong extends MovieClip {
}
}//package
Section 53
//Birdy_anim (Birdy_anim)
package {
import flash.display.*;
public dynamic class Birdy_anim extends MovieClip {
}
}//package
Section 54
//Birdy_tint (Birdy_tint)
package {
import flash.display.*;
public dynamic class Birdy_tint extends MovieClip {
}
}//package
Section 55
//Bulb_curtain (Bulb_curtain)
package {
import flash.display.*;
public dynamic class Bulb_curtain extends MovieClip {
}
}//package
Section 56
//Bunny_anim (Bunny_anim)
package {
import flash.display.*;
public dynamic class Bunny_anim extends MovieClip {
}
}//package
Section 57
//Bunny_tint (Bunny_tint)
package {
import flash.display.*;
public dynamic class Bunny_tint extends MovieClip {
}
}//package
Section 58
//Butterfly_anim (Butterfly_anim)
package {
import flash.display.*;
public dynamic class Butterfly_anim extends MovieClip {
}
}//package
Section 59
//Butterfly_tint (Butterfly_tint)
package {
import flash.display.*;
public dynamic class Butterfly_tint extends MovieClip {
}
}//package
Section 60
//Cactus_anim (Cactus_anim)
package {
import flash.display.*;
public dynamic class Cactus_anim extends MovieClip {
}
}//package
Section 61
//Cactus_tint (Cactus_tint)
package {
import flash.display.*;
public dynamic class Cactus_tint extends MovieClip {
}
}//package
Section 62
//CardMatch1 (CardMatch1)
package {
import flash.media.*;
public dynamic class CardMatch1 extends Sound {
}
}//package
Section 63
//CardMatch2 (CardMatch2)
package {
import flash.media.*;
public dynamic class CardMatch2 extends Sound {
}
}//package
Section 64
//CardMatch3 (CardMatch3)
package {
import flash.media.*;
public dynamic class CardMatch3 extends Sound {
}
}//package
Section 65
//CardMatch4 (CardMatch4)
package {
import flash.media.*;
public dynamic class CardMatch4 extends Sound {
}
}//package
Section 66
//CardMatch5 (CardMatch5)
package {
import flash.media.*;
public dynamic class CardMatch5 extends Sound {
}
}//package
Section 67
//Dog_anim (Dog_anim)
package {
import flash.display.*;
public dynamic class Dog_anim extends MovieClip {
}
}//package
Section 68
//Dog_tint (Dog_tint)
package {
import flash.display.*;
public dynamic class Dog_tint extends MovieClip {
}
}//package
Section 69
//Eye_anim (Eye_anim)
package {
import flash.display.*;
public dynamic class Eye_anim extends MovieClip {
}
}//package
Section 70
//Eye_tint (Eye_tint)
package {
import flash.display.*;
public dynamic class Eye_tint extends MovieClip {
}
}//package
Section 71
//Fish_anim (Fish_anim)
package {
import flash.display.*;
public dynamic class Fish_anim extends MovieClip {
}
}//package
Section 72
//Fish_tint (Fish_tint)
package {
import flash.display.*;
public dynamic class Fish_tint extends MovieClip {
}
}//package
Section 73
//Flower_anim (Flower_anim)
package {
import flash.display.*;
public dynamic class Flower_anim extends MovieClip {
}
}//package
Section 74
//Flower_tint (Flower_tint)
package {
import flash.display.*;
public dynamic class Flower_tint extends MovieClip {
}
}//package
Section 75
//GetReadyAnim (GetReadyAnim)
package {
import flash.display.*;
public dynamic class GetReadyAnim extends MovieClip {
public var getReady:MovieClip;
}
}//package
Section 76
//Ghost_anim (Ghost_anim)
package {
import flash.display.*;
public dynamic class Ghost_anim extends MovieClip {
}
}//package
Section 77
//Ghost_tint (Ghost_tint)
package {
import flash.display.*;
public dynamic class Ghost_tint extends MovieClip {
}
}//package
Section 78
//GoldCardMatch (GoldCardMatch)
package {
import flash.media.*;
public dynamic class GoldCardMatch extends Sound {
}
}//package
Section 79
//Greenguy_anim (Greenguy_anim)
package {
import flash.display.*;
public dynamic class Greenguy_anim extends MovieClip {
}
}//package
Section 80
//Greenguy_tint (Greenguy_tint)
package {
import flash.display.*;
public dynamic class Greenguy_tint extends MovieClip {
}
}//package
Section 81
//Horn_curtain (Horn_curtain)
package {
import flash.display.*;
public dynamic class Horn_curtain extends MovieClip {
}
}//package
Section 82
//IntroGangAnim (IntroGangAnim)
package {
import flash.display.*;
public dynamic class IntroGangAnim extends MovieClip {
}
}//package
Section 83
//IntroScene1 (IntroScene1)
package {
import flash.display.*;
import flash.text.*;
public dynamic class IntroScene1 extends MovieClip {
public var banner:MovieClip;
public var background:MovieClip;
public var soundControl:MovieClip;
public var exitControl:MovieClip;
public var people:IntroGangAnim;
public var beams:MovieClip;
public var timeToExitText:TextField;
public var timeToExitValue:TextField;
}
}//package
Section 84
//IntroScene2 (IntroScene2)
package {
import flash.display.*;
import flash.text.*;
public dynamic class IntroScene2 extends MovieClip {
public var bulb:MovieClip;
public var right:MovieClip;
public var banner:MovieClip;
public var background:MovieClip;
public var soundControl:MovieClip;
public var exitControl:MovieClip;
public var bricks:MovieClip;
public var houseSide:MovieClip;
public var text3:TextField;
public var people:MovieClip;
public var text2:TextField;
public var wrong:MovieClip;
public var text1:TextField;
public var timeToExitText:TextField;
public var x2:MovieClip;
public var timeToExitValue:TextField;
public var backgroundPink:MovieClip;
public var beams:MovieClip;
public var lines:MovieClip;
}
}//package
Section 85
//King_anim (King_anim)
package {
import flash.display.*;
public dynamic class King_anim extends MovieClip {
}
}//package
Section 86
//King_tint (King_tint)
package {
import flash.display.*;
public dynamic class King_tint extends MovieClip {
}
}//package
Section 87
//Lavalamp_anim (Lavalamp_anim)
package {
import flash.display.*;
public dynamic class Lavalamp_anim extends MovieClip {
}
}//package
Section 88
//Lavalamp_tint (Lavalamp_tint)
package {
import flash.display.*;
public dynamic class Lavalamp_tint extends MovieClip {
}
}//package
Section 89
//LevelComplete1 (LevelComplete1)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelComplete1 extends MovieClip {
public var levelNumber:MovieClip;
public var completeText:TextField;
public var bonusText_right:TextField;
public var fruit:MovieClip;
public var background:Back_01;
public var completedText:TextField;
public var gameOverText:TextField;
public var scoreNum_right:TextField;
public var totalNum_right:TextField;
public var soundControl:MovieClip;
public var exitControl:MovieClip;
public var start:MovieClip;
public var completeMax:TextField;
public var sewerLid:MovieClip;
public var clockPointer:MovieClip;
public var scoreText_left:TextField;
public var bonusBar:MovieClip;
public var symbol:MovieClip;
public var scoreLines:MovieClip;
public var popComplete:MovieClip;
public var completeNum:TextField;
public var clockRed:MovieClip;
public var timeToExitText:TextField;
public var scoreText_right:TextField;
public var miniCardBar:BalkAnim;
public var timeToExitValue:TextField;
public var levelText:TextField;
public var scoreNum_left:TextField;
public var bonusNum_right:TextField;
public var getReady:GetReadyAnim;
public var totalText_right:TextField;
public var gameOverCloud:MovieClip;
public var lampFlash:MovieClip;
}
}//package
Section 90
//LevelComplete2 (LevelComplete2)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelComplete2 extends MovieClip {
public var levelNumber:MovieClip;
public var completeText:TextField;
public var bonusText_right:TextField;
public var fruit:MovieClip;
public var background:Back_02;
public var completedText:TextField;
public var gameOverText:TextField;
public var scoreNum_right:TextField;
public var totalNum_right:TextField;
public var soundControl:MovieClip;
public var exitControl:MovieClip;
public var start:MovieClip;
public var completeMax:TextField;
public var clockPointer:MovieClip;
public var scoreText_left:TextField;
public var bonusBar:MovieClip;
public var symbol:MovieClip;
public var scoreLines:MovieClip;
public var popComplete:MovieClip;
public var freeText:MovieClip;
public var completeNum:TextField;
public var clockRed:MovieClip;
public var timeToExitText:TextField;
public var scoreText_right:TextField;
public var miniCardBar:BalkAnim;
public var timeToExitValue:TextField;
public var levelText:TextField;
public var scoreNum_left:TextField;
public var bonusNum_right:TextField;
public var getReady:GetReadyAnim;
public var totalText_right:TextField;
public var gameOverCloud:MovieClip;
}
}//package
Section 91
//LevelComplete3 (LevelComplete3)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelComplete3 extends MovieClip {
public var levelNumber:MovieClip;
public var completeText:TextField;
public var bonusText_right:TextField;
public var fruit:MovieClip;
public var carriage:MovieClip;
public var background:Back_03;
public var completedText:TextField;
public var gameOverText:TextField;
public var scoreNum_right:TextField;
public var totalNum_right:TextField;
public var soundControl:MovieClip;
public var exitControl:MovieClip;
public var start:MovieClip;
public var completeMax:TextField;
public var clockPointer:MovieClip;
public var scoreText_left:TextField;
public var bonusBar:MovieClip;
public var symbol:MovieClip;
public var scoreLines:MovieClip;
public var popComplete:MovieClip;
public var miniCardBar:BalkAnimLong;
public var completeNum:TextField;
public var clockRed:MovieClip;
public var timeToExitText:TextField;
public var scoreText_right:TextField;
public var timeToExitValue:TextField;
public var levelText:TextField;
public var scoreNum_left:TextField;
public var bonusNum_right:TextField;
public var getReady:MovieClip;
public var totalText_right:TextField;
public var gameOverCloud:MovieClip;
}
}//package
Section 92
//Marker (Marker)
package {
import flash.display.*;
public dynamic class Marker extends MovieClip {
public var marker:MovieClip;
}
}//package
Section 93
//MarkerGreen (MarkerGreen)
package {
import flash.display.*;
public dynamic class MarkerGreen extends MovieClip {
public var marker:MovieClip;
}
}//package
Section 94
//MarkerRed (MarkerRed)
package {
import flash.display.*;
public dynamic class MarkerRed extends MovieClip {
public var marker:MovieClip;
}
}//package
Section 95
//MemoryGameoverNeg (MemoryGameoverNeg)
package {
import flash.media.*;
public dynamic class MemoryGameoverNeg extends Sound {
}
}//package
Section 96
//MemoryGameoverPos (MemoryGameoverPos)
package {
import flash.media.*;
public dynamic class MemoryGameoverPos extends Sound {
}
}//package
Section 97
//MemoryLevelClear (MemoryLevelClear)
package {
import flash.media.*;
public dynamic class MemoryLevelClear extends Sound {
}
}//package
Section 98
//MemoryLevelStart (MemoryLevelStart)
package {
import flash.media.*;
public dynamic class MemoryLevelStart extends Sound {
}
}//package
Section 99
//MemoryMatcher (MemoryMatcher)
package {
import flash.events.*;
import flash.display.*;
import gamestate.*;
import source.*;
import flash.text.*;
import com.*;
import flash.net.*;
import flash.utils.*;
import flash.external.*;
import flash.xml.*;
import flash.system.*;
public class MemoryMatcher extends MovieClip {
private var lastFrameGraphicsTime:Number;
public var numBlocksRemoved:int;
public var bonus:int;
public var soundContainer:SoundContainer;
public var currentGameState;
public var timeLeft:int;
public var ticks:uint;
public var freeGame:int;
public var currLevel:int;
private var stageKeyboardHandler:KeyboardHandler;
public var state:int;
public var score:int;
private var m_gameDataAttrib:Object;
public var gameData:String;
public var m_rng:Random;
public var renderManager:RenderManager;
public var timer:Timer;
public var gameStartSent:Boolean;
public var backGround:MovieClip;
public var myLocalData:SharedObject;
public var testGameData:TestGameData;
public var playedTimeRunningOut:Boolean;
public var animationManager:AnimationManager;
public var levelManager:LevelManager;
public var m_localizedString:Object;
public var fpsText:Text;
public var gameState:int;
public var memoryCardContainer:MemoryCardContainer;
public var fpsGraphicsText:Text;
private var lastFrameTime:Number;
public var scoreWithoutBonus:int;
public var updateTimer:Timer;
public function MemoryMatcher(){
gameData = null;
state = 0;
freeGame = 0;
gameStartSent = false;
timer = new Timer(Constants.TICKS_PER_SECOND);
animationManager = new AnimationManager(this);
renderManager = new RenderManager(this);
fpsText = new Text(this, 10, 10, 300, 100, 0xFF0000, "");
fpsGraphicsText = new Text(this, 10, 30, 300, 100, 0xFF0000, "");
changeGamestate(GameStateReceiveGameData, -1);
m_gameDataAttrib = {};
m_localizedString = {};
myLocalData = SharedObject.getLocal("mygamedata");
myLocalData.flush();
if (Constants.ALLOW_LOCAL_DATA){
testGameData = new TestGameData(this);
testGameData.insertGameData();
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
lastFrameTime = getTimer();
lastFrameGraphicsTime = getTimer();
stage.addEventListener(Event.ENTER_FRAME, advanceTime);
}
public function sendToProxy(_arg1:String, _arg2:String){
if (!Constants.ALLOW_LOCAL_DATA){
if (_arg1 == "playData"){
if (Constants.GOLD_GAME){
fscommand(_arg1, _arg2);
};
} else {
if (_arg1 == "gameStart"){
gameStartSent = true;
};
fscommand(_arg1, _arg2);
};
};
}
public function changeGamestate(_arg1:Class, _arg2:int){
if (currentGameState){
currentGameState.exit();
};
currentGameState = new _arg1(this);
currentGameState.enter(_arg2);
}
public function exitGame(){
print("exit game...");
cleanUpGame();
if (m_rng){
m_rng = null;
};
if (Constants.ALLOW_PROXY){
sendToProxy("gameQuit", "");
};
}
public function startUpGame(){
currLevel = Constants.INIT_STARTLEVEL;
score = 0;
ticks = 0;
numBlocksRemoved = 0;
playedTimeRunningOut = false;
stageKeyboardHandler = new KeyboardHandler(stage, this);
soundContainer = new SoundContainer();
levelManager = new LevelManager();
changeGamestate(GameStateIntro, -1);
}
public function getURL(_arg1:String, _arg2:String=null):void{
var request:URLRequest;
var url = _arg1;
var window = _arg2;
request = new URLRequest(url);
trace("getURL", url);
try {
navigateToURL(request, window);
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
private function advanceTime(_arg1:Event):void{
var _local2:int;
var _local3:*;
var _local4:*;
_local2 = (getTimer() - lastFrameGraphicsTime);
lastFrameGraphicsTime = getTimer();
fpsGraphicsText.myTextField.text = String(("fps (graphics): " + int((1000 / _local2))));
_local3 = timer.advanceTime();
_local4 = 0;
while (_local4 < _local3) {
update();
ticks++;
_local4++;
};
}
private function clickHandler(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
var _local4:*;
_local2 = int(_arg1.stageX);
_local3 = int(_arg1.stageY);
_local4 = 0;
switch (gameState){
case Constants.GAMESTATE_INTRO:
break;
case Constants.GAMESTATE_SETUP:
break;
case Constants.GAMESTATE_PLAYING:
if (currentGameState.state == 2){
memoryCardContainer.findClickedCard(_local2, _local3);
sendToProxy("playData", ((((((("42," + ticks) + ",") + _local2) + ",") + _local3) + ",0=") + _local4));
};
break;
case Constants.GAMESTATE_LEVELCOMPLETE:
sendToProxy("playData", ((((((("42," + ticks) + ",") + _local2) + ",") + _local3) + ",0=") + _local4));
currentGameState.startNextLevel();
break;
case Constants.GAMESTATE_GAMEOVER:
currentGameState.exit();
break;
default:
print(("ERROR: unknown clicked gamestate: " + gameState));
break;
};
}
public function print(_arg1:String){
if (Constants.ALLOW_TRACE){
trace(_arg1);
};
}
public function receiveGameData(){
var _local1:Boolean;
var _local2:Object;
var _local3:String;
var _local4:XMLDocument;
var _local5:XMLNode;
var _local6:int;
var _local7:*;
var _local8:XMLNode;
_local1 = false;
if (Constants.ALLOW_LOCAL_DATA){
if (gameData != null){
_local1 = true;
};
} else {
_local2 = ExternalInterface.call("getGameData");
if ((((_local2 == null)) || (!(_local2.success)))){
} else {
gameData = _local2.message;
_local1 = true;
};
};
if (_local1){
_local4 = new XMLDocument();
_local4.ignoreWhite = true;
_local4.parseXML(gameData);
_local5 = _local4.firstChild;
if (_local5.nodeName != "gamedata"){
print("Bad XML (expected <gamedata>)");
return;
};
for (_local3 in _local5.attributes) {
_local7 = _local5.attributes[_local3];
m_gameDataAttrib[_local3] = _local7;
};
for (_local3 in _local5.childNodes) {
_local8 = _local5.childNodes[_local3];
switch (_local8.nodeName){
case "text":
m_localizedString[_local8.attributes.id] = _local8.firstChild.nodeValue;
break;
case "userType":
if (_local8.attributes.id == 0){
if (!Constants.GOLD_GAME){
freeGame = parseInt(_local8.firstChild.nodeValue);
print(("::" + freeGame));
};
};
break;
default:
break;
};
};
_local6 = parseInt(m_gameDataAttrib["randomseed"]);
m_rng = new Random(_local6);
print(("init 0: seed=" + _local6));
startUpGame();
_local4 = null;
return;
};
print("waiting [_root.gameData] ...");
}
public function update(){
var _local1:int;
if (state == 0){
_local1 = (getTimer() - lastFrameTime);
lastFrameTime = getTimer();
fpsText.myTextField.text = String(("fps (logics): " + int((1000 / _local1))));
if (currentGameState){
currentGameState.update(_local1);
} else {
print("currentGameState missing!");
};
if (soundContainer){
soundContainer.update(_local1);
} else {
print("soundContainer missing!");
};
} else {
if (state == 1){
exitGame();
state = 2;
};
};
}
public function cleanUpGame(){
if (stageKeyboardHandler){
stageKeyboardHandler.cleanUp(stage);
stageKeyboardHandler = null;
};
if (levelManager){
levelManager.removeLevels();
levelManager = null;
};
if (testGameData){
testGameData = null;
};
if (soundContainer){
soundContainer.removeSounds();
soundContainer = null;
};
}
public function checkKeyboard(){
if (stageKeyboardHandler.getDown(32)){
sendToProxy("playData", (("25," + ticks) + ",0=0"));
spawnNewRow();
};
}
public function endGame(_arg1:int){
print("sending score...");
if (!gameStartSent){
if (Constants.ALLOW_PROXY){
sendToProxy("gameStart", "");
};
if (Constants.ALLOW_PROXY){
sendToProxy("playData", (((("11," + ticks) + ",0,") + Constants.GAME_VERSION) + ",0=0"));
};
};
if (Constants.ALLOW_PROXY){
sendToProxy("playData", (("99," + ticks) + ",0=0"));
sendToProxy("gameEnd", ("" + _arg1));
};
}
public function spawnNewRow(){
memoryCardContainer.setTimeRowSpawnTime(0);
}
public function fixStr(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("\r\n").join("\n");
return (_local2);
}
}
}//package
Section 100
//MemoryMatcherGamesong (MemoryMatcherGamesong)
package {
import flash.media.*;
public dynamic class MemoryMatcherGamesong extends Sound {
}
}//package
Section 101
//MemoryMatcherLoop (MemoryMatcherLoop)
package {
import flash.media.*;
public dynamic class MemoryMatcherLoop extends Sound {
}
}//package
Section 102
//MultiButton (MultiButton)
package {
import flash.display.*;
public dynamic class MultiButton extends SimpleButton {
}
}//package
Section 103
//Napoleon_anim (Napoleon_anim)
package {
import flash.display.*;
public dynamic class Napoleon_anim extends MovieClip {
}
}//package
Section 104
//Napoleon_tint (Napoleon_tint)
package {
import flash.display.*;
public dynamic class Napoleon_tint extends MovieClip {
}
}//package
Section 105
//NoMatch (NoMatch)
package {
import flash.media.*;
public dynamic class NoMatch extends Sound {
}
}//package
Section 106
//Octopus_anim (Octopus_anim)
package {
import flash.display.*;
public dynamic class Octopus_anim extends MovieClip {
}
}//package
Section 107
//Octopus_tint (Octopus_tint)
package {
import flash.display.*;
public dynamic class Octopus_tint extends MovieClip {
}
}//package
Section 108
//Owl_anim (Owl_anim)
package {
import flash.display.*;
public dynamic class Owl_anim extends MovieClip {
}
}//package
Section 109
//Owl_tint (Owl_tint)
package {
import flash.display.*;
public dynamic class Owl_tint extends MovieClip {
}
}//package
Section 110
//Pinkguy_anim (Pinkguy_anim)
package {
import flash.display.*;
public dynamic class Pinkguy_anim extends MovieClip {
}
}//package
Section 111
//Pinkguy_tint (Pinkguy_tint)
package {
import flash.display.*;
public dynamic class Pinkguy_tint extends MovieClip {
}
}//package
Section 112
//Sausage_anim (Sausage_anim)
package {
import flash.display.*;
public dynamic class Sausage_anim extends MovieClip {
}
}//package
Section 113
//Sausage_tint (Sausage_tint)
package {
import flash.display.*;
public dynamic class Sausage_tint extends MovieClip {
}
}//package
Section 114
//StartAnim (StartAnim)
package {
import flash.display.*;
public dynamic class StartAnim extends MovieClip {
public var start:MovieClip;
public var getReady:MovieClip;
}
}//package
Section 115
//StartButton (StartButton)
package {
import flash.display.*;
public dynamic class StartButton extends SimpleButton {
}
}//package
Section 116
//StartSound (StartSound)
package {
import flash.media.*;
public dynamic class StartSound extends Sound {
}
}//package
Section 117
//StartText (StartText)
package {
import flash.display.*;
public dynamic class StartText extends MovieClip {
}
}//package
Section 118
//Symbol1 (Symbol1)
package {
import flash.display.*;
public dynamic class Symbol1 extends MovieClip {
}
}//package
Section 119
//Things (Things)
package {
import flash.display.*;
public dynamic class Things extends MovieClip {
}
}//package
Section 120
//TimeIsRunningOut (TimeIsRunningOut)
package {
import flash.media.*;
public dynamic class TimeIsRunningOut extends Sound {
}
}//package
Section 121
//Turtle_anim (Turtle_anim)
package {
import flash.display.*;
public dynamic class Turtle_anim extends MovieClip {
}
}//package
Section 122
//Turtle_tint (Turtle_tint)
package {
import flash.display.*;
public dynamic class Turtle_tint extends MovieClip {
}
}//package
Section 123
//WarningsquareAnim (WarningsquareAnim)
package {
import flash.display.*;
public dynamic class WarningsquareAnim extends MovieClip {
}
}//package
Section 124
//WindowBorder (WindowBorder)
package {
import flash.display.*;
public dynamic class WindowBorder extends MovieClip {
}
}//package
Section 125
//WindowHolder (WindowHolder)
package {
import flash.display.*;
public dynamic class WindowHolder extends MovieClip {
}
}//package