Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(_arg1:Event):void{
var _local2:String;
var _local3:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
_local2 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package CPMStar
Section 2
//Enemy (enemies.Enemy)
package enemies {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public dynamic class Enemy extends MovieClip {
private var cTrans:ColorTransform;
private var raioEnemy:Number;
private var goodGuyMode:Boolean;
private var backMode:int;
private var distancePlayer:Number;
private var cNone:ColorTransform;
private var contBoom:int;
private var distanceLimitCircle:Number;
private var speed:int;// = 2
private var atack:Boolean;
private var frameTwo:Array;
private var distanceBall:Number;
private var position:int;
private var collisionPlayer:Boolean;
private var frameOne:Array;
private var screenWidth:int;
private var fMc:Boolean;
private var contPlayerCollision:int;
private var enemyType:int;// = -1
public function Enemy(){
enemyType = -1;
frameOne = new Array(8);
frameTwo = new Array(8);
speed = 2;
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
initVariables();
}
public function setBackVariables(){
if (GameControler.getInstance() != null){
GameControler.getInstance().setPostionArray(position, false);
};
atack = false;
this.visible = false;
this.position = -1;
contPlayerCollision = 0;
goodGuyMode = false;
fMc = false;
}
public function setBlind(){
this.blind.visible = !(this.blind.visible);
}
public function checkCollisionBall(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Boolean){
if (((!((this.currentFrame == 3))) && (this.visible))){
distanceBall = Math.sqrt((((_arg1 - this.x) * (_arg1 - this.x)) + ((_arg2 - this.y) * (_arg2 - this.y))));
distanceLimitCircle = Math.sqrt((((275 - this.x) * (275 - this.x)) + ((200 - this.y) * (200 - this.y))));
if ((((((distanceLimitCircle < (raioEnemy + 70))) && ((distanceBall < (raioEnemy + _arg3))))) && (!(_arg5)))){
if (enemyType == _arg4){
dead(100);
SoundsGame.getInstance().playConvertEnemy();
} else {
atack = true;
if (GameControler.getInstance() != null){
GameControler.getInstance().deadBall(_arg4);
} else {
HowToPlay.getInstace().deadBall(_arg4);
};
if (frameTwo[_arg4]){
frameOne[_arg4] = true;
frameTwo[_arg4] = false;
this.gotoAndStop(2);
this.blind.gotoAndStop(2);
SoundsGame.getInstance().playAtackBall();
};
};
} else {
if (frameOne[_arg4]){
frameOne[_arg4] = false;
frameTwo[_arg4] = true;
this.gotoAndStop(1);
this.blind.gotoAndStop(1);
};
};
};
}
public function pauseEnemy(_arg1:Boolean){
if (_arg1){
cTrans.color = 0xD0D0D0;
cNone = this.transform.colorTransform;
this.transform.colorTransform = cTrans;
this.enemy.stop();
} else {
this.transform.colorTransform = cNone;
this.enemy.play();
};
}
private function initVariables(){
var _local1:int;
while (_local1 < frameOne.length) {
frameOne[_local1] = false;
frameTwo[_local1] = true;
_local1++;
};
this.blind.visible = false;
this.visible = false;
position = -1;
raioEnemy = 15;
distanceBall = 0;
distancePlayer = 0;
goodGuyMode = false;
contBoom = 0;
contPlayerCollision = 0;
distanceLimitCircle = 0;
atack = false;
speed = 2;
backMode = 0;
collisionPlayer = false;
enemyType = int((this.toString().charAt(13) as String));
}
public function dead(_arg1:int){
if (!goodGuyMode){
this.gotoAndStop(3);
this.blind.gotoAndStop(3);
};
goodGuyMode = true;
if (GameControler.getInstance() != null){
GameControler.getInstance().setEnemyTransform(this.x, this.y, enemyType);
GameControler.getInstance().setPoints(_arg1);
GameControler.getInstance().setPlayerCollision(false);
} else {
HowToPlay.getInstace().setEnemyTransform(this.x, this.y);
};
}
public function checkCollisionPlayer(_arg1:Number, _arg2:Number, _arg3:Number){
if (this.visible){
distancePlayer = Math.sqrt((((_arg1 - this.x) * (_arg1 - this.x)) + ((_arg2 - this.y) * (_arg2 - this.y))));
if ((distancePlayer < (raioEnemy + _arg3))){
if (!atack){
atack = true;
this.gotoAndStop(2);
this.blind.gotoAndStop(2);
SoundsGame.getInstance().playAtackBall();
if (GameControler.getInstance() != null){
GameControler.getInstance().playerLoseLife();
};
collisionPlayer = true;
};
if (!fMc){
if (GameControler.getInstance() != null){
GameControler.getInstance().setPlayerCollision(true);
} else {
HowToPlay.getInstace().setPlayerCollision(true);
};
fMc = true;
};
};
};
}
public function getPosition():int{
return (position);
}
public function getType():int{
return (enemyType);
}
public function setPosition(_arg1:int){
switch (_arg1){
case 0:
this.x = -30;
this.y = 200;
this.rotation = 0;
this.scaleX = -1;
this.scaleY = 1;
backMode = 0;
break;
case 1:
this.x = 50;
this.y = -30;
this.rotation = 45;
this.scaleX = -1;
this.scaleY = 1;
backMode = 2;
break;
case 2:
this.x = 280;
this.y = -30;
this.rotation = 90;
this.scaleX = -1;
this.scaleY = 1;
backMode = 2;
break;
case 3:
this.x = 510;
this.y = -35;
this.rotation = 135;
this.scaleX = -1;
this.scaleY = -1;
backMode = 2;
break;
case 4:
this.x = 580;
this.y = 200;
this.rotation = 180;
this.scaleX = -1;
this.scaleY = -1;
backMode = 3;
break;
case 5:
this.x = 510;
this.y = 430;
this.rotation = 225;
this.scaleX = -1;
this.scaleY = -1;
backMode = 1;
break;
case 6:
this.x = 275;
this.y = 430;
this.rotation = 270;
this.scaleX = -1;
this.scaleY = -1;
backMode = 1;
break;
case 7:
this.x = 50;
this.y = 430;
this.rotation = 315;
this.scaleX = -1;
this.scaleY = 1;
backMode = 1;
break;
};
this.visible = true;
atack = false;
goodGuyMode = false;
contPlayerCollision = 0;
this.position = _arg1;
if (GameControler.getInstance() != null){
GameControler.getInstance().setPostionArray(_arg1, true);
};
this.gotoAndStop(1);
this.blind.gotoAndStop(1);
}
public function update(){
if (this.currentFrame != 3){
if (!atack){
this.x = (this.x - (Math.sin(((this.rotation - 90) * (Math.PI / 180))) * speed));
this.y = (this.y - (Math.cos(((this.rotation - 90) * (Math.PI / 180))) * -(speed)));
} else {
if (++contPlayerCollision > 40){
if (collisionPlayer){
collisionPlayer = false;
this.gotoAndStop(1);
this.blind.gotoAndStop(1);
if (GameControler.getInstance() != null){
GameControler.getInstance().setPlayerCollision(false);
};
};
this.gotoAndStop(3);
this.blind.gotoAndStop(3);
};
};
};
}
public function getGoodGuyMode():Boolean{
return (this.goodGuyMode);
}
public static function create(_arg1:int, _arg2:int, _arg3:int):Enemy{
var _local4:Class;
var _local5:Enemy;
_local4 = (getDefinitionByName(("enemies.Enemy" + _arg1)) as Class);
_local5 = new (_local4);
_local5.x = _arg2;
_local5.y = _arg3;
_local5.gotoAndStop(1);
_local5.blind.gotoAndStop(1);
return (_local5);
}
}
}//package enemies
Section 3
//Enemy0 (enemies.Enemy0)
package enemies {
import flash.display.*;
public dynamic class Enemy0 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy0(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 4
//Enemy1 (enemies.Enemy1)
package enemies {
import flash.display.*;
public dynamic class Enemy1 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 5
//Enemy2 (enemies.Enemy2)
package enemies {
import flash.display.*;
public dynamic class Enemy2 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy2(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 6
//Enemy3 (enemies.Enemy3)
package enemies {
import flash.display.*;
public dynamic class Enemy3 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 7
//Enemy4 (enemies.Enemy4)
package enemies {
import flash.display.*;
public dynamic class Enemy4 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy4(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 8
//Enemy5 (enemies.Enemy5)
package enemies {
import flash.display.*;
public dynamic class Enemy5 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy5(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 9
//Enemy6 (enemies.Enemy6)
package enemies {
import flash.display.*;
public dynamic class Enemy6 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy6(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 10
//Enemy7 (enemies.Enemy7)
package enemies {
import flash.display.*;
public dynamic class Enemy7 extends Enemy {
public var blind:MovieClip;
public var enemy:MovieClip;
public function Enemy7(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package enemies
Section 11
//TransformEnemy (enemies.TransformEnemy)
package enemies {
import flash.display.*;
import flash.geom.*;
public class TransformEnemy extends MovieClip {
private var cTrans:ColorTransform;
private var pauseGame:Boolean;
private var cNone:ColorTransform;
public function TransformEnemy(){
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
addFrameScript(58, frame59);
this.visible = false;
}
public function setPosition(_arg1:Number, _arg2:Number){
this.gotoAndPlay(1);
this.visible = true;
this.x = _arg1;
this.y = _arg2;
}
public function update(){
this.y--;
if ((((this.y > 130)) && ((((this.x > 275)) && ((this.x < 400)))))){
this.x = (this.x + 3);
};
if ((((this.y > 130)) && ((((this.x < 275)) && ((this.x > 150)))))){
this.x = (this.x - 3);
};
if ((((this.y > 250)) && ((((this.x > 260)) && ((this.x < 280)))))){
this.x = (this.x - 6);
};
}
function frame59(){
this.visible = false;
}
public function pause(_arg1:Boolean){
this.pauseGame = _arg1;
if (_arg1){
cTrans.color = 0xD0D0D0;
cNone = this.transform.colorTransform;
this.transform.colorTransform = cTrans;
this.stop();
} else {
this.transform.colorTransform = cNone;
this.play();
};
}
}
}//package enemies
Section 12
//blind_black_enemy_112 (Game_fla.blind_black_enemy_112)
package Game_fla {
import flash.display.*;
public dynamic class blind_black_enemy_112 extends MovieClip {
public function blind_black_enemy_112(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 13
//blind_black_ok_197 (Game_fla.blind_black_ok_197)
package Game_fla {
import flash.display.*;
public dynamic class blind_black_ok_197 extends MovieClip {
public function blind_black_ok_197(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 14
//blind_blue_enemy_119 (Game_fla.blind_blue_enemy_119)
package Game_fla {
import flash.display.*;
public dynamic class blind_blue_enemy_119 extends MovieClip {
public function blind_blue_enemy_119(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 15
//blind_blue_ok_223 (Game_fla.blind_blue_ok_223)
package Game_fla {
import flash.display.*;
public dynamic class blind_blue_ok_223 extends MovieClip {
public function blind_blue_ok_223(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 16
//blind_brown_enemy_124 (Game_fla.blind_brown_enemy_124)
package Game_fla {
import flash.display.*;
public dynamic class blind_brown_enemy_124 extends MovieClip {
public function blind_brown_enemy_124(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 17
//blind_brown_ok_219 (Game_fla.blind_brown_ok_219)
package Game_fla {
import flash.display.*;
public dynamic class blind_brown_ok_219 extends MovieClip {
public function blind_brown_ok_219(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 18
//blind_green_enemy_129 (Game_fla.blind_green_enemy_129)
package Game_fla {
import flash.display.*;
public dynamic class blind_green_enemy_129 extends MovieClip {
public function blind_green_enemy_129(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 19
//blind_green_ok_215 (Game_fla.blind_green_ok_215)
package Game_fla {
import flash.display.*;
public dynamic class blind_green_ok_215 extends MovieClip {
public function blind_green_ok_215(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 20
//blind_grey_enemy_149 (Game_fla.blind_grey_enemy_149)
package Game_fla {
import flash.display.*;
public dynamic class blind_grey_enemy_149 extends MovieClip {
public function blind_grey_enemy_149(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 21
//blind_grey_ok_201 (Game_fla.blind_grey_ok_201)
package Game_fla {
import flash.display.*;
public dynamic class blind_grey_ok_201 extends MovieClip {
public function blind_grey_ok_201(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 22
//blind_purple_enemy_134 (Game_fla.blind_purple_enemy_134)
package Game_fla {
import flash.display.*;
public dynamic class blind_purple_enemy_134 extends MovieClip {
public function blind_purple_enemy_134(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 23
//blind_purple_ok_212 (Game_fla.blind_purple_ok_212)
package Game_fla {
import flash.display.*;
public dynamic class blind_purple_ok_212 extends MovieClip {
public function blind_purple_ok_212(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 24
//blind_red_enemy_139 (Game_fla.blind_red_enemy_139)
package Game_fla {
import flash.display.*;
public dynamic class blind_red_enemy_139 extends MovieClip {
public function blind_red_enemy_139(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 25
//blind_red_ok_209 (Game_fla.blind_red_ok_209)
package Game_fla {
import flash.display.*;
public dynamic class blind_red_ok_209 extends MovieClip {
public function blind_red_ok_209(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 26
//blind_yellow_enemy_144 (Game_fla.blind_yellow_enemy_144)
package Game_fla {
import flash.display.*;
public dynamic class blind_yellow_enemy_144 extends MovieClip {
public function blind_yellow_enemy_144(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Game_fla
Section 27
//blind_yellow_ok_205 (Game_fla.blind_yellow_ok_205)
package Game_fla {
import flash.display.*;
public dynamic class blind_yellow_ok_205 extends MovieClip {
public function blind_yellow_ok_205(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 28
//groupMoreGames_31 (Game_fla.groupMoreGames_31)
package Game_fla {
import flash.display.*;
public dynamic class groupMoreGames_31 extends MovieClip {
public var slotMoreGames:MC_Slot;
public var moregames:MovieClip;
}
}//package Game_fla
Section 29
//introFlash_242 (Game_fla.introFlash_242)
package Game_fla {
import flash.display.*;
public dynamic class introFlash_242 extends MovieClip {
public function introFlash_242(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package Game_fla
Section 30
//Life_93 (Game_fla.Life_93)
package Game_fla {
import flash.display.*;
public dynamic class Life_93 extends MovieClip {
public function Life_93(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 31
//LogoSponsor_23 (Game_fla.LogoSponsor_23)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class LogoSponsor_23 extends MovieClip {
public var url:URLRequest;
public function LogoSponsor_23(){
addFrameScript(0, frame1);
}
public function sponsor(_arg1:MouseEvent){
navigateToURL(url);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, sponsor);
url = new URLRequest("http://www.notdoppler.com/?ref=kokimi");
this.buttonMode = true;
}
}
}//package Game_fla
Section 32
//LogoSponsor2_5 (Game_fla.LogoSponsor2_5)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class LogoSponsor2_5 extends MovieClip {
public var url:URLRequest;
public function LogoSponsor2_5(){
addFrameScript(0, frame1);
}
public function sponsor(_arg1:MouseEvent){
navigateToURL(url);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, sponsor);
url = new URLRequest("http://www.notdoppler.com/?ref=kokimi");
this.buttonMode = true;
}
}
}//package Game_fla
Section 33
//MC_assjynx_75 (Game_fla.MC_assjynx_75)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class MC_assjynx_75 extends MovieClip {
public var url:URLRequest;
public function MC_assjynx_75(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, jynx);
url = new URLRequest("http://www.jynx.locaweb.com.br/");
this.buttonMode = true;
}
public function jynx(_arg1:MouseEvent){
navigateToURL(url);
}
}
}//package Game_fla
Section 34
//MC_congrat_173 (Game_fla.MC_congrat_173)
package Game_fla {
import flash.display.*;
public dynamic class MC_congrat_173 extends MovieClip {
public function MC_congrat_173(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Game_fla
Section 35
//MC_earth_89 (Game_fla.MC_earth_89)
package Game_fla {
import flash.display.*;
public dynamic class MC_earth_89 extends MovieClip {
public var c:MovieClip;
}
}//package Game_fla
Section 36
//MC_final_01_153 (Game_fla.MC_final_01_153)
package Game_fla {
import flash.display.*;
public dynamic class MC_final_01_153 extends MovieClip {
public function MC_final_01_153(){
addFrameScript(304, frame305);
}
function frame305(){
(this.parent as MovieClip).gotoAndStop(2);
}
}
}//package Game_fla
Section 37
//MC_final_02_157 (Game_fla.MC_final_02_157)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MC_final_02_157 extends MovieClip {
public var check1:MC_check_ok;
public var check3:MC_check_ok;
public var bonus:MC_bonusok;
public var check2:MC_check_ok;
public var pontos:TextField;
public function MC_final_02_157(){
addFrameScript(182, frame183, 202, frame203, 242, frame243);
}
function frame183(){
this.pontos.text = ("" + ConsTAndVars.SCORE);
}
function frame203(){
this.pontos.text = ("" + ConsTAndVars.SCORE);
}
function frame243(){
this.pontos.text = ("" + ConsTAndVars.SCORE);
this.stop();
}
}
}//package Game_fla
Section 38
//MC_final_03_171 (Game_fla.MC_final_03_171)
package Game_fla {
import flash.display.*;
public dynamic class MC_final_03_171 extends MovieClip {
public var end_clickOn:MovieClip;
public var congratulations:MovieClip;
public var jynx:MovieClip;
public var tela:MovieClip;
public function MC_final_03_171(){
addFrameScript(488, frame489);
}
function frame489(){
this.stop();
}
}
}//package Game_fla
Section 39
//MC_fumaca_115 (Game_fla.MC_fumaca_115)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_fumaca_115 extends MovieClip {
public function MC_fumaca_115(){
addFrameScript(23, frame24);
}
function frame24(){
(this.parent as MovieClip).setBackVariables();
stop();
}
}
}//package Game_fla
Section 40
//MC_fumacaFogo_50 (Game_fla.MC_fumacaFogo_50)
package Game_fla {
import flash.display.*;
public dynamic class MC_fumacaFogo_50 extends MovieClip {
public function MC_fumacaFogo_50(){
addFrameScript(24, frame25);
}
function frame25(){
this.stop();
}
}
}//package Game_fla
Section 41
//MC_fumacaFogo_92 (Game_fla.MC_fumacaFogo_92)
package Game_fla {
import flash.display.*;
public dynamic class MC_fumacaFogo_92 extends MovieClip {
public function MC_fumacaFogo_92(){
addFrameScript(24, frame25);
}
function frame25(){
this.stop();
}
}
}//package Game_fla
Section 42
//MC_gameovernome_108 (Game_fla.MC_gameovernome_108)
package Game_fla {
import flash.display.*;
public dynamic class MC_gameovernome_108 extends MovieClip {
public function MC_gameovernome_108(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package Game_fla
Section 43
//MC_jynxlogofinal_176 (Game_fla.MC_jynxlogofinal_176)
package Game_fla {
import flash.display.*;
public dynamic class MC_jynxlogofinal_176 extends MovieClip {
public function MC_jynxlogofinal_176(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Game_fla
Section 44
//MC_life_94 (Game_fla.MC_life_94)
package Game_fla {
import flash.display.*;
public dynamic class MC_life_94 extends MovieClip {
public function MC_life_94(){
addFrameScript(63, frame64);
}
function frame64(){
stop();
}
}
}//package Game_fla
Section 45
//MC_maldi_48 (Game_fla.MC_maldi_48)
package Game_fla {
import flash.display.*;
public dynamic class MC_maldi_48 extends MovieClip {
public function MC_maldi_48(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 46
//MC_maldi_91 (Game_fla.MC_maldi_91)
package Game_fla {
import flash.display.*;
public dynamic class MC_maldi_91 extends MovieClip {
public function MC_maldi_91(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 47
//MC_menu_about_34 (Game_fla.MC_menu_about_34)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_menu_about_34 extends MovieClip {
public function MC_menu_about_34(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
this.stop();
}
function frame13(){
(this.parent.parent as MovieClip).setPosMenuType(ConsTAndVars.ABOUT);
(this.parent.parent as MovieClip).hideBall();
(this.parent.parent as MovieClip).play();
}
}
}//package Game_fla
Section 48
//MC_menu_howtoplay_36 (Game_fla.MC_menu_howtoplay_36)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_menu_howtoplay_36 extends MovieClip {
public function MC_menu_howtoplay_36(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
this.stop();
}
function frame17(){
(this.parent.parent as MovieClip).setPosMenuType(ConsTAndVars.HOW_TO_PLAY);
(this.parent.parent as MovieClip).hideBall();
(this.parent.parent as MovieClip).play();
}
}
}//package Game_fla
Section 49
//MC_menu_play_37 (Game_fla.MC_menu_play_37)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_menu_play_37 extends MovieClip {
public function MC_menu_play_37(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
trace("chamou");
(this.parent.parent as MovieClip).setPosMenuType(ConsTAndVars.DIFFICULT);
(this.parent.parent as MovieClip).hideBall();
(this.parent.parent as MovieClip).play();
}
}
}//package Game_fla
Section 50
//MC_menu_ranking_35 (Game_fla.MC_menu_ranking_35)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_menu_ranking_35 extends MovieClip {
public function MC_menu_ranking_35(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
(this.parent.parent as MovieClip).setPosMenuType(ConsTAndVars.RANKING);
(this.parent.parent as MovieClip).hideBall();
(this.parent.parent as MovieClip).play();
}
}
}//package Game_fla
Section 51
//MC_pause_97 (Game_fla.MC_pause_97)
package Game_fla {
import flash.display.*;
public dynamic class MC_pause_97 extends MovieClip {
public function MC_pause_97(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package Game_fla
Section 52
//MC_player_come_261 (Game_fla.MC_player_come_261)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_player_come_261 extends MovieClip {
public function MC_player_come_261(){
addFrameScript(8, frame9);
}
function frame9(){
(this.parent as MovieClip).eatPowerup();
}
}
}//package Game_fla
Section 53
//MC_player_dano_256 (Game_fla.MC_player_dano_256)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_player_dano_256 extends MovieClip {
public function MC_player_dano_256(){
addFrameScript(34, frame35);
}
function frame35(){
if ((((GameControler.getInstance() == null)) || (((!((GameControler.getInstance() == null))) && (!(GameControler.getInstance().getGameOver())))))){
(this.parent as MovieClip).gotoAndStop(3);
if (!ConsTAndVars.NORMAL_GAME){
HowToPlay.getInstace().returnToInitKokimis();
};
} else {
this.gotoAndPlay(1);
};
}
}
}//package Game_fla
Section 54
//MC_player_dano2_257 (Game_fla.MC_player_dano2_257)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_player_dano2_257 extends MovieClip {
public function MC_player_dano2_257(){
addFrameScript(48, frame49);
}
function frame49(){
(this.parent as MovieClip).setMotionIdle();
}
}
}//package Game_fla
Section 55
//MC_player_especial_258 (Game_fla.MC_player_especial_258)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MC_player_especial_258 extends MovieClip {
public function MC_player_especial_258(){
addFrameScript(45, frame46);
}
function frame46(){
(this.parent as MovieClip).endPowerup();
}
}
}//package Game_fla
Section 56
//MC_spotlight_103 (Game_fla.MC_spotlight_103)
package Game_fla {
import flash.display.*;
public dynamic class MC_spotlight_103 extends MovieClip {
public function MC_spotlight_103(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Game_fla
Section 57
//MENU02_19 (Game_fla.MENU02_19)
package Game_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MENU02_19 extends MovieClip {
public function MENU02_19(){
addFrameScript(0, frame1);
}
public function clickMenu(_arg1:Event){
if ((((ScreenControl.getInstance().getState() == ScreenControl.STATE_GAME_OVER)) || ((ScreenControl.getInstance().getState() == ScreenControl.STATE_FINAL_SCREEN)))){
ScreenControl.getInstance().setNewScreen(ScreenControl.STATE_FIRST_SCREEN);
ScreenControl.getInstance().changeScreen();
} else {
ScreenControl.getInstance().backToMenu();
};
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, clickMenu);
}
}
}//package Game_fla
Section 58
//MENU02_72 (Game_fla.MENU02_72)
package Game_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MENU02_72 extends MovieClip {
public function MENU02_72(){
addFrameScript(0, frame1);
}
public function clickMenu(_arg1:Event){
trace("click");
ScreenControl.getInstance().backToMenu();
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, clickMenu);
}
}
}//package Game_fla
Section 59
//MenuItems_42 (Game_fla.MenuItems_42)
package Game_fla {
import flash.display.*;
public dynamic class MenuItems_42 extends MovieClip {
public var groupHowToPlay:MovieClip;
public var groupAbout:MovieClip;
public var groupPlay:MovieClip;
public var groupMoreGames:MovieClip;
public var groupRanking:MovieClip;
}
}//package Game_fla
Section 60
//moregames_menu_32 (Game_fla.moregames_menu_32)
package Game_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class moregames_menu_32 extends MovieClip {
public function moregames_menu_32(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
(this.parent.parent as MovieClip).hideBall();
(this.parent.parent as MovieClip).showBall();
navigateToURL(new URLRequest("http://www.notdoppler.com/?ref=kokimi"), "_blank");
}
}
}//package Game_fla
Section 61
//moregames_sumit_botao_238 (Game_fla.moregames_sumit_botao_238)
package Game_fla {
import flash.display.*;
public dynamic class moregames_sumit_botao_238 extends MovieClip {
public var playGame:MovieClip;
}
}//package Game_fla
Section 62
//ProgressBar_3 (Game_fla.ProgressBar_3)
package Game_fla {
import flash.display.*;
public dynamic class ProgressBar_3 extends MovieClip {
public var fill:MovieClip;
}
}//package Game_fla
Section 63
//Tween20_90 (Game_fla.Tween20_90)
package Game_fla {
import flash.display.*;
public dynamic class Tween20_90 extends MovieClip {
public var fumaca1:MovieClip;
public var fumaca3:MovieClip;
public var fumaca4:MovieClip;
public var fumaca5:MovieClip;
public var fumaca6:MovieClip;
public var fumaca0:MovieClip;
public var fumaca2:MovieClip;
}
}//package Game_fla
Section 64
//Tween37_38 (Game_fla.Tween37_38)
package Game_fla {
import flash.display.*;
public dynamic class Tween37_38 extends MovieClip {
public var slotPlay:MC_Slot;
public var playGame:MovieClip;
}
}//package Game_fla
Section 65
//Tween38_39 (Game_fla.Tween38_39)
package Game_fla {
import flash.display.*;
public dynamic class Tween38_39 extends MovieClip {
public var slotHowToPlay:MC_Slot;
public var howToPlay:MovieClip;
}
}//package Game_fla
Section 66
//Tween39_40 (Game_fla.Tween39_40)
package Game_fla {
import flash.display.*;
public dynamic class Tween39_40 extends MovieClip {
public var ranking:MovieClip;
public var slotRanking:MC_Slot;
}
}//package Game_fla
Section 67
//Tween40_41 (Game_fla.Tween40_41)
package Game_fla {
import flash.display.*;
public dynamic class Tween40_41 extends MovieClip {
public var slotAbout:MC_Slot;
public var about:MovieClip;
}
}//package Game_fla
Section 68
//wewewqqqq_47 (Game_fla.wewewqqqq_47)
package Game_fla {
import flash.display.*;
public dynamic class wewewqqqq_47 extends MovieClip {
public var fumaca1:MovieClip;
public var fumaca3:MovieClip;
public var fumaca4:MovieClip;
public var fumaca5:MovieClip;
public var fumaca6:MovieClip;
public var fumaca0:MovieClip;
public var fumaca2:MovieClip;
}
}//package Game_fla
Section 69
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 70
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var netup:Boolean;
var vars:Object;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var err:Function;
var complete:Function;
var setURL:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
complete = function (_arg1:Object):void{
netup = true;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
setURL = function ():void{
var _local1:String;
var _local2:DisplayObject;
if (netup){
_local1 = (url + s);
} else {
_local1 = burl;
};
_local2 = clickMovie(_local1, onClick);
btn.addChild(_local2);
_local2.scaleX = (0.01 * btn.width);
_local2.scaleY = (0.01 * btn.height);
};
setTimeout(setURL, 1500);
}
public static function getVersion():String{
return ("1.35");
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 71
//a (a)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class a extends MovieClip {
public var skipSeta:MovieClip;
public var skip:MovieClip;
public var btnPlay:SimpleButton;
public var bb:MovieClip;
public var btnMenu:MovieClip;
public var texto:TextField;
public function a(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
if (btnMenu != null){
btnMenu.visible = true;
};
if (texto != null){
texto.visible = true;
};
if (bb != null){
bb.visible = true;
};
if (skip != null){
skip.visible = true;
};
if (skipSeta != null){
skipSeta.visible = true;
};
if (((!((btnPlay == null))) && (!((HowToPlay.getInstace() == null))))){
if (((!(HowToPlay.getInstace().getfirstVisionOrb())) && (!(HowToPlay.getInstace().getGoodLockVar())))){
btnPlay.visible = true;
} else {
btnPlay.visible = false;
};
};
if (bb != null){
bb.addEventListener(MouseEvent.CLICK, game);
bb.buttonMode = true;
};
}
function frame2(){
btnMenu.visible = false;
texto.visible = false;
btnPlay.visible = false;
bb.visible = false;
skip.visible = false;
skipSeta.visible = false;
}
public function game(_arg1:MouseEvent){
(this.parent as MovieClip).removeUpdate();
ScreenControl.getInstance().activeFade(ScreenControl.STATE_GAME);
}
}
}//package
Section 72
//About (About)
package {
import flash.display.*;
public class About extends MovieClip {
public function About(){
addFrameScript(21, frame22);
}
function frame22(){
this.stop();
}
public function removeUpdateFlag():Boolean{
return (false);
}
}
}//package
Section 73
//AssetHolder (AssetHolder)
package {
import flash.display.*;
public dynamic class AssetHolder extends MovieClip {
public function AssetHolder(){
var _local1:MovieClip;
var _local2:int;
super();
addFrameScript(0, frame1);
_local2 = 0;
while (_local2 < this.numChildren) {
_local1 = (this.getChildAt(_local2) as MovieClip);
if (_local1){
_local1.stop();
};
_local2++;
};
}
function frame1(){
stop();
}
}
}//package
Section 74
//assJynx_ (assJynx_)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class assJynx_ extends MovieClip {
public var url:URLRequest;
public function assJynx_(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, jynx);
url = new URLRequest("http://www.jynx.locaweb.com.br/");
this.buttonMode = true;
}
public function jynx(_arg1:MouseEvent){
navigateToURL(url);
}
}
}//package
Section 75
//backGroundHtP (backGroundHtP)
package {
import flash.display.*;
public dynamic class backGroundHtP extends MovieClip {
}
}//package
Section 76
//Ball0 (Ball0)
package {
import flash.display.*;
public dynamic class Ball0 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball0(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 77
//Ball1 (Ball1)
package {
import flash.display.*;
public dynamic class Ball1 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 78
//Ball2 (Ball2)
package {
import flash.display.*;
public dynamic class Ball2 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball2(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 79
//Ball3 (Ball3)
package {
import flash.display.*;
public dynamic class Ball3 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 80
//Ball4 (Ball4)
package {
import flash.display.*;
public dynamic class Ball4 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball4(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 81
//Ball5 (Ball5)
package {
import flash.display.*;
public dynamic class Ball5 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball5(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 82
//Ball6 (Ball6)
package {
import flash.display.*;
public dynamic class Ball6 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball6(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 83
//Ball7 (Ball7)
package {
import flash.display.*;
public dynamic class Ball7 extends MovieClip {
public var blind:MovieClip;
public var ball:MovieClip;
public function Ball7(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package
Section 84
//BallMenu (BallMenu)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class BallMenu extends GameObject {
private var angles:Array;
private var boom:MovieClip;
private var balloon:MovieClip;
private var raioBall:Number;
var cont:int;
private var effect:MovieClip;
var test:int;
var firstHold:Boolean;
var inSlot:Boolean;
private var ballType:int;
private var holdVar:Boolean;
private var slotNumber:int;
private var changePosition:Boolean;
public function BallMenu(_arg1:int, _arg2:Number, _arg3:Number){
var _local4:Class;
super();
this.ballType = _arg1;
effect = new MC_effect();
this.addChild(effect);
effect.gotoAndStop(20);
balloon = new MC_balloon();
this.addChild(balloon);
balloon.x = (_arg2 - 27);
balloon.y = (_arg3 - 31);
_local4 = (getDefinitionByName(("Ball" + _arg1)) as Class);
object = new (_local4);
object.x = _arg2;
object.y = _arg3;
object.blind.visible = false;
this.addChild(object);
boom = new MC_fumaca01();
boom.x = _arg2;
boom.y = _arg3;
this.addChild(boom);
object.gotoAndStop(1);
object.buttonMode = true;
object.addEventListener(MouseEvent.MOUSE_DOWN, holdBall);
object.addEventListener(MouseEvent.MOUSE_UP, freeBall);
raioBall = (object.height >> 1);
this.setBallAngles(_arg1);
}
public function getBB():MovieClip{
return (object);
}
public function collision(_arg1:MovieClip, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local4 = Math.sqrt((((_arg2 - object.x) * (_arg2 - object.x)) + ((_arg3 - object.y) * (_arg3 - object.y))));
_local5 = Math.sqrt((((275 - object.x) * (275 - object.x)) + ((200 - object.y) * (200 - object.y))));
_local6 = 15;
if (((((((!(holdVar)) && (!(inSlot)))) && ((_local4 < (raioBall + _local6))))) && (firstHold))){
trace(("nome " + _arg1.name));
object.x = _arg2;
object.y = _arg3;
inSlot = true;
if (angles[_arg1.getSlotBall()] != slotNumber){
trace(((("slot atual " + slotNumber) + " -- o alvo ") + _arg1.getSlotBall()));
changePosition = true;
setBallAngles(_arg1.getSlotBall());
};
};
update();
}
public function hideBall(){
boom.x = object.x;
boom.y = object.y;
boom.play();
object.visible = false;
}
private function holdBall(_arg1:MouseEvent){
balloon.visible = false;
object.startDrag();
object.gotoAndStop(2);
holdVar = true;
SoundsGame.getInstance().playHold();
inSlot = false;
if (HowToPlay.getInstace() != null){
HowToPlay.getInstace().setIndexKokimi(ballType);
};
if (!firstHold){
firstHold = true;
};
}
public function ballonVisible(_arg1:Boolean){
balloon.visible = _arg1;
}
private function freeBall(_arg1:MouseEvent){
object.stopDrag();
object.gotoAndStop(1);
holdVar = false;
}
public function update(){
if (changePosition){
object.x = (object.x + (Math.sin((angles[this.slotNumber] * (Math.PI / 180))) * 0.5));
object.y = (object.y + (Math.cos((angles[this.slotNumber] * (Math.PI / 180))) * -0.5));
};
}
public function setBallPosition(_arg1:Number, _arg2:Number){
object.x = _arg1;
object.y = _arg2;
holdVar = true;
effect.x = _arg1;
effect.y = _arg2;
effect.play();
SoundsGame.getInstance().playSlot();
}
public function hold():Boolean{
return (holdVar);
}
private function setBallAngles(_arg1:int){
switch (_arg1){
case 0:
angles = new Array(null, 25, 47, 70, 90, 115, 135, 160);
break;
case 1:
angles = new Array(200, null, 65, 90, 115, 135, 157, 180);
break;
case 2:
angles = new Array(223, 245, null, 113, 135, 157, 180, 202);
break;
case 3:
angles = new Array(245, 270, 290, null, 155, 180, 202, 225);
break;
case 4:
angles = new Array(270, 292, 315, 340, null, 200, 223, 247);
break;
case 5:
angles = new Array(293, 315, 340, 0, 25, null, 243, 270);
break;
case 6:
angles = new Array(315, 337, 0, 23, 47, 67, null, 290);
break;
case 7:
angles = new Array(337, 0, 25, 47, 70, 90, 113, null);
break;
};
}
}
}//package
Section 85
//Balls (Balls)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class Balls extends GameObject {
private var angles:Array;
private var cTrans:ColorTransform;
private var reburnX:Number;
private var slotX:Number;
private var slotY:Number;
private var cNone:ColorTransform;
private var typeBall:int;
private var dead:Boolean;
private var oldSlotNumber:int;
private var posX:Number;
private var posY:Number;
private var reburn:Boolean;
private var targetBallNumber:int;// = -1
private var cMaldicao2:ColorTransform;
private var hold:Boolean;
private var slotMode:Boolean;// = true
private var intialSlotCollision:Boolean;// = true
private var slotNumber:int;// = -1
private var tickDeadTwo:int;
private var changePosition:Boolean;
private var select:Boolean;
private var tickDeadOne:int;
private var positionReburn:int;
private var controlMouseTick:int;
private var pauseGame:Boolean;
private var controlMouseClick:Boolean;
private var targetSlot:int;// = -1
private var distanceLimitCircle:Number;
private var raioBall:int;
private var distancia:Number;
private var effect:MovieClip;
private var backBall:Boolean;
private var maldicao2Control:Boolean;
private var targetSlotBall:Boolean;
private var initHold:Boolean;
private var controlBlinkMaldicao:Boolean;
private var slot:Boolean;
private static var VELOCITY:Number = 20;
public function Balls(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Boolean){
slotNumber = -1;
intialSlotCollision = true;
slotMode = true;
targetSlot = -1;
targetBallNumber = -1;
cTrans = new ColorTransform();
cMaldicao2 = new ColorTransform();
cNone = new ColorTransform();
super();
this.posX = _arg2;
this.posY = _arg3;
if (_arg3 == 0){
this.posY = -30;
};
typeBall = _arg1;
loadBall(typeBall);
raioBall = (object.height >> 1);
if (_arg4){
object.addEventListener(MouseEvent.MOUSE_DOWN, holdBall);
} else {
object.addEventListener(MouseEvent.MOUSE_DOWN, holdBallHtP);
};
ConsTAndVars.NORMAL_GAME = _arg4;
object.addEventListener(MouseEvent.MOUSE_UP, freeBall);
cTrans.color = 0xD0D0D0;
cMaldicao2.color = 0;
cNone = object.transform.colorTransform;
}
private function loadBall(_arg1:int){
var _local2:Class;
_local2 = (getDefinitionByName(("Ball" + _arg1)) as Class);
object = new (_local2);
switch (_arg1){
case 0:
reburnX = 580;
break;
case 1:
reburnX = 610;
break;
case 2:
reburnX = 650;
break;
case 3:
reburnX = 690;
break;
case 4:
reburnX = 720;
break;
case 5:
reburnX = 760;
break;
case 6:
reburnX = 800;
break;
case 7:
reburnX = 840;
break;
};
effect = new MC_effect();
effect.visible = false;
this.addChild(effect);
object.gotoAndStop(1);
object.blind.gotoAndStop(1);
this.addChild(object);
object.buttonMode = true;
object.x = posX;
object.y = posY;
object.blind.visible = false;
}
public function setChangePosition(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean){
if (object.currentFrame != 3){
slotNumber = _arg1;
this.changePosition = _arg4;
controlMouseClick = true;
if (_arg4){
if (GameControler.getInstance() != null){
GameControler.getInstance().upBallArranged(typeBall, 16);
};
} else {
object.x = Math.abs(_arg2);
object.y = Math.abs(_arg3);
SoundsGame.getInstance().playSlot();
playEffect();
};
};
}
public function deadBallEnemies(){
dead = true;
if (slotNumber != -1){
if (ConsTAndVars.NORMAL_GAME){
GameControler.getInstance().clearSlot(slotNumber);
} else {
HowToPlay.getInstace().clearSlot(slotNumber);
};
};
slotNumber = -1;
targetSlot = -1;
targetBallNumber = -1;
if (GameControler.getInstance() != null){
GameControler.getInstance().upBallArranged(typeBall, 16);
};
object.gotoAndStop(2);
object.blind.gotoAndStop(2);
ConsTAndVars.TODOS_KOKIMIS = false;
}
public function setBlind(){
this.object.blind.visible = !(this.object.blind.visible);
}
public function setY(_arg1:Number){
object.y = _arg1;
}
public function getSlotMode():Boolean{
return (this.slotMode);
}
public function getVisibleBall():Boolean{
return (object.visible);
}
public function setInitHold(_arg1:Boolean){
this.initHold = _arg1;
}
public function getSlot():Boolean{
return (this.slot);
}
private function free(){
if (((((((!(pauseGame)) && (!(controlMouseClick)))) && (slotMode))) && (!(dead)))){
object.stopDrag();
object.gotoAndStop(1);
object.blind.gotoAndStop(1);
intialSlotCollision = true;
hold = false;
if (!targetSlotBall){
backBall = false;
};
if (((initHold) && ((distanceLimitCircle > (raioBall + 70))))){
if (GameControler.getInstance() != null){
deadBallEnemies();
};
};
if (((((slot) && (!(dead)))) && (!(backBall)))){
if (GameControler.getInstance() != null){
GameControler.getInstance().setChangePosition(this.targetBallNumber, this.slotNumber, this.typeBall, this.targetSlot);
} else {
HowToPlay.getInstace().setChangePosition(this.targetBallNumber, this.slotNumber, this.typeBall, this.targetSlot);
};
slotX = object.x;
slotY = object.y;
setBallAngles(this.targetSlot);
};
};
}
private function holdBallHtP(_arg1:MouseEvent){
if (HowToPlay.getInstace().getEnemyScene()){
if (((((((!(pauseGame)) && (!(controlMouseClick)))) && (slotMode))) && (!(dead)))){
object.gotoAndStop(2);
object.blind.gotoAndStop(2);
object.startDrag();
HowToPlay.getInstace().setIndexKokimi(typeBall);
intialSlotCollision = false;
hold = true;
reburn = false;
SoundsGame.getInstance().playHold();
};
};
}
public function freeBall(_arg1:MouseEvent):void{
free();
}
public function update(){
if (((((((reburn) && ((object.x <= 0)))) && ((object.y <= 0)))) || (((reburn) && ((((object.y < 0)) || ((object.y > 580)))))))){
free();
deadBallEnemies();
};
if ((((((object.y < 80)) && (!(hold)))) && (!(initHold)))){
object.y = (object.y + 0.5);
};
if (reburn){
moveReburnMode();
};
if (((((((initHold) && ((slotNumber == -1)))) && (!(reburn)))) && (!(hold)))){
if (!dead){
object.y = (object.y + 0.5);
};
if (((!(dead)) && ((distanceLimitCircle > (raioBall + 70))))){
deadBallEnemies();
};
};
if (((dead) && ((++tickDeadOne > 45)))){
if (GameControler.getInstance()){
if (slotNumber != -1){
GameControler.getInstance().clearSlot(slotNumber);
};
GameControler.getInstance().upBallArranged(typeBall, 16);
};
if (tickDeadTwo == 0){
if (object.visible){
SoundsGame.getInstance().playLoseBall();
};
object.gotoAndStop(3);
object.blind.gotoAndStop(3);
};
if (++tickDeadTwo > 6){
object.visible = false;
tickDeadOne = 0;
tickDeadTwo = 0;
dead = false;
};
};
if (changePosition){
object.x = (object.x + (Math.sin((angles[this.slotNumber] * (Math.PI / 180))) * VELOCITY));
object.y = (object.y + (Math.cos((angles[this.slotNumber] * (Math.PI / 180))) * -(VELOCITY)));
if ((((((object.y > 300)) || ((object.y < 100)))) || ((((object.x > 450)) || ((object.x < 80)))))){
changePosition = false;
deadBallEnemies();
};
};
if (((controlMouseClick) && ((++controlMouseTick > 8)))){
controlMouseClick = false;
controlMouseTick = 0;
};
}
public function getHoldBall():Boolean{
return (hold);
}
public function maldicao(){
var _local1:int;
if (!dead){
_local1 = slotNumber;
switch (slotNumber){
case 0:
slotNumber = 4;
break;
case 1:
slotNumber = 5;
break;
case 2:
slotNumber = 6;
break;
case 3:
slotNumber = 7;
break;
case 4:
slotNumber = 0;
break;
case 5:
slotNumber = 1;
break;
case 6:
slotNumber = 2;
break;
case 7:
slotNumber = 3;
break;
};
if (!hold){
this.changePosition = true;
controlMouseClick = true;
} else {
object.gotoAndStop(1);
object.blind.gotoAndStop(1);
object.stopDrag();
hold = false;
if (GameControler.getInstance() != null){
GameControler.getInstance().showHideBallEffect(object.x, object.y);
object.x = Math.abs(GameControler.getInstance().getSlotX(this.slotNumber));
object.y = Math.abs(GameControler.getInstance().getSlotY(this.slotNumber));
};
playEffect();
setBallAngles(this.slotNumber);
changePosition = false;
};
if (ConsTAndVars.NORMAL_GAME){
GameControler.getInstance().setFillSlot(this.slotNumber, true, typeBall);
};
};
}
public function getSlotNumber():int{
return (slotNumber);
}
private function setBallAngles(_arg1:int){
switch (_arg1){
case 0:
angles = new Array(null, 25, 47, 70, 90, 115, 135, 160);
break;
case 1:
angles = new Array(200, null, 65, 90, 115, 135, 157, 180);
break;
case 2:
angles = new Array(223, 245, null, 113, 135, 157, 180, 202);
break;
case 3:
angles = new Array(245, 270, 290, null, 155, 180, 202, 225);
break;
case 4:
angles = new Array(270, 292, 315, 340, null, 200, 223, 247);
break;
case 5:
angles = new Array(293, 315, 340, 0, 25, null, 243, 270);
break;
case 6:
angles = new Array(315, 337, 0, 23, 47, 67, null, 290);
break;
case 7:
angles = new Array(337, 0, 25, 47, 70, 90, 113, null);
break;
};
}
public function pauseBall(_arg1:Boolean){
if (_arg1){
object.transform.colorTransform = cTrans;
object.ball.stop();
} else {
if (!maldicao2Control){
object.transform.colorTransform = cNone;
} else {
object.transform.colorTransform = cMaldicao2;
};
object.ball.play();
if (hold){
object.x = mouseX;
object.y = mouseY;
};
};
this.pauseGame = _arg1;
}
public function backToFrameOneHtP(){
object.gotoAndStop(1);
object.blind.gotoAndStop(1);
}
public function setSlotMode(_arg1:Boolean){
this.slotMode = _arg1;
}
public function checkCollisionSlots(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Boolean, _arg6:int){
distancia = Math.sqrt((((_arg1 - object.x) * (_arg1 - object.x)) + ((_arg2 - object.y) * (_arg2 - object.y))));
distanceLimitCircle = Math.sqrt((((275 - object.x) * (275 - object.x)) + ((200 - object.y) * (200 - object.y))));
if (distancia < (raioBall + _arg3)){
this.targetSlot = _arg4;
this.targetBallNumber = _arg6;
this.targetSlotBall = _arg5;
if (((((((intialSlotCollision) && (!(_arg5)))) && (!(initHold)))) && (!(dead)))){
this.slotNumber = _arg4;
object.x = Math.abs(_arg1);
object.y = Math.abs(_arg2);
playEffect();
SoundsGame.getInstance().playSlot();
slotX = object.x;
slotY = object.y;
if (GameControler.getInstance() != null){
GameControler.getInstance().setFillSlot(this.slotNumber, true, typeBall);
};
setBallAngles(this.slotNumber);
intialSlotCollision = false;
slot = true;
if (!initHold){
initHold = true;
slotMode = false;
};
} else {
if (((changePosition) && ((_arg4 == this.slotNumber)))){
object.x = Math.abs(_arg1);
object.y = Math.abs(_arg2);
playEffect();
SoundsGame.getInstance().playSlot();
setBallAngles(this.slotNumber);
changePosition = false;
};
};
};
}
public function holdBall(_arg1:MouseEvent):void{
var _local2:Boolean;
if (GameControler.getInstance() != null){
_local2 = GameControler.getInstance().getGameOver();
} else {
_local2 = false;
};
if (((((((((!(pauseGame)) && (!(controlMouseClick)))) && (slotMode))) && (!(dead)))) && (!(_local2)))){
object.gotoAndStop(2);
object.blind.gotoAndStop(2);
object.startDrag();
GameControler.getInstance().upBallArranged(typeBall, GameControler.ARRANGED_POSITION);
intialSlotCollision = false;
hold = true;
reburn = false;
SoundsGame.getInstance().playHold();
GameControler.getInstance().hideKokimiBallon(typeBall);
};
}
public function getReburn():Boolean{
return (reburn);
}
public function visibleBall(_arg1:int, _arg2:int){
object.gotoAndStop(1);
object.blind.gotoAndStop(1);
object.visible = true;
dead = false;
if (GameControler.getInstance() != null){
backBall = true;
reburn = true;
object.x = reburnX;
object.y = 320;
} else {
object.x = _arg1;
object.y = _arg2;
};
}
public function setMaldicao2(_arg1:Boolean){
if (_arg1){
object.transform.colorTransform = cMaldicao2;
maldicao2Control = true;
controlBlinkMaldicao = false;
playEffect();
} else {
object.transform.colorTransform = cNone;
maldicao2Control = false;
controlBlinkMaldicao = false;
};
}
public function deadHtP(){
object.gotoAndStop(2);
object.blind.gotoAndStop(2);
}
public function blinkMaldicao2(){
if (controlBlinkMaldicao){
object.transform.colorTransform = cNone;
} else {
object.transform.colorTransform = cMaldicao2;
};
controlBlinkMaldicao = !(controlBlinkMaldicao);
}
private function playEffect(){
effect.x = object.x;
effect.y = object.y;
effect.visible = true;
effect.gotoAndPlay(1);
}
public function collideEnemy(){
object.gotoAndStop(2);
object.blind.gotoAndStop(2);
}
private function moveReburnMode(){
object.x = (object.x - 1.5);
if ((((object.x < -40)) || ((((object.x == 0)) && ((object.y == 0)))))){
object.visible = false;
};
}
}
}//package
Section 86
//BlockedSite (BlockedSite)
package {
import flash.display.*;
public class BlockedSite extends MovieClip {
}
}//package
Section 87
//bt_quitgame (bt_quitgame)
package {
import flash.display.*;
public dynamic class bt_quitgame extends MovieClip {
public var bb:MovieClip;
public var quit:SimpleButton;
}
}//package
Section 88
//Cenario (Cenario)
package {
import flash.display.*;
public class Cenario extends MovieClip {
public function Cenario(){
addFrameScript(0, frame1, 100, frame101, 200, frame201);
}
function frame201(){
this.stop();
}
function frame1(){
this.stop();
}
function frame101(){
this.stop();
}
}
}//package
Section 89
//ConsTAndVars (ConsTAndVars)
package {
public class ConsTAndVars {
public static const SERVER:String = "http://pitfall/kokimi/domainLock.php";
public static const RANKING:String = "ranking";
public static const DIFFICULT:String = "difficult";
public static const ALLOWED_DOMAINS:Array = ["jynx", "mochiads", "flashgamelicense", "notdoppler", ""];
public static const HOW_TO_PLAY:String = "howtoplay";
public static const ABOUT:String = "about";
public static var TODOS_KOKIMIS:Boolean = true;
public static var LOADED:Boolean = false;
public static var NORMAL_GAME:Boolean;
public static var BONUS_TODOS_OS_KOKIMIS:int = 3000;
public static var BONUS_TODAS_VIDAS:int = 1000;
public static var BONUS_MADRUGADA:int = 300;
public static var PERIOD_OF_THE_DAY:String;
public static var BONUS_PERFECT:int = 5000;
public static var SCORE:Number = 0;
public static var HARD:Boolean = false;
public static var TODAS_VIDAS:Boolean;
}
}//package
Section 90
//convertendo_inimigo (convertendo_inimigo)
package {
import flash.media.*;
public dynamic class convertendo_inimigo extends Sound {
}
}//package
Section 91
//Difficult (Difficult)
package {
import flash.events.*;
import flash.display.*;
public class Difficult extends MovieClip {
public var hard:MC_Slot;
public var jynx:assJynx_;
public var normal:MC_Slot;
private var ball:MovieClip;
public function Difficult(){
addFrameScript(21, frame22);
}
private function PlayGame(){
this.removeEventListener(Event.ENTER_FRAME, update);
ScreenControl.getInstance().activeFade(ScreenControl.STATE_OPEN);
}
function frame22(){
this.stop();
this.showBall();
}
public function removeUpdateFlag():Boolean{
return (false);
}
private function showBall(){
var _local1:int;
_local1 = (Math.random() * 8);
ball = new BallMenu(_local1, 380, 165);
this.addChild(ball);
this.addEventListener(Event.ENTER_FRAME, update);
}
private function update(_arg1:Event){
if (ball == null){
return;
};
if (!ball.hold()){
if (ball.getBB().hitTestObject(this.normal)){
ConsTAndVars.HARD = false;
ball.setBallPosition(150.4, 208);
ball.hideBall();
PlayGame();
};
if (ball.getBB().hitTestObject(this.hard)){
ConsTAndVars.HARD = true;
ball.setBallPosition(151.4, 261.9);
ball.hideBall();
PlayGame();
};
};
}
}
}//package
Section 92
//DomainLock (DomainLock)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class DomainLock extends MovieClip {
public var url_txt:TextField;
public function DomainLock(){
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
private function checkDomain(_arg1:String){
var _local2:String;
var _local3:URLVariables;
var _local4:URLRequest;
var _local5:URLLoader;
MovieClip(this.parent).allowed = false;
for each (_local2 in ConsTAndVars.ALLOWED_DOMAINS) {
if (_arg1.indexOf(_local2) != -1){
MovieClip(this.parent).allowed = true;
break;
};
};
}
public function addedToStage(_arg1:Event){
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(_arg1:Event){
var _local2:TextField;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:String;
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_local2 = (this.getChildByName("url_txt") as TextField);
_local3 = stage.loaderInfo.url;
_local4 = (_local3.indexOf("://") + 3);
_local5 = _local3.indexOf("/", _local4);
_local6 = _local3.substring(_local4, _local5);
_local2.text = ("URL = " + _local6);
this.checkDomain(_local6);
_local2.text = ("Enviou pra checagem " + _local6);
this.parent.setChildIndex(this, (this.parent.numChildren - 1));
}
public function onLoadError(_arg1:Event){
}
public function onLoadResponse(_arg1:Event){
var _local2:TextField;
var _local3:Number;
var _local4:BlockedSite;
trace(_arg1.target.data);
_local2 = (this.getChildByName("url_txt") as TextField);
_local2.text = (_arg1.target.data + "");
_local3 = _arg1.target.data;
if (_local3 == 0){
while (this.parent.numChildren > 1) {
this.parent.removeChild(this.parent.getChildAt(0));
};
_local4 = new BlockedSite();
this.parent.addChild(_local4);
};
}
}
}//package
Section 93
//encaixar_kokimi (encaixar_kokimi)
package {
import flash.media.*;
public dynamic class encaixar_kokimi extends Sound {
}
}//package
Section 94
//fadeHowToPlay (fadeHowToPlay)
package {
import flash.display.*;
public dynamic class fadeHowToPlay extends MovieClip {
public function fadeHowToPlay(){
addFrameScript(49, frame50);
}
function frame50(){
this.stop();
}
}
}//package
Section 95
//FadeOut (FadeOut)
package {
import flash.display.*;
public class FadeOut extends MovieClip {
public function FadeOut(){
addFrameScript(0, frame1, 29, frame30, 59, frame60);
}
function frame1(){
this.stop();
}
function frame30(){
ScreenControl.getInstance().changeScreen();
if (ScreenControl.getInstance().getScreen() == GameControler.getInstance()){
ScreenControl.getInstance().hideMenu();
};
}
function frame60(){
this.stop();
ScreenControl.getInstance().arrangedBackFade();
}
}
}//package
Section 96
//FinalScreen (FinalScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.filters.*;
public class FinalScreen extends MovieClip {
private var check:Array;
private var initialCheck:Boolean;
private var bonus:MovieClip;
private var timer:Timer;
private var contFilter:int;
public var final2:MovieClip;
private var seconds:int;// = 16
public var credits:MovieClip;
public function FinalScreen(){
timer = new Timer(1000, 0);
check = [new MC_check_ok(), new MC_check_ok(), new MC_check_ok()];
seconds = 16;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
this.addEventListener(MouseEvent.CLICK, mouseClick);
this.buttonMode = true;
this.addEventListener(Event.ENTER_FRAME, update);
}
private function mouseClick(_arg1:MouseEvent){
if ((((this.currentFrame == 3)) && ((this.credits.currentFrame == this.credits.totalFrames)))){
this.addEventListener(Event.ENTER_FRAME, blurFilter);
};
}
private function initCheck(){
var _local1:int;
_local1 = 0;
while (_local1 < check.length) {
this.check[_local1].gotoAndStop(this.check[_local1].totalFrames);
this.check[_local1].visible = false;
this.addChild(this.check[_local1]);
_local1++;
};
bonus = new MC_bonusok();
bonus.gotoAndStop(bonus.totalFrames);
bonus.x = 275;
bonus.y = 100;
this.addChild(bonus);
timer.addEventListener(TimerEvent.TIMER, timerBonus);
timer.reset();
timer.start();
removeEventListener(Event.ENTER_FRAME, update);
initialCheck = true;
}
private function removeTimer(){
timer.stop();
this.removeEventListener(TimerEvent.TIMER, timerBonus);
this.gotoAndStop(3);
}
private function addBonus(){
bonus.gotoAndPlay(1);
this.final2.gotoAndPlay((this.final2.totalFrames - 1));
}
function frame3(){
this.stop();
}
private function removeClick(){
var _local1:NamePopupAnimation;
this.removeEventListener(Event.ENTER_FRAME, blurFilter);
this.removeEventListener(MouseEvent.CLICK, mouseClick);
_local1 = new NamePopupAnimation();
_local1.filters = [new BlurFilter(0, 0, 1)];
this.addChild(_local1);
this.removeEventListener(Event.ENTER_FRAME, update);
}
function frame2(){
this.stop();
}
function frame1(){
this.stop();
}
private function update(_arg1:Event){
if ((((this.currentFrame == 2)) && ((this.final2.currentFrame == this.final2.totalFrames)))){
if (!initialCheck){
initCheck();
};
};
}
private function blurFilter(_arg1:Event){
if (contFilter >= 31){
removeClick();
};
this.credits.tela.filters = [new BlurFilter(contFilter, contFilter, 1)];
this.credits.congratulations.filters = [new BlurFilter(contFilter, contFilter, 1)];
this.credits.end_clickOn.filters = [new BlurFilter(contFilter, contFilter, 1)];
this.credits.jynx.filters = [new BlurFilter(contFilter, contFilter, 1)];
contFilter++;
}
private function timerBonus(_arg1:TimerEvent){
seconds--;
if (seconds == 0){
removeTimer();
};
if (seconds == 15){
if (ConsTAndVars.PERIOD_OF_THE_DAY == "SUNRISE"){
check[0].x = 60;
check[0].y = 130;
check[0].visible = true;
check[0].gotoAndPlay(1);
SoundsGame.getInstance().playTakePowerUp();
} else {
seconds = 12;
};
};
if ((((seconds == 14)) && ((ConsTAndVars.PERIOD_OF_THE_DAY == "SUNRISE")))){
ConsTAndVars.SCORE = (ConsTAndVars.SCORE + ConsTAndVars.BONUS_MADRUGADA);
addBonus();
};
if (seconds == 12){
if (ConsTAndVars.TODOS_KOKIMIS){
check[1].x = 180;
check[1].y = 165;
check[1].visible = true;
check[1].gotoAndPlay(1);
SoundsGame.getInstance().playTakePowerUp();
} else {
seconds = 9;
};
};
if ((((seconds == 11)) && (ConsTAndVars.TODOS_KOKIMIS))){
ConsTAndVars.SCORE = (ConsTAndVars.SCORE + ConsTAndVars.BONUS_MADRUGADA);
addBonus();
};
if (seconds == 9){
if (ConsTAndVars.TODAS_VIDAS){
check[2].x = 200;
check[2].y = 195;
check[2].visible = true;
check[2].gotoAndPlay(1);
SoundsGame.getInstance().playTakePowerUp();
} else {
seconds = 6;
};
};
if ((((seconds == 8)) && (ConsTAndVars.TODAS_VIDAS))){
ConsTAndVars.SCORE = (ConsTAndVars.SCORE + ConsTAndVars.BONUS_TODAS_VIDAS);
addBonus();
};
if ((((((((seconds == 6)) && (ConsTAndVars.TODAS_VIDAS))) && (ConsTAndVars.TODOS_KOKIMIS))) && ((ConsTAndVars.PERIOD_OF_THE_DAY == "SUNRISE")))){
ConsTAndVars.SCORE = (ConsTAndVars.SCORE + ConsTAndVars.BONUS_PERFECT);
check[0].gotoAndPlay(1);
check[1].gotoAndPlay(1);
check[2].gotoAndPlay(1);
SoundsGame.getInstance().playPowerUp();
addBonus();
};
}
}
}//package
Section 97
//FirstScreen (FirstScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public class FirstScreen extends MovieClip {
private var clicked:Boolean;
private var contFilter:int;
var click:Boolean;
public function FirstScreen(){
addFrameScript(55, frame56);
this.addEventListener(MouseEvent.CLICK, mouseClick);
this.buttonMode = true;
}
private function endBlurFilter(){
this.removeEventListener(Event.ENTER_FRAME, blurFilter);
ScreenControl.getInstance().showMenu();
}
private function mouseClick(_arg1:MouseEvent){
if ((((this.currentFrame == 56)) && (this.buttonMode))){
this.addEventListener(Event.ENTER_FRAME, blurFilter);
this.buttonMode = false;
};
}
private function blurFilter(_arg1:Event){
if (contFilter >= 31){
endBlurFilter();
};
this.filters = [new BlurFilter(contFilter, contFilter, 1)];
contFilter++;
}
function frame56(){
this.stop();
}
}
}//package
Section 98
//Game (Game)
package {
import flash.events.*;
import flash.display.*;
public class Game extends MovieClip {
private var loadInf:Number;
private var load:Loader;
public function Game(){
this.addEventListener(Event.ADDED_TO_STAGE, init);
}
public function init(_arg1:Event):void{
this.stage.stageFocusRect = false;
onFinishLoad();
}
public function onFinishLoad():void{
var _local1:MovieClip;
_local1 = new ScreenControl();
this.addChild(_local1);
}
}
}//package
Section 99
//game_over (game_over)
package {
import flash.media.*;
public dynamic class game_over extends Sound {
}
}//package
Section 100
//GameControler (GameControler)
package {
import flash.events.*;
import flash.display.*;
import enemies.*;
public dynamic class GameControler extends MovieClip {
private var balloonsKokimi:Array;
private var firstTimePowerUp:Boolean;
private var enemies:Array;
private var timeGetted:int;
private var ballSelectedTwo:int;// = -1
private var slots:Array;
private var ballSelectedOne:int;// = -1
private var balls:Array;
private var initLevel:Boolean;
private var transEnemies:Array;
private var ballSelectedTwoX:Number;
private var ballSelectedTwoY:Number;
private var hideBall:MovieClip;
private var contTimePowerUp:int;
private var dead:Array;
private var transNumb:int;
private var powerUp:PowerUps;
private var ballsHeight:Number;
private var positionArray;
private var screenHeight:int;
private var screenWidth:int;
private var slotHeight:Number;
private var btnQuit:MovieClip;
private var contMaldicao2:int;
private var maldicao:MovieClip;
private var player:Player;
private var timePowerUp:PowerUps;
private var pauseGame:Boolean;
private var firstMaldicao2:Boolean;
private var timeAtackEnemies:int;
private var levelUp:MovieClip;
private var firstColorOrb:Boolean;
private var reset:Boolean;
private var contVisibleBalls:int;
private var senario:MovieClip;
private var startGame:Boolean;
private var activeMaldicao2:Boolean;
private var level:int;// = 0
private var allFilledSlots:Boolean;// = true
private var ballSelectedOneX:Number;
private var ballSelectedOneY:Number;
private var firstMaldicao:Boolean;
private var gameHud:GameHud;
private var firstPowerUp:Boolean;
private var date:Date;
private var gameState:int;
private var balloonsOrbs:Array;
private var maldicao2:MovieClip;
private var gameOver:Boolean;
public static const ARRANGED_POSITION = 52;
private static var instance:GameControler;
private static var pointsNumber:int;
public function GameControler(){
balls = new Array(8);
slots = new Array(8);
enemies = new Array(8);
transEnemies = new Array(8);
balloonsKokimi = new Array(10);
balloonsOrbs = new Array(2);
ballSelectedOne = -1;
ballSelectedTwo = -1;
allFilledSlots = true;
dead = new Array(8);
positionArray = new Array(8);
level = 0;
date = new Date();
super();
initGameVariables();
instance = this;
}
public function setChangePosition(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local5 = _arg1;
_local6 = _arg2;
if (_local6 != -1){
_local11 = slots[_local6].getX();
_local12 = slots[_local6].getY();
};
_local7 = _arg3;
_local8 = _arg4;
_local9 = slots[_local8].getX();
_local10 = slots[_local8].getY();
if (((!((_local5 == -1))) && (!((_local6 == -1))))){
balls[_local5].setChangePosition(_local6, _local11, _local12, true);
slots[_local6].setFillSlot(true, _local5);
} else {
if (_local6 != -1){
slots[_local6].setFillSlot(false, -1);
};
};
balls[_local7].setChangePosition(_local8, _local9, _local10, false);
slots[_local8].setFillSlot(true, _local7);
}
public function setBlind(){
var _local1:int;
_local1 = 0;
while (_local1 < enemies.length) {
enemies[_local1].setBlind();
balls[_local1].setBlind();
_local1++;
};
}
private function updateEnemy(){
var _local1:int;
while (_local1 < enemies.length) {
if (enemies[_local1].visible){
enemies[_local1].update();
};
_local1++;
};
}
public function setGameOver(){
gameOver = true;
}
public function setTime(){
gameHud.setMinuts(2);
timeGetted++;
}
public function getSlotY(_arg1:int):Number{
return (slots[_arg1].getY());
}
public function initGameVariables(){
var _local1:String;
var _local2:Number;
var _local3:int;
var _local4:int;
var _local5:int;
ConsTAndVars.TODOS_KOKIMIS = true;
SoundsGame.getInstance().playScenery("inicio");
gameOver = false;
level = 0;
btnQuit = new bt_quitgame();
btnQuit.x = 275;
btnQuit.y = 200;
btnQuit.quit.addEventListener(MouseEvent.CLICK, quitGame);
pointsNumber = 0;
contVisibleBalls = 0;
ballSelectedOne = -1;
ballSelectedOneX = 0;
ballSelectedOneY = 0;
ballSelectedTwo = -1;
ballSelectedTwoX = 0;
ballSelectedTwoY = 0;
allFilledSlots = true;
gameState = 0;
startGame = false;
pauseGame = false;
timeAtackEnemies = 0;
transNumb = 0;
senario = new Cenario();
this.addChild(senario);
_local1 = ("" + date.getHours());
if (date.getMinutes() < 10){
_local1 = (_local1 + ("0" + date.getMinutes()));
} else {
_local1 = (_local1 + ("" + date.getMinutes()));
};
_local2 = Number(_local1);
if ((((_local2 >= 500)) && ((_local2 < 1700)))){
senario.gotoAndStop(200);
ConsTAndVars.PERIOD_OF_THE_DAY = "MORNING";
} else {
if ((((_local2 >= 1700)) && ((_local2 < 1800)))){
senario.gotoAndStop(101);
ConsTAndVars.PERIOD_OF_THE_DAY = "SUNSET";
} else {
if ((((_local2 >= 1800)) && ((_local2 < 400)))){
senario.gotoAndStop(1);
ConsTAndVars.PERIOD_OF_THE_DAY = "NIGHT";
} else {
if ((((_local2 >= 100)) && ((_local2 < 500)))){
senario.gotoAndStop(101);
ConsTAndVars.PERIOD_OF_THE_DAY = "SUNRISE";
};
};
};
};
player = new Player();
this.addChild(player);
balloonsOrbs[0] = new MC_balloon2();
balloonsOrbs[0].visible = false;
this.addChild(balloonsOrbs[0]);
balloonsOrbs[0].x = -90;
balloonsOrbs[0].y = -90;
balloonsOrbs[1] = new MC_balloon2();
balloonsOrbs[1].visible = false;
this.addChild(balloonsOrbs[1]);
balloonsOrbs[1].x = -90;
balloonsOrbs[1].y = -90;
while (_local3 < balloonsKokimi.length) {
balloonsKokimi[_local3] = new MC_balloon();
balloonsKokimi[_local3].visible = false;
this.addChild(balloonsKokimi[_local3]);
_local3++;
};
while (_local4 < transEnemies.length) {
transEnemies[_local4] = new TransformEnemy();
this.addChild(transEnemies[_local4]);
_local4++;
};
levelUp = new MC_levelup();
levelUp.x = 275;
levelUp.y = 110;
levelUp.visible = false;
levelUp.stop();
this.addChild(levelUp);
while (_local5 < balls.length) {
slots[_local5] = new Slots(_local5);
this.addChild(slots[_local5]);
balls[_local5] = new Balls(_local5, (135 + (_local5 * 40)), 0, true);
this.addChild(balls[_local5]);
dead[_local5] = false;
enemies[_local5] = Enemy.create(_local5, 0, 0);
this.addChild(enemies[_local5]);
positionArray[_local5] = false;
_local5++;
};
slotHeight = (slots[0].getHeight() >> 2);
ballsHeight = 15;
hideBall = new MC_effect();
hideBall.gotoAndStop(20);
this.addChild(hideBall);
maldicao2 = new Maldicao2();
this.addChild(maldicao2);
maldicao = new Maldicao();
this.addChild(maldicao);
timePowerUp = new PowerUps(0);
this.addChild(timePowerUp);
powerUp = new PowerUps(1);
this.addChild(powerUp);
gameHud = new GameHud();
this.addChild(gameHud);
gameState = 0;
}
public function updateEventsGame(_arg1:int, _arg2:int){
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
if (timeGetted == 2){
player.finalGame();
gameHud.setFinalScreen();
} else {
gameHud.setGameOverScreen();
gameOver = true;
};
};
if (((((_arg1 % 2) == 0)) && ((_arg2 == 0)))){
if (initLevel){
firstColorOrb = true;
level++;
gameHud.upLevel();
if (_arg1 > 0){
levelUp.visible = true;
levelUp.play();
SoundsGame.getInstance().playLevelUp();
};
};
initLevel = true;
};
if (((((_arg1 % 3) == 0)) && ((_arg2 == 0)))){
senario.play();
};
if (((firstColorOrb) && (((_arg2 % 20) == 0)))){
_local3 = (Math.random() * 2);
maldicao.setPosition(_local3);
if (!firstMaldicao){
balloonsOrbs[0].x = (maldicao.x - 27);
balloonsOrbs[0].y = (maldicao.y - 31);
balloonsOrbs[0].visible = true;
firstMaldicao = true;
};
};
if ((((_arg2 == 0)) && (((_arg1 % 2) == 1)))){
maldicao2.setPosition(maldicao.getPosition());
if (!firstMaldicao2){
balloonsOrbs[1].x = (maldicao2.x - 27);
balloonsOrbs[1].y = (maldicao2.y - 31);
balloonsOrbs[1].visible = true;
firstMaldicao2 = true;
};
};
if (activeMaldicao2){
if (((((_arg2 % 1) == 0)) && ((contMaldicao2++ > 5)))){
activeMaldicao2 = false;
contMaldicao2 = 0;
_local4 = 0;
while (_local4 < balls.length) {
balls[_local4].setMaldicao2(false);
_local4++;
};
};
};
if (!player.getPower()){
if (((((_arg1 % 1) == 0)) && ((_arg2 == 55)))){
_local5 = (Math.random() * 4);
powerUp.showPowerUp(_local5);
if (!firstPowerUp){
balloonsKokimi[8].visible = true;
firstPowerUp = true;
};
balloonsKokimi[8].x = (powerUp.getX() - 30);
balloonsKokimi[8].y = (powerUp.getY() - 30);
} else {
if ((((level == 5)) && (((((_arg1 % 2) == 0)) && ((_arg2 == 40)))))){
_local6 = (Math.random() * 4);
powerUp.showPowerUp(_local6);
};
};
};
if ((((((((level == 4)) || ((level == 5)))) && ((_arg2 == 0)))) && ((contTimePowerUp <= 1)))){
_local7 = (Math.random() * 4);
timePowerUp.showPowerUp(_local7);
if (!firstTimePowerUp){
balloonsKokimi[9].visible = true;
firstTimePowerUp = true;
};
balloonsKokimi[9].x = (powerUp.getX() - 30);
balloonsKokimi[9].y = (powerUp.getY() - 30);
contTimePowerUp++;
};
if (ConsTAndVars.HARD){
updateAtackEnemiesHard(level, _arg2);
} else {
updateAtackEnemiesNormal(level, _arg2);
};
}
public function deadBall(_arg1:int){
if (!dead[_arg1]){
balls[_arg1].deadBallEnemies();
dead[_arg1] = true;
};
}
public function getSlotX(_arg1:int):Number{
return (slots[_arg1].getX());
}
public function setPlayerCollision(_arg1:Boolean){
player.setCollision(_arg1);
}
private function setAllFilledSlots(){
var _local1:int;
while (_local1 < balls.length) {
balls[_local1].setSlotMode(true);
slots[_local1].disappearSlots();
_local1++;
};
startGame = true;
gameHud.timeStart();
}
public function arrangedMaldicao2(){
this.setChildIndex(maldicao2, ARRANGED_POSITION);
}
private function updateTransform(){
var _local1:int;
while (_local1 < transEnemies.length) {
if (transEnemies[_local1].visible){
transEnemies[_local1].update();
};
_local1++;
};
}
private function createBalls():void{
var _local1:int;
while (_local1 <= 7) {
if (!balls[_local1].getVisible()){
balls[_local1].visibleBall(0, 0);
balloonsKokimi[_local1].visible = true;
dead[_local1] = false;
};
_local1++;
};
}
public function setFillSlot(_arg1:int, _arg2:Boolean, _arg3:int){
slots[_arg1].setFillSlot(_arg2, _arg3);
}
private function updateMaldicao(){
if (maldicao.visible){
maldicao.update();
maldicao.collisionPlayer(player.x, player.y, 30);
balloonsOrbs[0].x = (maldicao.x - 27);
balloonsOrbs[0].y = (maldicao.y - 31);
};
}
public function getStartGame():Boolean{
return (startGame);
}
public function update(_arg1:Event):void{
var _local2:int;
if (!pauseGame){
updateEnemy();
updatePoweUps();
player.update();
updateTransform();
updateMaldicao();
updateMaldicao2();
updateBalls();
if (contMaldicao2 > 4){
_local2 = 0;
while (_local2 < balls.length) {
balls[_local2].blinkMaldicao2();
_local2++;
};
};
};
}
public function resetVariables(){
trace("reset variables");
gameOver = false;
level = 0;
pointsNumber = 0;
contVisibleBalls = 0;
ballSelectedOne = -1;
ballSelectedOneX = 0;
ballSelectedOneY = 0;
ballSelectedTwo = -1;
ballSelectedTwoX = 0;
ballSelectedTwoY = 0;
allFilledSlots = true;
gameState = 0;
startGame = false;
pauseGame = false;
timeAtackEnemies = 0;
transNumb = 0;
}
private function enemiesAtack(){
var _local1:int;
var _local2:*;
var _local3:Boolean;
var _local4:int;
var _local5:int;
_local1 = (Math.random() * 8);
_local2 = int((Math.random() * 8));
if (enemies[_local1].visible){
while (_local4 < enemies.length) {
if (!enemies[_local4].visible){
_local1 = _local4;
break;
};
_local4++;
};
};
if (positionArray[_local2]){
while (_local5 < enemies.length) {
if (!positionArray[_local5]){
_local2 = _local5;
break;
};
_local5++;
};
};
enemies[_local1].setPosition(_local2);
}
private function quitGame(_arg1:MouseEvent){
ScreenControl.getInstance().activeFade(ScreenControl.STATE_FIRST_SCREEN);
}
public function hideKokimiBallon(_arg1:int){
balloonsKokimi[_arg1].visible = false;
}
private function updateBalls(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
if (++this.contVisibleBalls == 100){
createBalls();
this.contVisibleBalls = 0;
};
while (_local2 < balls.length) {
if (balls[_local2].getVisible()){
_local1++;
};
_local2++;
};
while (_local3 < balls.length) {
if (balls[_local3].getVisible()){
balls[_local3].checkCollisionSlots(slots[0].getX(), slots[0].getY(), slotHeight, 0, slots[0].getFillSlot(), slots[0].getSlotBall());
balls[_local3].checkCollisionSlots(slots[1].getX(), slots[1].getY(), slotHeight, 1, slots[1].getFillSlot(), slots[1].getSlotBall());
balls[_local3].checkCollisionSlots(slots[2].getX(), slots[2].getY(), slotHeight, 2, slots[2].getFillSlot(), slots[2].getSlotBall());
balls[_local3].checkCollisionSlots(slots[3].getX(), slots[3].getY(), slotHeight, 3, slots[3].getFillSlot(), slots[3].getSlotBall());
balls[_local3].checkCollisionSlots(slots[4].getX(), slots[4].getY(), slotHeight, 4, slots[4].getFillSlot(), slots[4].getSlotBall());
balls[_local3].checkCollisionSlots(slots[5].getX(), slots[5].getY(), slotHeight, 5, slots[5].getFillSlot(), slots[5].getSlotBall());
balls[_local3].checkCollisionSlots(slots[6].getX(), slots[6].getY(), slotHeight, 6, slots[6].getFillSlot(), slots[6].getSlotBall());
balls[_local3].checkCollisionSlots(slots[7].getX(), slots[7].getY(), slotHeight, 7, slots[7].getFillSlot(), slots[7].getSlotBall());
};
if (!enemies[_local3].getGoodGuyMode()){
enemies[_local3].checkCollisionBall(balls[0].getX(), balls[0].getY(), ballsHeight, 0, balls[0].getHoldBall());
enemies[_local3].checkCollisionBall(balls[1].getX(), balls[1].getY(), ballsHeight, 1, balls[1].getHoldBall());
enemies[_local3].checkCollisionBall(balls[2].getX(), balls[2].getY(), ballsHeight, 2, balls[2].getHoldBall());
enemies[_local3].checkCollisionBall(balls[3].getX(), balls[3].getY(), ballsHeight, 3, balls[3].getHoldBall());
enemies[_local3].checkCollisionBall(balls[4].getX(), balls[4].getY(), ballsHeight, 4, balls[4].getHoldBall());
enemies[_local3].checkCollisionBall(balls[5].getX(), balls[5].getY(), ballsHeight, 5, balls[5].getHoldBall());
enemies[_local3].checkCollisionBall(balls[6].getX(), balls[6].getY(), ballsHeight, 6, balls[6].getHoldBall());
enemies[_local3].checkCollisionBall(balls[7].getX(), balls[7].getY(), ballsHeight, 7, balls[7].getHoldBall());
enemies[_local3].checkCollisionPlayer(player.x, player.y, 30);
};
balloonsKokimi[_local3].x = (balls[_local3].getX() - 27);
balloonsKokimi[_local3].y = (balls[_local3].getY() - 31);
if (balls[_local3].getSlot()){
++_local4;
if ((((_local4 == _local1)) && (allFilledSlots))){
setAllFilledSlots();
allFilledSlots = false;
SoundsGame.getInstance().playScenery("stage");
};
};
balls[_local3].update();
_local3++;
};
}
private function updateMaldicao2(){
if (maldicao2.visible){
maldicao2.update();
maldicao2.collisionPlayer(player.x, player.y, 30);
balloonsOrbs[1].x = (maldicao2.x - 27);
balloonsOrbs[1].y = (maldicao2.y - 31);
};
}
public function arrangedMaldicao(){
this.setChildIndex(maldicao, ARRANGED_POSITION);
}
public function arrangedPowerUp(_arg1:int){
if (_arg1 == 1){
this.setChildIndex(powerUp, ARRANGED_POSITION);
} else {
this.setChildIndex(timePowerUp, ARRANGED_POSITION);
};
}
public function hideBalloonPowerUp(_arg1:int){
balloonsKokimi[_arg1].visible = false;
}
public function removeInstance(){
instance = null;
}
public function setPostionArray(_arg1:int, _arg2:Boolean){
positionArray[_arg1] = _arg2;
}
public function setMaldicao(){
var _local1:int;
var _local2:int;
_local1 = 0;
while (_local1 < slots.length) {
clearSlot(_local1);
_local1++;
};
_local2 = 0;
while (_local2 < balls.length) {
if (balls[_local2].getSlotNumber() != -1){
balls[_local2].maldicao();
};
_local2++;
};
}
public function getGameOver():Boolean{
return (gameOver);
}
private function updateAtackEnemiesNormal(_arg1:int, _arg2:int){
switch (_arg1){
case 0:
if ((_arg2 % 5) == 0){
this.enemiesAtack();
};
break;
case 1:
if ((_arg2 % 3) == 0){
this.enemiesAtack();
};
break;
case 2:
if ((_arg2 % 5) == 0){
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 3:
if ((_arg2 % 3) == 0){
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 4:
if ((_arg2 % 5) == 0){
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 5:
if ((_arg2 % 7) == 0){
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 6:
if ((_arg2 % 1) == 0){
this.enemiesAtack();
};
break;
case 7:
break;
};
}
public function upBallArranged(_arg1:uint, _arg2:int){
var _local3:int;
while (_local3 < enemies.length) {
this.setChildIndex(enemies[_local3], 25);
_local3++;
};
this.setChildIndex(balls[_arg1], _arg2);
}
public function hideBalloonOrbs(_arg1:int){
balloonsOrbs[_arg1].visible = false;
}
public function showHideBallEffect(_arg1:Number, _arg2:Number){
hideBall.x = _arg1;
hideBall.y = _arg2;
hideBall.play();
}
public function playerLoseLife(){
gameHud.loseLife();
}
public function setMaldicao2(){
var _local1:int;
activeMaldicao2 = true;
while (_local1 < balls.length) {
balls[_local1].setMaldicao2(activeMaldicao2);
_local1++;
};
}
public function setPowerUp(_arg1:int){
player.setAnimatePowerUp(_arg1);
}
public function setEnemyTransform(_arg1:Number, _arg2:Number, _arg3:int){
transEnemies[transNumb].setPosition(_arg1, _arg2);
transNumb++;
if (transNumb > (transEnemies.length - 1)){
transNumb = 0;
};
}
private function updateAtackEnemiesHard(_arg1:int, _arg2:int){
switch (_arg1){
case 0:
if ((_arg2 % 4) == 0){
this.enemiesAtack();
};
break;
case 1:
if ((_arg2 % 2) == 0){
this.enemiesAtack();
};
break;
case 2:
if ((_arg2 % 4) == 0){
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 3:
if ((_arg2 % 2) == 0){
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 4:
if ((_arg2 % 4) == 0){
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 5:
if ((_arg2 % 7) == 0){
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
this.enemiesAtack();
};
break;
case 6:
if ((_arg2 % 2) == 0){
this.enemiesAtack();
};
break;
case 7:
break;
};
}
private function updatePoweUps(){
if (powerUp.visible){
powerUp.checkCollision(player.x, player.y, 30);
powerUp.update();
balloonsKokimi[8].x = (powerUp.getX() - 30);
balloonsKokimi[8].y = (powerUp.getY() - 30);
};
if (timePowerUp.visible){
timePowerUp.checkCollision(player.x, player.y, 30);
timePowerUp.update();
balloonsKokimi[9].x = (timePowerUp.getX() - 30);
balloonsKokimi[9].y = (timePowerUp.getY() - 30);
};
timePowerUp.updateFeedback();
}
public function setPoints(_arg1:int){
gameHud.setPoints(_arg1);
}
public function eatPowerup(){
player.eatPowerup();
}
public function clearSlot(_arg1:int){
slots[_arg1].setFillSlot(false, -1);
}
public function killFunckinEnemies(){
var _local1:int;
while (_local1 < enemies.length) {
if (((((enemies[_local1].visible) && (!(enemies[_local1].getGoodGuyMode())))) && ((((((enemies[_local1].x > 30)) && ((enemies[_local1].x < 520)))) && ((((enemies[_local1].y > 10)) && ((enemies[_local1].y < 380)))))))){
enemies[_local1].dead(50);
};
_local1++;
};
}
public function pause():Boolean{
var _local1:int;
if (startGame){
pauseGame = !(pauseGame);
powerUp.pausePowerUp(pauseGame);
timePowerUp.pausePowerUp(pauseGame);
player.pausePlayer(pauseGame);
maldicao.pause(pauseGame);
maldicao2.pause(pauseGame);
senario.visible = !(senario.visible);
gameHud.pauseTime(pauseGame);
if (pauseGame){
this.addChild(btnQuit);
} else {
this.removeChild(btnQuit);
};
while (_local1 < balls.length) {
enemies[_local1].pauseEnemy(pauseGame);
if (transEnemies[_local1].visible){
transEnemies[_local1].pause(pauseGame);
};
balls[_local1].pauseBall(pauseGame);
_local1++;
};
};
return (pauseGame);
}
public static function addPoints():int{
pointsNumber++;
return (pointsNumber);
}
public static function getInstance():GameControler{
return (instance);
}
}
}//package
Section 101
//GameHud (GameHud)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class GameHud extends MovieClip {
public var points:TextField;
private var lifes:int;// = 0
private var clock:String;
public var put:MovieClip;
private var minuts:int;// = 2
private var sound:Boolean;
private var timer:Timer;
private var fumaca:int;
public var two:MovieClip;
public var one:MovieClip;
private var hPoints:int;
public var blind:SimpleButton;
private var fade:Boolean;
private var seconds:int;// = 1
private var finalScreen:Boolean;
public var world:MovieClip;
public var three:MovieClip;
public var soundBtn:SimpleButton;
private var contFade:int;
public var time:TextField;
public var pauseBt:MovieClip;
public function GameHud(){
var _local1:int;
timer = new Timer(1000, 0);
seconds = 1;
minuts = 2;
lifes = 0;
super();
addFrameScript(30, frame31);
ConsTAndVars.TODAS_VIDAS = true;
if (ConsTAndVars.NORMAL_GAME){
this.pauseBt.addEventListener(MouseEvent.CLICK, pause);
this.blind.addEventListener(MouseEvent.CLICK, blindVision);
this.soundBtn.addEventListener(MouseEvent.CLICK, sounds);
timer.addEventListener(TimerEvent.TIMER, timeGame);
};
timer.reset();
timer.stop();
seconds = 1;
minuts = 10;
lifes = 0;
fumaca = 0;
_local1 = 0;
while (_local1 < 7) {
this.world.c.getChildByName(("fumaca" + _local1)).gotoAndStop(1);
_local1++;
};
this.time.selectable = false;
this.points.selectable = false;
}
public function pauseTime(_arg1:Boolean){
if (_arg1){
timer.stop();
} else {
timer.start();
};
}
public function setGameOverScreen(){
fade = true;
}
public function removeTimer(){
this.removeEventListener(TimerEvent.TIMER, timeGame);
}
public function removePut(){
this.put.visible = false;
}
public function getSeconds():int{
return (seconds);
}
public function setMinuts(_arg1:int){
this.minuts = (this.minuts + _arg1);
}
public function timeGame(_arg1:TimerEvent):void{
var _local2:String;
_local2 = "";
seconds--;
if (seconds < 0){
seconds = 59;
minuts--;
};
if (minuts < 10){
_local2 = (_local2 + ("0" + minuts));
} else {
_local2 = (_local2 + minuts);
};
if (seconds < 10){
_local2 = (_local2 + (":0" + seconds));
} else {
_local2 = (_local2 + (":" + seconds));
};
if (((fade) && ((++contFade >= 3)))){
if (finalScreen){
ScreenControl.getInstance().activeFade(ScreenControl.STATE_FINAL_SCREEN);
} else {
ScreenControl.getInstance().activeFade(ScreenControl.STATE_GAME_OVER);
};
fade = false;
contFade = 0;
timer.stop();
this.removeEventListener(TimerEvent.TIMER, timeGame);
};
GameControler.getInstance().updateEventsGame(minuts, seconds);
if ((((minuts >= 0)) && ((seconds >= 0)))){
this.time.text = _local2;
};
}
public function setMinutInHtP(){
this.time.text = "13:00";
}
private function sounds(_arg1:MouseEvent){
sound = !(sound);
SoundsGame.getInstance().setSounds(sound);
}
public function timeStart(){
timer.start();
this.put.visible = false;
}
private function blindVision(_arg1:MouseEvent){
GameControler.getInstance().setBlind();
}
public function hudReset(){
timer.reset();
}
public function upLevel(){
if (fumaca < 7){
this.world.c.getChildByName(("fumaca" + fumaca)).gotoAndStop(2);
};
fumaca++;
}
public function loseLife(){
if (lifes < 3){
if (lifes == 0){
this.three.gotoAndStop(2);
} else {
if (lifes == 1){
this.two.gotoAndStop(2);
} else {
if (lifes == 2){
this.one.gotoAndStop(2);
};
};
};
lifes++;
ConsTAndVars.TODAS_VIDAS = false;
if (lifes == 3){
GameControler.getInstance().setGameOver();
fade = true;
};
};
}
public function setFinalScreen(){
finalScreen = true;
fade = true;
}
function frame31(){
stop();
}
public function setPoints(_arg1:int){
hPoints = (hPoints + _arg1);
ConsTAndVars.SCORE = hPoints;
this.points.text = ("" + hPoints);
}
private function pause(_arg1:MouseEvent){
if (GameControler.getInstance().getStartGame()){
if (GameControler.getInstance().pause()){
this.pauseBt.gotoAndStop(2);
} else {
this.pauseBt.gotoAndStop(1);
};
};
}
}
}//package
Section 102
//GameObject (GameObject)
package {
import flash.display.*;
public class GameObject extends MovieClip {
protected var object:MovieClip;
public function getHeight():int{
return (object.height);
}
public function getObject():MovieClip{
return (object);
}
public function getVisible():Boolean{
return (object.visible);
}
public function getX():Number{
return (object.x);
}
public function getY():Number{
return (object.y);
}
}
}//package
Section 103
//GameOver (GameOver)
package {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public class GameOver extends MovieClip {
private var contFilter:int;
private var screen:MC_gameover;
private var player:MovieClip;
public function GameOver(){
player = new MC_playergameover();
screen = new MC_gameover();
super();
this.addChild(screen);
this.addChild(player);
player.x = 277;
player.y = 303.5;
player.buttonMode = true;
screen.buttonMode = true;
player.addEventListener(MouseEvent.CLICK, clickKokimi);
screen.addEventListener(MouseEvent.CLICK, clickScreen);
}
private function endBlurFilter(){
var _local1:NamePopupAnimation;
this.removeEventListener(Event.ENTER_FRAME, blurFilter);
screen.removeEventListener(MouseEvent.CLICK, clickScreen);
screen.buttonMode = false;
_local1 = new NamePopupAnimation();
this.addChild(_local1);
}
private function clickScreen(_arg1:MouseEvent){
this.addEventListener(Event.ENTER_FRAME, blurFilter);
}
private function clickKokimi(_arg1:MouseEvent){
player.gotoAndPlay(1);
}
private function blurFilter(_arg1:Event){
if (contFilter >= 31){
endBlurFilter();
};
this.player.filters = [new BlurFilter(contFilter, contFilter, 1)];
this.screen.filters = [new BlurFilter(contFilter, contFilter, 1)];
contFilter++;
}
}
}//package
Section 104
//HowToPlay (HowToPlay)
package {
import flash.events.*;
import flash.display.*;
import enemies.*;
public class HowToPlay extends MovieClip {
private var initMaldicao:Boolean;
private var kokimiHitted:int;// = -1
private var slots:Array;
private var contBackMenu:int;
private var powerKokimi:Boolean;
private var firstCollision:Boolean;
private var fade:MovieClip;
private var timerPlus:PowerUps;
private var powerUp:PowerUps;
var test:int;
private var contActionsPowerUPs:int;
private var maldicao:Maldicao;
private var player:Player;
private var hud:GameHud;
private var firstVisionOrb:Boolean;
private var firstScenePowerUp:Boolean;
private var timerMaldicao:int;
private var backGround:MovieClip;
private var kokimis:Array;
private var enemy:MovieClip;
private var goodLock:Boolean;
private var tela:MovieClip;
private var transEnemy:TransformEnemy;
private var textos:Array;
private var maldicao2:Maldicao2;
private var cScene:int;// = 0
public static const SCENE_ORBS:int = 1;
public static const SCENE_POWER_UP:int = 2;
public static const SCENE_ENEMY:int = 0;
public static const SCENE_TIME_PLUS:int = 3;
public static const SCENE_GOOD_LOCK:int = 4;
public static var INDEX_OBJECT;
private static var instance:MovieClip;
public function HowToPlay(_arg1:Boolean){
slots = new Array(8);
kokimis = new Array(8);
cScene = 0;
textos = ["Drag and drop to switch Kokimis, matching monsters’ colors to destroy them.", "Watch...", "Use mouse to take the blackout orb and confusion orb away from Kokimis.", "Drag and drop power-ups in the Kokimis.", "Click to use them.", "Hourglass power-up will add three minutes in the game time.", "Good luck!"];
kokimiHitted = -1;
super();
init(_arg1);
instance = this;
setAllFilledSlots();
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
public function timePlus(){
hud.setMinutInHtP();
goodLock = true;
}
public function setGoodLock(){
(cScene == SCENE_GOOD_LOCK);
fade.gotoAndStop(1);
this.tela.texto.text = textos[6];
this.tela.btnPlay.visible = false;
}
public function setChangePosition(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local5 = _arg1;
_local6 = _arg2;
if (_local6 != -1){
_local11 = slots[_local6].getX();
_local12 = slots[_local6].getY();
};
_local7 = _arg3;
_local8 = _arg4;
_local9 = slots[_local8].getX();
_local10 = slots[_local8].getY();
if (((!((_local5 == -1))) && (!((_local6 == -1))))){
kokimis[_local5].setChangePosition(_local6, _local11, _local12, true);
slots[_local6].setFillSlot(true, _local5);
} else {
if (_local6 != -1){
slots[_local6].setFillSlot(false, -1);
};
};
kokimis[_local7].setChangePosition(_local8, _local9, _local10, false);
slots[_local8].setFillSlot(true, _local7);
}
private function pressPlay(_arg1:MouseEvent){
switch (cScene){
case SCENE_ENEMY:
refreashEnemyAtack();
break;
case SCENE_ORBS:
refrashMaldicoes();
break;
case SCENE_POWER_UP:
refreashPowerUps();
refrashMaldicoes();
break;
case SCENE_TIME_PLUS:
refreashPowerUps();
break;
};
tela.gotoAndStop(2);
}
public function removeUpdate(){
this.removeEventListener(Event.ENTER_FRAME, update);
}
private function enemyUpdate(){
var _local1:int;
_local1 = 0;
while (_local1 < kokimis.length) {
if (kokimis[_local1].getVisibleBall()){
enemy.checkCollisionBall(kokimis[_local1].getX(), kokimis[_local1].getY(), 15, _local1, kokimis[_local1].getHoldBall());
};
_local1++;
};
enemy.checkCollisionPlayer(player.x, player.y, 30);
enemy.update();
if (!enemy.visible){
refreashEnemyAtack();
};
}
public function deadBall(_arg1:int){
kokimis[_arg1].deadBallEnemies();
}
public function setPlayerCollision(_arg1:Boolean){
player.setCollision(_arg1);
}
private function setAllFilledSlots(){
var _local1:int;
while (_local1 < kokimis.length) {
kokimis[_local1].setSlotMode(true);
_local1++;
};
}
public function setIndexKokimi(_arg1:int){
this.setChildIndex(kokimis[_arg1], INDEX_OBJECT);
}
public function arrangedMaldicao2(){
this.setChildIndex(maldicao2, INDEX_OBJECT);
}
private function updateMaldicoes(){
if (maldicao.visible){
maldicao.update();
maldicao.collisionPlayer(player.x, player.y, 30);
};
if (maldicao2.visible){
maldicao2.update();
maldicao2.collisionPlayer(player.x, player.y, 30);
};
if ((((maldicao.x > 580)) && ((maldicao2.x < -30)))){
cScene = SCENE_POWER_UP;
nextSceneHtp();
firstVisionOrb = false;
};
if (((initMaldicao) && ((++timerMaldicao > 80)))){
timerMaldicao = 0;
initMaldicao = false;
refrashMaldicoes();
tela.gotoAndStop(1);
if (firstVisionOrb){
firstVisionOrb = false;
this.tela.btnPlay.visible = true;
};
};
if (timerMaldicao > 69){
initMaldicao = !(initMaldicao);
piscaMaldicao2(initMaldicao);
};
}
private function updatePoweUp(){
if (powerUp.visible){
powerUp.checkCollision(player.x, player.y, 30);
powerUp.update();
};
if (powerUp.getPowerUpX() < -50){
this.tela.texto.text = textos[3];
tela.gotoAndStop(1);
powerUp.free();
};
if ((((contActionsPowerUPs == 2)) && ((++contBackMenu > 80)))){
};
}
private function refreashPowerUps(){
timerPlus.showPowerUp(0);
powerUp.showPowerUp(3);
contActionsPowerUPs = 0;
contBackMenu = 0;
}
private function update(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
updateFade();
setAllFilledSlots();
_local2 = 0;
while (_local2 < 8) {
_local3 = 0;
while (_local3 < 8) {
kokimis[_local2].checkCollisionSlots(slots[_local3].getX(), slots[_local3].getY(), 15, _local3, slots[_local3].getFillSlot(), slots[_local3].getSlotBall());
_local3++;
};
kokimis[_local2].update();
_local2++;
};
player.update();
allScenesUpdates(cScene);
if (transEnemy.visible){
transEnemy.update();
};
if (cScene == SCENE_TIME_PLUS){
timerPlus.updateFeedback();
};
if (!firstCollision){
_local4 = 0;
while (_local4 < 8) {
slots[_local4].setFillSlot(false, _local4);
_local4++;
};
firstCollision = true;
};
}
public function nextSceneHtp(){
fade.gotoAndPlay(1);
}
private function updateFade(){
if (fade.currentFrame == (fade.totalFrames >> 1)){
if (transEnemy.visible){
transEnemy.visible = false;
};
if (tela.currentFrame == 2){
if (cScene == SCENE_ENEMY){
refreashEnemyAtack();
returnToInitKokimis();
};
if (cScene == SCENE_ORBS){
refrashMaldicoes();
};
if (cScene == SCENE_POWER_UP){
this.tela.texto.text = textos[3];
};
if (((((!((cScene == SCENE_POWER_UP))) && (!((cScene == SCENE_TIME_PLUS))))) && ((++cScene > SCENE_GOOD_LOCK)))){
cScene = SCENE_GOOD_LOCK;
};
tela.gotoAndStop(1);
if (cScene == SCENE_ORBS){
firstVisionOrb = true;
this.tela.texto.text = textos[1];
};
};
};
}
private function onRemovedFromStage(_arg1:Event):void{
trace("Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
this.removeEventListener(Event.ENTER_FRAME, update);
}
private function clickMenu(_arg1:Event){
ScreenControl.getInstance().backToMenu();
}
private function init(_arg1:Boolean){
var _local2:int;
var _local3:int;
var _local4:int;
backGround = new backGroundHtP();
this.addChild(backGround);
player = new Player();
this.addChild(player);
_local2 = 0;
while (_local2 < 8) {
slots[_local2] = new Slots(_local2);
this.addChild(slots[_local2]);
_local2++;
};
_local3 = 0;
while (_local3 < 8) {
kokimis[_local3] = new Balls(_local3, slots[_local3].getX(), slots[_local3].getY(), false);
this.addChild(kokimis[_local3]);
_local3++;
};
maldicao = new Maldicao();
this.addChild(maldicao);
maldicao.visible = true;
maldicao.setPosition(0);
maldicao2 = new Maldicao2();
this.addChild(maldicao2);
maldicao2.setPosition(0);
maldicao2.visible = true;
timerPlus = new PowerUps(0);
this.addChild(timerPlus);
timerPlus.showPowerUp(0);
powerUp = new PowerUps(1);
this.addChild(powerUp);
powerUp.showPowerUp(3);
this.addEventListener(Event.ENTER_FRAME, update);
_local4 = (Math.random() * 8);
transEnemy = new TransformEnemy();
this.addChild(transEnemy);
enemy = Enemy.create(_local4, 0, 0);
this.addChild(enemy);
_local4 = (Math.random() * 8);
enemy.setPosition(_local4);
hud = new GameHud();
this.addChild(hud);
hud.removePut();
tela = new a();
trace(("menu:" + _arg1));
if (_arg1){
this.tela.bb.x = -100;
this.tela.skip.x = -100;
this.tela.skipSeta.x = -100;
} else {
this.tela.btnMenu.x = -100;
};
this.tela.texto.text = textos[0];
tela.btnPlay.addEventListener(MouseEvent.CLICK, pressPlay);
tela.gotoAndStop(1);
this.addChild(tela);
fade = new fadeHowToPlay();
this.addChild(fade);
fade.gotoAndStop(fade.totalFrames);
INDEX_OBJECT = this.getChildIndex(enemy);
}
public function arrangedMaldicao(){
this.setChildIndex(maldicao, INDEX_OBJECT);
}
public function arrangedPowerUp(_arg1:int){
if (_arg1 == 1){
this.setChildIndex(powerUp, INDEX_OBJECT);
} else {
this.setChildIndex(timerPlus, (INDEX_OBJECT + 1));
};
}
private function allScenesUpdates(_arg1:int){
switch (_arg1){
case SCENE_ENEMY:
if (tela.currentFrame == 2){
enemyUpdate();
};
break;
case SCENE_ORBS:
if (((firstVisionOrb) || ((tela.currentFrame == 2)))){
updateMaldicoes();
};
break;
case SCENE_POWER_UP:
if (tela.currentFrame == 2){
if (!powerKokimi){
updatePoweUp();
} else {
enemyUpdate();
};
};
break;
case SCENE_TIME_PLUS:
if ((((tela.currentFrame == 2)) && ((fade.currentFrame == fade.totalFrames)))){
updateTimerPlus();
};
break;
};
}
public function getGoodLockVar():Boolean{
return (goodLock);
}
private function piscaMaldicao2(_arg1:Boolean){
var _local2:int;
while (_local2 < kokimis.length) {
kokimis[_local2].setMaldicao2(_arg1);
_local2++;
};
}
public function setMaldicao(){
var _local1:int;
var _local2:int;
_local1 = 0;
while (_local1 < slots.length) {
clearSlot(_local1);
_local1++;
};
_local2 = 0;
while (_local2 < kokimis.length) {
if (kokimis[_local2].getSlotNumber() != -1){
kokimis[_local2].maldicao();
};
_local2++;
};
if (tela.currentFrame == 2){
refrashMaldicoes();
tela.gotoAndStop(1);
};
}
public function returnToInitKokimis(){
var _local1:Array;
var _local2:int;
var _local3:int;
if (GameControler.getInstance() == null){
_local1 = new Array(8);
_local2 = 0;
while (_local2 < kokimis.length) {
this.removeChild(kokimis[_local2]);
clearSlot(_local2);
kokimis[_local2] = null;
_local2++;
};
_local3 = 0;
while (_local3 < kokimis.length) {
kokimis[_local3] = new Balls(_local3, slots[_local3].getX(), slots[_local3].getY(), false);
this.addChildAt(kokimis[_local3], (this.getChildIndex(tela) - 1));
_local3++;
};
INDEX_OBJECT = (this.getChildIndex(tela) - 2);
this.setChildIndex(tela, (INDEX_OBJECT + 2));
firstCollision = false;
tela.gotoAndStop(1);
if (firstScenePowerUp){
this.tela.texto.text = textos[4];
};
refreashEnemyAtack();
};
}
private function refrashMaldicoes(){
setMaldicao2(false);
maldicao2.stopDrag();
maldicao.setPosition(0);
maldicao.stopDrag();
maldicao2.setPosition(0);
timerMaldicao = 0;
initMaldicao = false;
}
public function actionPowerUp(){
if (cScene == SCENE_POWER_UP){
powerKokimi = true;
this.tela.texto.text = textos[4];
firstScenePowerUp = true;
tela.gotoAndStop(1);
};
}
public function removeUpdateFlag():Boolean{
return (true);
}
public function setMaldicao2(_arg1:Boolean){
var _local2:int;
while (_local2 < kokimis.length) {
kokimis[_local2].setMaldicao2(_arg1);
_local2++;
};
initMaldicao = true;
if (tela.currentFrame == 1){
this.tela.texto.text = textos[2];
this.tela.btnPlay.visible = true;
};
}
public function refreashEnemyAtack(){
var _local1:int;
_local1 = (Math.random() * 8);
enemy.setPosition(_local1);
if (kokimiHitted != -1){
kokimis[kokimiHitted].backToFrameOneHtP();
};
}
private function updateTimerPlus(){
if (timerPlus.visible){
timerPlus.checkCollision(player.x, player.y, 30);
timerPlus.update();
};
if (timerPlus.getPowerUpX() > 590){
tela.gotoAndStop(1);
timerPlus.free();
};
}
public function setPowerUp(_arg1:int){
player.setAnimatePowerUp(_arg1);
}
public function setEnemyTransform(_arg1:Number, _arg2:Number){
transEnemy.setPosition(_arg1, _arg2);
if (cScene == SCENE_ENEMY){
nextSceneHtp();
} else {
firstScenePowerUp = true;
};
}
public function getEnemyScene():Boolean{
return ((cScene == SCENE_ENEMY));
}
public function getfirstVisionOrb():Boolean{
return (firstVisionOrb);
}
public function clearSlot(_arg1:int){
slots[_arg1].setFillSlot(false, -1);
}
public function killFunckinEnemies(){
if (((((enemy.visible) && (!(enemy.getGoodGuyMode())))) && ((((((enemy.x > 80)) && ((enemy.x < 490)))) && ((((enemy.y > 50)) && ((enemy.y < 380)))))))){
enemy.dead(0);
cScene = SCENE_TIME_PLUS;
this.tela.texto.text = textos[5];
};
}
public static function getInstace():MovieClip{
return (instance);
}
}
}//package
Section 105
//Kokimi (Kokimi)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
import CPMStar.*;
import flash.net.*;
import flash.utils.*;
public dynamic class Kokimi extends MovieClip {
public var bgPreload:MovieClip;
public var adBox:MovieClip;
public var allowed;// = true
public var btnPlayGame:SimpleButton;
private var mLoaded:Boolean;
public var logoSponsor:MovieClip;
public var pb:MovieClip;
public function Kokimi(){
var _local1:String;
var _local2:DisplayObject;
allowed = true;
super();
addFrameScript(2, frame3, 4, frame5);
stop();
mLoaded = false;
MochiBot.track(this, "fec81428");
_local1 = "379QF678A4D9";
_local2 = new AdLoader(_local1);
adBox.addChild(_local2);
MochiServices.connect("73c81f7b6bbb82a9", this);
this.logoSponsor.addEventListener(MouseEvent.CLICK, onClickSponsor);
this.logoSponsor.buttonMode = true;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function init():void{
var _local1:Class;
var _local2:DisplayObject;
stop();
if (!this.allowed){
while (this.numChildren > 1) {
this.removeChild(this.getChildAt(0));
};
_local1 = (getDefinitionByName("BlockedSite") as Class);
_local2 = new (_local1);
this.addChild(_local2);
};
if (this["adBox"] != null){
removeChild(this["adBox"]);
};
if (this["bgPreload"] != null){
removeChild(this["bgPreload"]);
};
}
function frame3(){
stop();
btnPlayGame.addEventListener(MouseEvent.CLICK, onClickPlayGame);
}
public function onClickPlayGame(_arg1:MouseEvent):void{
this.play();
}
function frame5(){
stop();
}
public function onEnterFrame(_arg1:Event):void{
var _local2:Number;
if (!mLoaded){
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
mLoaded = true;
play();
} else {
_local2 = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
this.pb.fill.x = (_local2 * this.pb.fill.width);
};
} else {
if (this.currentFrame == this.totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
init();
};
};
}
private function onClickSponsor(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.notdoppler.com/?ref=kokimi");
navigateToURL(_local2, "_blank");
}
}
}//package
Section 106
//kokimi_trilha (kokimi_trilha)
package {
import flash.media.*;
public dynamic class kokimi_trilha extends Sound {
}
}//package
Section 107
//level_up (level_up)
package {
import flash.media.*;
public dynamic class level_up extends Sound {
}
}//package
Section 108
//LoadingAnimation (LoadingAnimation)
package {
import flash.display.*;
public class LoadingAnimation extends MovieClip {
}
}//package
Section 109
//Maldicao (Maldicao)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Maldicao extends MovieClip {
private var cTrans:ColorTransform;
private var pauseGame:Boolean;
private var position:int;
private var drag:Boolean;
private var cNone:ColorTransform;
private var raio:Number;
private var velocity:int;// = 2
public function Maldicao(){
velocity = 2;
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
this.visible = false;
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_DOWN, hold);
this.addEventListener(MouseEvent.MOUSE_UP, free);
raio = (this.height >> 1);
}
private function free(_arg1:MouseEvent){
this.stopDrag();
drag = false;
}
public function getPosition():int{
return (this.position);
}
public function collisionPlayer(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:Number;
_local4 = Math.sqrt((((_arg1 - this.x) * (_arg1 - this.x)) + ((_arg2 - this.y) * (_arg2 - this.y))));
_local5 = Math.sqrt((((275 - this.x) * (275 - this.x)) + ((200 - this.y) * (200 - this.y))));
if ((((_local4 < (raio + _arg3))) && (!(drag)))){
this.visible = false;
if (GameControler.getInstance() != null){
GameControler.getInstance().hideBalloonOrbs(0);
GameControler.getInstance().setMaldicao();
} else {
HowToPlay.getInstace().setMaldicao();
};
SoundsGame.getInstance().playPowerDown();
};
}
public function setPosition(_arg1:int){
this.position = _arg1;
if (_arg1 == 0){
this.x = -90;
} else {
this.x = 630;
};
this.y = 200;
this.visible = true;
drag = false;
}
public function update(){
if (!drag){
if (this.position == 0){
this.x = (this.x + velocity);
} else {
this.x = (this.x - velocity);
};
};
}
private function hold(_arg1:MouseEvent){
if (!pauseGame){
this.startDrag();
drag = true;
if (GameControler.getInstance() != null){
GameControler.getInstance().arrangedMaldicao();
GameControler.getInstance().hideBalloonOrbs(0);
} else {
HowToPlay.getInstace().arrangedMaldicao();
};
};
}
public function pause(_arg1:Boolean){
this.pauseGame = _arg1;
if (_arg1){
cTrans.color = 0xD0D0D0;
cNone = this.transform.colorTransform;
this.transform.colorTransform = cTrans;
this.stop();
} else {
this.transform.colorTransform = cNone;
this.play();
};
}
}
}//package
Section 110
//Maldicao2 (Maldicao2)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Maldicao2 extends MovieClip {
private var cTrans:ColorTransform;
private var pauseGame:Boolean;
private var position:int;
private var drag:Boolean;
private var cNone:ColorTransform;
private var raio:Number;
private var velocity:int;// = 2
public function Maldicao2(){
velocity = 2;
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
this.visible = false;
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_DOWN, hold);
this.addEventListener(MouseEvent.MOUSE_UP, free);
raio = (this.height >> 1);
}
private function free(_arg1:MouseEvent){
this.stopDrag();
drag = false;
}
public function collisionPlayer(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:Number;
_local4 = Math.sqrt((((_arg1 - this.x) * (_arg1 - this.x)) + ((_arg2 - this.y) * (_arg2 - this.y))));
_local5 = Math.sqrt((((275 - this.x) * (275 - this.x)) + ((200 - this.y) * (200 - this.y))));
if ((((_local4 < (raio + _arg3))) && (!(drag)))){
this.visible = false;
if (GameControler.getInstance() != null){
GameControler.getInstance().setMaldicao2();
GameControler.getInstance().hideBalloonOrbs(1);
} else {
HowToPlay.getInstace().setMaldicao2(true);
};
SoundsGame.getInstance().playPowerDown();
};
}
public function setPosition(_arg1:int){
if (_arg1 == 0){
_arg1 = 1;
} else {
_arg1 = 0;
};
this.position = _arg1;
if (_arg1 == 0){
this.x = -90;
} else {
if (GameControler.getInstance() != null){
this.x = 630;
} else {
this.x = 800;
};
};
this.y = 200;
this.visible = true;
drag = false;
}
public function update(){
if (!drag){
if (this.position == 0){
this.x = (this.x + velocity);
} else {
this.x = (this.x - velocity);
};
};
}
private function hold(_arg1:MouseEvent){
if (!pauseGame){
this.startDrag();
drag = true;
if (GameControler.getInstance() != null){
GameControler.getInstance().arrangedMaldicao2();
GameControler.getInstance().hideBalloonOrbs(1);
} else {
HowToPlay.getInstace().arrangedMaldicao2();
};
};
}
public function pause(_arg1:Boolean){
this.pauseGame = _arg1;
if (_arg1){
cTrans.color = 0xD0D0D0;
cNone = this.transform.colorTransform;
this.transform.colorTransform = cTrans;
this.stop();
} else {
this.transform.colorTransform = cNone;
this.play();
};
}
}
}//package
Section 111
//MC_ball_destroy (MC_ball_destroy)
package {
import flash.display.*;
public dynamic class MC_ball_destroy extends MovieClip {
public function MC_ball_destroy(){
addFrameScript(5, frame6);
}
function frame6(){
(this.parent as MovieClip).visible = false;
}
}
}//package
Section 112
//MC_balloon (MC_balloon)
package {
import flash.display.*;
public dynamic class MC_balloon extends MovieClip {
}
}//package
Section 113
//MC_balloon2 (MC_balloon2)
package {
import flash.display.*;
public dynamic class MC_balloon2 extends MovieClip {
}
}//package
Section 114
//MC_bonusok (MC_bonusok)
package {
import flash.display.*;
public dynamic class MC_bonusok extends MovieClip {
public function MC_bonusok(){
addFrameScript(59, frame60);
}
function frame60(){
this.stop();
}
}
}//package
Section 115
//MC_check_ok (MC_check_ok)
package {
import flash.display.*;
public dynamic class MC_check_ok extends MovieClip {
public function MC_check_ok(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 116
//MC_effect (MC_effect)
package {
import flash.display.*;
public dynamic class MC_effect extends MovieClip {
public function MC_effect(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package
Section 117
//MC_feedbackPowerUp (MC_feedbackPowerUp)
package {
import flash.display.*;
public dynamic class MC_feedbackPowerUp extends MovieClip {
}
}//package
Section 118
//MC_fumaca (MC_fumaca)
package {
import flash.display.*;
public dynamic class MC_fumaca extends MovieClip {
public function MC_fumaca(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package
Section 119
//MC_fumaca01 (MC_fumaca01)
package {
import flash.display.*;
public dynamic class MC_fumaca01 extends MovieClip {
public function MC_fumaca01(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package
Section 120
//MC_gameover (MC_gameover)
package {
import flash.display.*;
public dynamic class MC_gameover extends MovieClip {
}
}//package
Section 121
//MC_levelup (MC_levelup)
package {
import flash.display.*;
public dynamic class MC_levelup extends MovieClip {
public function MC_levelup(){
addFrameScript(48, frame49);
}
function frame49(){
this.stop();
}
}
}//package
Section 122
//MC_maldição (MC_maldição)
package {
import flash.display.*;
public dynamic class MC_maldição extends MovieClip {
}
}//package
Section 123
//MC_playergameover (MC_playergameover)
package {
import flash.display.*;
public dynamic class MC_playergameover extends MovieClip {
public function MC_playergameover(){
addFrameScript(42, frame43);
}
function frame43(){
stop();
}
}
}//package
Section 124
//MC_powerUp (MC_powerUp)
package {
import flash.display.*;
public dynamic class MC_powerUp extends MovieClip {
}
}//package
Section 125
//MC_powerup_power (MC_powerup_power)
package {
import flash.display.*;
public dynamic class MC_powerup_power extends MovieClip {
}
}//package
Section 126
//MC_Slot (MC_Slot)
package {
import flash.display.*;
public dynamic class MC_Slot extends MovieClip {
}
}//package
Section 127
//MC_time (MC_time)
package {
import flash.display.*;
public dynamic class MC_time extends MovieClip {
}
}//package
Section 128
//Menu (Menu)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Menu extends MovieClip {
public var groupHowToPlay:MovieClip;
private var cTrans:ColorTransform;
public var slotAbout:MC_Slot;
private var cNone:ColorTransform;
public var ranking:MovieClip;
public var groupAbout:MovieClip;
public var slotRanking:MC_Slot;
public var slotPlay:MC_Slot;
public var groupPlay:MovieClip;
public var slotHowToPlay:MC_Slot;
public var jynx:assJynx_;
public var playGame:MovieClip;
public var groupMoreGames:MovieClip;
public var about:MovieClip;
public var howToPlay:MovieClip;
public var groupRanking:MovieClip;
private var posMenu:MovieClip;
private var updateMenu:Boolean;
private var posMenuType:String;
private var ball:MovieClip;
private static var instavePosMenu:MovieClip;
public function Menu(){
addFrameScript(48, frame49, 75, frame76);
cTrans = new ColorTransform();
cNone = new ColorTransform();
cTrans.color = 0xFFFFFF;
cNone = this.transform.colorTransform;
this.gotoAndStop(1);
}
public function showMenu(){
this.addEventListener(Event.ENTER_FRAME, update);
this.transform.colorTransform = cNone;
this.play();
}
public function setPosMenuType(_arg1:String){
this.posMenuType = _arg1;
}
function frame76(){
this.showPosMenu();
this.stop();
}
public function showPosMenu(){
this.removeChild(ball);
ball = null;
this.removeEventListener(Event.ENTER_FRAME, update);
switch (posMenuType){
case ConsTAndVars.HOW_TO_PLAY:
posMenu = new HowToPlay(true);
break;
case ConsTAndVars.DIFFICULT:
posMenu = new Difficult();
break;
case ConsTAndVars.RANKING:
posMenu = new Ranking(true);
break;
case ConsTAndVars.ABOUT:
posMenu = new About();
break;
};
instavePosMenu = posMenu;
this.addChild(posMenu);
}
public function backToMenu(){
trace(("posMenu " + posMenu));
if (posMenu != null){
if (posMenu.removeUpdateFlag()){
posMenu.removeUpdate();
};
this.removeChild(posMenu);
posMenu = null;
};
showMenu();
}
public function hideBall(){
if (ball != null){
ball.hideBall();
};
}
public function hideMenu(){
this.transform.colorTransform = cTrans;
if (ball != null){
this.removeChild(ball);
ball = null;
};
if (posMenu != null){
this.removeChild(posMenu);
posMenu = null;
};
this.removeEventListener(Event.ENTER_FRAME, update);
this.gotoAndStop(1);
}
public function showBall(){
var _local1:int;
_local1 = (Math.random() * 8);
ball = new BallMenu(_local1, 380, 135);
this.addChild(ball);
}
public function setUpdateMenu(_arg1:Boolean){
this.updateMenu = _arg1;
if (this.updateMenu){
showBall();
};
}
private function update(_arg1:Event){
if (ball == null){
return;
};
if (((this.updateMenu) && (!(ball.hold())))){
if (ball.getBB().hitTestObject(this.groupPlay.slotPlay)){
ball.setBallPosition(151, 124.5);
this.groupPlay.playGame.gotoAndPlay(2);
} else {
if (ball.getBB().hitTestObject(this.groupHowToPlay.slotHowToPlay)){
ball.setBallPosition(151, 173.4);
this.groupHowToPlay.howToPlay.gotoAndPlay(2);
} else {
if (ball.getBB().hitTestObject(this.groupRanking.slotRanking)){
ball.setBallPosition(151, 224.4);
this.groupRanking.ranking.gotoAndPlay(2);
} else {
if (ball.getBB().hitTestObject(this.groupAbout.slotAbout)){
ball.setBallPosition(151, 275.4);
this.groupAbout.about.gotoAndPlay(2);
} else {
if (ball.getBB().hitTestObject(this.groupMoreGames.slotMoreGames)){
ball.setBallPosition(151, 325);
this.groupMoreGames.moregames.gotoAndPlay(2);
};
};
};
};
};
};
}
function frame49(){
this.setUpdateMenu(true);
this.stop();
}
public static function getPosMenu():MovieClip{
return (instavePosMenu);
}
}
}//package
Section 129
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 130
//monstro_atacando_bolinha (monstro_atacando_bolinha)
package {
import flash.media.*;
public dynamic class monstro_atacando_bolinha extends Sound {
}
}//package
Section 131
//NamePopup (NamePopup)
package {
import flash.events.*;
import flash.display.*;
import mochi.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
public class NamePopup extends MovieClip {
private var loadAnimation:LoadingAnimation;
public var score_txt:TextField;
public var menu:MovieClip;
public var btnMoreGames:MovieClip;
public var sendScore_btn:MovieClip;
public var name_txt:TextField;
public function NamePopup(){
addFrameScript(0, frame1);
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
public function mouseClick(_arg1:MouseEvent){
name_txt.text = "";
}
public function addedToStage(_arg1:Event){
var _local2:TextField;
var _local3:MovieClip;
var _local4:SimpleButton;
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
_local2 = (this.getChildByName("score_txt") as TextField);
_local2.text = (ConsTAndVars.SCORE + "");
_local3 = (this.getChildByName("sendScore_btn") as MovieClip);
_local3.buttonMode = true;
_local3.addEventListener(MouseEvent.CLICK, onSendScore);
_local4 = (this.getChildByName("block") as SimpleButton);
this.addEventListener(KeyboardEvent.KEY_DOWN, enterSend);
if (_local4 != null){
_local4.enabled = false;
};
}
function frame1(){
this.name_txt.addEventListener(MouseEvent.CLICK, mouseClick);
this.btnMoreGames.addEventListener(MouseEvent.CLICK, onMoreGames);
this.btnMoreGames.useHandCursor = true;
this.btnMoreGames.buttonMode = true;
}
public function sendScoreCallback(_arg1:Object){
var _local2:Ranking;
this.menu.visible = false;
this.removeChild(loadAnimation);
loadAnimation = null;
_local2 = new Ranking(false);
this.addChild(_local2);
}
private function enterSend(_arg1:KeyboardEvent){
if (_arg1.keyCode == Keyboard.ENTER){
actionSend();
};
}
public function onMoreGames(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.notdoppler.com/?ref=kokimi"), "_blank");
}
public function onSendScore(_arg1:Event){
actionSend();
}
private function actionSend(){
var _local1:TextField;
_local1 = (this.getChildByName("name_txt") as TextField);
MochiScores.setBoardID("99e9b7467d47b6ee");
MochiScores.submit(ConsTAndVars.SCORE, _local1.text, this, "sendScoreCallback");
loadAnimation = new LoadingAnimation();
loadAnimation.x = 35;
this.addChild(loadAnimation);
}
}
}//package
Section 132
//NamePopupAnimation (NamePopupAnimation)
package {
import flash.display.*;
public class NamePopupAnimation extends MovieClip {
public function NamePopupAnimation(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package
Section 133
//Open (Open)
package {
import flash.events.*;
import flash.display.*;
public class Open extends MovieClip {
public var bb:MovieClip;
public var skip:MovieClip;
private static var instance:MovieClip;
public function Open(){
addFrameScript(950, frame951);
this.addEventListener(Event.ENTER_FRAME, update);
this.x = (this.width >> 1);
this.y = (this.height >> 1);
instance = this;
this.bb.buttonMode = true;
this.bb.addEventListener(MouseEvent.CLICK, clickMouse);
}
function frame951(){
this.stop();
}
private function remove(){
this.removeEventListener(Event.ENTER_FRAME, update);
this.bb.removeEventListener(MouseEvent.CLICK, clickMouse);
}
private function update(_arg1:Event){
if (this.currentFrame == this.totalFrames){
ScreenControl.getInstance().activeFade(ScreenControl.STATE_HOW_TO_PLAY);
this.remove();
};
}
private function clickMouse(_arg1:MouseEvent){
ScreenControl.getInstance().activeFade(ScreenControl.STATE_HOW_TO_PLAY);
this.stop();
}
public static function getInstance():MovieClip{
return (instance);
}
}
}//package
Section 134
//opening_songTrilha_secundaria (opening_songTrilha_secundaria)
package {
import flash.media.*;
public dynamic class opening_songTrilha_secundaria extends Sound {
}
}//package
Section 135
//passar_de_level (passar_de_level)
package {
import flash.media.*;
public dynamic class passar_de_level extends Sound {
}
}//package
Section 136
//perdendo_bolinha (perdendo_bolinha)
package {
import flash.media.*;
public dynamic class perdendo_bolinha extends Sound {
}
}//package
Section 137
//Player (Player)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Player extends MovieClip {
private var distance:Number;
private var power:Boolean;
private var pauseGame:Boolean;
private var collision:Boolean;
private var cNone:ColorTransform;
private var rayBall:Number;
private var executePowerUp:Boolean;
private var motionIdle:int;// = 1
private var cTrans:ColorTransform;
public var player:MovieClip;
public function Player(){
motionIdle = 1;
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
this.x = 275;
this.y = 200;
rayBall = (this.height >> 1);
this.gotoAndStop(1);
this.addEventListener(MouseEvent.CLICK, executePower);
this.buttonMode = true;
}
public function endPowerup(){
executePowerUp = false;
motionIdle = 1;
this.gotoAndStop(motionIdle);
if (GameControler.getInstance() == null){
HowToPlay.getInstace().nextSceneHtp();
};
}
public function checkCollision(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){
distance = Math.sqrt((((_arg1 - this.x) * (_arg1 - this.x)) + ((_arg2 - this.y) * (_arg2 - this.y))));
if (distance < (rayBall + _arg3)){
trace("COLLLISION!!!");
};
}
public function setAnimatePowerUp(_arg1:int){
if (_arg1 == 0){
this.gotoAndStop(6);
} else {
if (!power){
this.gotoAndStop(6);
motionIdle = 5;
power = true;
};
};
}
public function getPower():Boolean{
return (power);
}
public function pausePlayer(_arg1:Boolean){
this.pauseGame = _arg1;
if (_arg1){
cTrans.color = 0xD0D0D0;
cNone = this.transform.colorTransform;
this.transform.colorTransform = cTrans;
this.player.stop();
} else {
this.transform.colorTransform = cNone;
this.player.play();
};
}
private function executePower(_arg1:MouseEvent){
if ((((((GameControler.getInstance() == null)) && (power))) || (((((power) && (!(pauseGame)))) && (!(GameControler.getInstance().getGameOver())))))){
power = false;
this.gotoAndStop(4);
executePowerUp = true;
SoundsGame.getInstance().playPowerUp();
};
}
public function finalGame(){
executePowerUp = true;
}
public function setMotionIdle(){
this.gotoAndStop(motionIdle);
}
public function update(){
if (executePowerUp){
if (GameControler.getInstance() != null){
GameControler.getInstance().killFunckinEnemies();
} else {
HowToPlay.getInstace().killFunckinEnemies();
};
};
}
public function setMotion(_arg1:int){
this.gotoAndStop(_arg1);
}
public function eatPowerup(){
this.gotoAndStop(motionIdle);
}
public function setCollision(_arg1:Boolean){
this.collision = _arg1;
if (_arg1){
this.gotoAndStop(2);
};
}
}
}//package
Section 138
//power_up (power_up)
package {
import flash.media.*;
public dynamic class power_up extends Sound {
}
}//package
Section 139
//powerdown (powerdown)
package {
import flash.media.*;
public dynamic class powerdown extends Sound {
}
}//package
Section 140
//PowerUps (PowerUps)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class PowerUps extends GameObject {
private const velocity = 1;
private var distance:Number;
private var cTrans:ColorTransform;
private var pauseGame:Boolean;
private var feedBackTime:MovieClip;
private var position:int;
private var cNone:ColorTransform;
private var moveFeedBackTime:Boolean;
private var type:int;
private var hold:Boolean;
private var mouseCircle:Number;
private var rayPowerUp:Number;
public function PowerUps(_arg1:int){
cTrans = new ColorTransform();
cNone = new ColorTransform();
super();
loadPowerUps(_arg1);
this.addChild(object);
object.addEventListener(MouseEvent.MOUSE_DOWN, holdPowerUp);
object.addEventListener(MouseEvent.MOUSE_UP, freePowerUp);
this.type = _arg1;
object.visible = false;
object.x = -90;
object.y = -90;
}
public function checkCollision(_arg1:Number, _arg2:Number, _arg3:Number){
distance = Math.sqrt((((_arg1 - object.x) * (_arg1 - object.x)) + ((_arg2 - object.y) * (_arg2 - object.y))));
if (((((object.visible) && (!(hold)))) && ((distance < (rayPowerUp + _arg3))))){
if (GameControler.getInstance() != null){
GameControler.getInstance().setPowerUp(type);
} else {
HowToPlay.getInstace().setPowerUp(type);
HowToPlay.getInstace().actionPowerUp();
};
if (type == 0){
feedBackTime = new MC_feedbackPowerUp();
feedBackTime.x = 265;
feedBackTime.y = 200;
this.addChild(feedBackTime);
moveFeedBackTime = true;
if ((((GameControler.getInstance() == null)) && ((type == 0)))){
HowToPlay.getInstace().setGoodLock();
};
};
object.visible = false;
SoundsGame.getInstance().playTakePowerUp();
};
}
public function getPowerUpX():Number{
return (object.x);
}
public function updateFeedback(){
if (moveFeedBackTime){
feedBackTime.x = (feedBackTime.x + (Math.sin((225 * (Math.PI / 180))) * 3));
feedBackTime.y = (feedBackTime.y + (Math.cos((225 * (Math.PI / 180))) * -3));
if (feedBackTime.y > 370){
feedBackTime.visible = false;
this.removeChild(feedBackTime);
feedBackTime = null;
moveFeedBackTime = false;
if (ConsTAndVars.NORMAL_GAME){
GameControler.getInstance().setTime();
} else {
HowToPlay.getInstace().timePlus();
HowToPlay.getInstace().nextSceneHtp();
};
};
};
}
public function free(){
object.stopDrag();
hold = false;
}
private function freePowerUp(_arg1:MouseEvent){
free();
}
public function pausePowerUp(_arg1:Boolean){
if (_arg1){
cNone = object.transform.colorTransform;
cTrans.color = 0xD0D0D0;
object.transform.colorTransform = cTrans;
object.stop();
object.stopDrag();
if (feedBackTime != null){
feedBackTime.stop();
};
} else {
object.transform.colorTransform = cNone;
object.play();
if (feedBackTime != null){
feedBackTime.play();
};
if (hold){
object.x = mouseX;
object.y = mouseY;
object.startDrag();
};
};
this.pauseGame = _arg1;
}
private function holdPowerUp(_arg1:MouseEvent){
var _local2:int;
if ((((GameControler.getInstance() == null)) || (((!(GameControler.getInstance().getGameOver())) && (!(this.pauseGame)))))){
if (type == 0){
_local2 = 9;
mouseCircle = Math.sqrt((((mouseX - object.x) * (mouseX - object.x)) + ((mouseY - object.y) * (mouseY - object.y))));
if (((!(pauseGame)) && ((mouseCircle < (13 + 5))))){
object.startDrag();
hold = true;
};
} else {
object.startDrag();
hold = true;
_local2 = 8;
};
if (GameControler.getInstance() != null){
GameControler.getInstance().arrangedPowerUp(type);
GameControler.getInstance().hideBalloonPowerUp(_local2);
} else {
HowToPlay.getInstace().arrangedPowerUp(type);
};
};
}
public function update(){
if (((!(hold)) && (object.visible))){
if ((((position == 0)) || ((position == 1)))){
object.x = (object.x + velocity);
} else {
object.x = (object.x - velocity);
};
};
if ((((GameControler.getInstance() == null)) && (moveFeedBackTime))){
updateFeedback();
};
}
public function showPowerUp(_arg1:int){
this.position = _arg1;
if ((((this.position == 0)) || ((this.position == 2)))){
object.y = 60;
} else {
object.y = 300;
};
if ((((this.position == 0)) || ((this.position == 1)))){
object.x = -80;
} else {
object.x = 630;
};
object.visible = true;
}
private function loadPowerUps(_arg1:int){
switch (_arg1){
case 0:
object = new MC_time();
rayPowerUp = 20;
break;
case 1:
object = new MC_powerUp();
rayPowerUp = 20;
break;
};
object.x = 30;
object.y = 30;
object.buttonMode = true;
}
}
}//package
Section 141
//Ranking (Ranking)
package {
import flash.events.*;
import flash.display.*;
import mochi.*;
import flash.text.*;
public class Ranking extends MovieClip {
public var score1:TextField;
public var score5:TextField;
private var rank:MovieClip;
public var score6:TextField;
private var loadAnimation:LoadingAnimation;
public var menu:MovieClip;
public var player1:TextField;
public var player2:TextField;
public var player6:TextField;
public var player7:TextField;
public var player8:TextField;
public var player5:TextField;
public var player9:TextField;
public var player0:TextField;
public var player3:TextField;
public var container:MovieClip;
public var player4:TextField;
public var jynx:assJynx_;
public var score0:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score9:TextField;
public var score4:TextField;
public function Ranking(_arg1:Boolean=false){
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
if (!_arg1){
this.x = 35;
};
}
private function mouseClick(_arg1:MouseEvent){
ScreenControl.getInstance().setNewScreen(ScreenControl.STATE_FIRST_SCREEN);
ScreenControl.getInstance().changeScreen();
}
public function onLoadRank(_arg1:Object){
var _local2:Object;
var _local3:Array;
var _local4:TextField;
var _local5:TextField;
var _local6:uint;
this.removeChild(loadAnimation);
loadAnimation = null;
if (_arg1.scores != null){
trace("Scores received!");
_local2 = MochiScores.scoresArrayToObjects(_arg1.scores);
_local3 = _local2.alltime;
_local6 = 0;
while ((((_local6 < 10)) && ((_local6 < _local3.length)))) {
_local4 = (this.getChildByName(("player" + _local6)) as TextField);
_local4.text = _local3[_local6].name;
_local5 = (this.getChildByName(("score" + _local6)) as TextField);
_local5.text = _local3[_local6].score;
_local6++;
};
} else {
if (_arg1.error){
trace("Itacaray");
trace(("Error: " + _arg1.errorCode));
};
};
}
public function addedToStage(_arg1:Event){
var _local2:MovieClip;
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
_local2 = (this.getChildByName("container") as MovieClip);
MochiScores.setBoardID("99e9b7467d47b6ee");
MochiScores.requestList(this, "onLoadRank");
loadAnimation = new LoadingAnimation();
this.addChild(loadAnimation);
}
public function removeUpdateFlag(){
}
}
}//package
Section 142
//ScreenControl (ScreenControl)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class ScreenControl extends MovieClip {
private var sponsor:MovieClip;
private var INDEX_ZERO:int;// = 0
private var gControler:MovieClip;
private var INDEX_TWO;// = 2
private var stateGame:int;
private var INDEX_ONE;// = 1
private var whiteBackGround:MovieClip;
private var fadeOut:MovieClip;
private var menu:MovieClip;
private var jynx:MovieClip;
private var fade:Boolean;
public static const STATE_GAME = 3;
public static const STATE_FINAL_SCREEN = 5;
public static const STATE_RANKING = 7;
public static const STATE_FIRST_SCREEN = 0;
public static const STATE_GAME_OVER = 4;
public static const STATE_OPEN = 2;
public static const STATE_HOW_TO_PLAY = 1;
public static const STATE_NAME_POPUP = 6;
public static var LOADED:Boolean = false;
private static var instance:ScreenControl;
public function ScreenControl(){
INDEX_ZERO = 0;
INDEX_ONE = 1;
INDEX_TWO = 2;
super();
this.addEventListener(Event.ADDED_TO_STAGE, SplashSponsor);
}
private function clickJynx(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.jynx.com.br"), "_blank");
}
private function updateSplashJynx(_arg1:Event){
if (jynx.currentFrame == jynx.totalFrames){
initVariables();
};
}
public function showMenu(){
this.setChildIndex(menu, INDEX_TWO);
menu.showMenu();
}
public function changeScreen(){
if (gControler != null){
if (gControler == GameControler.getInstance()){
this.removeEventListener(Event.ENTER_FRAME, gControler.update);
GameControler.getInstance().removeInstance();
};
this.removeChild(gControler);
gControler = null;
};
switch (stateGame){
case STATE_FIRST_SCREEN:
gControler = new FirstScreen();
SoundsGame.getInstance().playScenery("menu");
SoundsGame.getInstance().stopGameOver();
break;
case STATE_HOW_TO_PLAY:
gControler = new HowToPlay(false);
break;
case STATE_OPEN:
gControler = new Open();
break;
case STATE_GAME:
gControler = new GameControler();
this.addEventListener(Event.ENTER_FRAME, gControler.update);
break;
case STATE_GAME_OVER:
SoundsGame.getInstance().playScenery("inicio");
SoundsGame.getInstance().playGameOver();
gControler = new GameOver();
break;
case STATE_FINAL_SCREEN:
SoundsGame.getInstance().playScenery("win game");
gControler = new FinalScreen();
break;
case STATE_NAME_POPUP:
gControler = new NamePopup();
break;
case STATE_RANKING:
gControler = new Ranking(true);
break;
};
if (fade){
this.addChildAt(gControler, INDEX_ONE);
} else {
this.addChild(gControler);
};
}
public function backToMenu(){
menu.backToMenu();
}
public function arrangedBackFade(){
this.setChildIndex(menu, INDEX_ZERO);
this.setChildIndex(fadeOut, INDEX_ONE);
this.setChildIndex(gControler, INDEX_TWO);
fade = false;
}
private function initVariables(){
jynx.removeEventListener(Event.ENTER_FRAME, updateSplashJynx);
this.removeChild(jynx);
jynx = null;
stateGame = STATE_FIRST_SCREEN;
fadeOut = new FadeOut();
this.addChild(fadeOut);
fadeOut.stop();
menu = new Menu();
this.addChild(menu);
menu.stop();
changeScreen();
instance = this;
}
private function updateSplashSponsor(_arg1:Event){
if (sponsor.currentFrame == sponsor.totalFrames){
sponsor.removeEventListener(Event.ENTER_FRAME, updateSplashSponsor);
sponsor.stop();
this.removeChild(sponsor);
SplashJynx(_arg1);
};
}
public function getScreen():MovieClip{
return (gControler);
}
private function SplashJynx(_arg1:Event){
jynx = new Splash_Jynx();
jynx.x = (275 - (jynx.width >> 1));
jynx.y = (200 - (jynx.height >> 1));
this.addChild(jynx);
jynx.addEventListener(MouseEvent.CLICK, clickJynx);
jynx.buttonMode = true;
jynx.addEventListener(Event.ENTER_FRAME, updateSplashJynx);
}
private function clickSponsor(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.notdoppler.com/?ref=kokimi"), "_blank");
}
public function activeFade(_arg1:int){
var _local2:int;
fade = true;
this.stateGame = _arg1;
this.setChildIndex(fadeOut, INDEX_TWO);
if (gControler == GameControler.getInstance()){
_local2 = INDEX_ZERO;
} else {
if ((((gControler == Open.getInstance())) || ((gControler == HowToPlay.getInstace())))){
_local2 = INDEX_ZERO;
} else {
_local2 = INDEX_ONE;
};
};
this.setChildIndex(menu, _local2);
trace("playing fade out");
fadeOut.gotoAndPlay(2);
}
public function hideMenu(){
menu.hideMenu();
}
private function SplashSponsor(_arg1:Event){
sponsor = new Splash_Sponsor();
sponsor.x = 0;
sponsor.y = 0;
this.addChild(sponsor);
sponsor.addEventListener(MouseEvent.CLICK, clickSponsor);
sponsor.addEventListener(Event.ENTER_FRAME, updateSplashSponsor);
}
public function getState():int{
return (stateGame);
}
public function setNewScreen(_arg1:int){
this.stateGame = _arg1;
}
public static function getInstance():ScreenControl{
return (instance);
}
}
}//package
Section 143
//Senario (Senario)
package {
import flash.display.*;
public dynamic class Senario extends MovieClip {
}
}//package
Section 144
//Slots (Slots)
package {
public class Slots extends GameObject {
private var distance:Number;
private var fillSlot:Boolean;
private var rayBall:Number;
private var typeSlot:int;
private var ballNumber:int;// = -1
public function Slots(_arg1:int){
ballNumber = -1;
super();
loadSlots(_arg1);
rayBall = (object.height >> 1);
}
public function checkCollision(_arg1:Number, _arg2:Number, _arg3:Number){
distance = Math.sqrt((((_arg1 - object.x) * (_arg1 - object.x)) + ((_arg2 - object.y) * (_arg2 - object.y))));
if (distance < (rayBall + _arg3)){
};
}
public function disappearSlots(){
object.visible = false;
}
public function getFillSlot():Boolean{
return (fillSlot);
}
public function getSlotBall():int{
return (ballNumber);
}
public function setFillSlot(_arg1:Boolean, _arg2:int){
this.ballNumber = _arg2;
this.fillSlot = _arg1;
}
public function loadSlots(_arg1:int){
object = new MC_Slot();
switch (_arg1){
case 0:
object.x = 227;
object.y = 200;
break;
case 1:
object.x = 241;
object.y = 166;
break;
case 2:
object.x = 275;
object.y = 152;
break;
case 3:
object.x = 310;
object.y = 166;
break;
case 4:
object.x = 323;
object.y = 200;
break;
case 5:
object.x = 309;
object.y = 235;
break;
case 6:
object.x = 275;
object.y = 248;
break;
case 7:
object.x = 241;
object.y = 233;
break;
};
typeSlot = _arg1;
this.addChild(object);
}
}
}//package
Section 145
//solta_poder_grito (solta_poder_grito)
package {
import flash.media.*;
public dynamic class solta_poder_grito extends Sound {
}
}//package
Section 146
//SoundsGame (SoundsGame)
package {
import flash.media.*;
public class SoundsGame {
private var powerUp:Sound;
private var channel:SoundChannel;// = null
private var stage:Sound;
private var slot:Sound;
private var convertEnemy:Sound;
private var atackBall:Sound;
private var vazio:Sound;
private var slotChannel:SoundChannel;
private var loseGame:Sound;
private var convertEnemyChannel:SoundChannel;
private var loseBallChannel:SoundChannel;
private var loseBall:Sound;
private var atackBallChannel:SoundChannel;
private var powerDownChannel:SoundChannel;
private var gameOverChannel:SoundChannel;
private var levelUp:Sound;
private var levelUpChannel:SoundChannel;
private var powerDown:Sound;
private var takePowerUpChannel:SoundChannel;
private var menu:Sound;
private var gameOver:Sound;
private var powerUpChannel:SoundChannel;
private var transform:SoundTransform;
private var winGame:Sound;
private var takePowerUp:Sound;
public static var instance:SoundsGame;
public function SoundsGame(){
takePowerUp = new power_up();
loseBall = new perdendo_bolinha();
convertEnemy = new monstro_atacando_bolinha();
powerUp = new solta_poder_grito();
powerDown = new powerdown();
slot = new encaixar_kokimi();
gameOver = new game_over();
atackBall = new convertendo_inimigo();
levelUp = new level_up();
stage = new kokimi_trilha();
menu = new opening_songTrilha_secundaria();
winGame = new victory_final();
vazio = new Sound();
channel = null;
transform = new SoundTransform();
super();
instance = this;
}
public function playHold(){
}
public function playLoseBall(){
loseBallChannel = loseBall.play();
loseBallChannel.soundTransform = transform;
}
public function stopGameOver(){
if (gameOverChannel != null){
gameOverChannel.stop();
};
}
public function playTakePowerUp(){
takePowerUpChannel = takePowerUp.play();
takePowerUpChannel.soundTransform = transform;
}
public function stopSound(){
channel.stop();
channel = null;
}
public function playGameOver(){
gameOverChannel = gameOver.play();
gameOverChannel.soundTransform = transform;
}
public function playPowerUp(){
powerUpChannel = powerUp.play();
powerUpChannel.soundTransform = transform;
}
public function playAtackBall(){
atackBallChannel = atackBall.play();
atackBallChannel.soundTransform = transform;
}
public function setSounds(_arg1:Boolean){
transform = channel.soundTransform;
if (_arg1){
transform.volume = 0;
channel.soundTransform = transform;
} else {
transform.volume = 1;
channel.soundTransform = transform;
};
}
public function playSlot(){
slotChannel = slot.play();
slotChannel.soundTransform = transform;
}
public function playConvertEnemy(){
convertEnemyChannel = convertEnemy.play();
convertEnemyChannel.soundTransform = transform;
}
public function playLevelUp(){
levelUpChannel = levelUp.play();
levelUpChannel.soundTransform = transform;
}
public function playPowerDown(){
powerDownChannel = powerDown.play();
powerDownChannel.soundTransform = transform;
}
public function playScenery(_arg1:String){
if (channel != null){
channel.stop();
};
channel = null;
switch (_arg1){
case "stage":
channel = this.stage.play(0, 30, null);
break;
case "menu":
channel = menu.play(0, 30, null);
break;
case "win game":
channel = winGame.play(0, 30, null);
break;
case "win level":
break;
case "lose game":
break;
case "inicio":
channel = null;
break;
};
if (channel != null){
channel.soundTransform = transform;
};
}
public static function getInstance():SoundsGame{
if (instance == null){
instance = new (SoundsGame);
};
return (instance);
}
}
}//package
Section 147
//Splash_Jynx (Splash_Jynx)
package {
import flash.display.*;
public dynamic class Splash_Jynx extends MovieClip {
public function Splash_Jynx(){
addFrameScript(119, frame120);
}
function frame120(){
stop();
}
}
}//package
Section 148
//Splash_Sponsor (Splash_Sponsor)
package {
import flash.display.*;
public dynamic class Splash_Sponsor extends MovieClip {
public function Splash_Sponsor(){
addFrameScript(185, frame186);
}
function frame186(){
}
}
}//package
Section 149
//victory_final (victory_final)
package {
import flash.media.*;
public dynamic class victory_final extends Sound {
}
}//package