Section 1
//Cat1Sax_42 (CatCorner_fla.Cat1Sax_42)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat1Sax_42 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat1Sax_42(){
addFrameScript(0, frame1, 10, frame11, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame50(){
stop();
}
}
}//package CatCorner_fla
Section 2
//Cat2Piano_88 (CatCorner_fla.Cat2Piano_88)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat2Piano_88 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat2Piano_88(){
addFrameScript(0, frame1, 10, frame11, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame50(){
stop();
}
}
}//package CatCorner_fla
Section 3
//Cat3Bass_92 (CatCorner_fla.Cat3Bass_92)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat3Bass_92 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat3Bass_92(){
addFrameScript(0, frame1, 10, frame11, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame50(){
stop();
}
}
}//package CatCorner_fla
Section 4
//Cat4Drums_95 (CatCorner_fla.Cat4Drums_95)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat4Drums_95 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat4Drums_95(){
addFrameScript(0, frame1, 9, frame10, 18, frame19, 28, frame29, 38, frame39, 48, frame49);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
function frame19(){
stop();
}
function frame29(){
stop();
}
function frame39(){
stop();
}
function frame49(){
stop();
}
}
}//package CatCorner_fla
Section 5
//Cat5Trumpet_98 (CatCorner_fla.Cat5Trumpet_98)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat5Trumpet_98 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat5Trumpet_98(){
addFrameScript(0, frame1, 9, frame10, 18, frame19, 28, frame29, 38, frame39, 48, frame49);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
function frame19(){
stop();
}
function frame29(){
stop();
}
function frame39(){
stop();
}
function frame49(){
stop();
}
}
}//package CatCorner_fla
Section 6
//Cat6Song_101 (CatCorner_fla.Cat6Song_101)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Cat6Song_101 extends MovieClip {
public var blink:MovieClip;
public var face:MovieClip;
public function Cat6Song_101(){
addFrameScript(9, frame10, 18, frame19, 28, frame29, 38, frame39, 48, frame49);
}
function frame10(){
stop();
}
function frame19(){
stop();
}
function frame29(){
stop();
}
function frame39(){
stop();
}
function frame49(){
stop();
}
}
}//package CatCorner_fla
Section 7
//CatRainbow_63 (CatCorner_fla.CatRainbow_63)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class CatRainbow_63 extends MovieClip {
public var rainbow:MovieClip;
public var blink:MovieClip;
public function CatRainbow_63(){
addFrameScript(0, frame1, 10, frame11, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame50(){
stop();
}
}
}//package CatCorner_fla
Section 8
//mc_PianoKeyBlack_18 (CatCorner_fla.mc_PianoKeyBlack_18)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class mc_PianoKeyBlack_18 extends MovieClip {
public function mc_PianoKeyBlack_18(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CatCorner_fla
Section 9
//mc_PianoKeyWhite_15 (CatCorner_fla.mc_PianoKeyWhite_15)
package CatCorner_fla {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class mc_PianoKeyWhite_15 extends MovieClip {
public function mc_PianoKeyWhite_15(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CatCorner_fla
Section 10
//Block (guipackage.Block)
package guipackage {
import modelpackage.*;
import flash.events.*;
import flash.display.*;
public class Block extends MovieClip implements Renderable {
protected var SHAKE_DECAY:int;// = 22
public var testClip:EyeAnimation;
public var shaking:Boolean;// = false
protected var grid:Grid;
protected var flippedAwayTick:Number;
protected var SHAKE_FACTOR:int;// = 4
protected var flippedBackTick:Number;
public var blockData:BlockData;
protected var endTick:Number;
public var prevActive:BlockData;
public var flipping:Boolean;// = false
protected var switchedBitmap:Boolean;// = false
public var nextBlockData:BlockData;
public var bitmap:Bitmap;
public var renderable:MovieClip;
protected var startFlipBackTick:Number;
public var orgY:int;
protected var startFlipAwayTick:Number;
public var orgX:int;
public var shakeEnd:int;// = -1
public static const BACKSIDE_SCALE:Number = 0.7;
public static var bitmapCopies:Array;
public static var blockBitmapData:BlockBitmapData;
public function Block(p__1:BlockData, p__2:Grid){
super();
blockData = p__1;
grid = p__2;
update();
}
public function update():void{
var l__3:Number;
if (bitmap != null){
removeChild(bitmap);
};
var l__1:int = blockData.color;
if (blockData.type == BlockData.RAINBOW){
l__1 = (BlockData.COLORS - 1);
};
var l__2:int = int(blockData.isFront);
bitmap = new Bitmap(BitmapData(Block.blockBitmapData.bitmaps[grid.size][l__1][l__2][blockData.type][blockData.status]));
bitmap.x = -(grid.blockHalfWidth);
bitmap.y = -(grid.blockHalfWidth);
addChildAt(bitmap, 0);
if (blockData.status == BlockData.ACTIVE){
if ((((((((prevActive == null)) || (!((blockData.color == prevActive.color))))) || (!((blockData.isFront == prevActive.isFront))))) || (!((blockData.type == prevActive.type))))){
if (renderable != null){
removeChild(renderable);
renderable = null;
};
l__3 = PlayArea.getScale(grid.size);
if (blockData.isFront == false){
l__3 = (l__3 * Block.BACKSIDE_SCALE);
};
if (blockData.type == BlockData.TIME){
renderable = new BlockTime();
renderable.clock.body.visible = false;
renderable.shadow.visible = false;
} else {
if (blockData.type == BlockData.GOLD){
renderable = new BlockGold();
renderable.herring1.visible = false;
renderable.herring2.visible = false;
renderable.shadow.visible = false;
} else {
if ((((blockData.type == BlockData.NORMAL)) && ((blockData.isFront == true)))){
if (blockData.color == 0){
renderable = new EyeAnimation1();
} else {
if (blockData.color == 1){
renderable = new EyeAnimation2();
} else {
if (blockData.color == 2){
renderable = new EyeAnimation3();
} else {
if (blockData.color == 3){
renderable = new EyeAnimation4();
} else {
if (blockData.color == 4){
renderable = new EyeAnimation5();
} else {
if (blockData.color == 5){
renderable = new EyeAnimation6();
};
};
};
};
};
};
if ((((grid.size >= 7)) && ((grid.size <= 9)))){
renderable.x = -1;
renderable.y = -1;
};
if (renderable != null){
};
} else {
if ((((blockData.type == BlockData.RAINBOW)) && ((blockData.isFront == true)))){
renderable = new EyeAnimationRainbow();
if ((((grid.size >= 7)) && ((grid.size <= 9)))){
renderable.x = -1;
renderable.y = -1;
};
};
};
};
};
if (renderable != null){
renderable.scaleX = l__3;
renderable.scaleY = l__3;
addChildAt(renderable, 1);
prevActive = blockData;
};
};
};
if (renderable != null){
if (blockData.status == BlockData.ACTIVE){
grid.playArea.gui.startRenderable(Renderable(renderable));
renderable.visible = true;
} else {
grid.playArea.gui.stopRenderable(Renderable(renderable));
renderable.visible = false;
};
};
}
public function nextBlock():void{
if (nextBlockData != null){
blockData = nextBlockData;
blockData.status = BlockData.NORMAL;
update();
};
}
public function initialize(p__1:Number, p__2:Number, p__3:Number, p__4:Number, p__5:Number):void{
this.startFlipAwayTick = p__1;
this.flippedAwayTick = p__2;
this.startFlipBackTick = p__3;
this.flippedBackTick = p__4;
this.endTick = p__5;
flipping = true;
switchedBitmap = false;
if (((!((renderable == null))) && ((renderable.visible == true)))){
grid.playArea.gui.stopRenderable(Renderable(renderable));
};
}
public function render(p__1:int, p__2:Number):int{
var l__3:Number;
var l__4:Number;
var l__5:Number;
var l__6:Number;
var l__7:int;
var l__8:Number;
if (flipping){
l__4 = (p__1 + p__2);
if (l__4 >= flippedBackTick){
scaleX = 1;
} else {
if (l__4 >= startFlipBackTick){
l__5 = (l__4 - startFlipBackTick);
l__6 = (flippedBackTick - startFlipBackTick);
l__3 = Math.pow((l__5 / l__6), 2);
if (l__3 < 0.01){
l__3 = 0.01;
};
scaleX = l__3;
} else {
if (l__4 >= flippedAwayTick){
if (flippedAwayTick == startFlipAwayTick){
l__3 = 0;
} else {
if (startFlipBackTick > endTick){
l__3 = 0;
} else {
l__3 = 0.01;
};
};
scaleX = l__3;
} else {
if (l__4 >= startFlipAwayTick){
l__5 = (l__4 - startFlipAwayTick);
l__6 = (flippedAwayTick - startFlipAwayTick);
l__3 = Math.pow((1 - (l__5 / l__6)), 2);
if (l__3 < 0.01){
l__3 = 0.01;
};
scaleX = l__3;
};
};
};
};
if (((!(switchedBitmap)) && ((l__4 >= flippedAwayTick)))){
nextBlock();
switchedBitmap = true;
};
if (l__4 >= endTick){
flipping = false;
return (Gui.RENDERABLE_STOP);
};
};
if (shaking){
if (shakeEnd == -1){
shakeEnd = (p__1 + SHAKE_DECAY);
orgX = x;
orgY = y;
if (canMiao()){
blockData.status = BlockData.MARKED;
update();
};
};
l__7 = (shakeEnd - p__1);
l__8 = (l__7 / SHAKE_DECAY);
if (l__7 > 0){
x = (orgX + (SHAKE_FACTOR * Math.random()));
y = (orgY + (SHAKE_FACTOR * Math.random()));
} else {
shaking = false;
shakeEnd = -1;
x = orgX;
y = orgY;
if (canMiao()){
blockData.status = BlockData.NORMAL;
update();
};
return (Gui.RENDERABLE_STOP);
};
};
return (Gui.RENDERABLE_CONTINUE);
}
public function canMiao():Boolean{
return ((((blockData.type == BlockData.BOMB)) || ((((((blockData.type == BlockData.NORMAL)) || ((blockData.type == BlockData.RAINBOW)))) && ((blockData.isFront == true))))));
}
}
}//package guipackage
Section 11
//BlockBitmapData (guipackage.BlockBitmapData)
package guipackage {
import modelpackage.*;
import flash.display.*;
import flash.geom.*;
public class BlockBitmapData {
public const ACTIVE:int = 2;
public const HILIGHT:Number = 1.6;
public const MAX_SIZE:int = 10;
public const BOMB:int = 1;
public const NEUTRAL:int = 2;
public const MARKED:int = 1;
public const BLANK:int = 0;
public const BACKSIDE:int = 5;
public const COOL:int = 4;
public const MIAO:int = 3;
public const NORMAL:int = 0;
public const MIN_SIZE:int = 5;
protected var halfWidths:Array;
protected var size:int;
protected var backgrounds:Array;
protected var block:MovieClip;
protected var takenRainbowBackgrounds:Array;
public var bitmaps:Array;
protected var paws:Array;
protected var clocks:Array;
protected var rainbowCats:Array;
protected var takenBackgrounds:Array;
protected var width:int;
protected var scale:Number;
protected var halfWidth:int;
protected var cats:Array;
protected var transparent:Boolean;
protected var color:int;
protected var scales:Array;
protected var rainbowPaws:Array;
protected var widths:Array;
protected var rainbowBackgrounds:Array;
protected var i:int;// = 0
protected var bitmapData:BitmapData;
protected var herrings:Array;
public function BlockBitmapData(){
super();
scales = new Array((MAX_SIZE + 1));
widths = new Array((MAX_SIZE + 1));
halfWidths = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
scale = PlayArea.getScale(size);
scales[size] = scale;
width = Math.floor((PlayArea.NATURAL_BLOCK_WIDTH * scale));
widths[size] = width;
halfWidths[size] = Math.floor((width / 2));
size++;
};
makeBackgrounds();
cats = new Array();
color = 0;
while (color < BlockData.COLORS) {
cats[color] = new Array((MAX_SIZE + 1));
color++;
};
}
public function makeBackgrounds():void{
backgrounds = new Array();
takenBackgrounds = new Array();
block = new BlockBackground();
transparent = false;
color = 0;
while (color < BlockData.COLORS) {
block.gotoAndStop((color + 1));
backgrounds[color] = new Array((MAX_SIZE + 1));
takenBackgrounds[color] = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
block.taken.visible = true;
bitmapData = copyToBitmapData();
takenBackgrounds[color][size] = bitmapData;
block.taken.visible = false;
bitmapData = copyToBitmapData();
backgrounds[color][size] = bitmapData;
size++;
};
color++;
};
}
public function makeCat(p__1:int, p__2:int):void{
size = p__1;
color = p__2;
transparent = true;
switch (color){
case 0:
block = new BlockCat1();
break;
case 1:
block = new BlockCat2();
break;
case 2:
block = new BlockCat3();
break;
case 3:
block = new BlockCat4();
break;
case 4:
block = new BlockCat5();
break;
case 5:
block = new BlockCat6();
break;
};
newSize(size);
cats[color][size] = new Array(((BACKSIDE + COOL) + 1));
block.head.face.visible = true;
block.shadow.visible = true;
block.head.gotoAndStop("blank");
block.sunglasses.visible = false;
block.hat.visible = false;
cats[color][size][BLANK] = copyToBitmapData();
block.head.face.visible = false;
block.shadow.visible = false;
block.head.visible = false;
block.sunglasses.visible = true;
block.hat.visible = true;
cats[color][size][BOMB] = copyToBitmapData();
block.head.gotoAndStop("neutral");
block.head.visible = true;
block.sunglasses.visible = false;
block.hat.visible = false;
cats[color][size][NEUTRAL] = copyToBitmapData();
block.head.gotoAndStop("miao");
cats[color][size][MIAO] = copyToBitmapData();
block.head.gotoAndStop("cool");
cats[color][size][COOL] = copyToBitmapData();
block.scaleX = (scale * Block.BACKSIDE_SCALE);
block.scaleY = (scale * Block.BACKSIDE_SCALE);
block.head.face.visible = true;
block.head.gotoAndStop("blank");
block.sunglasses.visible = false;
block.hat.visible = false;
cats[color][size][(BACKSIDE + BLANK)] = copyToBitmapData();
block.head.face.visible = false;
block.head.visible = false;
block.sunglasses.visible = true;
block.hat.visible = true;
cats[color][size][(BACKSIDE + BOMB)] = copyToBitmapData();
block.head.gotoAndStop("neutral");
block.head.visible = true;
block.sunglasses.visible = false;
block.hat.visible = false;
cats[color][size][(BACKSIDE + NEUTRAL)] = copyToBitmapData();
block.head.gotoAndStop("miao");
cats[color][size][(BACKSIDE + MIAO)] = copyToBitmapData();
block.head.gotoAndStop("cool");
cats[color][size][(BACKSIDE + COOL)] = copyToBitmapData();
}
public function makeMiscParts():void{
paws = new Array();
transparent = true;
block = new NormalBackside();
color = 0;
while (color < BlockData.COLORS) {
block.gotoAndStop((color + 1));
paws[color] = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
paws[color][size] = copyToBitmapData();
size++;
};
color++;
};
rainbowBackgrounds = new Array();
takenRainbowBackgrounds = new Array();
block = new BlockRainbow();
block.head.visible = false;
block.shadow.visible = false;
transparent = false;
color = 0;
while (color <= 0) {
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
block.taken.visible = true;
bitmapData = copyToBitmapData();
takenRainbowBackgrounds[size] = bitmapData;
block.taken.visible = false;
bitmapData = copyToBitmapData();
rainbowBackgrounds[size] = bitmapData;
size++;
};
color++;
};
rainbowCats = new Array(BlockData.COLORS);
block.bg.visible = false;
block.head.visible = true;
transparent = true;
color = (BlockData.COLORS - 1);
rainbowCats[color] = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
rainbowCats[color][size] = new Array((COOL + 1));
block.shadow.visible = true;
block.head.gotoAndStop("blank");
block.head.rainbow.visible = true;
rainbowCats[color][size][BLANK] = copyToBitmapData();
block.shadow.visible = false;
block.head.rainbow.visible = false;
block.head.gotoAndStop("neutral");
rainbowCats[color][size][NEUTRAL] = copyToBitmapData();
block.head.gotoAndStop("miao");
rainbowCats[color][size][MIAO] = copyToBitmapData();
block.head.gotoAndStop("cool");
rainbowCats[color][size][COOL] = copyToBitmapData();
size++;
};
rainbowPaws = new Array(BlockData.COLORS);
block = new RainbowBackside();
transparent = true;
color = (BlockData.COLORS - 1);
rainbowPaws[color] = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
rainbowPaws[color][size] = copyToBitmapData();
size++;
};
}
public function makeHerringsAndClocks():void{
herrings = new Array();
transparent = true;
block = new BlockGold();
block.glimmRotate1.visible = false;
block.glimmRotate2.visible = false;
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
herrings[size] = new Array(2);
herrings[size][0] = copyToBitmapData();
block.scaleX = (scale * Block.BACKSIDE_SCALE);
block.scaleY = (scale * Block.BACKSIDE_SCALE);
herrings[size][1] = copyToBitmapData();
size++;
};
clocks = new Array();
transparent = true;
block = new BlockTime();
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
clocks[size] = new Array(4);
block.clock.minute.visible = true;
block.clock.hour.visible = true;
clocks[size][0] = copyToBitmapData();
block.clock.minute.visible = false;
block.clock.hour.visible = false;
clocks[size][1] = copyToBitmapData();
block.scaleX = (scale * Block.BACKSIDE_SCALE);
block.scaleY = (scale * Block.BACKSIDE_SCALE);
block.clock.minute.visible = true;
block.clock.hour.visible = true;
clocks[size][2] = copyToBitmapData();
block.clock.minute.visible = false;
block.clock.hour.visible = false;
clocks[size][3] = copyToBitmapData();
size++;
};
}
public function makeFinalBacksides1():void{
var l__1:int;
var l__2:int;
var l__3:BitmapData;
var l__4:BitmapData;
var l__5:BitmapData;
var l__6:BitmapData;
var l__7:BitmapData;
var l__8:BitmapData;
var l__9:BitmapData;
var l__10:BitmapData;
bitmaps = new Array((MAX_SIZE + 1));
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
bitmaps[size] = new Array();
color = 0;
while (color < BlockData.COLORS) {
bitmaps[size][color] = new Array();
l__1 = 0;
bitmaps[size][color][l__1] = new Array();
l__3 = BitmapData(takenBackgrounds[color][size]);
l__2 = BlockData.NORMAL;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__4 = BitmapData(paws[color][size]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__4], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__4], width);
if (color == (BlockData.COLORS - 1)){
l__10 = BitmapData(takenRainbowBackgrounds[size]);
l__2 = BlockData.RAINBOW;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__4 = BitmapData(rainbowPaws[color][size]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__10, l__4], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__10, l__4], width);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__10, l__4], width);
};
l__2 = BlockData.BOMB;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__7 = BitmapData(cats[color][size][(BACKSIDE + BLANK)]);
l__8 = BitmapData(cats[color][size][(BACKSIDE + NEUTRAL)]);
l__9 = BitmapData(cats[color][size][(BACKSIDE + BOMB)]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
l__8 = BitmapData(cats[color][size][(BACKSIDE + MIAO)]);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
l__8 = BitmapData(cats[color][size][(BACKSIDE + COOL)]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
color++;
};
size++;
};
}
public function makeFinalBacksides2():void{
var l__1:int;
var l__2:int;
var l__3:BitmapData;
var l__4:BitmapData;
var l__5:BitmapData;
var l__6:BitmapData;
var l__7:BitmapData;
var l__8:BitmapData;
var l__9:BitmapData;
var l__10:BitmapData;
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
color = 0;
while (color < BlockData.COLORS) {
l__1 = 0;
l__3 = BitmapData(takenBackgrounds[color][size]);
l__2 = BlockData.GOLD;
bitmaps[size][color][l__1][l__2] = new Array(3);
l__5 = BitmapData(herrings[size][1]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__5], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__5], width);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__5], width);
l__2 = BlockData.TIME;
bitmaps[size][color][l__1][l__2] = new Array(4);
l__6 = BitmapData(clocks[size][2]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__6], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__6], width);
l__6 = BitmapData(clocks[size][3]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__6], width);
color++;
};
size++;
};
}
public function makeFinalFronts1():void{
var l__1:int;
var l__2:int;
var l__3:BitmapData;
var l__4:BitmapData;
var l__5:BitmapData;
var l__6:BitmapData;
var l__7:BitmapData;
var l__8:BitmapData;
var l__9:BitmapData;
var l__10:BitmapData;
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
color = 0;
while (color < BlockData.COLORS) {
l__1 = 1;
bitmaps[size][color][l__1] = new Array();
l__3 = BitmapData(backgrounds[color][size]);
l__2 = BlockData.NORMAL;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__7 = BitmapData(cats[color][size][BLANK]);
l__8 = BitmapData(cats[color][size][NEUTRAL]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__7, l__8], width);
l__8 = BitmapData(cats[color][size][MIAO]);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__7, l__8], width);
l__8 = BitmapData(cats[color][size][COOL]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__7, l__8], width);
if (color == (BlockData.COLORS - 1)){
l__10 = BitmapData(rainbowBackgrounds[size]);
l__2 = BlockData.RAINBOW;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__7 = BitmapData(rainbowCats[color][size][BLANK]);
l__8 = BitmapData(rainbowCats[color][size][NEUTRAL]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__10, l__7, l__8], width);
l__8 = BitmapData(rainbowCats[color][size][MIAO]);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__10, l__7, l__8], width);
l__8 = BitmapData(rainbowCats[color][size][COOL]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__10, l__7, l__8], width);
};
color++;
};
size++;
};
}
public function makeFinalFronts2():void{
var l__1:int;
var l__2:int;
var l__3:BitmapData;
var l__4:BitmapData;
var l__5:BitmapData;
var l__6:BitmapData;
var l__7:BitmapData;
var l__8:BitmapData;
var l__9:BitmapData;
var l__10:BitmapData;
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
color = 0;
while (color < BlockData.COLORS) {
l__1 = 1;
l__3 = BitmapData(backgrounds[color][size]);
l__2 = BlockData.BOMB;
bitmaps[size][color][l__1][l__2] = new Array((ACTIVE + 1));
l__7 = BitmapData(cats[color][size][BLANK]);
l__8 = BitmapData(cats[color][size][NEUTRAL]);
l__9 = BitmapData(cats[color][size][BOMB]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
l__8 = BitmapData(cats[color][size][MIAO]);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
l__8 = BitmapData(cats[color][size][COOL]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__7, l__8, l__9], width);
color++;
};
size++;
};
}
public function makeFinalFronts3():void{
var l__1:int;
var l__2:int;
var l__3:BitmapData;
var l__4:BitmapData;
var l__5:BitmapData;
var l__6:BitmapData;
var l__7:BitmapData;
var l__8:BitmapData;
var l__9:BitmapData;
var l__10:BitmapData;
size = MIN_SIZE;
while (size <= MAX_SIZE) {
newSize(size);
color = 0;
while (color < BlockData.COLORS) {
l__1 = 1;
l__3 = BitmapData(backgrounds[color][size]);
l__2 = BlockData.GOLD;
bitmaps[size][color][l__1][l__2] = new Array(3);
l__5 = BitmapData(herrings[size][0]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__5], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__5], width);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__5], width);
l__2 = BlockData.TIME;
bitmaps[size][color][l__1][l__2] = new Array(3);
l__6 = BitmapData(clocks[size][0]);
bitmaps[size][color][l__1][l__2][NORMAL] = mergeBitmapDatas([l__3, l__6], width);
bitmaps[size][color][l__1][l__2][MARKED] = mergeBitmapDatas([l__3, l__6], width);
l__6 = BitmapData(clocks[size][1]);
bitmaps[size][color][l__1][l__2][ACTIVE] = mergeBitmapDatas([l__3, l__6], width);
color++;
};
size++;
};
}
public function newSize(p__1:int):void{
scale = Number(scales[p__1]);
width = int(widths[p__1]);
halfWidth = int(halfWidths[p__1]);
block.scaleX = scale;
block.scaleY = scale;
block.x = halfWidth;
block.y = halfWidth;
}
public function copyToBitmapData():BitmapData{
var l__1:Sprite = new Sprite();
l__1.addChild(block);
var l__2:Rectangle = new Rectangle(0, 0, width, width);
var l__3:BitmapData = new BitmapData(width, width, true, 0);
l__3.draw(l__1, null, null, null, l__2, false);
return (l__3);
}
public function mergeBitmapDatas(p__1:Array, p__2:int):BitmapData{
var l__5:BitmapData;
var l__4:int;
var l__3:BitmapData = new BitmapData(p__2, p__2, false, 0);
while (l__4 < p__1.length) {
l__5 = BitmapData(p__1[l__4]);
l__3.draw(l__5);
l__4++;
};
return (l__3);
}
}
}//package guipackage
Section 12
//BlockGold (guipackage.BlockGold)
package guipackage {
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
public class BlockGold extends MovieClip implements Renderable {
public const TICKS_PER_ROTATION:int = 80;
public var shadow:Sprite;
public var glimmRotate1:Sprite;
public var glimmRotate2:Sprite;
public var herring1:Sprite;
public var herring2:Sprite;
protected var startTick:int;// = -1
public function BlockGold(){
super();
addFrameScript(0, frame1);
}
public function render(p__1:int, p__2:Number):int{
if (startTick == -1){
startTick = p__1;
};
var l__3:Number = ((((p__1 + p__2) - startTick) * 360) / TICKS_PER_ROTATION);
glimmRotate1.rotation = l__3;
glimmRotate2.rotation = l__3;
return (Gui.RENDERABLE_CONTINUE);
}
function frame1(){
stop();
}
}
}//package guipackage
Section 13
//BlockTime (guipackage.BlockTime)
package guipackage {
import flash.events.*;
import flash.display.*;
public class BlockTime extends MovieClip implements Renderable {
public const TICKS_PER_MINUTE_ROTATION:int = 240;
public const TICKS_PER_SECOND_ROTATION:int = 40;
public var shadow:Sprite;
public var clock:MovieClip;
protected var startTick:int;// = -1
public function BlockTime(){
super();
}
public function render(p__1:int, p__2:Number):int{
if (startTick == -1){
startTick = p__1;
};
var l__3:Number = ((((p__1 + p__2) - startTick) * 360) / TICKS_PER_MINUTE_ROTATION);
var l__4:Number = ((((p__1 + p__2) - startTick) * 360) / TICKS_PER_SECOND_ROTATION);
clock.minute.rotation = l__3;
clock.hour.rotation = l__4;
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 14
//EyeAnimation (guipackage.EyeAnimation)
package guipackage {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class EyeAnimation extends MovieClip implements Renderable {
public var eye1:Sprite;
public var eye2:Sprite;
public function EyeAnimation(){
super();
}
public function render(p__1:int, p__2:Number):int{
eye1.rotation = getMouseDirection(eye1);
eye2.rotation = getMouseDirection(eye2);
return (Gui.RENDERABLE_CONTINUE);
}
public function getMouseDirection(p__1:DisplayObject):Number{
var l__3:Point;
var l__4:Point;
var l__5:Number;
var l__6:Number;
var l__7:Number;
var l__2:Number = 0;
if (p__1 != null){
l__3 = localToGlobal(new Point(p__1.x, p__1.y));
l__4 = new Point(stage.mouseX, stage.mouseY);
l__5 = (stage.mouseX - l__3.x);
l__6 = (stage.mouseY - l__3.y);
l__7 = Math.atan2(l__6, l__5);
l__2 = ((l__7 * 360) / (2 * Math.PI));
};
return (l__2);
}
}
}//package guipackage
Section 15
//Footsteps (guipackage.Footsteps)
package guipackage {
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
public class Footsteps extends MovieClip implements Renderable {
public var nextLevel:MovieClip;
public var frames:int;// = 59
public var endTick:int;
public var startTick:int;
public static var nextLevelString:String;
public function Footsteps(){
super();
addFrameScript(58, frame59);
nextLevel.nextLevelTf.text = nextLevelString;
}
public function render(p__1:int, p__2:Number):int{
var l__3:int = (endTick - startTick);
var l__4:Number = ((p__1 - startTick) / l__3);
var l__5:int = Math.floor((l__4 * frames));
gotoAndStop(l__5);
if (p__1 < endTick){
return (Gui.RENDERABLE_CONTINUE);
};
return (Gui.RENDERABLE_REMOVE);
}
function frame59(){
stop();
}
}
}//package guipackage
Section 16
//GameBackground (guipackage.GameBackground)
package guipackage {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class GameBackground extends Sprite implements Renderable {
protected const HALF_TIME_TICKS:Number = 26.64;
public var g:MovieClip;
public var level:TextField;
public var gui:Gui;
public var scoreLabel:TextField;
public var aiss:MovieClip;
public var score:TextField;
protected var endTick:Number;
protected var startTick:Number;
public var shuffleBtn:Sprite;
public var diss:MovieClip;
public var paw:Sprite;
public var timeLabel:TextField;
public var ciss2:MovieClip;
public var diss2:MovieClip;
public var c2:MovieClip;
public var giss:MovieClip;
public var ciss:MovieClip;
protected var timeWarnings:int;
public var time:TextField;
public var levelLabel:TextField;
protected var middleTick:Number;
public var a:MovieClip;
public var b:MovieClip;
public var c:MovieClip;
public var d:MovieClip;
public var f:MovieClip;
public var fiss:MovieClip;
public var e:MovieClip;
public var e2:MovieClip;
public var shuffleBtn1:MovieClip;
public var shuffleBtn2:MovieClip;
public var d2:MovieClip;
protected var chordReleaseTimer:Timer;
public var shuffleLabel:TextField;
public function GameBackground(p__1:Gui){
super();
gui = p__1;
var l__2:TextFormat = new TextFormat();
l__2.letterSpacing = 2;
levelLabel.defaultTextFormat = l__2;
timeLabel.defaultTextFormat = l__2;
scoreLabel.defaultTextFormat = l__2;
shuffleLabel.defaultTextFormat = l__2;
levelLabel.text = p__1.document.getTranslation("level_label");
if (p__1.document.relaxMode){
timeLabel.text = p__1.document.getTranslation("remaining_moves");
} else {
timeLabel.text = p__1.document.getTranslation("time_label");
};
scoreLabel.text = p__1.document.getTranslation("score_label");
shuffleLabel.text = p__1.document.getTranslation("shuffle_label");
d = shuffleBtn2;
diss = shuffleBtn1;
chordReleaseTimer = new Timer(200, 1);
paw.mouseEnabled = false;
}
public function releaseChord(p__1:Event=null):void{
c.gotoAndStop(1);
ciss.gotoAndStop(1);
d.gotoAndStop(1);
diss.gotoAndStop(1);
e.gotoAndStop(1);
f.gotoAndStop(1);
fiss.gotoAndStop(1);
g.gotoAndStop(1);
giss.gotoAndStop(1);
a.gotoAndStop(1);
aiss.gotoAndStop(1);
b.gotoAndStop(1);
c2.gotoAndStop(1);
ciss2.gotoAndStop(1);
d2.gotoAndStop(1);
diss2.gotoAndStop(1);
e2.gotoAndStop(1);
}
public function playChord(p__1:int):void{
switch (p__1){
case 0:
d.gotoAndStop(2);
g.gotoAndStop(2);
c2.gotoAndStop(2);
break;
case 1:
c.gotoAndStop(2);
f.gotoAndStop(2);
b.gotoAndStop(2);
break;
case 2:
b.gotoAndStop(2);
diss.gotoAndStop(2);
giss.gotoAndStop(2);
break;
case 3:
e.gotoAndStop(2);
a.gotoAndStop(2);
d2.gotoAndStop(2);
break;
case 4:
diss.gotoAndStop(2);
giss.gotoAndStop(2);
ciss2.gotoAndStop(2);
break;
case 5:
f.gotoAndStop(2);
b.gotoAndStop(2);
diss2.gotoAndStop(2);
break;
};
chordReleaseTimer.start();
chordReleaseTimer.addEventListener(TimerEvent.TIMER_COMPLETE, releaseChord);
}
public function timeWarning(p__1:int, p__2:int):void{
timeWarnings = 1;
endTick = 0;
gui.startRenderable(this);
}
public function stopTimeWarning():void{
gui.stopRenderable(this);
time.textColor = 0;
}
public function render(p__1:int, p__2:Number):int{
var l__3:Number = (p__1 + p__2);
if (l__3 > endTick){
if (timeWarnings == 0){
return (Gui.RENDERABLE_STOP);
};
timeWarnings--;
startTick = l__3;
middleTick = (startTick + HALF_TIME_TICKS);
endTick = (middleTick + HALF_TIME_TICKS);
gui.soundManager.timeWarning();
};
if (l__3 > middleTick){
time.textColor = 0;
} else {
time.textColor = 11143700;
};
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 17
//GameEndScoreAnim (guipackage.GameEndScoreAnim)
package guipackage {
import modelpackage.*;
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
public class GameEndScoreAnim extends MovieClip implements Renderable {
protected const FRAMES_PER_TICK:Number = 0.7;
public var gui:Gui;
public var endTick:int;// = 90
public var startTick:int;// = 0
public var star:MovieClip;
public function GameEndScoreAnim(){
super();
addFrameScript(29, frame30);
gui = OutroAnimation(parent).gui;
gui.startRenderable(this);
}
public function render(p__1:int, p__2:Number):int{
if (startTick == 0){
startTick = p__1;
endTick = (endTick + startTick);
star.outroScoreLabel.text = gui.document.getTranslation("outro_score_label");
star.textField.text = ("" + OutroAnimation(parent).scoreInt);
};
var l__3:int = (p__1 - startTick);
var l__4:int = Math.ceil((l__3 * FRAMES_PER_TICK));
if (l__4 > totalFrames){
l__4 = totalFrames;
};
gotoAndStop(l__4);
if (p__1 < endTick){
return (Gui.RENDERABLE_CONTINUE);
};
gotoAndStop(totalFrames);
return (Gui.RENDERABLE_STOP);
}
function frame30(){
stop();
}
}
}//package guipackage
Section 18
//Grid (guipackage.Grid)
package guipackage {
import modelpackage.*;
import flash.events.*;
import flash.display.*;
public class Grid extends Sprite {
public var size:int;
public var playArea:PlayArea;
protected var flippingBlocks:Array;
public var blockHalfWidth:Number;
protected var blocks:Array;
public var colors:int;
public var blockWidth:Number;
protected var gui:Gui;
public function Grid(p__1:Gui, p__2:PlayArea, p__3:Array, p__4:int){
var l__5:int;
var l__6:int;
var l__7:int;
var l__8:BlockData;
var l__9:int;
var l__10:Block;
super();
gui = p__1;
playArea = p__2;
size = p__3.length;
colors = p__4;
blockWidth = (p__2.scale * PlayArea.NATURAL_BLOCK_WIDTH);
blockHalfWidth = (blockWidth / 2);
blocks = new Array();
l__5 = 0;
while (l__5 < size) {
blocks[l__5] = new Array();
l__6 = p__2.getPos(l__5);
l__7 = 0;
while (l__7 < size) {
l__8 = BlockData(p__3[l__5][l__7]);
l__9 = p__2.getPos(l__7);
l__10 = new Block(l__8, this);
l__10.x = l__9;
l__10.y = l__6;
addChild(l__10);
blocks[l__5][l__7] = l__10;
l__7++;
};
l__5++;
};
}
public function destroy():void{
var l__2:int;
var l__3:Object;
var l__4:Block;
var l__1:int;
while (l__1 < size) {
l__2 = 0;
while (l__2 < size) {
l__3 = blocks[l__1][l__2];
if (l__3 != null){
l__4 = Block(l__3);
gui.stopRenderable(l__4);
};
l__2++;
};
l__1++;
};
}
public function levelAnimationPart1(p__1:int, p__2:int, p__3:Array):void{
var l__10:BlockData;
var l__11:Block;
var l__16:int;
var l__17:Object;
var l__14:int;
var l__15:int;
var l__4:Number = ((p__2 - p__1) * 0.33);
var l__5:Number = p__1;
var l__6:Number = (p__1 + l__4);
var l__7:Number = Number.MAX_VALUE;
var l__8:Number = Number.MAX_VALUE;
var l__9:Number = l__6;
var l__12:Array = blocks.slice();
var l__13:int = p__3.length;
while (l__14 < l__13) {
l__10 = BlockData(p__3[l__14]);
l__11 = Block(l__12[l__10.row][l__10.col]);
l__12[l__10.row][l__10.col] = null;
l__11.initialize(l__5, l__6, l__7, l__8, l__9);
gui.startRenderable(l__11);
l__14++;
};
l__5 = ((p__1 + l__4) + l__4);
l__6 = p__2;
while (l__15 < size) {
l__16 = 0;
while (l__16 < size) {
l__17 = l__12[l__15][l__16];
if (l__17 != null){
l__11 = Block(l__17);
l__11.initialize(l__5, l__6, l__7, l__8, p__2);
gui.startRenderable(l__11);
};
l__16++;
};
l__15++;
};
}
public function levelAnimationPart3(p__1:int, p__2:int):void{
var l__8:BlockData;
var l__9:Block;
var l__11:int;
var l__12:Object;
var l__10:int;
var l__3:Number = ((p__2 - p__1) * 0.33);
var l__4:Number = p__1;
var l__5:Number = p__1;
var l__6:Number = (p__1 + l__3);
var l__7:Number = p__2;
while (l__10 < size) {
l__11 = 0;
while (l__11 < size) {
l__12 = blocks[l__10][l__11];
if (l__12 != null){
l__9 = Block(l__12);
l__9.initialize(l__4, l__5, l__6, l__7, p__2);
gui.startRenderable(l__9);
};
l__11++;
};
l__10++;
};
}
public function flipBlocks(p__1:int, p__2:int, p__3:Array):void{
var l__9:BlockData;
var l__10:Block;
var l__8:int;
var l__4:Number = (p__2 - p__1);
var l__5:Number = (p__1 + (l__4 * 0.5));
var l__6:Number = (p__1 + (l__4 * 0.5));
var l__7:int = p__3.length;
while (l__8 < l__7) {
l__9 = BlockData(p__3[l__8]);
l__10 = Block(blocks[l__9.row][l__9.col]);
if (l__10.flipping){
gui.stopRenderable(l__10);
l__10.nextBlock();
l__10.scaleX = 1;
l__10.scaleY = 1;
l__10.flipping = false;
};
if (l__10.shaking){
gui.stopRenderable(l__10);
l__10.x = playArea.getPos(l__9.col);
l__10.y = playArea.getPos(l__9.row);
l__10.shaking = false;
};
l__10.nextBlockData = l__9;
l__10.initialize(p__1, l__5, l__6, p__2, p__2);
gui.startRenderable(l__10);
l__8++;
};
}
public function shakeBlocks(p__1:Array):void{
var l__4:BlockData;
var l__5:Block;
var l__3:int;
var l__2:int = p__1.length;
while (l__3 < l__2) {
l__4 = BlockData(p__1[l__3]);
l__5 = Block(blocks[l__4.row][l__4.col]);
if ((((l__5.flipping == false)) && ((l__5.shaking == false)))){
l__5.shaking = true;
gui.startRenderable(l__5);
};
l__3++;
};
}
public function showStatus(p__1:Array):void{
var l__3:int;
var l__4:Block;
var l__2:int;
while (l__2 < size) {
l__3 = 0;
while (l__3 < size) {
l__4 = Block(blocks[l__2][l__3]);
l__4.blockData = BlockData(p__1[l__2][l__3]);
l__4.update();
l__3++;
};
l__2++;
};
}
public function normalize():void{
var l__2:int;
var l__3:Block;
var l__1:int;
while (l__1 < size) {
l__2 = 0;
while (l__2 < size) {
l__3 = Block(blocks[l__1][l__2]);
gui.stopRenderable(l__3);
l__3.nextBlock();
l__3.scaleX = 1;
l__3.scaleY = 1;
l__3.x = playArea.getPos(l__2);
l__3.y = playArea.getPos(l__1);
l__2++;
};
l__1++;
};
}
}
}//package guipackage
Section 19
//Gui (guipackage.Gui)
package guipackage {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import librarynames.*;
public class Gui extends Sprite {
public var document:Document;
public var guiControl:GuiControl;
public var playArea:PlayArea;
public var gameBackground:GameBackground;
protected var outro:Outro;
protected var soundOn:String;
var soundManager:SoundManager;
public var debugStr:String;
protected var soundOff:String;
protected var objectsToRender:Array;
protected var intro:Intro;
protected var gameRunning:Boolean;// = false
protected var background:Background;
public static const RENDERABLE_CONTINUE:int = 0;
public static const RENDERABLE_STOP:int = 1;
public static const RENDERABLE_HIDE:int = 2;
public static const RENDERABLE_REMOVE:int = 3;
public function Gui(p__1:Document, p__2, p__3){
super();
document = p__1;
x = (p__2 / 2);
y = (p__3 / 2);
objectsToRender = new Array();
background = new Background();
addChild(background);
soundManager = new SoundManager(this);
var l__4:* = soundManager.startIntroSound();
background.exitBtnTf.visible = false;
intro = new Intro(this, l__4);
intro.y = -90;
addChild(intro);
startRenderable(intro);
background.sndBtn.addEventListener(MouseEvent.CLICK, soundManager.toggleSound);
background.sndBtn.addEventListener(MouseEvent.CLICK, toggleSoundBtn);
}
public function toggleSoundBtn(p__1:Event):void{
if (background.soundBtnTf.text == soundOn){
background.soundBtnTf.text = soundOff;
} else {
background.soundBtnTf.text = soundOn;
};
}
protected function initDisplayObjects():void{
}
public function setIntroTranslations():void{
var l__1:TextFormat = new TextFormat();
l__1.letterSpacing = 2;
intro.clickToStartTf.defaultTextFormat = l__1;
intro.clickToStartTf.text = document.getTranslation("click_to_start");
intro.rainbowCatInstructionTf.text = document.getTranslation("rainbow_cat_instruction");
intro.coolCatInstructionTf.text = document.getTranslation("cool_cat_instruction");
intro.herringInstructionTf.text = document.getTranslation("herring_instruction");
intro.countDownTf1.text = document.getTranslation("intro_countdown_first");
intro.countDownTf2.text = document.getTranslation("countdown_last");
intro.instructionsLabel.text = document.getTranslation("instructions_label");
Footsteps.nextLevelString = document.getTranslation("next_level");
if (document.relaxMode){
intro.instructionTf.text = document.getTranslation("intro_instruction_relax");
intro.shuffleInstructionTf.text = document.getTranslation("shuffle_instruction_relax");
intro.clockInstructionTf.text = document.getTranslation("clock_instruction_relax");
} else {
intro.instructionTf.text = document.getTranslation("intro_instruction");
intro.shuffleInstructionTf.text = document.getTranslation("shuffle_instruction");
intro.clockInstructionTf.text = document.getTranslation("clock_instruction");
};
soundOn = document.getTranslation("sound_on").toUpperCase();
soundOff = document.getTranslation("sound_off").toUpperCase();
background.exitBtnTf.text = document.getTranslation("exit_button").toUpperCase();
background.soundBtnTf.text = soundOn;
}
public function startGame():void{
background.exitBtnTf.visible = true;
gameBackground = new GameBackground(this);
addChild(gameBackground);
playArea = new PlayArea(this);
playArea.x = -140;
playArea.y = -60;
addChild(playArea);
background.exitBtn.addEventListener(MouseEvent.CLICK, exitClicked);
document.startGame();
stage.addEventListener(MouseEvent.MOUSE_MOVE, playArea.mouseMove);
stage.addEventListener(MouseEvent.MOUSE_UP, playArea.mouseUp);
gameBackground.shuffleBtn.addEventListener(MouseEvent.CLICK, shuffleClick);
gameBackground.shuffleBtn.addEventListener(MouseEvent.CLICK, shuffleClick);
gameBackground.shuffleBtn.addEventListener(MouseEvent.ROLL_OVER, shuffleRollOver);
gameBackground.shuffleBtn.addEventListener(MouseEvent.ROLL_OUT, shuffleRollOut);
gameBackground.shuffleLabel.mouseEnabled = false;
soundManager.gameStart();
}
public function shuffleClick(p__1:MouseEvent):void{
if (gameRunning){
document.addPlayData([App.INPUT_SHUFFLE]);
};
}
public function shuffleRollOver(p__1:MouseEvent):void{
gameBackground.shuffleBtn1.gotoAndStop(2);
gameBackground.shuffleBtn2.gotoAndStop(2);
}
public function shuffleRollOut(p__1:MouseEvent):void{
gameBackground.shuffleBtn1.gotoAndStop(1);
gameBackground.shuffleBtn2.gotoAndStop(1);
}
public function selectRect(p__1:int, p__2:int, p__3:int, p__4:int):void{
if (gameRunning){
document.addPlayData([App.INPUT_SELECT_RECT, p__1, p__2, p__3, p__4]);
};
}
public function selectChange(p__1:int, p__2:int, p__3:int, p__4:int):void{
if (gameRunning){
document.addPlayData([App.INPUT_SELECT_CHANGE, p__1, p__2, p__3, p__4]);
};
}
private function exitClicked(p__1:MouseEvent):void{
background.exitBtn.removeEventListener(MouseEvent.CLICK, exitClicked);
document.addPlayData([App.INPUT_EXIT]);
}
private function test(p__1:MouseEvent):void{
if (gameRunning){
};
}
private function toggleSound(p__1:MouseEvent):void{
}
public function startRenderable(p__1:Renderable):void{
var l__2:int = objectsToRender.indexOf(p__1, 0);
if (l__2 == -1){
objectsToRender.push(p__1);
};
}
public function stopRenderable(p__1:Renderable):void{
var l__2:int = objectsToRender.indexOf(p__1, 0);
if (l__2 != -1){
objectsToRender.splice(l__2, 1);
};
}
public function render(p__1:int, p__2:Number):void{
var l__4:Renderable;
var l__5:int;
var l__6:DisplayObjectContainer;
guiControl.executeCommands(p__1, p__2);
var l__3:int = (objectsToRender.length - 1);
while (l__3 >= 0) {
l__4 = Renderable(objectsToRender[l__3]);
l__5 = l__4.render(p__1, p__2);
if (l__5 != Gui.RENDERABLE_CONTINUE){
stopRenderable(l__4);
if (l__5 == Gui.RENDERABLE_HIDE){
DisplayObject(l__4).visible = false;
} else {
if (l__5 == Gui.RENDERABLE_REMOVE){
l__6 = DisplayObject(l__4).parent;
l__6.removeChild(DisplayObject(l__4));
};
};
};
l__3--;
};
}
public function showTimeWarning():void{
}
public function showOutro(p__1:int, p__2:Boolean, p__3:int, p__4:int):void{
playArea.visible = false;
removeChild(gameBackground);
background.exitBtnTf.visible = false;
background.soundBtnTf.visible = false;
background.exitBtn.visible = false;
background.sndBtn.visible = false;
outro = new Outro(this, p__1, p__2, p__3, p__4);
addChild(outro);
startRenderable(outro);
soundManager.gameEnd();
}
public function setGameRunning(p__1:Boolean):void{
gameRunning = p__1;
}
public function getGameRunning():Boolean{
return (gameRunning);
}
public function updateScore(p__1:int):void{
gameBackground.score.text = ("" + p__1);
}
public function scorePop(p__1:int, p__2:Number, p__3:Number):void{
playArea.scorePop(p__1, p__2, p__3);
}
public function initGame(p__1:Array, p__2:int):void{
playArea.newLevel(p__1, p__2);
}
public function updateTime(p__1:int, p__2:int):void{
var l__3:String = String(p__1);
if (l__3.length < 1){
l__3 = "0";
};
var l__4:String = ("" + p__2);
if (l__4.length < 2){
l__4 = ("0" + l__4);
};
gameBackground.time.text = ((l__3 + ":") + l__4);
}
public function updateLevel(p__1:int):void{
gameBackground.level.text = ("" + (p__1 + 1));
}
}
}//package guipackage
Section 20
//GuiControl (guipackage.GuiControl)
package guipackage {
import librarynames.*;
public class GuiControl {
protected const GAME_OVER:int = 2;
protected const UPDATE_TIME:int = 1;
protected const SHOW_TIME_WARNING:int = 4;
protected const FLIP_BLOCKS:int = 7;
protected const LEVEL_ANIMATION_PART_1:int = 5;
protected const LEVEL_ANIMATION_PART_2:int = 13;
protected const LEVEL_ANIMATION_PART_3:int = 15;
protected const STOP_TIME_WARNING:int = 16;
protected const SET_GAME_RUNNING:int = 0;
protected const UPDATE_MOVES:int = 18;
protected const INIT_GAME:int = 6;
protected const NORMALIZE_GRID:int = 17;
protected const SHUFFLE:int = 14;
protected const COMBO_SOUND:int = 11;
protected const SCORE_POP:int = 9;
protected const UPDATE_LEVEL:int = 8;
protected const SHOW_STATUS:int = 10;
protected const UPDATE_SCORE:int = 3;
protected const SHAKE_BLOCKS:int = 12;
protected var commands:Array;
protected var gui:Gui;
public function GuiControl(_arg1:Gui){
super();
this.gui = _arg1;
commands = new Array();
}
public function shuffle():void{
commands.push([SHUFFLE]);
}
public function levelAnimationPart1(_arg1:int, _arg2:int, _arg3:Array, _arg4:int, _arg5:int, _arg6:int):void{
commands.push([LEVEL_ANIMATION_PART_1, _arg1, _arg2, _arg3, _arg5, _arg6]);
}
public function levelAnimationPart3(_arg1:int, _arg2:int, _arg3:Array, _arg4:int):void{
commands.push([LEVEL_ANIMATION_PART_3, _arg1, _arg2, _arg3, _arg4]);
}
public function comboSound(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
commands.push([COMBO_SOUND, _arg1, _arg2, _arg3, _arg4, _arg5]);
}
public function initGame(_arg1:Array, _arg2:int):void{
commands.push([INIT_GAME, _arg1, _arg2]);
}
public function executeCommands(_arg1:int, _arg2:Number):void{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
while (commands.length > 0) {
_local3 = commands.shift();
_local4 = int(_local3[0]);
_local5 = 1;
switch (_local4){
case SET_GAME_RUNNING:
gui.setGameRunning(Boolean(_local3[1]));
break;
case UPDATE_TIME:
gui.updateTime(int(_local3[1]), int(_local3[2]));
break;
case UPDATE_SCORE:
gui.updateScore(int(_local3[1]));
break;
case GAME_OVER:
gui.showOutro(int(_local3[1]), Boolean(_local3[2]), int(_local3[3]), int(_local3[4]));
break;
case SHOW_TIME_WARNING:
gui.gameBackground.timeWarning(_arg1, _arg2);
break;
case STOP_TIME_WARNING:
gui.gameBackground.stopTimeWarning();
break;
case LEVEL_ANIMATION_PART_1:
_local6 = _local5;
_local5 = (_local5 + 1);
_local7 = _local5;
_local5 = (_local5 + 1);
_local8 = _local5;
_local5 = (_local5 + 1);
gui.playArea.grid.levelAnimationPart1(int(_local3[_local6]), int(_local3[_local7]), _local3[_local8]);
_local9 = _local5;
_local5 = (_local5 + 1);
_local10 = _local5;
_local5 = (_local5 + 1);
_local11 = _local5;
_local5 = (_local5 + 1);
gui.soundManager.level(int(_local3[_local9]), int(_local3[_local10]), int(_local3[_local11]));
break;
case LEVEL_ANIMATION_PART_2:
_local12 = _local5;
_local5 = (_local5 + 1);
_local13 = _local5;
_local5 = (_local5 + 1);
gui.playArea.levelAnimationPart2(int(_local3[_local12]), int(_local3[_local13]));
break;
case LEVEL_ANIMATION_PART_3:
gui.playArea.newLevel(_local3[3], int(_local3[4]));
_local14 = _local5;
_local5 = (_local5 + 1);
_local15 = _local5;
_local5 = (_local5 + 1);
gui.playArea.grid.levelAnimationPart3(int(_local3[_local14]), int(_local3[_local15]));
break;
case INIT_GAME:
gui.initGame(_local3[1], int(_local3[2]));
break;
case FLIP_BLOCKS:
_local16 = _local5;
_local5 = (_local5 + 1);
_local17 = _local5;
_local5 = (_local5 + 1);
_local18 = _local5;
_local5 = (_local5 + 1);
gui.playArea.grid.flipBlocks(int(_local3[_local16]), int(_local3[_local17]), _local3[_local18]);
break;
case NORMALIZE_GRID:
gui.playArea.grid.normalize();
break;
case UPDATE_MOVES:
gui.gameBackground.time.text = ("" + int(_local3[1]));
break;
case UPDATE_LEVEL:
gui.updateLevel(int(_local3[1]));
break;
case SCORE_POP:
gui.scorePop(int(_local3[1]), Number(_local3[2]), Number(_local3[3]));
break;
case SHOW_STATUS:
gui.playArea.grid.showStatus(_local3[1]);
break;
case COMBO_SOUND:
gui.soundManager.comboSound(int(_local3[1]), int(_local3[2]), int(_local3[3]), int(_local3[4]), int(_local3[5]));
break;
case SHAKE_BLOCKS:
gui.playArea.grid.shakeBlocks(_local3[1]);
gui.soundManager.notCombo();
break;
case SHUFFLE:
gui.soundManager.shuffle();
break;
default:
throw (new Error(("unknown gui command: " + _local4)));
};
};
}
public function levelAnimationPart2(_arg1:int, _arg2:int):void{
commands.push([LEVEL_ANIMATION_PART_2, _arg1, _arg2]);
}
public function setGameRunning(_arg1:Boolean):void{
commands.push([SET_GAME_RUNNING, _arg1]);
}
public function updateTimeDisplay(_arg1:int, _arg2:int):void{
commands.push([UPDATE_TIME, _arg1, _arg2]);
}
public function stopTimeWarning():void{
commands.push([STOP_TIME_WARNING]);
}
public function updateLevel(_arg1:int):void{
commands.push([UPDATE_LEVEL, _arg1]);
}
public function shakeBlocks(_arg1:Array):void{
commands.push([SHAKE_BLOCKS, _arg1]);
}
public function updateScore(_arg1:int):void{
commands.push([UPDATE_SCORE, _arg1]);
}
public function showStatus(_arg1:Array):void{
commands.push([SHOW_STATUS, _arg1]);
}
public function showTimeWarning():void{
commands.push([SHOW_TIME_WARNING]);
}
public function flipBlocks(_arg1:int, _arg2:int, _arg3:Array):void{
commands.push([FLIP_BLOCKS, _arg1, _arg2, _arg3]);
}
public function scorePop(_arg1:int, _arg2:Number, _arg3:Number):void{
commands.push([SCORE_POP, _arg1, _arg2, _arg3]);
}
public function gameOver(_arg1:int, _arg2:Boolean, _arg3:int, _arg4:int):void{
commands.push([GAME_OVER, _arg1, _arg2, _arg3, _arg4]);
}
public function normalizeGrid():void{
commands.push([NORMALIZE_GRID]);
}
public function updateMoves(_arg1:int):void{
commands.push([UPDATE_MOVES, _arg1]);
}
}
}//package guipackage
Section 21
//InstrumentAnim (guipackage.InstrumentAnim)
package guipackage {
import flash.events.*;
import flash.display.*;
public class InstrumentAnim extends MovieClip implements Renderable {
protected const FRAMES_PER_TICK:Number = 0.6;
public var endTick:int;// = 2147483647
public var startTick:int;// = 0
public function InstrumentAnim(){
super();
OutroAnimation(parent).gui.startRenderable(this);
}
public function render(p__1:int, p__2:Number):int{
if ((((startTick == 0)) || ((p__1 > endTick)))){
startTick = p__1;
endTick = (startTick + (totalFrames / FRAMES_PER_TICK));
};
var l__3:int = (p__1 - startTick);
var l__4:int = Math.ceil((l__3 * FRAMES_PER_TICK));
if (l__4 > totalFrames){
l__4 = totalFrames;
};
gotoAndStop(l__4);
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 22
//Intro (guipackage.Intro)
package guipackage {
import modelpackage.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import librarynames.*;
public class Intro extends Sprite implements Renderable {
public var time:MovieClip;
protected var size:int;// = 5
protected var endTick:int;// = -1
protected var startTick:int;// = -100
public var instructionTf:TextField;
protected var startButtonInitializeTick:int;// = 2147483647
protected var countDownTicks:Number;
public var shuffleInstructionTf:TextField;
protected var lastTimeStr:String;
public var clockInstructionTf:TextField;
public var startButton:StartButton;
public var rainbow:MovieClip;
protected var bitmapGenerationPart:int;// = 0
protected var gui:Gui;
public var block1:MovieClip;
public var herring:MovieClip;
public var block3:MovieClip;
public var rainbowCatInstructionTf:TextField;
public var block2:MovieClip;
public var coolCat:MovieClip;
public var instructionsLabel:TextField;
public var clickToStartTf:TextField;
public var coolCatInstructionTf:TextField;
protected var countDownSec:int;
public var herringInstructionTf:TextField;
protected var color:int;
public var countDownDigitTf:TextField;
public var countDownTf2:TextField;
public var countDownTf1:TextField;
public function Intro(p__1:Gui, p__2){
super();
gui = p__1;
countDownTicks = ((p__2 * App.TICKS_PER_SECOND) / 1000);
countDownSec = (countDownTicks / App.TICKS_PER_SECOND);
var l__3:TextFormat = new TextFormat();
l__3.letterSpacing = 2;
countDownTf1.defaultTextFormat = l__3;
countDownTf1.visible = false;
countDownDigitTf.visible = false;
countDownTf2.visible = false;
rainbow.head.gotoAndStop("neutral");
coolCat.head.gotoAndStop("neutral");
block1.stop();
block1.taken.visible = false;
block2.stop();
block2.taken.visible = false;
block3.stop();
block3.taken.visible = false;
mouseEnabled = false;
}
public function render(p__1:int, p__2:Number):int{
if (startTick == -100){
startTick = p__1;
endTick = (startTick + countDownTicks);
};
switch (bitmapGenerationPart++){
case 0:
Block.blockBitmapData = new BlockBitmapData();
break;
case 1:
Block.blockBitmapData.makeCat(size++, color);
bitmapGenerationPart--;
if (size > 10){
color++;
if (color < BlockData.COLORS){
size = 5;
} else {
bitmapGenerationPart++;
};
};
break;
case 2:
Block.blockBitmapData.makeMiscParts();
break;
case 3:
Block.blockBitmapData.makeHerringsAndClocks();
break;
case 4:
Block.blockBitmapData.makeFinalBacksides1();
break;
case 5:
Block.blockBitmapData.makeFinalBacksides2();
break;
case 6:
Block.blockBitmapData.makeFinalFronts1();
break;
case 7:
Block.blockBitmapData.makeFinalFronts2();
break;
case 8:
Block.blockBitmapData.makeFinalFronts3();
break;
case 9:
startButton = new StartButton();
startButton.x = -467;
startButton.y = -428;
startButton.width = 1000;
startButton.height = 700;
startButton.alpha = 0;
addChild(startButton);
countDownTf1.visible = true;
countDownDigitTf.visible = true;
countDownTf2.visible = true;
break;
case 10:
startButton.addEventListener(MouseEvent.CLICK, start);
break;
};
var l__3:int = ((endTick - p__1) / App.TICKS_PER_SECOND);
if (l__3 != countDownSec){
countDownSec = l__3;
countDownDigitTf.text = ("" + countDownSec);
countDownSec = l__3;
};
if (p__1 >= endTick){
gui.startGame();
return (Gui.RENDERABLE_REMOVE);
};
return (Gui.RENDERABLE_CONTINUE);
}
protected function start(p__1:MouseEvent):void{
startButton.removeEventListener(MouseEvent.CLICK, start);
endTick = 0;
}
}
}//package guipackage
Section 23
//Outro (guipackage.Outro)
package guipackage {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Outro extends Sprite implements Renderable {
protected var outroAnimation:OutroAnimation;
protected var earliestPossibleEndTick:int;// = 120
protected var countDownSeconds:int;// = -1
protected var initialized:Boolean;// = false
protected var endTick:int;// = 960
public var FRAME_RATE:int;// = 25
public var drScore:int;// = 0
protected var gui:Gui;
public function Outro(p__1:Gui, p__2:int, p__3:Boolean, p__4:int, p__5:int){
super();
trace(((((("-----" + p__4) + " ") + p__5) + " ") + p__2));
gui = p__1;
drScore = p__2;
addEventListener(MouseEvent.CLICK, gameQuit);
outroAnimation = new OutroAnimation(p__1, p__2, p__3, p__4, p__5);
outroAnimation.countTf1.text = p__1.document.getTranslation("outro_countdown_first");
outroAnimation.countDownTf2.text = p__1.document.getTranslation("countdown_last");
addChild(outroAnimation);
p__1.startRenderable(outroAnimation);
}
protected function gameQuit(p__1:MouseEvent):void{
var p__1 = p__1;
trace("Outro.gameQuit");
trace(("drScore=" + drScore));
url = "index.php?act=Arcade&do=newscore";
request = new URLRequest(url);
variables = new URLVariables();
variables.gname = "CatCornerAS3v2DR";
variables.gscore = drScore;
request.data = variables;
request.method = URLRequestMethod.POST;
navigateToURL(request, "_self");
//unresolved jump
var _slot1 = e;
trace(_slot1);
endTick = earliestPossibleEndTick;
removeEventListener(MouseEvent.CLICK, gameQuit);
}
public function render(p__1:int, p__2:Number):int{
var l__4:int;
if (!initialized){
initialized = true;
endTick = (endTick + p__1);
earliestPossibleEndTick = (earliestPossibleEndTick + p__1);
};
var l__3:int = (endTick - p__1);
if (l__3 > 0){
l__4 = (((endTick - p__1) / App.TICKS_PER_SECOND) + 1);
} else {
l__4 = 0;
};
if (l__4 != countDownSeconds){
countDownSeconds = l__4;
outroAnimation.countDownDigitTf.text = ("" + countDownSeconds);
};
if (p__1 >= endTick){
gui.document.gameQuit();
return (Gui.RENDERABLE_STOP);
};
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 24
//OutroAnimation (guipackage.OutroAnimation)
package guipackage {
import modelpackage.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class OutroAnimation extends MovieClip implements Renderable {
protected const FRAMES_PER_TICK:Number = 0.7;
public var gui:Gui;
public var score:GameEndScoreAnim;
public var countDownDigitTf:TextField;
public var countDownTf2:TextField;
protected var cat3Neutralized:Boolean;// = false
protected var level:int;
protected var levelBabbleEndFrame:int;// = 30
protected var praciceBubbleSet:Boolean;// = false
protected var cat6Neutralized:Boolean;// = false
protected var endTick:int;
protected var practiceBabbleFrame:int;
public var cat1:MovieClip;
public var cat2:MovieClip;
public var cat3:MovieClip;
public var cat4:MovieClip;
public var cat6:MovieClip;
protected var cat2Neutralized:Boolean;// = false
public var cat5:MovieClip;
public var practiceBubble:MovieClip;
protected var startFrame:int;
protected var startTick:int;// = 0
protected var levelBabbleFrame:int;
protected var cat1Neutralized:Boolean;// = false
protected var shortMode:Boolean;
protected var cat1Blinking:Boolean;// = false
protected var cat2Blinking:Boolean;// = false
protected var cat5Neutralized:Boolean;// = false
public var levelBubble:MovieClip;
protected var endFrame:int;
protected var cat4Neutralized:Boolean;// = false
protected var outroBlinkings:Array;
public var Drums:MovieClip;
public var countTf1:TextField;
public var scoreInt:int;
public function OutroAnimation(p__1:Gui, p__2:int, p__3:Boolean, p__4:int, p__5:int){
super();
outroBlinkings = new Array();
gui = p__1;
scoreInt = p__2;
shortMode = p__3;
level = (p__4 + 1);
var l__6:TextFormat = new TextFormat();
l__6.letterSpacing = 2;
countTf1.defaultTextFormat = l__6;
switch (p__5){
case 2:
gotoAndStop("TwoCatsEnd");
endFrame = currentFrame;
gotoAndStop("LevelTwo");
levelBabbleFrame = currentFrame;
gotoAndStop("PracticeTwo");
practiceBabbleFrame = currentFrame;
gotoAndStop("TwoCats");
startFrame = currentFrame;
break;
case 3:
gotoAndStop("ThreeCatsEnd");
endFrame = currentFrame;
gotoAndStop("LevelThree");
levelBabbleFrame = currentFrame;
gotoAndStop("PracticeThree");
practiceBabbleFrame = currentFrame;
gotoAndStop("ThreeCats");
startFrame = currentFrame;
break;
case 4:
gotoAndStop("FourCatsEnd");
endFrame = currentFrame;
gotoAndStop("LevelFour");
levelBabbleFrame = currentFrame;
gotoAndStop("FourCats");
startFrame = currentFrame;
break;
case 5:
gotoAndStop("FiveCatsEnd");
endFrame = currentFrame;
gotoAndStop("LevelFive");
levelBabbleFrame = currentFrame;
gotoAndStop("FiveCats");
startFrame = currentFrame;
break;
case 6:
gotoAndStop("SixCatsEnd");
endFrame = currentFrame;
gotoAndStop("LevelSix");
levelBabbleFrame = currentFrame;
gotoAndStop("SixCats");
startFrame = currentFrame;
break;
default:
trace("error in OutroAnimation");
};
}
public function render(p__1:int, p__2:Number):int{
var l__6:int;
var l__7:int;
var l__9:OutroBlinking;
var l__8:int;
if (startTick == 0){
startTick = p__1;
levelBabbleEndFrame = (levelBabbleEndFrame + levelBabbleFrame);
if (levelBabbleEndFrame > endFrame){
levelBabbleEndFrame = endFrame;
};
};
var l__3:int = (p__1 - startTick);
var l__4:int = Math.floor((l__3 * FRAMES_PER_TICK));
var l__5:int = (startFrame + l__4);
if (l__5 > endFrame){
l__5 = endFrame;
};
gotoAndStop(l__5);
if (((!(cat1Neutralized)) && (!((cat1 == null))))){
cat1.gotoAndStop("neutral");
if (!shortMode){
outroBlinkings.push(new OutroBlinking(cat1));
cat1Blinking = true;
};
cat1Neutralized = true;
};
if (((!(cat2Neutralized)) && (!((cat2 == null))))){
cat2.gotoAndStop("neutral");
cat2Neutralized = true;
};
if (((!(cat3Neutralized)) && (!((cat3 == null))))){
cat3.gotoAndStop("neutral");
outroBlinkings.push(new OutroBlinking(cat3));
cat3Neutralized = true;
};
if (((!(cat4Neutralized)) && (!((cat4 == null))))){
cat4.gotoAndStop("neutral");
outroBlinkings.push(new OutroBlinking(cat4));
cat4Neutralized = true;
};
if (((!(cat5Neutralized)) && (!((cat5 == null))))){
cat5.gotoAndStop("neutral");
outroBlinkings.push(new OutroBlinking(cat5));
cat5Neutralized = true;
};
if (((!(cat6Neutralized)) && (!((cat6 == null))))){
cat6.gotoAndStop("neutral");
cat6Neutralized = true;
};
if (((((!((cat2 == null))) && ((currentFrame > levelBabbleFrame)))) && ((currentFrame < levelBabbleEndFrame)))){
l__6 = (levelBabbleEndFrame - currentFrame);
l__7 = ((levelBabbleEndFrame - levelBabbleFrame) / 4);
if (l__6 < l__7){
cat2.gotoAndStop("cool");
} else {
if (l__6 < (l__7 * 2)){
cat2.gotoAndStop("miao");
} else {
if (l__6 < (l__7 * 3)){
cat2.gotoAndStop("cool");
} else {
if (l__6 < (l__7 * 2)){
cat2.gotoAndStop("miao");
};
};
};
};
} else {
if (((!(cat2Blinking)) && ((currentFrame >= levelBabbleEndFrame)))){
outroBlinkings.push(new OutroBlinking(cat2));
cat2Blinking = true;
};
};
if (((((((((shortMode) && (!((cat1 == null))))) && (!((practiceBubble == null))))) && ((currentFrame > practiceBabbleFrame)))) && ((currentFrame < endFrame)))){
l__6 = (endFrame - currentFrame);
l__7 = ((endFrame - practiceBabbleFrame) / 4);
if (l__6 < l__7){
cat1.gotoAndStop("cool");
} else {
if (l__6 < (l__7 * 2)){
cat1.gotoAndStop("miao");
} else {
if (l__6 < (l__7 * 3)){
cat1.gotoAndStop("cool");
} else {
if (l__6 < (l__7 * 2)){
cat1.gotoAndStop("miao");
};
};
};
};
} else {
if (((((!(cat1Blinking)) && (shortMode))) && ((currentFrame == endFrame)))){
outroBlinkings.push(new OutroBlinking(cat1));
cat1Blinking = true;
};
};
if (levelBubble != null){
levelBubble.outroLevelLabel.text = gui.document.getTranslation("outro_level_label");
levelBubble.textField.text = ("" + level);
};
if (((!(praciceBubbleSet)) && (!((practiceBubble == null))))){
practiceBubble.textField.text = gui.document.getTranslation("outro_open_game_label");
practiceBubble.visible = shortMode;
praciceBubbleSet = true;
};
while (l__8 < outroBlinkings.length) {
l__9 = OutroBlinking(outroBlinkings[l__8]);
l__9.render(p__1);
l__8++;
};
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 25
//OutroBlinking (guipackage.OutroBlinking)
package guipackage {
import flash.display.*;
public class OutroBlinking {
protected const MIN_TICKS:int = 100;
protected const CLOSED_TICKS:int = 25;
protected const MAX_TICKS:int = 200;
protected var nextChange:int;// = 0
protected var cat:MovieClip;
public function OutroBlinking(p__1:MovieClip){
super();
cat = p__1;
p__1.gotoAndStop("blinking");
}
public function render(p__1:int):void{
if (cat.blink != null){
if (nextChange == 0){
if (cat.blink.visible){
nextChange = (p__1 + CLOSED_TICKS);
} else {
nextChange = ((p__1 + MIN_TICKS) + ((MAX_TICKS - MIN_TICKS) * Math.random()));
};
} else {
if (p__1 >= nextChange){
cat.blink.visible = !(cat.blink.visible);
nextChange = 0;
};
};
};
}
}
}//package guipackage
Section 26
//PlayArea (guipackage.PlayArea)
package guipackage {
import flash.events.*;
import flash.display.*;
public class PlayArea extends Sprite {
public var gui:Gui;
public var footsteps:Footsteps;
public var grid:Grid;
public var scale:Number;
public var selectionRect:SelectionRect;
protected var halfWidth:int;
protected var firstCenterPos:int;
protected var blocksWide:int;
public static const TOTAL_WIDTH:int = 450;
public static const NATURAL_SPACE_BETWEEN:int = 5;
public static const NATURAL_BLOCK_WIDTH:int = 100;
public function PlayArea(p__1:Gui){
super();
gui = p__1;
}
public function mouseMove(p__1:MouseEvent):void{
if (selectionRect != null){
selectionRect.mouseMove(p__1);
};
}
public function mouseUp(p__1:MouseEvent):void{
selectionRect.mouseUp(p__1);
}
public function levelAnimationPart2(p__1:int, p__2:int):void{
footsteps = new Footsteps();
footsteps.startTick = p__1;
footsteps.endTick = p__2;
addChildAt(footsteps, 2);
gui.startRenderable(footsteps);
}
public function newLevel(p__1:Array, p__2:int):void{
if (grid != null){
grid.destroy();
removeChild(grid);
};
this.blocksWide = p__1.length;
scale = getScale(blocksWide);
halfWidth = Math.floor((getSpan(blocksWide) / 2));
firstCenterPos = (-(halfWidth) + Math.floor(((PlayArea.NATURAL_BLOCK_WIDTH * scale) / 2)));
grid = new Grid(gui, this, p__1, p__2);
addChildAt(grid, 0);
if (selectionRect != null){
removeEventListener(MouseEvent.MOUSE_DOWN, selectionRect.mouseDown);
removeEventListener(MouseEvent.ROLL_OUT, selectionRect.rollOut);
removeChild(selectionRect);
};
switch (grid.size){
case 5:
selectionRect = new SelectionRect05();
break;
case 6:
selectionRect = new SelectionRect06();
break;
case 7:
selectionRect = new SelectionRect07();
break;
case 8:
selectionRect = new SelectionRect08();
break;
case 9:
selectionRect = new SelectionRect09();
break;
case 10:
selectionRect = new SelectionRect10();
break;
};
selectionRect.playArea = this;
selectionRect.visible = false;
addChildAt(selectionRect, 1);
addEventListener(MouseEvent.MOUSE_DOWN, selectionRect.mouseDown);
addEventListener(MouseEvent.ROLL_OUT, selectionRect.rollOut);
}
public function getPos(p__1:Number):int{
return ((firstCenterPos + ((p__1 * (PlayArea.NATURAL_SPACE_BETWEEN + PlayArea.NATURAL_BLOCK_WIDTH)) * scale)));
}
public function getSpan(p__1:int):int{
return ((((p__1 * PlayArea.NATURAL_BLOCK_WIDTH) + ((p__1 - 1) * PlayArea.NATURAL_SPACE_BETWEEN)) * scale));
}
public function getSlotNr(p__1:int):int{
var l__2:int = Math.floor(((p__1 + halfWidth) / ((PlayArea.NATURAL_SPACE_BETWEEN + PlayArea.NATURAL_BLOCK_WIDTH) * scale)));
if (l__2 < 0){
l__2 = 0;
} else {
if (l__2 >= blocksWide){
l__2 = (blocksWide - 1);
};
};
return (l__2);
}
public function getMouseCol():int{
return (getSlotNr(mouseX));
}
public function getMouseRow():int{
return (getSlotNr(mouseY));
}
public function scorePop(p__1:int, p__2:Number, p__3:Number):void{
var l__4:ScorePop = new ScorePop(p__1);
l__4.x = Math.floor(getPos(p__2));
l__4.y = Math.floor(getPos(p__3));
addChild(l__4);
gui.startRenderable(l__4);
}
public static function getScale(p__1:int):Number{
var l__2:Number = ((PlayArea.NATURAL_BLOCK_WIDTH * p__1) + (PlayArea.NATURAL_SPACE_BETWEEN * (p__1 - 1)));
return ((PlayArea.TOTAL_WIDTH / l__2));
}
}
}//package guipackage
Section 27
//Renderable (guipackage.Renderable)
package guipackage {
public interface Renderable {
function render(_arg1:int, _arg2:Number):int;
}
}//package guipackage
Section 28
//ScorePop (guipackage.ScorePop)
package guipackage {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ScorePop extends Sprite implements Renderable {
public const FADE_IN_TICKS:int = 10;
public const SPEED:Number = -1;
public const START_FADE_OUT_TICK:int = 50;
public const TOTAL_TICKS:int = 80;
public var textField:TextField;
protected var yStart:Number;
protected var startTick:Number;// = -1
public function ScorePop(p__1:int){
super();
mouseEnabled = false;
textField.mouseEnabled = false;
textField.text = ("" + p__1);
alpha = 0;
cacheAsBitmap = true;
}
public function render(p__1:int, p__2:Number):int{
var l__5:Number;
var l__6:int;
var l__7:Number;
var l__3:Number = (p__1 + p__2);
if (startTick == -1){
startTick = l__3;
yStart = y;
};
var l__4:Number = (l__3 - startTick);
if (l__4 < FADE_IN_TICKS){
l__5 = (l__4 / FADE_IN_TICKS);
this.alpha = Math.min(l__5, 1);
} else {
if (l__4 < START_FADE_OUT_TICK){
if (this.alpha != 1){
this.alpha = 1;
};
} else {
if (l__4 > START_FADE_OUT_TICK){
l__6 = (TOTAL_TICKS - START_FADE_OUT_TICK);
l__7 = (TOTAL_TICKS - l__4);
l__5 = (l__7 / l__6);
this.alpha = Math.max(l__5, 0);
};
};
};
y = Math.floor((yStart + (SPEED * l__4)));
if (l__4 > TOTAL_TICKS){
return (Gui.RENDERABLE_REMOVE);
};
return (Gui.RENDERABLE_CONTINUE);
}
}
}//package guipackage
Section 29
//SelectionRect (guipackage.SelectionRect)
package guipackage {
import flash.events.*;
import flash.display.*;
public class SelectionRect extends Sprite {
public var playArea:PlayArea;
protected var currentCol:int;
protected var currentRow:int;
protected var mouseIsDown:Boolean;// = false
protected var startRow:int;
protected var startCol:int;
public function SelectionRect(){
super();
}
public function mouseDown(p__1:MouseEvent):void{
mouseIsDown = true;
startCol = playArea.getMouseCol();
startRow = playArea.getMouseRow();
currentCol = startCol;
currentRow = startRow;
visible = true;
update(p__1);
playArea.gui.selectChange(startCol, startRow, startCol, startRow);
}
public function mouseMove(p__1:MouseEvent):void{
var l__2:int;
var l__3:int;
if (mouseIsDown){
l__2 = playArea.getMouseCol();
l__3 = playArea.getMouseRow();
if (((!((l__2 == currentCol))) || (!((l__3 == currentRow))))){
currentCol = l__2;
currentRow = l__3;
update(p__1);
playArea.gui.selectChange(startCol, startRow, currentCol, currentRow);
};
};
}
public function mouseUp(p__1:MouseEvent):void{
mouseIsDown = false;
if (visible){
visible = false;
playArea.gui.selectRect(startCol, startRow, currentCol, currentRow);
};
}
public function rollOut(p__1:MouseEvent):void{
}
protected function update(p__1:MouseEvent):void{
var l__2:Number = playArea.scale;
var l__3:Number = (PlayArea.NATURAL_BLOCK_WIDTH * l__2);
var l__4:Number = (14 * l__2);
var l__5:Number = (18 * l__2);
var l__6:int = startCol;
var l__7:int = currentCol;
if (l__7 < l__6){
l__6 = l__7;
l__7 = startCol;
};
var l__8:int = ((l__7 - l__6) + 1);
width = (((l__8 * l__3) + (l__8 - (1 * l__4))) + l__5);
x = Math.floor(((playArea.getPos(l__6) + playArea.getPos(l__7)) / 2));
var l__9:int = startRow;
var l__10:int = currentRow;
if (l__10 < l__9){
l__10 = l__9;
l__9 = currentRow;
};
var l__11:int = ((l__10 - l__9) + 1);
height = (((l__11 * l__3) + (l__11 - (1 * l__4))) + l__5);
y = Math.floor(((playArea.getPos(l__9) + playArea.getPos(l__10)) / 2));
p__1.updateAfterEvent();
}
}
}//package guipackage
Section 30
//SoundManager (guipackage.SoundManager)
package guipackage {
import util.*;
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class SoundManager {
public const VOLUME_NOT_COMBO:Number = 0.5;
public const VOLUME_OUTRO:Number = 0.6;
public const LOOP_DELAY:int = 200;
public const VOLUME_TIME_WARNING:Number = 0.5;
public const STEREO_INTENSITY:Number = 0.7;
public const OUTRO_DELAY:int = 200;
public const VOLUME_GAME_OVER:Number = 0.3;
public const VOLUME_LEVEL_ANIMATION:Number = 0.9;
public const VOLUME_BOMB:Number = 0.5;
public const VOLUME_LOOP:Number = 0.4;
public const VOLUME_SHUFFLE:Number = 0.5;
public const VOLUME_TIME:Number = 0.5;
public const VOLUME_COLOR:Number = 0.5;
public const VOLUME_GOLD:Number = 0.5;
public const VOLUME_INTRO:Number = 0.5;
public const VOLUME_NO_CAT:Number = 0.5;
private var introSoundChannel:SoundChannel;
private var introSound:Sound;
protected var chordChannel:SoundChannel;
public var outroSoundChannel:SoundChannel;
private var outroSoundTransform:SoundTransform;
private var outroNext:Boolean;// = false
private var introSoundTransform:SoundTransform;
public var gui:Gui;
private var loopSoundChannel:SoundChannel;
private var outroSound:Sound;
private var timer:Timer;
private var loopSound:Sound;
private var soundOn:Boolean;// = true
protected var loopPosition:Number;// = 0
private var loopSoundTransform:SoundTransform;
public function SoundManager(p__1:Gui){
super();
gui = p__1;
}
public function toggleSound(p__1:MouseEvent):void{
soundOn = !(soundOn);
if (soundOn){
startMusic();
} else {
stopMusic();
};
}
public function stopMusic():void{
if (loopSoundChannel != null){
loopSoundChannel.soundTransform = new SoundTransform(0);
};
if (introSoundChannel != null){
introSoundChannel.soundTransform = new SoundTransform(0);
};
if (outroSoundChannel != null){
outroSoundChannel.soundTransform = new SoundTransform(0);
};
}
public function startMusic():void{
if (soundOn){
if (loopSoundChannel != null){
loopSoundChannel.soundTransform = new SoundTransform(VOLUME_LOOP);
};
if (introSoundChannel != null){
introSoundChannel.soundTransform = new SoundTransform(VOLUME_LOOP);
};
if (outroSoundChannel != null){
outroSoundChannel.soundTransform = new SoundTransform(VOLUME_LOOP);
};
};
}
public function startIntroSound(p__1:Event=null):int{
var l__2:Number = VOLUME_INTRO;
if (!soundOn){
l__2 = 0;
};
introSoundTransform = new SoundTransform(l__2);
introSound = new IntroSnd();
introSoundChannel = introSound.play(0, 0, introSoundTransform);
return (introSound.length);
}
public function gameStart(p__1:Event=null):void{
if (introSoundChannel != null){
new SoundFader(introSoundChannel, LOOP_DELAY);
};
timer = new Timer(LOOP_DELAY, 1);
timer.addEventListener("timerComplete", startLoopSound);
timer.start();
}
public function startLoopSound(p__1:Event=null):void{
var l__2:Number = VOLUME_LOOP;
if (!soundOn){
l__2 = 0;
};
loopSoundTransform = new SoundTransform(l__2);
loopSound = new LoopSnd2();
loopSoundChannel = loopSound.play(loopPosition, int.MAX_VALUE, loopSoundTransform);
}
public function gameEnd(p__1:Event=null):void{
if (introSoundChannel != null){
new SoundFader(introSoundChannel, OUTRO_DELAY);
};
if (loopSoundChannel != null){
new SoundFader(loopSoundChannel, OUTRO_DELAY);
};
timer = new Timer(OUTRO_DELAY, 1);
timer.addEventListener("timerComplete", startOutroSound);
timer.start();
}
public function startOutroSound(p__1:Event=null):void{
var l__2:Number = VOLUME_OUTRO;
if (!soundOn){
l__2 = 0;
};
outroSoundTransform = new SoundTransform(l__2);
outroSound = new OutroSnd();
outroSoundChannel = outroSound.play(0, 0, loopSoundTransform);
}
public function timeWarning():void{
var l__1:Sound;
if (soundOn){
l__1 = new TimeWarningSnd();
playSound(l__1, VOLUME_TIME_WARNING);
};
}
public function shuffle():void{
if (soundOn){
playSound(new ShuffleSnd(), VOLUME_SHUFFLE);
};
}
public function levelFadeOut():void{
var l__1:SoundFader;
if (soundOn){
loopPosition = loopSoundChannel.position;
l__1 = new SoundFader(loopSoundChannel, 600);
};
}
public function level(p__1:int, p__2:int, p__3:int):void{
var l__4:int;
var l__5:VolumeChanger;
var l__6:Timer;
var l__7:int;
var l__8:Timer;
if (soundOn){
l__4 = App.ticksToMillisec(p__1);
l__5 = new VolumeChanger(loopSoundChannel, 0.1, l__4);
l__6 = new Timer(App.ticksToMillisec(Math.floor((p__1 * 0.5))), 1);
l__6.addEventListener("timerComplete", playLevelSound);
l__6.start();
l__7 = App.ticksToMillisec((p__1 + Math.floor((p__2 / 2))));
l__8 = new Timer(l__7, 1);
l__8.addEventListener("timerComplete", fadeBackLoop);
l__8.start();
};
}
public function playLevelSound(p__1:Event):void{
playSound(new NewLevelSnd(), VOLUME_LEVEL_ANIMATION);
}
public function fadeBackLoop(p__1:Event):void{
var l__2:VolumeChanger = new VolumeChanger(loopSoundChannel, VOLUME_LOOP, 1500);
}
public function loopContinue(p__1:Event=null):void{
loopSoundChannel.soundTransform = new SoundTransform(VOLUME_LOOP);
}
public function comboSound(p__1:int, p__2:int, p__3:int, p__4:int, p__5:int):void{
var l__6:Sound;
var l__7:int;
var l__8:SoundTransform;
var l__9:Sound;
if (soundOn){
if (p__2 != 0){
l__7 = Math.floor((Math.random() * 6));
switch (l__7){
case 0:
l__6 = new Color0Snd();
break;
case 1:
l__6 = new Color1Snd();
break;
case 2:
l__6 = new Color2Snd();
break;
case 3:
l__6 = new Color3Snd();
break;
case 4:
l__6 = new Color4Snd();
break;
case 5:
l__6 = new Color5Snd();
break;
default:
trace("Error in SoundManager.comboSound");
};
gui.gameBackground.playChord(l__7);
l__8 = new SoundTransform(VOLUME_COLOR);
l__9 = l__6;
chordChannel = l__9.play(0, 0, l__8);
if (p__3 > 0){
playSound(new BombSnd(), VOLUME_BOMB);
};
if (p__4 > 0){
playSound(new GoldSnd(), VOLUME_GOLD);
};
if (p__5 > 0){
playSound(new TimeSnd(), VOLUME_TIME);
};
} else {
playSound(new NoCatSnd(), VOLUME_NO_CAT);
};
};
}
public function notCombo():void{
if (soundOn){
playSound(new NotComboSnd(), VOLUME_NOT_COMBO);
};
}
protected function playSound(p__1:Sound, p__2:Number, p__3:int=0):void{
var l__4:SoundTransform = new SoundTransform(p__2);
var l__5:Sound = p__1;
var l__6:SoundChannel = l__5.play(0, p__3, l__4);
}
}
}//package guipackage
Section 31
//BlockBackside (librarydisplayobjects.BlockBackside)
package librarydisplayobjects {
import flash.display.*;
public dynamic class BlockBackside extends MovieClip {
}
}//package librarydisplayobjects
Section 32
//Background (librarynames.Background)
package librarynames {
import flash.display.*;
import flash.text.*;
public class Background extends Sprite {
public var exitBtnTf:TextField;
public var sndBtn:MovieClip;
public var exitBtn:MovieClip;
public var soundBtnTf:TextField;
public function Background(){
super();
}
}
}//package librarynames
Section 33
//ShortModeSign (librarynames.ShortModeSign)
package librarynames {
import flash.display.*;
import flash.text.*;
public class ShortModeSign extends Sprite {
public var textField:TextField;
public function ShortModeSign(){
super();
}
}
}//package librarynames
Section 34
//StartButton (librarynames.StartButton)
package librarynames {
import flash.display.*;
import flash.text.*;
public class StartButton extends Sprite {
public var label:TextField;
public function StartButton(){
super();
}
}
}//package librarynames
Section 35
//BlockData (modelpackage.BlockData)
package modelpackage {
public class BlockData {
public var col:int;
public var row:int;
public var color:int;
public var status:int;
public var type:int;
public var isFront:Boolean;
public static const COLORS:int = 5;
public static const NO_COLOR:int = 100;
public static const DIFFERENT_COLORS:int = -1;
public static const NORMAL:int = 0;
public static const RAINBOW:int = 1;
public static const BOMB:int = 2;
public static const GOLD:int = 3;
public static const TIME:int = 4;
public static const MARKED:int = 1;
public static const ACTIVE:int = 2;
public function BlockData(p__1:int, p__2:int, p__3:int){
super();
col = p__1;
row = p__2;
color = p__3;
type = BlockData.NORMAL;
isFront = true;
status = BlockData.NORMAL;
}
public function toString():String{
return (((((((((((("block: col " + col) + " row ") + row) + " color ") + color) + " type ") + type) + " isFront ") + isFront) + " status ") + status));
}
public function clone():BlockData{
var l__1:BlockData = new BlockData(col, row, color);
l__1.type = type;
l__1.isFront = isFront;
l__1.status = status;
return (l__1);
}
}
}//package modelpackage
Section 36
//BlockySquare (modelpackage.BlockySquare)
package modelpackage {
import util.*;
public class BlockySquare {
protected const SIZES:Array;
protected const COLORS:Array;
protected const RAINBOW_CHANCES:Array;
protected const BOMB_CHANCES:Array;
protected const GOLD_CHANCES:Array;
protected const TIME_CHANCES:Array;
var size:int;
protected var blocks:Array;
protected var bombLimit:Number;
private var shuffles:int;// = 1
protected var rainbowLimit:Number;
protected var model:Model;
protected var timeLimit:Number;
protected var colors:int;
protected var goldLimit:Number;
public function BlockySquare(p__1:Model, p__2:int){
var l__5:int;
var l__4:int;
SIZES = [5, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10];
COLORS = [2, 2, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 5, 5];
RAINBOW_CHANCES = [0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2];
BOMB_CHANCES = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1];
GOLD_CHANCES = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
TIME_CHANCES = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
super();
model = p__1;
var l__3:int = p__2;
if (l__3 >= SIZES.length){
l__3 = (SIZES.length - 1);
};
size = int(SIZES[l__3]);
colors = int(COLORS[l__3]);
rainbowLimit = (0.5 - (Number(RAINBOW_CHANCES[l__3]) / 100));
bombLimit = (rainbowLimit - (Number(BOMB_CHANCES[l__3]) / 100));
goldLimit = (bombLimit - (Number(GOLD_CHANCES[l__3]) / 100));
timeLimit = (goldLimit - (Number(TIME_CHANCES[l__3]) / 100));
if (p__1.game.colorsPlayed < colors){
p__1.game.colorsPlayed = colors;
};
blocks = new Array(size);
while (l__4 < size) {
blocks[l__4] = new Array(size);
l__5 = 0;
while (l__5 < size) {
blocks[l__4][l__5] = makeRandomBlock(l__5, l__4);
l__5++;
};
l__4++;
};
}
protected function makeRandomBlock(p__1:int, p__2:int):BlockData{
var l__3:BlockData = new BlockData(p__1, p__2, 0);
randomizeBlock(l__3);
return (l__3);
}
protected function randomizeBlock(p__1:BlockData):void{
var l__3:int;
var l__4:int;
var l__2:Number = model.rand.nextDouble();
if (l__2 > 0.5){
l__3 = BlockData.NORMAL;
} else {
if (l__2 > rainbowLimit){
l__3 = BlockData.RAINBOW;
} else {
if (l__2 > bombLimit){
l__3 = BlockData.BOMB;
} else {
if (l__2 > goldLimit){
l__3 = BlockData.GOLD;
} else {
if (((model.game.clockCounter) && ((--model.game.clockCounter > 0)))){
l__3 = BlockData.TIME;
} else {
l__3 = BlockData.NORMAL;
};
};
};
};
};
if (l__3 != BlockData.RAINBOW){
l__4 = model.rand.nextInt(colors);
} else {
l__4 = BlockData.NO_COLOR;
};
p__1.type = l__3;
p__1.color = l__4;
}
function getBlocks():Array{
var l__3:int;
var l__2:int;
var l__1:Array = new Array(size);
while (l__2 < size) {
l__1[l__2] = new Array(size);
l__3 = 0;
while (l__3 < size) {
l__1[l__2][l__3] = BlockData(blocks[l__2][l__3]).clone();
l__3++;
};
l__2++;
};
return (l__1);
}
function getColors():int{
return (colors);
}
function getBlock(p__1:int, p__2:int):BlockData{
return (BlockData(blocks[p__2][p__1]));
}
function flipBlock(p__1:int, p__2:int):void{
var l__3:BlockData = getBlock(p__1, p__2);
randomizeBlock(l__3);
l__3.isFront = false;
l__3.status = BlockData.NORMAL;
}
function isFinished():Boolean{
var l__2:int;
var l__3:BlockData;
var l__1:int;
while (l__1 < size) {
l__2 = 0;
while (l__2 < size) {
l__3 = getBlock(l__2, l__1);
if (l__3.isFront){
return (false);
};
l__2++;
};
l__1++;
};
return (true);
}
public function shuffle():Stack{
var l__3:int;
var l__4:BlockData;
var l__2:int;
var l__1:Stack = new Stack();
while (l__2 < size) {
l__3 = 0;
while (l__3 < size) {
l__4 = getBlock(l__3, l__2);
randomizeBlock(l__4);
l__1.push(l__4);
l__3++;
};
l__2++;
};
shuffles++;
return (l__1);
}
public function percentage(p__1:Number):Number{
return (((p__1 * 100) / ((size * size) * shuffles)));
}
public function normalizeStatus():void{
var l__2:int;
var l__1:int;
while (l__1 < size) {
l__2 = 0;
while (l__2 < size) {
BlockData(blocks[l__1][l__2]).status = BlockData.NORMAL;
l__2++;
};
l__1++;
};
}
}
}//package modelpackage
Section 37
//Game (modelpackage.Game)
package modelpackage {
import util.*;
public class Game {
protected var comboIncrement:int;// = 1
protected var blockPoint:int;// = 5
public var blockySquare:BlockySquare;
public var clockCounter:int;// = 8
public var level:int;// = -1
protected var timeBonus:int;// = 600
protected var blockIncrement:int;// = 5
public var colorsPlayed:int;// = 2
protected var shuffleCost:int;// = 600
protected var comboPoint:int;// = 5
public var relaxMoves:int;// = 20
public var totalScore:int;// = 0
protected var model:Model;
public static var MAX_MOVES:int = 12;
public static var LEVEL_MOVES:int = 4;
public static var SHUFFLE_PENALTY:int = -2;
public static var CLOCK_MOVES:int = 2;
public function Game(p__1:Model){
super();
model = p__1;
}
function nextLevel():Array{
if (model.document.relaxMode){
relaxMoves = (relaxMoves + Game.LEVEL_MOVES);
if (relaxMoves > Game.MAX_MOVES){
relaxMoves = Game.MAX_MOVES;
};
model.guiControl.updateMoves(relaxMoves);
};
level++;
blockySquare = new BlockySquare(model, level);
return (blockySquare.getBlocks());
}
function selectRect(p__1:int, p__2:int, p__3:int, p__4:int):Stack{
var l__9:int;
var l__10:int;
var l__11:Array;
var l__12:Array;
var l__13:int;
var l__14:int;
var l__15:int;
var l__16:int;
var l__17:int;
var l__18:int;
var l__7:int;
var l__8:int;
var l__5:* = true;
var l__6:Selection = new Selection(blockySquare, p__1, p__2, p__3, p__4, l__5);
while (l__8 < l__6.scoreBlocks) {
l__7 = (l__7 + (blockPoint + (l__8 * blockIncrement)));
l__8++;
};
if (l__6.scoreBlocks > 0){
l__9 = (comboPoint + ((l__6.comboBlocks - 4) * comboIncrement));
l__10 = ((l__7 + l__9) * (l__6.goldBlocks + 1));
model.guiControl.scorePop(l__10, l__6.xCenter, l__6.yCenter);
this.totalScore = (this.totalScore + l__10);
if (l__6.timeBlocks > 0){
if (model.document.relaxMode){
relaxMoves = (relaxMoves + Game.CLOCK_MOVES);
} else {
model.addTime((timeBonus * l__6.timeBlocks));
};
};
};
if (l__6.validity == l__6.NOT_COMBO){
l__11 = blockySquare.getBlocks();
l__12 = new Array();
l__13 = p__1;
l__14 = p__3;
if (l__13 > l__14){
l__13 = l__14;
l__14 = p__1;
};
l__15 = p__2;
l__16 = p__4;
if (l__15 > l__16){
l__15 = l__16;
l__16 = p__2;
};
l__17 = l__15;
while (l__17 <= l__16) {
l__18 = l__13;
while (l__18 <= l__14) {
l__12.push(l__11[l__17][l__18]);
l__18++;
};
l__17++;
};
model.guiControl.shakeBlocks(l__12);
} else {
if (l__6.validity == l__6.COMBO){
model.guiControl.comboSound(l__6.color, l__6.scoreBlocks, l__6.bombs, l__6.goldBlocks, l__6.timeBlocks);
};
};
if (((model.document.relaxMode) && ((l__6.flippedBlocks.size() > 0)))){
relaxMoves--;
if (relaxMoves > Game.MAX_MOVES){
relaxMoves = Game.MAX_MOVES;
};
model.guiControl.updateMoves(relaxMoves);
};
return (l__6.flippedBlocks);
}
function shuffle():Stack{
if (model.document.relaxMode){
relaxMoves = (relaxMoves + Game.SHUFFLE_PENALTY);
model.guiControl.updateMoves(relaxMoves);
} else {
model.addTime(-(shuffleCost));
};
return (blockySquare.shuffle());
}
}
}//package modelpackage
Section 38
//Model (modelpackage.Model)
package modelpackage {
import guipackage.*;
import util.*;
public class Model {
protected const GAME_OVER:int = 3;
protected const SHORT_MODE_END_LEVEL:int = 4;
protected const PLAYING:int = 0;
protected const LEVEL_ANIMATION_PART_3:int = 3;
protected const LEVEL_ANIMATION_PART_2:int = 2;
protected const LEVEL_ANIMATION_PART_1:int = 1;
protected const LEVEL_ANIMATION_PART_3_TICKS:int = 15;
protected const LEVEL_ANIMATION_PART_1_TICKS:int = 30;
protected const NOT_STARTED:int = -1;
protected const SECONDS:int = 180;
protected const FLIP_ANIMATION_TICKS:int = 20;
protected const SHUFFLE_TICKS:int = 40;
protected const LEVEL_ANIMATION_PART_2_TICKS:int = 40;
protected const FLIPPING:int = 4;
public var document:Document;
public var guiControl:GuiControl;
var rand:Random;
protected var countDownTicks:int;
protected var mode:int;// = -1
protected var shortMode:Boolean;// = false
protected var countDownPaused:Boolean;// = true
protected var continueTick:int;// = 0
public var remainingMoves:int;// = 20
protected var countDownSeconds:int;
public var game:Game;
protected var playData:Stack;
protected var timeWarningTick:int;
protected var timeWarningInterval:int;
public function Model(p__1:Document, p__2:GuiControl, p__3:XML){
timeWarningTick = (10 * App.TICKS_PER_SECOND);
timeWarningInterval = App.TICKS_PER_SECOND;
super();
document = p__1;
guiControl = p__2;
var l__4:int = p__3.@seed;
if (App.DEV_MODE){
l__4 = (Math.random() * 10000);
};
rand = new Random(l__4);
if (p__3.@mode == "short"){
shortMode = true;
};
if (!p__1.relaxMode){
countDownTicks = (SECONDS * App.TICKS_PER_SECOND);
};
p__1.log((("[seed " + p__3.@seed) + "]"));
p__1.log((("[countDownTicks " + countDownTicks) + "]"));
playData = new Stack();
game = new Game(this);
}
public function tick(p__1:int):void{
if (countDownPaused){
if (p__1 == continueTick){
continueTick = -1;
continueGame(p__1);
};
};
if (((!(countDownPaused)) && (!(document.relaxMode)))){
countDown(p__1);
};
executePlayData(p__1);
}
public function addPlayData(p__1:Array):void{
playData.push(p__1);
}
public function getScore():int{
return (game.totalScore);
}
protected function inputSelectRect(p__1:int, p__2:int, p__3:int, p__4:int, p__5:int):void{
var l__6:Stack;
var l__7:int;
var l__9:int;
var l__8:* = undefined;
if ((((mode == PLAYING)) && (!(countDownPaused)))){
document.log(((((((((("selectRect " + p__1) + " ") + p__2) + " ") + p__3) + " ") + p__4) + " ") + p__5));
l__6 = game.selectRect(p__2, p__3, p__4, p__5);
if (l__6.size() > 0){
pauseGame(p__1);
l__7 = l__6.size();
l__8 = new Array(l__7);
l__9 = 0;
while (l__9 < l__7) {
l__8[l__9] = BlockData(l__6.g(l__9)).clone();
l__9++;
};
guiControl.updateScore(game.totalScore);
if (game.blockySquare.isFinished()){
mode = LEVEL_ANIMATION_PART_1;
game.nextLevel();
continueTick = (p__1 + LEVEL_ANIMATION_PART_1_TICKS);
guiControl.levelAnimationPart1(p__1, continueTick, l__8, LEVEL_ANIMATION_PART_1_TICKS, LEVEL_ANIMATION_PART_2_TICKS, LEVEL_ANIMATION_PART_3_TICKS);
} else {
mode = FLIPPING;
continueTick = (p__1 + FLIP_ANIMATION_TICKS);
guiControl.flipBlocks(p__1, continueTick, l__8);
};
} else {
game.blockySquare.normalizeStatus();
guiControl.showStatus(game.blockySquare.getBlocks());
};
};
}
protected function inputShuffle(p__1:int):void{
var l__2:Stack;
var l__3:int;
var l__5:int;
var l__4:* = undefined;
if (!countDownPaused){
mode = FLIPPING;
pauseGame(p__1);
continueTick = (p__1 + 40);
document.log(("Shuffle " + p__1));
l__2 = game.shuffle();
l__3 = l__2.size();
l__4 = new Array(l__3);
l__5 = 0;
while (l__5 < l__3) {
l__4[l__5] = BlockData(l__2.g(l__5)).clone();
l__5++;
};
guiControl.flipBlocks(p__1, continueTick, l__4);
guiControl.shuffle();
};
}
protected function inputExit(p__1:int):void{
document.log("user chose exit");
gameOver(p__1, App.USER_CHOSE_EXIT);
}
protected function inputSelectChange(p__1:int, p__2:int, p__3:int, p__4:int, p__5:int):void{
var l__6:Boolean;
if ((((mode == PLAYING)) && (!(countDownPaused)))){
game.blockySquare.normalizeStatus();
l__6 = false;
new Selection(game.blockySquare, p__2, p__3, p__4, p__5, l__6);
};
guiControl.showStatus(game.blockySquare.getBlocks());
}
protected function continueGame(p__1:int):void{
var l__2:Array;
var l__3:int;
document.log(("continueGame " + p__1));
if (mode == NOT_STARTED){
countDownPaused = false;
l__2 = game.nextLevel();
l__3 = game.blockySquare.getColors();
guiControl.updateLevel(game.level);
guiControl.initGame(l__2, l__3);
guiControl.setGameRunning(true);
mode = PLAYING;
} else {
if (mode == LEVEL_ANIMATION_PART_1){
continueTick = (p__1 + LEVEL_ANIMATION_PART_2_TICKS);
guiControl.levelAnimationPart2(p__1, continueTick);
mode = LEVEL_ANIMATION_PART_2;
} else {
if (mode == LEVEL_ANIMATION_PART_2){
continueTick = (p__1 + LEVEL_ANIMATION_PART_3_TICKS);
guiControl.levelAnimationPart3(p__1, continueTick, game.blockySquare.getBlocks(), game.blockySquare.getColors());
mode = LEVEL_ANIMATION_PART_3;
} else {
if (mode == LEVEL_ANIMATION_PART_3){
guiControl.updateLevel(game.level);
if (((shortMode) && ((game.level == SHORT_MODE_END_LEVEL)))){
document.log("model short game end ");
gameOver(p__1, App.SHORT_GAME_END);
} else {
guiControl.setGameRunning(true);
countDownPaused = false;
mode = PLAYING;
};
} else {
if (mode == FLIPPING){
if (((document.relaxMode) && ((game.relaxMoves <= 0)))){
gameOver(p__1, App.RELAX_MOVES_FINISHED);
} else {
countDownPaused = false;
guiControl.setGameRunning(true);
mode = PLAYING;
};
};
};
};
};
};
}
protected function pauseGame(p__1:int):void{
document.log(("pauseGame " + p__1));
guiControl.setGameRunning(false);
countDownPaused = true;
}
protected function countDown(p__1:int):void{
var l__3:int;
countDownTicks--;
var l__2:int = ((countDownTicks / App.TICKS_PER_SECOND) + 1);
if (l__2 != countDownSeconds){
countDownSeconds = l__2;
l__3 = (l__2 / 60);
l__2 = (l__2 % 60);
guiControl.updateTimeDisplay(l__3, l__2);
};
if ((((countDownTicks <= timeWarningTick)) && ((countDownTicks > 0)))){
if ((countDownTicks % timeWarningInterval) == 0){
guiControl.showTimeWarning();
};
};
if (countDownTicks <= 0){
document.log(("TimeIsUp " + p__1));
gameOver(p__1, App.TIME_RAN_OUT);
};
}
protected function executePlayData(p__1:int):void{
var l__2:Array;
var l__3:int;
var l__4:int;
var l__5:String;
var l__6:String;
var l__7:int;
var l__8:int;
while (playData.size() > 0) {
l__2 = playData.remove(0);
l__3 = int(l__2[0]);
l__4 = int(l__2[1]);
l__5 = String(App.INPUT_STRINGS[l__3]);
if (App.isLogicPlayData(l__3)){
l__6 = ((l__5 + " ") + l__4);
l__7 = 2;
while (l__7 < l__2.length) {
l__7 = (l__7 + 1);
l__8 = int(l__2[l__7]);
l__6 = (l__6 + (" " + l__8));
};
document.log((("[" + l__6) + "]"));
};
switch (l__3){
case App.INPUT_SELECT_RECT:
inputSelectRect(p__1, int(l__2[2]), int(l__2[3]), int(l__2[4]), int(l__2[5]));
break;
case App.INPUT_SHUFFLE:
inputShuffle(p__1);
break;
case App.INPUT_EXIT:
inputExit(p__1);
break;
case App.LAST_TICK:
break;
case App.INPUT_SELECT_CHANGE:
inputSelectChange(p__1, int(l__2[2]), int(l__2[3]), int(l__2[4]), int(l__2[5]));
break;
default:
document.log(("**** Error in Model.tick(). Invalid inputType: " + l__3));
};
if (((!((l__4 == p__1))) && (!((l__3 == App.LAST_TICK))))){
document.log(((("**** Warning, bad sync! tickToExecute " + l__4) + " currentTick ") + p__1));
};
};
}
protected function gameOver(p__1:int, p__2:int):void{
document.log(("gameover score " + game.totalScore));
if (!countDownPaused){
pauseGame(p__1);
};
mode = GAME_OVER;
continueTick = -1;
guiControl.gameOver(game.totalScore, shortMode, game.level, game.colorsPlayed);
document.addPlayData([App.LAST_TICK]);
document.gameOver(game.totalScore, p__2);
}
public function addTime(p__1:int):void{
countDownTicks = (countDownTicks + p__1);
}
}
}//package modelpackage
Section 39
//Selection (modelpackage.Selection)
package modelpackage {
import util.*;
public class Selection {
public const NOT_SET:int = -100;
public const NOT_COMBO:int = 1;
public const COMBO:int = 2;
public const SINGLE_BLOCK:int = 0;
public var color:int;// = 100
protected var blockySquare:BlockySquare;
public var goldBlocks:int;// = 0
public var bombs:int;// = 0
public var firstColor:int;// = -100
public var flippedBlocks:Stack;
public var validity:int;// = -1
public var timeBlocks:int;// = 0
public var comboBlocks:int;// = 0
public var yCenter:Number;
public var scoreBlocks:int;// = 0
public var xCenter:Number;
public var rainbows:int;// = 0
public var makeChange:Boolean;
public function Selection(p__1:BlockySquare, p__2:int, p__3:int, p__4:int, p__5:int, p__6:Boolean){
var l__12:int;
var l__13:int;
var l__14:Boolean;
var l__15:int;
var l__16:int;
super();
blockySquare = p__1;
makeChange = p__6;
flippedBlocks = new Stack();
checkCorner(p__2, p__3);
checkCorner(p__2, p__5);
checkCorner(p__4, p__3);
checkCorner(p__4, p__5);
var l__7:int = p__2;
var l__8:int = p__4;
if (l__8 < l__7){
l__7 = p__4;
l__8 = p__2;
};
var l__9:int = p__3;
var l__10:int = p__5;
if (l__10 < l__9){
l__9 = p__5;
l__10 = p__3;
};
var l__11:int = p__1.size;
if ((((((((((((l__7 >= 0)) && ((l__7 < l__11)))) && ((l__7 < l__8)))) && ((((((l__9 >= 0)) && ((l__9 < l__11)))) && ((l__9 < l__10)))))) && ((((l__8 > 0)) && ((l__8 <= l__11)))))) && ((((l__10 > 0)) && ((l__10 <= l__11)))))){
if (color != BlockData.DIFFERENT_COLORS){
l__12 = ((l__8 - l__7) + 1);
l__13 = ((l__10 - l__9) + 1);
comboBlocks = (l__12 * l__13);
xCenter = (l__7 + (l__12 - (1 / 2)));
yCenter = (l__9 + (l__13 - (1 / 2)));
l__14 = false;
maybeFlipBlock(l__7, l__9, l__14);
maybeFlipBlock(l__7, l__10, l__14);
maybeFlipBlock(l__8, l__9, l__14);
maybeFlipBlock(l__8, l__10, l__14);
l__14 = false;
l__15 = l__9;
while (l__15 < (l__10 + 1)) {
l__16 = l__7;
while (l__16 < (l__8 + 1)) {
maybeFlipBlock(l__16, l__15, l__14);
l__16++;
};
l__15++;
};
if ((((bombs > 0)) && ((scoreBlocks > 0)))){
l__14 = true;
l__15 = 0;
while (l__15 < l__11) {
l__16 = 0;
while (l__16 < l__11) {
maybeFlipBlock(l__16, l__15, l__14);
l__16++;
};
l__15++;
};
};
validity = COMBO;
} else {
validity = NOT_COMBO;
};
} else {
validity = NOT_COMBO;
if ((((l__7 == l__8)) && ((l__9 == l__10)))){
validity = SINGLE_BLOCK;
};
};
maybeActivateBlock(p__2, p__3);
maybeActivateBlock(p__2, p__5);
maybeActivateBlock(p__4, p__3);
maybeActivateBlock(p__4, p__5);
}
public function toString():String{
return (((((((((((((((("flipped " + flippedBlocks.size()) + " color ") + color) + " rainbows ") + rainbows) + " bombs ") + bombs) + " gold ") + goldBlocks) + " timeBlocks ") + timeBlocks) + " comboBlocks ") + comboBlocks) + " scoreBlocks ") + scoreBlocks));
}
protected function checkCorner(p__1:int, p__2:int):void{
var l__3:BlockData = blockySquare.getBlock(p__1, p__2);
if (((!((l__3.color == BlockData.NO_COLOR))) && (!((color == BlockData.DIFFERENT_COLORS))))){
if (color == BlockData.NO_COLOR){
color = l__3.color;
} else {
if (l__3.color != color){
color = BlockData.DIFFERENT_COLORS;
};
};
};
if (l__3.type == BlockData.RAINBOW){
rainbows++;
} else {
if (l__3.type == BlockData.BOMB){
bombs++;
} else {
if (l__3.type == BlockData.GOLD){
goldBlocks++;
} else {
if (l__3.type == BlockData.TIME){
timeBlocks++;
};
};
};
};
}
protected function maybeActivateBlock(p__1:int, p__2:int):void{
var l__3:BlockData = blockySquare.getBlock(p__1, p__2);
if (firstColor == NOT_SET){
firstColor = l__3.color;
};
if ((((l__3.type == BlockData.NORMAL)) && (l__3.isFront))){
if ((((firstColor == BlockData.NO_COLOR)) && (!((color == BlockData.DIFFERENT_COLORS))))){
l__3.status = BlockData.ACTIVE;
} else {
if ((((l__3.color == firstColor)) || ((l__3.color == BlockData.NO_COLOR)))){
l__3.status = BlockData.ACTIVE;
};
};
};
if ((((((validity == COMBO)) && (!((l__3.type == BlockData.NORMAL))))) && ((scoreBlocks > 0)))){
l__3.status = BlockData.ACTIVE;
};
if ((((l__3.type == BlockData.RAINBOW)) && (l__3.isFront))){
l__3.status = BlockData.ACTIVE;
};
}
public function mark(p__1:BlockData):void{
if (p__1.status != BlockData.ACTIVE){
p__1.status = BlockData.MARKED;
};
}
protected function maybeFlipBlock(p__1:int, p__2:int, p__3:Boolean):void{
var l__4:BlockData = blockySquare.getBlock(p__1, p__2);
if (flippedBlocks.indexOf(l__4) == -1){
if (((!(p__3)) || ((l__4.color == color)))){
if (l__4.isFront){
scoreBlocks++;
};
l__4.status = BlockData.MARKED;
if (makeChange){
blockySquare.flipBlock(p__1, p__2);
};
flippedBlocks.push(l__4);
};
};
}
}
}//package modelpackage
Section 40
//ReplayControl (replay.ReplayControl)
package replay {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ReplayControl extends Sprite {
public var stopTickTf:TextField;
public var playBtn:MovieClip;
public var speedTf:TextField;
public function ReplayControl(){
super();
playBtn.stop();
}
}
}//package replay
Section 41
//Communicator (util.Communicator)
package util {
import guipackage.*;
import flash.external.*;
import flash.system.*;
public class Communicator {
public function Communicator(){
super();
}
public function sendPlayData(p__1:Array):void{
var l__2:String = ((String(p__1[0]) + ",") + String(p__1[1]));
var l__3:int = p__1.length;
var l__4:* = 2;
while (l__4 < l__3) {
l__2 = (l__2 + (" " + String(p__1[l__4])));
l__4++;
};
l__2 = (l__2 + "=0");
ExternalInterface.call("playData", l__2);
}
public function sendFsCommand(p__1:String, p__2:String):void{
fscommand(p__1, p__2);
}
}
}//package util
Section 42
//GameTimer (util.GameTimer)
package util {
import flash.utils.*;
public class GameTimer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = -1
private var msPerTick:Number;
public var passedTime:Number;// = 0
public var alpha:Number;// = 0
public function GameTimer(p__1:Number){
super();
msPerTick = (1000 / p__1);
}
public function advanceTime():int{
if (lastTime == -1){
lastTime = getTimer();
};
var l__1:int = getTimer();
passedTime = (l__1 - lastTime);
lastTime = l__1;
unprocessedTime = (unprocessedTime + passedTime);
var l__2:int = int((unprocessedTime / msPerTick));
unprocessedTime = (unprocessedTime - (l__2 * msPerTick));
alpha = (unprocessedTime / msPerTick);
return (l__2);
}
}
}//package util
Section 43
//Integer64 (util.Integer64)
package util {
import util.*;
import flash.events.*;
class Integer64 {
private var p:Array;
private var r:Array;
private var s:Array;
function Integer64(p__1){
super();
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 (p__1){
merge(p__1);
};
}
public function init(p__1:Integer64):void{
var l__2:* = 0;
while (l__2 < p.length) {
p[l__2] = p__1.p[l__2];
l__2 = (l__2 + 1);
};
}
public function init32(p__1:Number):void{
p[0] = (p__1 & 32767);
p__1 = (p__1 >>> 15);
p[1] = (p__1 & 32767);
p__1 = (p__1 >>> 15);
p[2] = (p__1 & 3);
p[3] = 0;
p[4] = 0;
}
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 binaryShiftLeft(p__1:Number):void{
var l__2:* = 0;
while (l__2 < p__1) {
shl();
l__2 = (l__2 + 1);
};
}
public function binaryShiftRight(p__1:Number):void{
var l__5:* = undefined;
var l__6:* = undefined;
var l__2:* = ((p__1 / 15) >> 0);
var l__3:* = (p__1 - (l__2 * 15));
var l__4:* = (p.length - 1);
while (l__4 > 0) {
l__5 = 0;
while (l__5 < l__2) {
p[l__5] = p[(l__5 + 1)];
l__5 = (l__5 + 1);
};
l__4--;
p[l__4] = 0;
};
if (l__3 > 0){
l__6 = 0;
while (l__6 < l__3) {
shr();
l__6 = (l__6 + 1);
};
};
}
public function binaryNot(p__1:Integer64):void{
p[0] = (p[0] ^ p__1.p[0]);
p[1] = (p[1] ^ p__1.p[1]);
p[2] = (p[2] ^ p__1.p[2]);
p[3] = (p[3] ^ p__1.p[3]);
p[4] = (p[4] ^ p__1.p[4]);
}
public function add64(p__1:Integer64):void{
var l__2:* = 0;
var l__3:* = 1;
var l__4:* = 0;
while ((((l__3 < p.length)) && (!((p__1.p[l__4] == 0))))) {
l__3 = (l__3 + 1);
};
l__4 = 0;
while (l__4 < l__3) {
l__2 = (l__2 + (p[l__4] + p__1.p[l__4]));
p[l__4] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__4 = (l__4 + 1);
};
}
public function add32(p__1:Number):void{
var l__2:* = 0;
var l__3:* = (p__1 & 32767);
p__1 = (p__1 >> 15);
var l__4:* = (p__1 & 32767);
p__1 = (p__1 >> 15);
var l__5:* = (p__1 & 3);
l__2 = (l__2 + (p[0] + l__3));
p[0] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (p[1] + l__4));
p[1] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (p[2] + l__5));
p[2] = (l__2 & 32767);
}
public function mulu32(p__1:Number):void{
var l__4:* = undefined;
var l__2:* = 0;
s[0] = (p__1 & 32767);
p__1 = (p__1 >>> 15);
s[1] = (p__1 & 32767);
p__1 = (p__1 >>> 15);
s[2] = (p__1 & 3);
var l__3:* = 0;
while (l__3 < 3) {
l__4 = s[l__3];
l__2 = (l__4 * p[0]);
r[l__3][0] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[1]));
r[l__3][1] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[2]));
r[l__3][2] = (l__2 & 3);
l__3 = (l__3 + 1);
};
l__2 = r[0][0];
p[0] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (r[0][1] + r[1][0]));
p[1] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (l__2 & 3);
p[3] = 0;
p[4] = 0;
}
public function mul64(p__1:Integer64):void{
var l__4:* = undefined;
var l__2:* = 0;
var l__3:* = 0;
while (l__3 < 5) {
l__4 = p__1.p[l__3];
l__2 = (l__4 * p[0]);
r[l__3][0] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[1]));
r[l__3][1] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[2]));
r[l__3][2] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[3]));
r[l__3][3] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (l__4 * p[4]));
r[l__3][4] = (l__2 & 32767);
l__3 = (l__3 + 1);
};
l__2 = r[0][0];
p[0] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (r[0][1] + r[1][0]));
p[1] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]));
p[3] = (l__2 & 32767);
l__2 = (l__2 >> 15);
l__2 = (l__2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]));
p[4] = (l__2 & 7);
}
public function mul32(p__1:Number):void{
mul64(new Integer64(p__1));
}
private function merge(p__1:Number):Number{
var l__2:* = 0;
while (l__2 < 3) {
p[l__2] = (p[l__2] + (p__1 & 32767));
p__1 = (p__1 >>> 15);
l__2 = (l__2 + 1);
};
return (p__1);
}
private function shl():void{
var l__1:* = 0;
var l__2:* = 0;
var l__3:* = 0;
var l__4:* = p.length;
while (l__3 < l__4) {
l__1 = ((p[l__3] & 0x4000) >> 14);
p[l__3] = (p[l__3] << 1);
p[l__3] = ((p[l__3] | l__2) & 32767);
l__3 = (l__3 + 1);
l__2 = l__1;
};
}
private function shr():void{
var l__1:* = 0;
var l__2:* = 0;
var l__3:* = (p.length - 1);
while (l__3 >= 0) {
l__1 = ((p[l__3] & 1) << 14);
p[l__3] = (p[l__3] >> 1);
p[l__3] = ((p[l__3] | l__2) & 32767);
l__3--;
l__2 = l__1;
};
}
}
}//package util
Section 44
//Random (util.Random)
package util {
import flash.display.*;
import flash.utils.*;
public class Random {
private var mta:Array;
private var mti:Number;
private var lastSeed:Number;
private static var N:Number = 624;
private static var M:Number = 397;
private static var MATRIX_A:Number = 2567483615;
private static var UPPER_MASK:Number = 2147483648;
private static var LOWER_MASK:Number = 2147483647;
private static var mag01:Array = [0, 2567483615];
public function Random(p__1:Number){
super();
mta = new Array(N);
mti = (N + 1);
if (p__1){
init_genrand(p__1);
};
}
public function set seed(p__1:Number){
init_genrand(p__1);
}
public function get seed():Number{
return (lastSeed);
}
public function nextInt(p__1:Number){
return (((genrand_int32() & 2147483647) % p__1));
}
public function nextFloat(){
return ((next(24) / (1 << 24)));
}
public function nextDouble(){
return ((next(24) / (1 << 24)));
}
public function next(p__1:Number){
if (p__1 < 32){
return ((genrand_int32() & ((1 << p__1) - 1)));
};
return (genrand_int32());
}
private function init_genrand(p__1:Number):void{
p__1 = int(p__1);
var l__2:* = getTimer();
lastSeed = p__1;
mta[0] = p__1;
var l__3:* = p__1;
var l__4:* = new Integer64(null);
var l__5:Number = N;
mti = 1;
while (mti < l__5) {
l__4.init32(((l__3 >>> 30) ^ l__3));
l__4.mulu32(1812433253);
l__3 = (mta[mti] = int((l__4.lsb + mti)));
mti++;
};
var l__6:* = getTimer();
}
private function genrand_int32(){
var l__3:* = undefined;
var l__4:* = undefined;
var l__5:* = undefined;
var l__6:* = undefined;
var l__7:* = undefined;
var l__8:* = undefined;
var l__9:* = undefined;
var l__10:* = undefined;
var l__11:* = undefined;
var l__1:Number = N;
var l__2:Number = 0;
if (mti >= l__1){
if (mti == (l__1 + 1)){
init_genrand(5489);
};
l__3 = M;
l__4 = UPPER_MASK;
l__5 = LOWER_MASK;
l__6 = mag01;
l__7 = getTimer();
l__8 = 0;
l__9 = (l__1 - l__3);
l__10 = (l__3 - l__1);
l__8 = 0;
while (l__8 < l__9) {
l__2 = ((mta[l__8] & l__4) | (mta[(l__8 + 1)] & l__5));
mta[l__8] = ((mta[(l__8 + l__3)] ^ (l__2 >>> 1)) ^ l__6[(l__2 & 1)]);
l__8 = (l__8 + 1);
};
l__9 = (l__1 - 1);
while (l__8 < l__9) {
l__2 = ((mta[l__8] & l__4) | (mta[(l__8 + 1)] & l__5));
mta[l__8] = ((mta[(l__8 + l__10)] ^ (l__2 >>> 1)) ^ l__6[(l__2 & 1)]);
l__8 = (l__8 + 1);
};
l__2 = ((mta[(l__1 - 1)] & l__4) | (mta[0] & l__5));
mta[(l__1 - 1)] = ((mta[(l__3 - 1)] ^ (l__2 >>> 1)) ^ l__6[(l__2 & 1)]);
mti = 0;
l__11 = getTimer();
};
l__2 = mta[mti++];
l__2 = (l__2 ^ (l__2 >>> 11));
l__2 = (l__2 ^ ((l__2 << 7) & 2636928640));
l__2 = (l__2 ^ ((l__2 << 15) & 4022730752));
l__2 = (l__2 ^ (l__2 >>> 18));
return (l__2);
}
}
}//package util
Section 45
//SoundFader (util.SoundFader)
package util {
import flash.media.*;
import flash.events.*;
import flash.utils.*;
public class SoundFader {
private var miniStep:Number;// = 0.01
private var millisec:int;
private var timer:Timer;
private var fadeStep:Number;// = 0.03
private var nrOfSteps:int;
private var panning:Number;
private var listener:Object;
private var extraRepeats:int;// = 5
public var soundChannel:SoundChannel;
public function SoundFader(p__1:SoundChannel, p__2:int, p__3:Object=null){
super();
soundChannel = p__1;
millisec = p__2;
listener = p__3;
var l__4:Number = p__1.soundTransform.volume;
nrOfSteps = (l__4 / fadeStep);
panning = p__1.soundTransform.pan;
var l__5:int = (p__2 / nrOfSteps);
timer = new Timer(l__5, (nrOfSteps + extraRepeats));
timer.addEventListener("timer", fade);
timer.addEventListener("timerComplete", destroy);
timer.start();
}
public function fade(p__1:TimerEvent):void{
var l__2:Number = soundChannel.soundTransform.volume;
if (l__2 > fadeStep){
l__2 = (l__2 - fadeStep);
} else {
l__2 = (l__2 - miniStep);
};
if (l__2 < 0){
l__2 = 0;
};
soundChannel.soundTransform = new SoundTransform(l__2, panning);
}
public function destroy(p__1:TimerEvent):void{
soundChannel.stop();
if (listener != null){
listener.soundFaderCompleted(this);
};
}
}
}//package util
Section 46
//Stack (util.Stack)
package util {
import guipackage.*;
public class Stack {
protected var array:Array;
public function Stack(){
super();
array = new Array();
}
public function g(p__1:int){
if ((((p__1 < 0)) || ((p__1 >= array.length)))){
throw (new Error(((("index " + p__1) + " out of range ") + array.length)));
};
return (array[p__1]);
}
public function s(p__1:int, p__2){
var l__3:* = undefined;
if ((((p__1 < 0)) || ((p__1 >= array.length)))){
throw (new Error(((("index " + p__1) + " out of range ") + array.length)));
};
l__3 = array[p__1];
array[p__1] = p__2;
return (l__3);
}
public function push(p__1){
array.push(p__1);
return (p__1);
}
public function pop(){
return (array.pop());
}
public function indexOf(p__1, p__2:int=0):int{
return (array.indexOf(p__1, p__2));
}
public function lastIndexOf(p__1, p__2:int=2147483647):int{
return (array.lastIndexOf(p__1, p__2));
}
public function add(p__1:int, p__2):void{
if ((((p__1 < 0)) || ((p__1 > array.length)))){
throw (new Error(((("index " + p__1) + " out of range ") + array.length)));
};
array.splice(p__1, 0, p__2);
}
public function remove(p__1:int){
if ((((p__1 < 0)) || ((p__1 >= array.length)))){
throw (new Error(((("index " + p__1) + " out of range ") + (array.length - 1))));
};
return (array.splice(p__1, 1)[0]);
}
public function size():int{
return (array.length);
}
public function toString():String{
return (array.toString());
}
public function toArray():Array{
return (array);
}
}
}//package util
Section 47
//VolumeChanger (util.VolumeChanger)
package util {
import flash.media.*;
import flash.events.*;
import flash.utils.*;
public class VolumeChanger {
public var soundChannel:SoundChannel;
protected var panning:Number;
protected var millisec:uint;
protected var timer:Timer;
protected var volumeStep:Number;
protected var endVolume:Number;
protected var MIN_DELAY:int;// = 10
protected var MIN_STEP:Number;// = 0.05
protected var listener:Object;
protected var startVolume:Number;
public function VolumeChanger(p__1:SoundChannel, p__2:Number, p__3:uint, p__4:Object=null){
super();
soundChannel = p__1;
endVolume = p__2;
millisec = p__3;
listener = p__4;
startVolume = p__1.soundTransform.volume;
panning = p__1.soundTransform.pan;
var l__5:Number = (p__2 - startVolume);
var l__6:int = Math.abs((l__5 / MIN_STEP));
if (l__6 == 0){
l__6 = 1;
};
var l__7:int = (p__3 / l__6);
if (l__7 < MIN_DELAY){
l__7 = MIN_DELAY;
l__6 = (p__3 / l__7);
};
volumeStep = (l__5 / l__6);
timer = new Timer(l__7, l__6);
timer.addEventListener("timer", changeVolume);
timer.addEventListener("timerComplete", finish);
timer.start();
}
public function changeVolume(p__1:TimerEvent):void{
var l__2:Number = soundChannel.soundTransform.volume;
l__2 = (l__2 + volumeStep);
soundChannel.soundTransform = new SoundTransform(l__2, panning);
}
public function finish(p__1:TimerEvent):void{
soundChannel.soundTransform = new SoundTransform(endVolume, panning);
if (listener != null){
listener.VolumeChangerCompleted(this);
};
}
}
}//package util
Section 48
//App (App)
package {
public class App {
public static const DEV_MODE:int = 1;
public static const MONEY_GAME:int = 1;
public static const PRACTICE_GAME:int = 2;
public static const GAME_TYPE:int = 1;
public static const TIME_RAN_OUT:int = 1;
public static const SHORT_GAME_END:int = 2;
public static const USER_CHOSE_EXIT:int = 3;
public static const RELAX_MOVES_FINISHED:int = 4;
public static const INPUT_SHUFFLE:int = 0;
public static const INPUT_EXIT:int = 1;
public static const INPUT_SELECT_RECT:int = 2;
public static const INPUT_SELECT_CHANGE:int = 4;
public static const LAST_TICK:int = 3;
public static const INPUT_STRINGS:Array = ["shuffle", "exit", "selectRect", "lastTick"];
public static const TICKS_PER_SECOND:int = 60;
public static const MOVIE_CLIP_FRAME_RATE:int = 120;
public static const MOVIE_CLIP_FRAMES_PER_GAME_TICK:Number = 2;
public static const TIME_WARNING_TICKS:int = 600;
public static const INTRO_TICKS:int = 900;
public static const END_REASON_TICKS:int = 180;
public function App(){
super();
trace("static class that should not be instanitated");
}
public static function ticksToMillisec(p__1:int):int{
return (Math.floor(((p__1 / App.TICKS_PER_SECOND) * 1000)));
}
public static function isLogicPlayData(p__1:int):Boolean{
if (p__1 == INPUT_SELECT_CHANGE){
return (false);
};
return (true);
}
}
}//package
Section 49
//BassAnim (BassAnim)
package {
import guipackage.*;
public dynamic class BassAnim extends InstrumentAnim {
public function BassAnim(){
super();
}
}
}//package
Section 50
//Block1 (Block1)
package {
import flash.display.*;
public dynamic class Block1 extends Sprite {
public function Block1(){
super();
}
}
}//package
Section 51
//Block2 (Block2)
package {
import flash.display.*;
public dynamic class Block2 extends Sprite {
public function Block2(){
super();
}
}
}//package
Section 52
//Block3 (Block3)
package {
import flash.display.*;
public dynamic class Block3 extends Sprite {
public function Block3(){
super();
}
}
}//package
Section 53
//Block4 (Block4)
package {
import flash.display.*;
public dynamic class Block4 extends Sprite {
public function Block4(){
super();
}
}
}//package
Section 54
//BlockBackground (BlockBackground)
package {
import flash.display.*;
public dynamic class BlockBackground extends MovieClip {
public var taken:MovieClip;
}
}//package
Section 55
//BlockCat1 (BlockCat1)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat1 extends MovieClip {
public var hat:MovieClip;
public var head:Cat1Sax_42;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 56
//BlockCat2 (BlockCat2)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat2 extends MovieClip {
public var hat:MovieClip;
public var head:Cat2Piano_88;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 57
//BlockCat3 (BlockCat3)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat3 extends MovieClip {
public var hat:MovieClip;
public var head:Cat3Bass_92;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 58
//BlockCat4 (BlockCat4)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat4 extends MovieClip {
public var hat:MovieClip;
public var head:Cat4Drums_95;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 59
//BlockCat5 (BlockCat5)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat5 extends MovieClip {
public var hat:MovieClip;
public var head:Cat5Trumpet_98;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 60
//BlockCat6 (BlockCat6)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockCat6 extends MovieClip {
public var hat:MovieClip;
public var head:Cat6Song_101;
public var shadow:MovieClip;
public var sunglasses:MovieClip;
}
}//package
Section 61
//BlockRainbow (BlockRainbow)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BlockRainbow extends MovieClip {
public var head:CatRainbow_63;
public var bg:RainbowBackground;
public var shadow:MovieClip;
public var taken:MovieClip;
}
}//package
Section 62
//BombBackside1 (BombBackside1)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside1 extends MovieClip {
public var head:Cat1Sax_42;
}
}//package
Section 63
//BombBackside2 (BombBackside2)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside2 extends MovieClip {
public var head:Cat2Piano_88;
}
}//package
Section 64
//BombBackside3 (BombBackside3)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside3 extends MovieClip {
public var head:Cat3Bass_92;
}
}//package
Section 65
//BombBackside4 (BombBackside4)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside4 extends MovieClip {
public var head:Cat4Drums_95;
}
}//package
Section 66
//BombBackside5 (BombBackside5)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside5 extends MovieClip {
public var head:Cat5Trumpet_98;
}
}//package
Section 67
//BombBackside6 (BombBackside6)
package {
import flash.display.*;
import CatCorner_fla.*;
public dynamic class BombBackside6 extends MovieClip {
public var head:Cat6Song_101;
}
}//package
Section 68
//BombSnd (BombSnd)
package {
import flash.media.*;
public dynamic class BombSnd extends Sound {
}
}//package
Section 69
//Color0Snd (Color0Snd)
package {
import flash.media.*;
public dynamic class Color0Snd extends Sound {
}
}//package
Section 70
//Color1Snd (Color1Snd)
package {
import flash.media.*;
public dynamic class Color1Snd extends Sound {
}
}//package
Section 71
//Color2Snd (Color2Snd)
package {
import flash.media.*;
public dynamic class Color2Snd extends Sound {
}
}//package
Section 72
//Color3Snd (Color3Snd)
package {
import flash.media.*;
public dynamic class Color3Snd extends Sound {
}
}//package
Section 73
//Color4Snd (Color4Snd)
package {
import flash.media.*;
public dynamic class Color4Snd extends Sound {
}
}//package
Section 74
//Color5Snd (Color5Snd)
package {
import flash.media.*;
public dynamic class Color5Snd extends Sound {
}
}//package
Section 75
//Document (Document)
package {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.external.*;
import flash.net.*;
public class Document extends Sprite {
protected var gui:Gui;
protected var timer:GameTimer;
protected var currentTick:int;// = -1
public var relaxMode:Boolean;// = false
protected var communicator:Communicator;
protected var guiControl:GuiControl;
protected var model:Model;
protected var gameRunning:Boolean;// = false
protected var gameLog:String;// = ""
protected var gameTimer:GameTimer;
protected var gameDataXml:XML;
public static var debugTf:TextField;
public function Document(){
super();
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
gui = new Gui(this, stage.stageWidth, stage.stageHeight);
addChild(gui);
guiControl = new GuiControl(gui);
gui.guiControl = guiControl;
gameTimer = new GameTimer(App.TICKS_PER_SECOND);
fakeGameData();
}
public function log(_arg1:String):void{
trace((_arg1 + "\n"));
}
public function getTranslation(_arg1:String):String{
var _arg1 = _arg1;
var id:* = _arg1;
return (String(gameDataXml.text.(@id == id)));
}
public function gameDataLoaded():void{
gui.setIntroTranslations();
model = new Model(this, guiControl, gameDataXml);
communicator = new Communicator();
addEventListener("enterFrame", advanceTime);
}
public function gameQuit(_arg1:Event=null):void{
if (App.GAME_TYPE != App.DEV_MODE){
};
trace(gameLog);
}
protected function advanceTime(_arg1:Event):void{
var _local2:int = gameTimer.advanceTime();
var _local3:* = 0;
while (_local3 < _local2) {
currentTick++;
if (gameRunning){
model.tick(currentTick);
};
_local3++;
};
gui.render(currentTick, gameTimer.alpha);
}
protected function fakeGameData():void{
var myLoader:* = null;
var xmlLoaded:* = null;
var loadError:* = null;
gameDataXml = new XML((((((((((((((((((((((((((("<gamedata randomseed=\"10034644\" userType=\"1\">" + "<text id=\"intro_instruction\">Click and drag a rectangle around a numbr of cats and the board. If all corner cats have the same color all cats inside the rectangles are flipped and replaced by paws. Bigger rectangle give a higer score.When all blocks on a board have been flipped, a new bigger board appears. Claer as many boards as possible before the time is out.</text>") + "<text id=\"instructions_label\">Instructions</text>") + "<text id=\"click_to_start\">CLICK TO START!</text>") + "<text id=\"rainbow_cat_instruction\">RAINBOW CAT can be combined with any other color</text>") + "<text id=\"cool_cat_instruction\">If COOL CAT is in a corner, all cats of the same color are flipped</text>") + "<text id=\"shuffle_instruction\">SHUFFLE changes the colour on every square on the board but costs 10sec.</text>") + "<text id=\"herring_instruction\">A HERRING in a corner gives 2x score of the combo. Two in 2 Corners gives 3x score etc.</text>") + "<text id=\"clock_instruction\">If this CLOCK is in one of the corners, you earn extra time.</text>") + "<text id=\"sound_on\">SOUND ON</text>") + "<text id=\"sound_off\">SOUND OFF</text>") + "<text id=\"intro_countdown_first\">GAME STARTS IN</text>") + "<text id=\"countdown_last\">SEC</text>") + "<text id=\"next_level\">3</text>") + "<text id=\"exit_button\">4</text>") + "<text id=\"level_label\">LEVEL</text>") + "<text id=\"time_label\">TIME</text>") + "<text id=\"score_label\">SCORE</text>") + "<text id=\"shuffle_label\">SHUFFLE</text>") + "<text id=\"outro_score_label\">SCORE</text>") + "<text id=\"outro_level_label\">You made it to Level</text>") + "<text id=\"outro_countdown_first\">GAME ENDS IN</text>") + "<text id=\"outro_open_game_label\">abc</text>") + "<sfx state=\"1\" />") + "<music state=\"1\" />") + "<userType id=\"0\">1</userType>") + "</gamedata>"));
gameDataLoaded();
}
public function startGame():void{
gameRunning = true;
if (App.GAME_TYPE != App.DEV_MODE){
};
gameTimer = new GameTimer(App.TICKS_PER_SECOND);
currentTick = -1;
if (relaxMode){
model.guiControl.updateMoves(model.game.relaxMoves);
};
}
protected function getGameData():void{
var _local1:Object = ExternalInterface.call("getGameData");
if (((!((_local1 == null))) && (_local1.success))){
gameDataXml = new XML(_local1.message);
gameDataLoaded();
} else {
log("Error: Could not load game Data!");
};
}
public function gameOver(_arg1:int, _arg2:int):void{
gameRunning = false;
trace(((("DR:" + _arg1) + " ") + _arg2));
}
public function addPlayData(_arg1:Array):void{
var _local2:int = (currentTick + 1);
_arg1.splice(1, 0, _local2);
model.addPlayData(_arg1);
var _local3:int = int(_arg1[0]);
if (App.GAME_TYPE == App.MONEY_GAME){
if (App.isLogicPlayData(_local3)){
};
};
}
}
}//package
Section 76
//DrumsAnim (DrumsAnim)
package {
import guipackage.*;
public dynamic class DrumsAnim extends InstrumentAnim {
public function DrumsAnim(){
super();
}
}
}//package
Section 77
//EyeAnimation1 (EyeAnimation1)
package {
import guipackage.*;
public dynamic class EyeAnimation1 extends EyeAnimation {
public function EyeAnimation1(){
super();
}
}
}//package
Section 78
//EyeAnimation2 (EyeAnimation2)
package {
import guipackage.*;
public dynamic class EyeAnimation2 extends EyeAnimation {
public function EyeAnimation2(){
super();
}
}
}//package
Section 79
//EyeAnimation3 (EyeAnimation3)
package {
import guipackage.*;
public dynamic class EyeAnimation3 extends EyeAnimation {
public function EyeAnimation3(){
super();
}
}
}//package
Section 80
//EyeAnimation4 (EyeAnimation4)
package {
import guipackage.*;
public dynamic class EyeAnimation4 extends EyeAnimation {
public function EyeAnimation4(){
super();
}
}
}//package
Section 81
//EyeAnimation5 (EyeAnimation5)
package {
import guipackage.*;
public dynamic class EyeAnimation5 extends EyeAnimation {
public function EyeAnimation5(){
super();
}
}
}//package
Section 82
//EyeAnimation6 (EyeAnimation6)
package {
import guipackage.*;
public dynamic class EyeAnimation6 extends EyeAnimation {
public function EyeAnimation6(){
super();
}
}
}//package
Section 83
//EyeAnimationRainbow (EyeAnimationRainbow)
package {
import guipackage.*;
public dynamic class EyeAnimationRainbow extends EyeAnimation {
public function EyeAnimationRainbow(){
super();
}
}
}//package
Section 84
//FrameCount (FrameCount)
package {
import flash.display.*;
import flash.text.*;
public dynamic class FrameCount extends Sprite {
public var textField:TextField;
public function FrameCount(){
super();
}
}
}//package
Section 85
//GoldBackside (GoldBackside)
package {
import flash.display.*;
public dynamic class GoldBackside extends MovieClip {
public var glimmRotate1:MovieClip;
public var glimmRotate2:MovieClip;
}
}//package
Section 86
//GoldSnd (GoldSnd)
package {
import flash.media.*;
public dynamic class GoldSnd extends Sound {
}
}//package
Section 87
//IntroSnd (IntroSnd)
package {
import flash.media.*;
public dynamic class IntroSnd extends Sound {
}
}//package
Section 88
//InvisibleButton (InvisibleButton)
package {
import flash.display.*;
public dynamic class InvisibleButton extends Sprite {
public function InvisibleButton(){
super();
}
}
}//package
Section 89
//LoopSnd (LoopSnd)
package {
import flash.media.*;
public dynamic class LoopSnd extends Sound {
}
}//package
Section 90
//LoopSnd2 (LoopSnd2)
package {
import flash.media.*;
public dynamic class LoopSnd2 extends Sound {
}
}//package
Section 91
//MicrophoneAnim (MicrophoneAnim)
package {
import guipackage.*;
public dynamic class MicrophoneAnim extends InstrumentAnim {
public function MicrophoneAnim(){
super();
}
}
}//package
Section 92
//MultiFileBlock1_1757060451 (MultiFileBlock1_1757060451)
package {
import guipackage.*;
import modelpackage.*;
import util.*;
import flash.display.*;
import librarynames.*;
import replay.*;
public class MultiFileBlock1_1757060451 extends MovieClip {
public function MultiFileBlock1_1757060451(){
var Dummy1:GameTimer;
var Dummy2:GuiControl;
var Dummy3:Communicator;
var Dummy4:Model;
var Dummy5:OutroBlinking;
var Dummy6:App;
var Dummy7:BlockBitmapData;
var Dummy8:BlockData;
var Dummy9:Stack;
var Dummy10:Game;
var Dummy11:Random;
var Dummy12:SoundManager;
var Dummy13:Selection;
var Dummy14:BlockySquare;
var Dummy15:SoundFader;
var Dummy16:VolumeChanger;
var Dummy17:Block1;
var Dummy18:Block2;
var Dummy19:Block3;
var Dummy20:Block4;
var Dummy21:Document;
var Dummy22:FrameCount;
var Dummy23:InvisibleButton;
var Dummy24:GameBackground;
var Dummy25:Intro;
var Dummy26:Outro;
var Dummy27:ScorePop;
var Dummy28:SelectionRect;
var Dummy29:Background;
var Dummy30:ShortModeSign;
var Dummy31:StartButton;
var Dummy32:ReplayControl;
var Dummy33:Gui;
var Dummy34:PlayArea;
var Dummy35:Grid;
var Dummy36:SelectionRect05;
var Dummy37:SelectionRect06;
var Dummy38:SelectionRect07;
var Dummy39:SelectionRect08;
var Dummy40:SelectionRect09;
var Dummy41:SelectionRect10;
var Dummy42:BlockGold;
var Dummy43:BlockTime;
var Dummy44:Footsteps;
var Dummy45:GameEndScoreAnim;
var Dummy46:OutroAnimation;
var Dummy47:InstrumentAnim;
var Dummy48:EyeAnimation;
var Dummy49:Block;
var Dummy50:BassAnim;
var Dummy51:DrumsAnim;
var Dummy52:MicrophoneAnim;
var Dummy53:PianoAnim;
var Dummy54:SaxAnim;
var Dummy55:TrumpetAnim;
var Dummy56:EyeAnimation1;
var Dummy57:EyeAnimation2;
var Dummy58:EyeAnimation3;
var Dummy59:EyeAnimation4;
var Dummy60:EyeAnimation5;
var Dummy61:EyeAnimation6;
var Dummy62:EyeAnimationRainbow;
super();
}
}
}//package
Section 93
//NewLevelSnd (NewLevelSnd)
package {
import flash.media.*;
public dynamic class NewLevelSnd extends Sound {
}
}//package
Section 94
//NoCatSnd (NoCatSnd)
package {
import flash.media.*;
public dynamic class NoCatSnd extends Sound {
}
}//package
Section 95
//NormalBackside (NormalBackside)
package {
import flash.display.*;
public dynamic class NormalBackside extends MovieClip {
}
}//package
Section 96
//NotComboSnd (NotComboSnd)
package {
import flash.media.*;
public dynamic class NotComboSnd extends Sound {
}
}//package
Section 97
//OutroSnd (OutroSnd)
package {
import flash.media.*;
public dynamic class OutroSnd extends Sound {
}
}//package
Section 98
//PianoAnim (PianoAnim)
package {
import guipackage.*;
public dynamic class PianoAnim extends InstrumentAnim {
public function PianoAnim(){
super();
}
}
}//package
Section 99
//PlayBtn (PlayBtn)
package {
import flash.display.*;
public dynamic class PlayBtn extends MovieClip {
}
}//package
Section 100
//RainbowBackground (RainbowBackground)
package {
import flash.display.*;
public dynamic class RainbowBackground extends MovieClip {
}
}//package
Section 101
//RainbowBackside (RainbowBackside)
package {
import flash.display.*;
public dynamic class RainbowBackside extends MovieClip {
}
}//package
Section 102
//SaxAnim (SaxAnim)
package {
import guipackage.*;
public dynamic class SaxAnim extends InstrumentAnim {
public function SaxAnim(){
super();
}
}
}//package
Section 103
//SelectionRect05 (SelectionRect05)
package {
import guipackage.*;
public dynamic class SelectionRect05 extends SelectionRect {
public function SelectionRect05(){
super();
}
}
}//package
Section 104
//SelectionRect06 (SelectionRect06)
package {
import guipackage.*;
public dynamic class SelectionRect06 extends SelectionRect {
public function SelectionRect06(){
super();
}
}
}//package
Section 105
//SelectionRect07 (SelectionRect07)
package {
import guipackage.*;
public dynamic class SelectionRect07 extends SelectionRect {
public function SelectionRect07(){
super();
}
}
}//package
Section 106
//SelectionRect08 (SelectionRect08)
package {
import guipackage.*;
public dynamic class SelectionRect08 extends SelectionRect {
public function SelectionRect08(){
super();
}
}
}//package
Section 107
//SelectionRect09 (SelectionRect09)
package {
import guipackage.*;
public dynamic class SelectionRect09 extends SelectionRect {
public function SelectionRect09(){
super();
}
}
}//package
Section 108
//SelectionRect10 (SelectionRect10)
package {
import guipackage.*;
public dynamic class SelectionRect10 extends SelectionRect {
public function SelectionRect10(){
super();
}
}
}//package
Section 109
//ShuffleSnd (ShuffleSnd)
package {
import flash.media.*;
public dynamic class ShuffleSnd extends Sound {
}
}//package
Section 110
//TimeBackside (TimeBackside)
package {
import flash.display.*;
public dynamic class TimeBackside extends MovieClip {
}
}//package
Section 111
//TimeSnd (TimeSnd)
package {
import flash.media.*;
public dynamic class TimeSnd extends Sound {
}
}//package
Section 112
//TimeWarningSnd (TimeWarningSnd)
package {
import flash.media.*;
public dynamic class TimeWarningSnd extends Sound {
}
}//package
Section 113
//TrumpetAnim (TrumpetAnim)
package {
import guipackage.*;
public dynamic class TrumpetAnim extends InstrumentAnim {
public function TrumpetAnim(){
super();
}
}
}//package