Section 1
//bramanAnimationDuckDown_14 (LICD_fla.bramanAnimationDuckDown_14)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationDuckDown_14 extends MovieClip {
public function bramanAnimationDuckDown_14(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package LICD_fla
Section 2
//bramanAnimationDuckUp_15 (LICD_fla.bramanAnimationDuckUp_15)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationDuckUp_15 extends MovieClip {
public function bramanAnimationDuckUp_15(){
addFrameScript(14, frame15);
}
function frame15(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 3
//bramanAnimationJumpLand_13 (LICD_fla.bramanAnimationJumpLand_13)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationJumpLand_13 extends MovieClip {
public function bramanAnimationJumpLand_13(){
addFrameScript(5, frame6);
}
function frame6(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 4
//bramanAnimationJumpUp_10 (LICD_fla.bramanAnimationJumpUp_10)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationJumpUp_10 extends MovieClip {
public function bramanAnimationJumpUp_10(){
addFrameScript(18, frame19);
}
function frame19(){
if (root != null){
(Character(parent.parent).currentState == "air");
};
}
}
}//package LICD_fla
Section 5
//bramanAnimationRun_8 (LICD_fla.bramanAnimationRun_8)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationRun_8 extends MovieClip {
public function bramanAnimationRun_8(){
addFrameScript(0, frame1);
}
function frame1(){
if (root != null){
Game(root).theRunAnimation = this;
};
}
}
}//package LICD_fla
Section 6
//bramanAnimationRunStart_7 (LICD_fla.bramanAnimationRunStart_7)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationRunStart_7 extends MovieClip {
public function bramanAnimationRunStart_7(){
addFrameScript(17, frame18);
}
function frame18(){
if (root != null){
Character(parent.parent).currentState = "run";
};
}
}
}//package LICD_fla
Section 7
//bramanAnimationRunStop_9 (LICD_fla.bramanAnimationRunStop_9)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationRunStop_9 extends MovieClip {
public function bramanAnimationRunStop_9(){
addFrameScript(11, frame12);
}
function frame12(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 8
//bramanAnimationThrowDuck_17 (LICD_fla.bramanAnimationThrowDuck_17)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationThrowDuck_17 extends MovieClip {
public function bramanAnimationThrowDuck_17(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package LICD_fla
Section 9
//bramanAnimationThrowIdle_18 (LICD_fla.bramanAnimationThrowIdle_18)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationThrowIdle_18 extends MovieClip {
public function bramanAnimationThrowIdle_18(){
addFrameScript(7, frame8);
}
function frame8(){
if (root != null){
(Character(parent.parent).currentState == "idle");
};
}
}
}//package LICD_fla
Section 10
//bramanAnimationThrowJump_19 (LICD_fla.bramanAnimationThrowJump_19)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationThrowJump_19 extends MovieClip {
public function bramanAnimationThrowJump_19(){
addFrameScript(6, frame7);
}
function frame7(){
if (root != null){
Character(parent.parent).currentState = "air";
};
}
}
}//package LICD_fla
Section 11
//bramanAnimationThrowRun_20 (LICD_fla.bramanAnimationThrowRun_20)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class bramanAnimationThrowRun_20 extends MovieClip {
public function bramanAnimationThrowRun_20(){
addFrameScript(0, frame1, 13, frame14);
}
function frame14(){
if (root != null){
(Character(parent.parent).currentState == "run");
};
}
function frame1(){
if (root != null){
Game(root).theRunAnimation = this;
};
}
}
}//package LICD_fla
Section 12
//girlCute_74 (LICD_fla.girlCute_74)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class girlCute_74 extends MovieClip {
public function girlCute_74(){
addFrameScript(179, frame180);
}
function frame180(){
if (Game(root).finishUp){
stop();
};
}
}
}//package LICD_fla
Section 13
//girlHot_73 (LICD_fla.girlHot_73)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class girlHot_73 extends MovieClip {
public function girlHot_73(){
addFrameScript(179, frame180);
}
function frame180(){
if (Game(root).finishUp){
stop();
};
}
}
}//package LICD_fla
Section 14
//girlUgly_75 (LICD_fla.girlUgly_75)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class girlUgly_75 extends MovieClip {
public function girlUgly_75(){
addFrameScript(89, frame90);
}
function frame90(){
if (Game(root).finishUp){
stop();
};
}
}
}//package LICD_fla
Section 15
//goombaAnimationStomped_54 (LICD_fla.goombaAnimationStomped_54)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class goombaAnimationStomped_54 extends MovieClip {
public function goombaAnimationStomped_54(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package LICD_fla
Section 16
//goombaAnimator_51 (LICD_fla.goombaAnimator_51)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class goombaAnimator_51 extends MovieClip {
public var animation:MovieClip;
public function goombaAnimator_51(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package LICD_fla
Section 17
//ladyAnimationDuckDown_30 (LICD_fla.ladyAnimationDuckDown_30)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationDuckDown_30 extends MovieClip {
public function ladyAnimationDuckDown_30(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package LICD_fla
Section 18
//ladyAnimationDuckUp_31 (LICD_fla.ladyAnimationDuckUp_31)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationDuckUp_31 extends MovieClip {
public function ladyAnimationDuckUp_31(){
addFrameScript(14, frame15);
}
function frame15(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 19
//ladyAnimationJumpLand_29 (LICD_fla.ladyAnimationJumpLand_29)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationJumpLand_29 extends MovieClip {
public function ladyAnimationJumpLand_29(){
addFrameScript(5, frame6);
}
function frame6(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 20
//ladyAnimationJumpUp_26 (LICD_fla.ladyAnimationJumpUp_26)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationJumpUp_26 extends MovieClip {
public function ladyAnimationJumpUp_26(){
addFrameScript(18, frame19);
}
function frame19(){
if (root != null){
(Character(parent.parent).currentState == "air");
};
}
}
}//package LICD_fla
Section 21
//ladyAnimationRun_24 (LICD_fla.ladyAnimationRun_24)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationRun_24 extends MovieClip {
public function ladyAnimationRun_24(){
addFrameScript(0, frame1);
}
function frame1(){
if (root != null){
Game(root).theRunAnimation = this;
};
}
}
}//package LICD_fla
Section 22
//ladyAnimationRunStart_23 (LICD_fla.ladyAnimationRunStart_23)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationRunStart_23 extends MovieClip {
public function ladyAnimationRunStart_23(){
addFrameScript(17, frame18);
}
function frame18(){
if (root != null){
Character(parent.parent).currentState = "run";
};
}
}
}//package LICD_fla
Section 23
//ladyAnimationRunStop_25 (LICD_fla.ladyAnimationRunStop_25)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ladyAnimationRunStop_25 extends MovieClip {
public function ladyAnimationRunStop_25(){
addFrameScript(11, frame12);
}
function frame12(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 24
//rayneAnimationDuckDown_40 (LICD_fla.rayneAnimationDuckDown_40)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationDuckDown_40 extends MovieClip {
public function rayneAnimationDuckDown_40(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package LICD_fla
Section 25
//rayneAnimationDuckUp_41 (LICD_fla.rayneAnimationDuckUp_41)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationDuckUp_41 extends MovieClip {
public function rayneAnimationDuckUp_41(){
addFrameScript(14, frame15);
}
function frame15(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 26
//rayneAnimationJumpLand_39 (LICD_fla.rayneAnimationJumpLand_39)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationJumpLand_39 extends MovieClip {
public function rayneAnimationJumpLand_39(){
addFrameScript(5, frame6);
}
function frame6(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 27
//rayneAnimationJumpUp_36 (LICD_fla.rayneAnimationJumpUp_36)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationJumpUp_36 extends MovieClip {
public function rayneAnimationJumpUp_36(){
addFrameScript(18, frame19);
}
function frame19(){
if (root != null){
(Character(parent.parent).currentState == "air");
};
}
}
}//package LICD_fla
Section 28
//rayneAnimationRun_3 (LICD_fla.rayneAnimationRun_3)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationRun_3 extends MovieClip {
public function rayneAnimationRun_3(){
addFrameScript(0, frame1);
}
function frame1(){
if (root != null){
Game(root).theRunAnimation = this;
};
}
}
}//package LICD_fla
Section 29
//rayneAnimationRunStart_34 (LICD_fla.rayneAnimationRunStart_34)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationRunStart_34 extends MovieClip {
public function rayneAnimationRunStart_34(){
addFrameScript(17, frame18);
}
function frame18(){
if (root != null){
Character(parent.parent).currentState = "run";
};
}
}
}//package LICD_fla
Section 30
//rayneAnimationRunStop_35 (LICD_fla.rayneAnimationRunStop_35)
package LICD_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class rayneAnimationRunStop_35 extends MovieClip {
public function rayneAnimationRunStop_35(){
addFrameScript(11, frame12);
}
function frame12(){
if (root != null){
Character(parent.parent).currentState = "idle";
};
stop();
}
}
}//package LICD_fla
Section 31
//Biggie (Biggie)
package {
public dynamic class Biggie extends Powerup {
}
}//package
Section 32
//Block (Block)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class Block extends Obj {
private var moveTimer:Timer;
private var amount:int;// = 10
public var theBox:Sprite;
public var gone:Boolean;// = false
public var used:Boolean;// = false
private var pauseCount:int;// = 0
private var spawnedPower:Powerup;
public function Block():void{
var _local1:Number;
used = false;
amount = 10;
pauseCount = 0;
gone = false;
super();
stop();
Game(root).theBlocks.push(this);
_local1 = 0;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) is HitBoxStatic)){
theBox = Sprite(getChildAt(_local1));
return;
};
_local1++;
};
}
public function destroy():void{
tap();
this.gotoAndPlay("destroyed");
gone = true;
Game(root).removeHitbox(theBox);
Game(root).soundChan2 = new soundBreak().play();
}
public function reset():void{
gone = false;
used = false;
amount = 10;
gotoAndStop(1);
Game(root).addHitbox(theBox);
}
public function spawn(_arg1:Powerup):void{
tap();
if (((!(used)) && ((this.currentFrame == 1)))){
Game(root).soundChan1 = new soundPopup().play();
spawnedPower = _arg1;
Game(root).addChild(spawnedPower);
spawnedPower.x = this.x;
spawnedPower.y = (this.y - 5);
amount = 10;
moveTimer = new Timer(50, 25);
moveTimer.start();
moveTimer.addEventListener(TimerEvent.TIMER, spawnStep, false, 0, true);
moveTimer.addEventListener(TimerEvent.TIMER_COMPLETE, spawnFinish, false, 0, true);
};
used = true;
}
public function tap():void{
var _local1:Coin;
if (((!(used)) && ((this.currentFrame == 1)))){
this.gotoAndPlay("tapped");
Game(root).interactions.push(theBox);
Game(root).interactionDirection.push(new Point(0, -5));
Game(root).soundChan2 = new soundBlock().play();
if ((((((this is CoinBlock)) || ((this is OneCoinBlock)))) && ((amount > 0)))){
_local1 = new Coin();
Game(root).addChild(_local1);
_local1.x = this.x;
_local1.y = (this.y - 30);
Game(root).soundChan1 = new soundCoin().play();
Game(root).addPoints(200, (this.x + (this.width / 2)), this.y);
_local1.collect();
amount--;
if ((((amount == 0)) || ((this is OneCoinBlock)))){
used = true;
};
};
};
}
private function spawnStep(_arg1:TimerEvent){
if (!spawnedPower.used){
spawnedPower.y = (spawnedPower.y - 1);
amount--;
if (amount == 0){
spawnedPower.ready = true;
Game(root).fixSpecialBoxes.push(spawnedPower.theBox);
};
} else {
spawnedPower = null;
moveTimer.removeEventListener(TimerEvent.TIMER, spawnStep);
moveTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, spawnFinish);
};
}
private function spawnFinish(_arg1:TimerEvent){
if (!spawnedPower.used){
spawnedPower.y = (spawnedPower.y - 1);
spawnedPower.wakeUp();
};
spawnedPower = null;
moveTimer.removeEventListener(TimerEvent.TIMER, spawnStep);
moveTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, spawnFinish);
}
}
}//package
Section 33
//Bottle (Bottle)
package {
public dynamic class Bottle extends Powerup {
}
}//package
Section 34
//Character (Character)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class Character extends Obj {
public var widthInit:Number;
public var anim:MovieClip;
private var startX:Number;
private var startY:Number;
public var onGround:Boolean;// = false
public var duckBox:HitBox;
private var turtleSpeed:Number;// = -3
public var flip:Number;
public var isEnemy:Boolean;// = true
public var turn:Boolean;
public var currentState:String;// = "idle"
public var isDead:Boolean;// = false
private var oldState:String;// = "idle"
public var heightInit:Number;
public var isInvincible:Boolean;// = false
private var PCFlip:Number;
public var isUntouchable:Boolean;// = false
public var baseBox:HitBox;
private var changeCount:Number;
private var plantCount:int;// = 0
public var isBraman:Boolean;// = false
private var changeTimer:Timer;
public var isBig:Boolean;// = false
private var PCVersion:MovieClip;
public var theBox:Sprite;
private var goombaSpeed:Number;// = -3
public var activated:Boolean;// = false
public var Headbox:SpecialBox;
public function Character():void{
var _local1:Number;
isDead = false;
isEnemy = true;
onGround = false;
isBig = false;
isBraman = false;
isUntouchable = false;
isInvincible = false;
activated = false;
goombaSpeed = -3;
turtleSpeed = -3;
plantCount = 0;
currentState = "idle";
oldState = "idle";
super();
if ((this is MainPC)){
isEnemy = false;
this.height = (this.height / 2);
} else {
xBounce = true;
startX = this.x;
startY = this.y;
Game(root).theEnemies.push(this);
};
widthInit = this.width;
heightInit = this.height;
if (this.anim != null){
flip = this.anim.scaleX;
} else {
flip = scaleX;
};
_local1 = 0;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) is SpecialBox)){
theBox = Sprite(getChildAt(_local1));
return;
};
_local1++;
};
}
public function shrink(){
Game(root).isFrozen = true;
Game(root).soundChan1 = new soundPowerDown().play();
PCFlip = this.anim.scaleX;
changeTimer = new Timer(50, 10);
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, shrinkStep, false, 0, true);
changeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, shrinkFinish, false, 0, true);
}
public function grow(){
if (((!(isBig)) || (isBraman))){
Game(root).isFrozen = true;
PCFlip = this.anim.scaleX;
changeTimer = new Timer(50, 10);
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, growStep, false, 0, true);
changeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, growFinish, false, 0, true);
};
}
private function goombaAction(){
if (turn){
goombaSpeed = (goombaSpeed * -1);
flip = (flip * -1);
turn = false;
};
Obj(this).xSpeed = goombaSpeed;
Game(root).fixSpecialBoxes.push(theBox);
}
public function invincible(){
Game(root).isFrozen = true;
PCVersion = new this.anim.constructor();
PCFlip = this.anim.scaleX;
changeTimer = new Timer(50, 10);
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, invincStep, false, 0, true);
changeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, invincFinish, false, 0, true);
}
private function turtleAirAction(){
if (this.y < this.height){
Obj(this).ySpeed = 2;
};
if (this.y > Game(root).stage.stageHeight){
Obj(this).ySpeed = -2;
};
Obj(this).ySpeed = (Obj(this).ySpeed - Game(root).gravity);
}
public function stomp(){
Obj(this).xBounce = true;
Obj(this).yBounce = false;
if (this.currentState != "stomped"){
this.currentState = "stomped";
Obj(this).xSpeed = 0;
Game(root).addPoints(100, this.x, ((this.y - this.height) - 10));
if ((((((this is Turtle1)) || ((this is Turtle2)))) || ((this is Turtle3)))){
Game(root).soundChan2 = new soundStompTurtle().play();
} else {
Game(root).soundChan2 = new soundStomp().play();
};
} else {
if ((((((this is Turtle1)) || ((this is Turtle2)))) || ((this is Turtle3)))){
if (Obj(this).xSpeed != 0){
Obj(this).xSpeed = 0;
Game(root).soundChan2 = new soundStomp().play();
} else {
if (Game(root).thePC.x < this.x){
Obj(this).xSpeed = Game(root).maxSpeed;
Game(root).soundChan2 = new soundShell().play();
} else {
if (Game(root).thePC.x > this.x){
Obj(this).xSpeed = -(Game(root).maxSpeed);
Game(root).soundChan2 = new soundShell().play();
};
};
};
};
};
}
private function turtleAirBounceAction(){
if (turn){
turtleSpeed = (turtleSpeed * -1);
flip = (flip * -1);
this.scaleX = flip;
turn = false;
};
Obj(this).xSpeed = turtleSpeed;
Game(root).fixSpecialBoxes.push(theBox);
if (this.y < this.height){
Obj(this).ySpeed = 2;
};
if (this.y > Game(root).stage.stageHeight){
Obj(this).ySpeed = -2;
};
Obj(this).ySpeed = (Obj(this).ySpeed - Game(root).gravity);
}
private function shrinkStep(_arg1:TimerEvent){
this.height = (this.height - ((Math.random() * heightInit) / 5));
if (this.visible){
this.visible = false;
} else {
this.visible = true;
};
if (isBraman){
this.removeChild(this.anim);
if ((this.anim is PCAnimMain)){
this.anim = new PCAnimBraman();
} else {
this.anim = new PCAnimMain();
};
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
}
public function die(){
isDead = true;
Obj(this).ySpeed = -12;
Obj(this).xSpeed = 0;
if (this.isEnemy){
Game(root).fixSpecialBoxes.push(theBox);
if (((!((this.currentState == "stomped"))) && ((this.y < (Game(root).stage.stageHeight + 10))))){
this.currentState = "dead";
Game(root).addPoints(150, this.x, ((this.y - this.height) - 10));
};
if (this.y < (Game(root).stage.stageHeight + 20)){
Game(root).soundChan2 = new soundShell().play();
};
} else {
this.currentState = "dead";
};
}
private function growFinish(_arg1:TimerEvent){
isBig = true;
this.height = (heightInit * 2);
if (((isBraman) && (!((this.anim is PCAnimBraman))))){
this.removeChild(this.anim);
this.anim = null;
this.anim = new PCAnimBraman();
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
Obj(this).verticeArray = Obj(this).bigVerts;
changeTimer.removeEventListener(TimerEvent.TIMER, growStep);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, growFinish);
Game(root).isFrozen = false;
}
private function plantAction(){
if (currentState == "idle"){
plantCount++;
if ((((Game(root).thePC.x >= (this.x - 40))) && ((Game(root).thePC.x <= (this.x + 40))))){
plantCount = 0;
};
if (plantCount == 60){
Game(root).soundChan2 = new soundChomp().play();
currentState = "up";
plantCount = 0;
};
} else {
Game(root).fixSpecialBoxes.push(theBox);
};
}
private function invincStep(_arg1:TimerEvent){
this.removeChild(this.anim);
if ((this.anim is PCVersion.constructor)){
this.anim = null;
this.anim = new PCAnimInvinc();
} else {
this.anim = null;
this.anim = new PCVersion.constructor();
};
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
}
private function checkGround():Boolean{
return (((Game(root).globalHitBox.hitTestPoint((this.x - (widthInit / 4)), (this.y + 6), true)) || (Game(root).globalHitBox.hitTestPoint((this.x + (widthInit / 4)), (this.y + 6), true))));
}
public function resetVariables(){
activated = false;
isDead = false;
currentState = "idle";
isBig = false;
isBraman = false;
isUntouchable = false;
isInvincible = false;
this.xSpeed = 0;
this.ySpeed = 0;
this.flip = Math.abs(flip);
if (this.anim != null){
this.anim.scaleX = flip;
} else {
this.scaleX = flip;
};
this.x = startX;
this.y = startY;
goombaSpeed = -3;
turtleSpeed = -3;
plantCount = 0;
}
private function invincFinish(_arg1:TimerEvent){
this.isInvincible = true;
if (!(this.anim is PCAnimInvinc)){
this.removeChild(this.anim);
this.anim = new PCAnimInvinc();
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
Game(root).musicPause();
Game(root).musicChan = new soundLady().play();
changeTimer.removeEventListener(TimerEvent.TIMER, invincStep);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, invincFinish);
Game(root).isFrozen = false;
Game(root).maxSpeed = (Game(root).maxSpeed * 1.2);
changeCount = 0;
changeTimer = new Timer(100, 100);
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, invincFlash, false, 0, true);
changeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, invincOff, false, 0, true);
}
private function untouchableFinish(_arg1:TimerEvent){
this.alpha = 1;
isUntouchable = false;
changeTimer.removeEventListener(TimerEvent.TIMER, untouchableStep);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, untouchableFinish);
}
private function growStep(_arg1:TimerEvent){
if (!isBig){
this.height = (this.height + ((Math.random() * heightInit) / 5));
};
if (isBraman){
this.removeChild(this.anim);
if ((this.anim is PCAnimMain)){
this.anim = null;
this.anim = new PCAnimBraman();
} else {
this.anim = null;
this.anim = new PCAnimMain();
};
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
}
public function addCharEvents(){
addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true);
}
private function untouchableStep(_arg1:TimerEvent){
if (this.alpha != 0.75){
this.alpha = 0.75;
} else {
this.alpha = 0.25;
};
}
private function invincFlash(_arg1:TimerEvent){
var _local2:int;
if (isInvincible){
changeCount++;
if (changeCount > 70){
PCFlip = this.anim.scaleX;
if (this.anim.getChildAt(0) != null){
_local2 = MovieClip(this.anim.getChildAt(0)).currentFrame;
} else {
if (Game(root).theRunAnimation != null){
_local2 = Game(root).theRunAnimation.currentFrame;
} else {
_local2 = 1;
};
};
this.removeChild(this.anim);
if ((this.anim is PCVersion.constructor)){
this.anim = null;
this.anim = new PCAnimInvinc();
} else {
this.anim = null;
this.anim = new PCVersion.constructor();
};
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
if (this.anim.getChildAt(0) != null){
MovieClip(this.anim.getChildAt(0)).gotoAndStop((_local2 + 1));
} else {
if (Game(root).theRunAnimation != null){
Game(root).theRunAnimation.gotoAndStop((_local2 + 1));
};
};
};
} else {
Game(root).maxSpeed = (Game(root).maxSpeed / 1.2);
changeTimer.removeEventListener(TimerEvent.TIMER, invincFlash);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, invincOff);
};
}
public function removeCharEvents(){
removeEventListener(Event.ENTER_FRAME, mainLoop);
}
private function invincOff(_arg1:TimerEvent){
isInvincible = false;
changeTimer.removeEventListener(TimerEvent.TIMER, invincFlash);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, invincOff);
if (!this.isDead){
Game(root).musicStart(true);
PCFlip = this.anim.scaleX;
this.removeChild(this.anim);
this.anim = new PCVersion.constructor();
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
Game(root).maxSpeed = (Game(root).maxSpeed / 1.2);
}
private function turtleGroundAction(){
var _local1:Boolean;
var _local2:Boolean;
_local1 = !(Game(root).globalHitBox.hitTestPoint(((this.x + ((this.width * Game(root).posNeg(turtleSpeed)) / 2)) + turtleSpeed), (this.y + 4), true));
_local2 = Game(root).globalHitBox.hitTestPoint(((this.x - ((this.width * Game(root).posNeg(turtleSpeed)) / 2)) + turtleSpeed), (this.y + 4), true);
if (((turn) || (((_local1) && (_local2))))){
turtleSpeed = (turtleSpeed * -1);
flip = (flip * -1);
this.scaleX = flip;
};
turn = false;
Obj(this).xSpeed = turtleSpeed;
Game(root).fixSpecialBoxes.push(theBox);
}
private function shrinkFinish(_arg1:TimerEvent){
this.visible = true;
isBraman = false;
isBig = false;
isUntouchable = true;
this.height = heightInit;
if ((this.anim is PCAnimBraman)){
this.removeChild(this.anim);
this.anim = new PCAnimMain();
this.addChild(this.anim);
this.anim.scaleX = PCFlip;
this.anim.gotoAndStop(currentState);
};
Obj(this).verticeArray = Obj(this).oneVert;
changeTimer.removeEventListener(TimerEvent.TIMER, shrinkStep);
changeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, shrinkFinish);
Game(root).isFrozen = false;
changeTimer = new Timer(100, 20);
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, untouchableStep, false, 0, true);
changeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, untouchableFinish, false, 0, true);
}
private function mainLoop(_arg1:Event):void{
if (((!(Game(root).isFrozen)) && (Game(root).initialized))){
if (oldState != currentState){
if (this.anim != null){
this.anim.gotoAndStop(currentState);
} else {
this.gotoAndPlay(currentState);
};
if ((((oldState == "run")) && ((this is MainPC)))){
Game(root).theRunAnimation = null;
};
oldState = currentState;
};
if (((!(isDead)) && (!((currentState == "stomped"))))){
if (isEnemy){
if (((((((!(activated)) && ((this.x > (-(root.x) - 50))))) && (((Math.round(((this.x - Game(root).theStartX) / 375)) * 375) <= ((Math.round((-(Game(root).x) / 375)) * 375) + 375))))) && (((Math.round(((this.x - Game(root).theStartX) / 375)) * 375) >= ((Math.round((-(Game(root).x) / 375)) * 375) - 375))))){
activated = true;
if ((this is Turtle2)){
Obj(this).ySpeed = 2;
Obj(this).yBounce = true;
} else {
if ((this is Turtle3)){
Obj(this).ySpeed = 2;
Obj(this).xSpeed = turtleSpeed;
Obj(this).yBounce = true;
};
};
} else {
if (((activated) && ((((this.x < (-(root.x) - 350))) || ((this.x > ((-(root.x) + 750) + 350))))))){
activated = false;
Obj(this).xSpeed = 0;
};
};
if (activated){
if ((this is Goomba)){
goombaAction();
} else {
if ((this is Turtle1)){
turtleGroundAction();
} else {
if ((this is Turtle2)){
turtleAirAction();
} else {
if ((this is Turtle3)){
turtleAirBounceAction();
} else {
if ((this is Plant)){
plantAction();
};
};
};
};
};
} else {
if ((((this is Turtle2)) || ((this is Turtle3)))){
Obj(this).ySpeed = -(Game(root).gravity);
};
};
} else {
onGround = checkGround();
};
if (this.y > (Game(root).stage.stageHeight + 200)){
die();
};
} else {
if ((((((currentState == "stomped")) && ((((((this is Turtle1)) || ((this is Turtle2)))) || ((this is Turtle3)))))) && (!((Obj(this).xSpeed == 0))))){
if ((((this.x < (-(root.x) - 350))) || ((this.x > ((-(root.x) + 750) + 350))))){
die();
} else {
Game(root).fixSpecialBoxes.push(theBox);
Game(root).interactions.push(this);
Game(root).interactionDirection.push(new Point(Obj(this).xSpeed, 0));
};
};
};
};
}
}
}//package
Section 35
//CheckPoint (CheckPoint)
package {
import flash.display.*;
public dynamic class CheckPoint extends Sprite {
}
}//package
Section 36
//Coin (Coin)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Coin extends Powerup {
public function Coin(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
Powerup(this).destroy();
stop();
}
function frame1(){
stop();
}
}
}//package
Section 37
//CoinBlock (CoinBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class CoinBlock extends Block {
public function CoinBlock(){
addFrameScript(15, frame16);
}
function frame16(){
if (Block(this).used){
gotoAndStop((currentFrame + 1));
} else {
gotoAndStop(1);
};
}
}
}//package
Section 38
//creditsMenu (creditsMenu)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class creditsMenu extends MovieClip {
public function creditsMenu(){
addFrameScript(0, frame1, 706, frame707);
}
function frame1(){
stop();
}
function frame707(){
stop();
}
}
}//package
Section 39
//EndBuildingBack (EndBuildingBack)
package {
import flash.display.*;
public dynamic class EndBuildingBack extends MovieClip {
public var girlHot:MovieClip;
public var girlCute:MovieClip;
public var girlUgly:MovieClip;
}
}//package
Section 40
//EndBuildingFront (EndBuildingFront)
package {
import flash.display.*;
public dynamic class EndBuildingFront extends MovieClip {
}
}//package
Section 41
//FpsCounter (FpsCounter)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class FpsCounter extends Sprite {
private var oldT:uint;
private var mfpsCount:int;// = 0
private var avgCount:int;// = 30
private var avgCount2:int;// = 30
private var textBox:TextField;
private var mfpsCount2:int;// = 0
private var textBox3:TextField;
private var textBox2:TextField;
public function FpsCounter(){
mfpsCount = 0;
mfpsCount2 = 0;
avgCount = 30;
avgCount2 = 30;
super();
textBox = new TextField();
textBox.text = "...";
textBox.textColor = 11145540;
textBox.selectable = false;
textBox2 = new TextField();
textBox2.text = "...";
textBox2.width = 150;
textBox2.textColor = 11145540;
textBox2.selectable = false;
textBox2.y = 15;
textBox3 = new TextField();
textBox3.text = "...";
textBox3.textColor = 11145540;
textBox3.selectable = false;
textBox3.y = 30;
oldT = getTimer();
addChild(textBox);
addChild(textBox2);
addChild(textBox3);
}
public function updateEnd():void{
}
public function updatePhys(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
_local2 = getTimer();
_local3 = (_local2 - _arg1);
mfpsCount2 = (mfpsCount2 + _local3);
if (avgCount2 < 1){
textBox2.text = String((((("Physics step: " + Math.round((mfpsCount2 / 30))) + " ms (") + Math.round((1000 / (mfpsCount2 / 30)))) + " fps)"));
avgCount2 = 30;
mfpsCount2 = 0;
};
avgCount2--;
}
public function update():void{
var _local1:uint;
var _local2:uint;
_local1 = getTimer();
_local2 = (_local1 - oldT);
mfpsCount = (mfpsCount + _local2);
if (avgCount < 1){
textBox.text = String((Math.round((1000 / (mfpsCount / 30))) + " fps average"));
avgCount = 30;
mfpsCount = 0;
};
avgCount--;
updatePhys(oldT);
oldT = getTimer();
textBox3.text = (Math.round((System.totalMemory / (0x0400 * 0x0400))) + " MB used");
}
}
}//package
Section 42
//Game (Game)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.utils.*;
public class Game extends MovieClip {
const GRAV:Number = 1E-5;
var theStartX:Number;
var pressedDuck:Boolean;
public var loader:TheLoader;
var theCoins:Array;
var checkPointPCFirst:Point;
var thePC:Character;
var accelSpeed:Number;// = 2.5
public var theRunAnimation:MovieClip;
var theMainMenu:MovieClip;
var deadCountMax:int;// = 100
var gravity:Number;// = 1.35
var menuUp:int;// = 1
var currentTip:int;// = 0
var addJump:Number;// = 10
var isFrozen:Boolean;// = false
var gameTimer:Timer;
var specialBoxes:Array;
var theEnemies:Array;
var thePointTexts:Array;
var thePCOnGround:Boolean;// = false
var stageAngle:Number;
public var finishUp:Boolean;// = false
var baseJump:Number;// = 18
var jumpStillPressed:Boolean;// = false
var interactions:Array;
var theCheckpoints:Array;
var specialBoxesCoords:Array;
var globalHitBox:Sprite;
var depth:Array;
var theHUD:MovieClip;
var dumbCount:int;// = 0
private var testJumpNow:Boolean;// = false
var nextCheckpoint:int;// = 0
var theCredits:MovieClip;
var fpscounter:FpsCounter;
var initialized:Boolean;// = false
var highQuality:String;// = "high"
var deadCount:int;// = 0
var musicChan:SoundChannel;
var lastPoints:Number;// = 0
var pressedRight:Boolean;
var theBGs1:Array;
var isOver:Boolean;// = false
var bottleCount:int;// = 0
var lessQuality:String;// = "medium"
var pressedShoot:Boolean;
private var endCount:int;// = 0
var count:int;// = 0
public var permBG:MovieClip;
var tipCount:int;// = 0
var fixSpecialBoxes:Array;
var maxSpeed:Number;// = 6
var totalPoints:Number;// = 0
var pressedLeft:Boolean;
var thePCOldX:Number;
var thePCOldY:Number;
var theBlocks:Array;
var soundChan2:SoundChannel;
var checkPointPC:Point;
var soundChan1:SoundChannel;
var pressedJump:Boolean;
var endPoint:Number;// = 1000
public var parallax1:MovieClip;
private var jumpCount:int;// = 0
var theEndBuilding:EndBuildingBack;
var stageDiag:Number;
var pressedRestart:Boolean;
var interactionDirection:Array;
private var jumpNow:Boolean;// = false
var hitBoxes:Array;
public function Game():void{
var _local1:Number;
gravity = 1.35;
accelSpeed = 2.5;
maxSpeed = 6;
baseJump = 18;
addJump = 10;
dumbCount = 0;
gameTimer = new Timer(16.66);
jumpStillPressed = false;
thePCOnGround = false;
totalPoints = 0;
lastPoints = 0;
isFrozen = false;
isOver = false;
finishUp = false;
checkPointPC = new Point();
checkPointPCFirst = new Point();
theEnemies = new Array();
theBlocks = new Array();
theCoins = new Array();
thePointTexts = new Array();
theBGs1 = new Array();
menuUp = 1;
theCheckpoints = new Array();
nextCheckpoint = 0;
endPoint = 1000;
currentTip = 0;
tipCount = 0;
bottleCount = 0;
deadCount = 0;
deadCountMax = 100;
musicChan = new SoundChannel();
soundChan1 = new SoundChannel();
soundChan2 = new SoundChannel();
jumpCount = 0;
jumpNow = false;
testJumpNow = false;
endCount = 0;
fpscounter = new FpsCounter();
initialized = false;
depth = new Array();
count = 0;
highQuality = StageQuality.HIGH;
lessQuality = StageQuality.MEDIUM;
hitBoxes = new Array();
globalHitBox = new Sprite();
specialBoxes = new Array();
specialBoxesCoords = new Array();
fixSpecialBoxes = new Array();
interactions = new Array();
interactionDirection = new Array();
stageDiag = (Math.sqrt(((stage.stageHeight * stage.stageHeight) + (stage.stageWidth * stage.stageWidth))) / 2);
stageAngle = Math.atan2(stage.stageHeight, stage.stageWidth);
super();
stage.addEventListener(KeyboardEvent.KEY_DOWN, downKey, false, 3, true);
stage.addEventListener(KeyboardEvent.KEY_UP, upKey, false, 3, true);
stop();
if (((!(initialized)) && ((this.currentFrame > 2)))){
dumbCount = 0;
initLevel();
} else {
if (((!(initialized)) && ((this.currentFrame == 1)))){
_local1 = 0;
while (_local1 < numChildren) {
if (getChildAt(_local1) == null){
removeChildAt(_local1);
} else {
childNewHandler(null, getChildAt(_local1));
};
_local1++;
};
gameTimer.start();
gameTimer.addEventListener(TimerEvent.TIMER, startCheck, false, 500, true);
};
};
}
public function mainLoop(_arg1:TimerEvent):void{
if (!isOver){
updateCamera();
};
if (!isFrozen){
if (((!(thePC.isDead)) && (!(isOver)))){
updateInput();
} else {
if (deadCount == deadCountMax){
restartPlayer(false);
deadCount = 0;
musicStart(true);
} else {
if (!isOver){
if (deadCount == 0){
musicPause();
soundChan1 = new soundDeath().play(500);
};
deadCount++;
};
};
};
updateGameplay();
updateHitboxes();
} else {
if (menuUp == 1){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, downKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, upKey);
stage.addEventListener(KeyboardEvent.KEY_DOWN, downKey, false, 3, true);
stage.addEventListener(KeyboardEvent.KEY_UP, upKey, false, 3, true);
if (((pressedJump) && (!(jumpStillPressed)))){
isFrozen = false;
theMainMenu.visible = false;
theMainMenu.stop();
soundChan1.stop();
musicStart(true);
menuUp = 0;
};
};
};
theHUD.x = -(root.x);
this.permBG.x = -(root.x);
theMainMenu.x = -(root.x);
theCredits.x = -(root.x);
}
private function updateGameplay(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Boolean;
var _local6:Number;
var _local7:Point;
var _local8:int;
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
updateSpecialBoxes();
_local1 = -1;
_local2 = -1;
_local3 = 0;
while (_local3 < specialBoxes.length) {
if (_local1 == -1){
if (specialBoxesCoords[_local3] > (-(root.x) - 50)){
_local1 = _local3;
};
} else {
if (_local1 != specialBoxesCoords[_local3]){
if (specialBoxesCoords[_local3] > ((-(root.x) + 750) + 50)){
_local2 = _local3;
_local3 = specialBoxes.length;
};
};
};
_local3++;
};
if (_local1 == -1){
_local1 = specialBoxes.length;
};
if (_local2 == -1){
_local2 = specialBoxes.length;
};
_local3 = _local1;
while (_local3 < _local2) {
if (((((specialBoxes[_local3].parent.visible) && (!(thePC.isDead)))) && (((specialBoxes[_local3].hitTestObject(thePC.baseBox)) || (((((!(thePC.isBig)) || (((!((thePC.currentState == "duckdown"))) && (!((thePC.currentState == "duckup"))))))) && (specialBoxes[_local3].hitTestObject(thePC.duckBox)))))))){
if ((((specialBoxes[_local3].parent is Character)) && (!(Character(specialBoxes[_local3].parent).isDead)))){
if ((specialBoxes[_local3].parent is Plant)){
if (thePC.isInvincible){
Character(specialBoxes[_local3].parent).die();
} else {
if (((thePC.isBig) && (!(thePC.isUntouchable)))){
thePC.shrink();
} else {
if (!thePC.isUntouchable){
thePC.die();
gravity = (gravity / 3);
};
};
};
} else {
_local7 = specialBoxes[_local3].parent.localToGlobal(new Point(specialBoxes[_local3].x, specialBoxes[_local3].y));
if ((((thePC.ySpeed > 0)) && (((((((!((specialBoxes[_local3].parent.currentState == "stomped"))) || ((specialBoxes[_local3].parent is Turtle1)))) || ((specialBoxes[_local3].parent is Turtle2)))) || ((specialBoxes[_local3].parent is Turtle3)))))){
thePC.y = (thePC.y - 15);
thePC.ySpeed = -10;
Character(specialBoxes[_local3].parent).stomp();
} else {
if (thePC.isInvincible){
Character(specialBoxes[_local3].parent).die();
} else {
if ((((specialBoxes[_local3].parent.currentState == "stomped")) && ((((specialBoxes[_local3].parent.xSpeed == 0)) || (((Math.abs(specialBoxes[_local3].parent.xSpeed) / specialBoxes[_local3].parent.xSpeed) == (Math.abs(thePC.xSpeed) / thePC.xSpeed))))))){
if ((((((specialBoxes[_local3].parent is Turtle1)) || ((specialBoxes[_local3].parent is Turtle2)))) || ((specialBoxes[_local3].parent is Turtle3)))){
if (specialBoxes[_local3].parent.xSpeed == 0){
soundChan2 = new soundShell().play();
};
specialBoxes[_local3].parent.xSpeed = ((maxSpeed * (thePC.xSpeed / Math.abs(thePC.xSpeed))) * 2);
};
} else {
if (((thePC.isBig) && (!(thePC.isUntouchable)))){
thePC.shrink();
} else {
if (!thePC.isUntouchable){
thePC.die();
gravity = (gravity / 3);
};
};
};
};
};
};
} else {
if ((((((((specialBoxes[_local3].parent is Block)) && ((thePC.oldYSpeed < 0)))) && (!(specialBoxes[_local3].parent.gone)))) && (((specialBoxes[_local3].hitTestPoint((thePC.x - 10), (thePC.y - thePC.height))) || (specialBoxes[_local3].hitTestPoint((thePC.x + 10), (thePC.y - thePC.height))))))){
if (((!(specialBoxes[_local3].parent.used)) && ((((specialBoxes[_local3].parent is CoinBlock)) || ((specialBoxes[_local3].parent is OneCoinBlock)))))){
specialBoxes[_local3].parent.tap();
} else {
if (!thePC.isBig){
if ((specialBoxes[_local3].parent is SpawnBlock)){
specialBoxes[_local3].parent.spawn(new Biggie());
} else {
if ((specialBoxes[_local3].parent is SomeBlock)){
specialBoxes[_local3].parent.tap();
} else {
if ((specialBoxes[_local3].parent is LadyBlock)){
specialBoxes[_local3].parent.spawn(new Lipstick());
};
};
};
} else {
if ((specialBoxes[_local3].parent is SpawnBlock)){
if (Math.random() >= 0.75){
specialBoxes[_local3].parent.spawn(new Lipstick());
} else {
specialBoxes[_local3].parent.spawn(new Bottle());
};
} else {
if ((specialBoxes[_local3].parent is LadyBlock)){
specialBoxes[_local3].parent.spawn(new Lipstick());
} else {
if ((specialBoxes[_local3].parent is SomeBlock)){
specialBoxes[_local3].parent.destroy();
};
};
};
};
};
thePC.ySpeed = 0;
thePC.y = (thePC.y - 1);
thePC.currentState = "air";
} else {
if ((specialBoxes[_local3].parent is Powerup)){
if ((((((((specialBoxes[_local3].parent is Biggie)) || ((specialBoxes[_local3].parent is Bottle)))) || ((specialBoxes[_local3].parent is Lipstick)))) && (specialBoxes[_local3].parent.ready))){
if ((((specialBoxes[_local3].parent is Lipstick)) && (!(thePC.isInvincible)))){
thePC.invincible();
soundChan1 = new soundPowerUp().play();
} else {
if ((((specialBoxes[_local3].parent is Bottle)) && (!(Character(thePC).isBraman)))){
Character(thePC).isBraman = true;
thePC.grow();
soundChan1 = new soundDrinkUp().play();
} else {
if ((((specialBoxes[_local3].parent is Biggie)) && (!(Character(thePC).isBig)))){
thePC.grow();
soundChan1 = new soundPowerUp().play();
};
};
};
addPoints(1000, specialBoxes[_local3].parent.x, ((specialBoxes[_local3].parent.y - specialBoxes[_local3].parent.height) - 10));
Powerup(specialBoxes[_local3].parent).destroy();
} else {
if ((specialBoxes[_local3].parent is Coin)){
addPoints(200, specialBoxes[_local3].parent.x, ((specialBoxes[_local3].parent.y - specialBoxes[_local3].parent.height) - 10));
Powerup(specialBoxes[_local3].parent).destroy();
soundChan1.stop();
soundChan1 = new soundCoin().play();
};
};
};
};
};
};
_local6 = 0;
while (_local6 < interactions.length) {
if (((((((!((interactions[_local6] == null))) && (!((specialBoxes[_local3] == null))))) && (specialBoxes[_local3].hitTestObject(interactions[_local6])))) && (!((specialBoxes[_local3].parent == interactions[_local6]))))){
if ((((specialBoxes[_local3].parent is Powerup)) && ((interactionDirection[_local6].y < 0)))){
specialBoxes[_local3].parent.ySpeed = -8;
} else {
if ((((specialBoxes[_local3].parent is Character)) && (!(Character(specialBoxes[_local3].parent).isDead)))){
if ((((((specialBoxes[_local3].parent.currentState == "stomped")) && ((((((specialBoxes[_local3].parent is Turtle1)) || ((specialBoxes[_local3].parent is Turtle2)))) || ((specialBoxes[_local3].parent is Turtle3)))))) && (!((((((((interactions[_local6] is Turtle1)) || ((interactions[_local6] is Turtle2)))) || ((interactions[_local6] is Turtle3)))) && ((interactions[_local6].currentState == "stomped"))))))){
specialBoxes[_local3].parent.xSpeed = (maxSpeed * (interactionDirection[_local6].x / Math.abs(interactionDirection[_local6].x)));
if (interactionDirection[_local6].y < 0){
specialBoxes[_local3].parent.die();
};
if ((interactions[_local6] is ThrowBottle)){
interactions[_local6].bounce();
};
} else {
if (((!(specialBoxes[_local3].parent.isDead)) && (!((specialBoxes[_local3].parent.currentState == "stomped"))))){
Character(specialBoxes[_local3].parent).die();
if ((interactions[_local6] is Obj)){
Obj(specialBoxes[_local3].parent).xSpeed = (interactions[_local6].xSpeed / 4);
};
if ((interactions[_local6] is ThrowBottle)){
interactions[_local6].bounce();
};
};
};
};
};
};
_local6++;
};
_local6 = _local1;
while (_local6 < _local2) {
if (((((((((((!((_local6 == _local3))) && (!((specialBoxes[_local6] == null))))) && (!((specialBoxes[_local3] == null))))) && ((specialBoxes[_local3].parent is Character)))) && ((specialBoxes[_local6].parent is Character)))) && (!((((specialBoxes[_local3].parent is Plant)) || ((specialBoxes[_local6].parent is Plant))))))){
if (((((((((((((!((specialBoxes[_local3].parent.currentState == "stomped"))) || ((specialBoxes[_local3].parent is Turtle1)))) || ((specialBoxes[_local3].parent is Turtle2)))) || ((specialBoxes[_local3].parent is Turtle3)))) && (((((((!((specialBoxes[_local6].parent.currentState == "stomped"))) || ((specialBoxes[_local6].parent is Turtle1)))) || ((specialBoxes[_local6].parent is Turtle2)))) || ((specialBoxes[_local6].parent is Turtle3)))))) && (!(specialBoxes[_local3].parent.isDead)))) && (!(specialBoxes[_local6].parent.isDead)))){
if (specialBoxes[_local6].hitTestObject(specialBoxes[_local3])){
specialBoxes[_local3].parent.x = (specialBoxes[_local3].parent.x - specialBoxes[_local3].parent.xSpeed);
specialBoxes[_local6].parent.x = (specialBoxes[_local6].parent.x - specialBoxes[_local6].parent.xSpeed);
_local8 = posNeg(specialBoxes[_local6].parent.xSpeed);
_local9 = posNeg(specialBoxes[_local3].parent.xSpeed);
_local10 = (((specialBoxes[_local3].parent.currentState == "stomped")) && ((((((specialBoxes[_local3].parent is Turtle1)) || ((specialBoxes[_local3].parent is Turtle2)))) || ((specialBoxes[_local3].parent is Turtle3)))));
_local11 = (((specialBoxes[_local6].parent.currentState == "stomped")) && ((((((specialBoxes[_local6].parent is Turtle1)) || ((specialBoxes[_local6].parent is Turtle2)))) || ((specialBoxes[_local6].parent is Turtle3)))));
if (((_local10) && (_local11))){
specialBoxes[_local3].parent.xSpeed = (maxSpeed * _local8);
specialBoxes[_local6].parent.xSpeed = (maxSpeed * _local9);
soundChan2 = new soundShell().play();
} else {
if (((_local10) && (!((specialBoxes[_local3].parent.xSpeed == 0))))){
specialBoxes[_local6].parent.die();
} else {
if (((_local11) && (!((specialBoxes[_local6].parent.xSpeed == 0))))){
specialBoxes[_local3].parent.die();
} else {
if (!(((specialBoxes[_local3].parent is Turtle2)) || ((specialBoxes[_local3].parent is Turtle3)))){
specialBoxes[_local3].parent.xSpeed = 0;
specialBoxes[_local3].parent.turn = true;
specialBoxes[_local6].parent.xSpeed = 0;
specialBoxes[_local6].parent.turn = true;
};
};
};
};
};
};
};
_local6++;
};
_local3++;
};
interactions.length = 0;
interactionDirection.length = 0;
if ((((nextCheckpoint <= theCheckpoints.length)) && ((thePC.x >= theCheckpoints[nextCheckpoint])))){
checkPointPC.x = theCheckpoints[nextCheckpoint];
checkPointPC.y = thePC.y;
lastPoints = totalPoints;
nextCheckpoint++;
};
if ((((endCount == 0)) && ((thePC.x >= endPoint)))){
if (thePC.onGround){
thePC.currentState = "run";
};
if (!isOver){
isOver = true;
} else {
if (thePC.x >= (endPoint + 90)){
thePC.currentState = "run";
if (thePC.y <= 210){
thePC.y = 180;
if (theEndBuilding.girlHot.visible){
theEndBuilding.girlHot.visible = false;
addPoints(5000, thePC.x, (thePC.y - 45));
};
} else {
if (thePC.y <= 270){
thePC.y = 260;
if (theEndBuilding.girlCute.visible){
theEndBuilding.girlCute.visible = false;
addPoints(1000, thePC.x, (thePC.y - 45));
};
} else {
thePC.y = 344.5;
if (theEndBuilding.girlUgly.visible){
theEndBuilding.girlUgly.visible = false;
addPoints(3, thePC.x, (thePC.y - 45));
musicChan.stop();
soundChan1.stop();
soundChan1 = new soundCoin().play();
};
};
};
thePC.ySpeed = 0;
nextCheckpoint = 0;
};
};
if (thePC.currentState == "jumpup"){
jumpCount++;
if (jumpCount == 1){
jumpNow = true;
} else {
if (jumpCount == 10){
testJumpNow = true;
} else {
if (jumpCount > 15){
testJumpNow = false;
thePC.currentState = "air";
};
};
};
if (((testJumpNow) && (pressedJump))){
thePC.ySpeed = (-5.4 - gravity);
} else {
if (testJumpNow){
thePC.currentState = "air";
testJumpNow = false;
};
};
} else {
testJumpNow = false;
jumpCount = 0;
};
if (thePC.x < (endPoint + 145)){
thePC.xSpeed = (maxSpeed * 0.7);
} else {
finishUp = true;
thePC.xSpeed = 0;
thePC.ySpeed = 0;
if (int(theHUD.pointText.text) >= (totalPoints - 15)){
endCount++;
finishUp = false;
};
};
} else {
if (((!((endCount == 0))) && ((endCount < 140)))){
endCount++;
} else {
if (((!((endCount == 0))) && ((endCount == 140)))){
menuCredits();
endCount++;
} else {
if (endCount != 0){
if (pressedJump){
menuMain();
jumpStillPressed = true;
};
};
};
};
};
_local4 = thePointTexts.length;
_local3 = 0;
while (_local3 < thePointTexts.length) {
thePointTexts[_local3].y = (thePointTexts[_local3].y - 2);
thePointTexts[_local3].alpha = (thePointTexts[_local3].alpha - 0.05);
if (thePointTexts[_local3].alpha < 0){
thePointTexts.splice(_local3, 1);
thePointTexts.length = (_local4 - 1);
_local4--;
_local3--;
};
_local3++;
};
_local5 = false;
if (currentTip == 0){
if (((!(pressedLeft)) && (!(pressedRight)))){
tipCount++;
if (tipCount > 180){
_local5 = true;
theHUD.tipText.text = "Use the LEFT and RIGHT keys to move";
};
} else {
currentTip = 1;
tipCount = 0;
};
} else {
if (currentTip == 1){
if (!pressedJump){
if (thePC.x > 750){
tipCount++;
};
if (tipCount > 60){
_local5 = true;
theHUD.tipText.text = "Tap or hold SPACE to jump";
};
} else {
currentTip = 2;
tipCount = 0;
};
} else {
if (currentTip == 2){
if (!pressedShoot){
if (thePC.isBraman){
tipCount++;
};
if (tipCount > 60){
_local5 = true;
theHUD.tipText.text = "Tap CONTROL to throw bottles as Braman";
};
} else {
currentTip = 3;
tipCount = 0;
};
};
};
};
if (((_local5) && ((theHUD.tipText.alpha < 1)))){
theHUD.tipText.alpha = (theHUD.tipText.alpha + 0.05);
theHUD.tipBubble.alpha = (theHUD.tipBubble.alpha + 0.05);
} else {
if (((!(_local5)) && ((theHUD.tipText.alpha > 0)))){
theHUD.tipText.alpha = (theHUD.tipText.alpha - 0.05);
theHUD.tipBubble.alpha = (theHUD.tipBubble.alpha - 0.05);
};
};
if (theHUD.qualityText.alpha > 0){
theHUD.qualityText.alpha = (theHUD.qualityText.alpha - 0.05);
};
}
private function menuCredits(){
soundChan1.stop();
soundChan1 = new soundCoin().play();
theCredits.visible = true;
theCredits.gotoAndPlay(1);
}
private function initLevel(){
var _local1:Number;
if (!initialized){
stop();
_local1 = 0;
while (_local1 < numChildren) {
if (getChildAt(_local1) == null){
removeChildAt(_local1);
} else {
childNewHandler(null, getChildAt(_local1));
};
_local1++;
};
addChild(globalHitBox);
globalHitBox.x = 0;
globalHitBox.y = 0;
theStartX = thePC.x;
checkPointPCFirst.x = thePC.x;
checkPointPCFirst.y = thePC.y;
gameTimer.start();
gameTimer.addEventListener(TimerEvent.TIMER, mainLoop, false, 2, true);
addEventListener(Event.ENTER_FRAME, frameLoop, false, 0, true);
addEventListener(Event.ADDED, childNewHandler, false, 0, true);
addEventListener(Event.REMOVED, childGoneHandler, false, 0, true);
menuMain();
initialized = true;
};
}
private function downKey(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
pressedLeft = true;
} else {
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
pressedRight = true;
} else {
if (_arg1.keyCode == 32){
pressedJump = true;
} else {
if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){
pressedDuck = true;
} else {
if (_arg1.keyCode == 17){
pressedShoot = true;
} else {
if (_arg1.keyCode == 17){
pressedRestart = true;
} else {
if (_arg1.keyCode == 81){
cycleQuality();
};
};
};
};
};
};
};
}
public function isOnScreen(_arg1:Number, _arg2:Number){
if ((((_arg1 > (-(this.x) - 50))) && ((_arg1 < ((-(this.x) + stage.stageWidth) + 50))))){
return (true);
};
return (false);
}
private function updateInput(){
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
var _local4:String;
var _local5:ThrowBottle;
var _local6:int;
_local1 = thePC.xSpeed;
_local2 = thePC.ySpeed;
_local3 = false;
if (((thePC.onGround) && (!(thePCOnGround)))){
thePCOnGround = true;
_local3 = true;
if (Math.abs(_local1) < (maxSpeed / 4)){
thePC.currentState = "land";
} else {
thePC.currentState = "run";
};
} else {
if (!thePC.onGround){
thePCOnGround = false;
};
};
if (pressedDuck){
if (thePC.currentState != "duckThrow"){
thePC.currentState = "duckdown";
};
if (thePC.isBig){
Obj(thePC).verticeArray = Obj(thePC).smallVerts;
};
} else {
if ((((thePC.currentState == "duckdown")) || ((thePC.currentState == "duckThrow")))){
thePC.currentState = "duckup";
if (thePC.isBig){
Obj(thePC).verticeArray = Obj(thePC).bigVerts;
};
};
};
if ((((((thePC.currentState == "duckup")) || ((thePC.currentState == "duckdown")))) || ((thePC.currentState == "duckThrow")))){
if (((pressedLeft) && (!(pressedRight)))){
thePC.anim.scaleX = -(thePC.flip);
} else {
if (((pressedRight) && (!(pressedLeft)))){
thePC.anim.scaleX = thePC.flip;
};
};
if (thePC.onGround){
PCDecelerateX(_local1, _local2, null);
};
};
if (((((((!((thePC.currentState == "land"))) && (!((thePC.currentState == "duckdown"))))) && (!((thePC.currentState == "duckup"))))) && (!((thePC.currentState == "duckThrow"))))){
_local4 = "idle";
if (((((pressedLeft) && (!(pressedRight)))) && ((thePC.xSpeed <= 0)))){
thePC.xSpeed = (thePC.xSpeed - accelSpeed);
thePC.anim.scaleX = -(thePC.flip);
if (thePC.onGround){
if (((!((thePC.currentState == "run"))) && (!((thePC.currentState == "runThrow"))))){
_local4 = "startrun";
} else {
_local4 = "run";
};
};
} else {
if (((((pressedRight) && (!(pressedLeft)))) && ((thePC.xSpeed >= 0)))){
thePC.xSpeed = (thePC.xSpeed + accelSpeed);
thePC.anim.scaleX = thePC.flip;
if (thePC.onGround){
if (((!((thePC.currentState == "run"))) && (!((thePC.currentState == "runThrow"))))){
_local4 = "startrun";
} else {
_local4 = "run";
};
};
} else {
_local4 = PCDecelerateX(_local1, _local2, _local4);
};
};
if ((((_local1 > maxSpeed)) || ((_local1 < -(maxSpeed))))){
thePC.xSpeed = (maxSpeed * (Math.abs(_local1) / _local1));
};
if (thePC.currentState != "jumpup"){
if (thePC.onGround){
thePC.currentState = _local4;
} else {
if (_local2 > 1){
thePC.currentState = "air";
};
};
};
};
if (thePC.currentState == "jumpup"){
jumpCount++;
if (jumpCount == 1){
jumpNow = true;
} else {
if (jumpCount == 10){
testJumpNow = true;
} else {
if (jumpCount > 15){
testJumpNow = false;
thePC.currentState = "air";
};
};
};
} else {
testJumpNow = false;
jumpCount = 0;
};
if (((((((thePC.onGround) && (!((thePC.currentState == "duckdown"))))) && (!((thePC.currentState == "duckup"))))) && (!((thePC.currentState == "duckThrow"))))){
if (((((((pressedJump) && (!(jumpStillPressed)))) && (thePC.onGround))) && (!((thePC.currentState == "jumpup"))))){
thePC.currentState = "jumpup";
jumpCount = 0;
soundChan1 = new soundJump().play();
} else {
if ((((thePC.currentState == "jumpup")) && (jumpNow))){
thePC.ySpeed = -(baseJump);
jumpStillPressed = true;
jumpNow = false;
};
};
} else {
if (thePC.currentState == "jumpup"){
if (((testJumpNow) && (pressedJump))){
thePC.ySpeed = (-5.4 - gravity);
} else {
if (testJumpNow){
thePC.currentState = "air";
testJumpNow = false;
};
};
};
};
if ((((((bottleCount == 0)) && (thePC.isBraman))) && (pressedShoot))){
bottleCount = 30;
soundChan1 = new soundShoot().play();
if (thePC.currentState == "duckThrow"){
MovieClip(thePC.anim.getChildAt(0)).gotoAndPlay(1);
};
} else {
if (bottleCount == 25){
_local5 = new ThrowBottle();
_local6 = (Math.abs(thePC.anim.scaleX) / thePC.anim.scaleX);
addChild(_local5);
_local5.x = (thePC.x + (15 * _local6));
if (((!((thePC.currentState == "duckdown"))) && (!((thePC.currentState == "duckThrow"))))){
_local5.y = (thePC.y - 60);
} else {
_local5.y = (thePC.y - 30);
};
_local5.xSpeed = (thePC.xSpeed + (10 * _local6));
_local5.scaleX = (_local5.scaleX * _local6);
};
};
if (bottleCount > 20){
if ((((thePC.currentState == "duckdown")) || ((thePC.currentState == "duckThrow")))){
thePC.currentState = "duckThrow";
} else {
if ((((thePC.currentState == "air")) || ((thePC.currentState == "jumpup")))){
thePC.currentState = "airThrow";
} else {
if ((((thePC.currentState == "run")) || ((thePC.currentState == "startrun")))){
thePC.currentState = "runThrow";
} else {
thePC.currentState = "idleThrow";
};
};
};
};
if (bottleCount != 0){
bottleCount--;
};
}
private function xCoordSort(_arg1, _arg2):Number{
var _local3:Point;
var _local4:Point;
_local3 = _arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y));
_local4 = _arg2.parent.localToGlobal(new Point(_arg2.x, _arg2.y));
if (_local3.x > _local4.x){
return (1);
};
if (_local3.x < _local4.x){
return (-1);
};
return (0);
}
public function posNeg(_arg1:Number):Number{
if (_arg1 != 0){
return ((_arg1 / Math.abs(_arg1)));
};
return (0);
}
public function musicPause(){
if (musicChan != null){
musicChan.stop();
};
if (soundChan1 != null){
soundChan1.stop();
};
if (soundChan2 != null){
soundChan2.stop();
};
}
public function addPoints(_arg1:int, _arg2:Number, _arg3:Number){
var _local4:pointText;
totalPoints = (totalPoints + _arg1);
_local4 = new pointText();
_local4.amnt.text = String(_arg1);
_local4.x = _arg2;
if (_arg3 > 0){
_local4.y = _arg3;
} else {
_local4.y = 0;
};
addChild(_local4);
thePointTexts.push(_local4);
}
private function childGoneHandler(_arg1:Event){
var _local2:int;
var _local3:Number;
var _local4:int;
if (_arg1.target.parent == this){
_local2 = depth.length;
_local3 = depth.indexOf(_arg1.target);
if (_local3 != -1){
depth.splice(_local3, 1);
depth.length = (_local2 - 1);
};
if ((_arg1.target is DisplayObjectContainer)){
_local4 = 0;
while (_local4 < hitBoxes.length) {
if (hitBoxes[_local4].parent == _arg1.target){
removeHitbox(hitBoxes[_local4]);
};
_local4++;
};
_local4 = 0;
while (_local4 < specialBoxes.length) {
if (specialBoxes[_local4].parent == _arg1.target){
removespecialBox(specialBoxes[_local4]);
};
_local4++;
};
};
};
}
public function removeHitbox(_arg1){
var _local2:int;
var _local3:int;
_local2 = hitBoxes.length;
_local3 = hitBoxes.indexOf(_arg1);
if (_local3 != -1){
hitBoxes.splice(_local3, 1);
hitBoxes.length = (_local2 - 1);
globalHitBox.removeChildAt(_local3);
};
}
public function debugPoint(_arg1:Number, _arg2:Number, _arg3:uint=0xFF){
this.graphics.beginFill(0xFF);
this.graphics.drawCircle(_arg1, _arg2, 1.5);
}
private function depthSort(_arg1, _arg2):Number{
if ((_arg1 is mainMenu)){
return (1);
};
if ((_arg2 is mainMenu)){
return (-1);
};
if ((_arg1 is creditsMenu)){
return (1);
};
if ((_arg2 is creditsMenu)){
return (-1);
};
if ((_arg1 is HUD)){
return (1);
};
if ((_arg2 is HUD)){
return (-1);
};
if ((_arg1 is pointText)){
return (1);
};
if ((_arg2 is pointText)){
return (-1);
};
if ((((_arg1 is Character)) && ((_arg2 is Character)))){
if ((_arg1 is MainPC)){
return (1);
};
if ((_arg2 is MainPC)){
return (-1);
};
return (0);
} else {
if ((_arg1 is ThrowBottle)){
return (1);
};
if ((_arg2 is ThrowBottle)){
return (-1);
};
if ((_arg1 is EndBuildingBack)){
return (1);
};
if ((_arg2 is EndBuildingBack)){
return (-1);
};
if ((_arg1 is Character)){
return (1);
};
if ((_arg2 is Character)){
return (-1);
};
if ((_arg1 is EndBuildingFront)){
return (1);
};
if ((_arg2 is EndBuildingFront)){
return (-1);
};
if ((((_arg1 is Block)) && ((_arg2 is Block)))){
return (0);
};
if ((_arg1 is Block)){
return (1);
};
if ((_arg2 is Block)){
return (-1);
};
if ((((_arg1 is Powerup)) && ((_arg2 is Powerup)))){
return (0);
};
if ((_arg1 is Powerup)){
return (1);
};
if ((_arg2 is Powerup)){
return (-1);
};
if (_arg1.name == "permBG"){
return (-1);
};
if (_arg2.name == "permBG"){
return (1);
};
if (_arg1.name == "parallax1"){
return (-1);
};
if (_arg2.name == "parallax1"){
return (1);
};
};
return (0);
}
public function cycleQuality(){
if (highQuality == StageQuality.LOW){
highQuality = StageQuality.HIGH;
lessQuality = StageQuality.MEDIUM;
theMainMenu.qualityText.text = "High";
theHUD.qualityText.text = "Quality: High";
} else {
if (highQuality == StageQuality.HIGH){
highQuality = StageQuality.MEDIUM;
lessQuality = StageQuality.LOW;
theMainMenu.qualityText.text = "Medium";
theHUD.qualityText.text = "Quality: Medium";
} else {
if (highQuality == StageQuality.MEDIUM){
highQuality = StageQuality.LOW;
lessQuality = StageQuality.LOW;
theMainMenu.qualityText.text = "Low";
theHUD.qualityText.text = "Quality: Low";
};
};
};
theHUD.qualityText.alpha = 2;
stage.quality = highQuality;
}
public function musicStart(_arg1:Boolean=false){
var _local2:*;
_local2 = new soundMusic();
if (_arg1){
musicChan = new soundMusic().play(0, 1000);
} else {
musicChan = new soundMusic().play(musicChan.position, 1000);
};
}
private function updateCamera(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (!thePC.isDead){
_local1 = (globalToLocal(new Point()).x + (stage.stageWidth * (23 / 48)));
_local2 = (globalToLocal(new Point()).x + (stage.stageWidth * (9 / 20)));
_local3 = (globalToLocal(new Point()).y + (stage.stageHeight * (9 / 24)));
_local4 = (globalToLocal(new Point()).y + (stage.stageHeight * (19 / 24)));
if (!isNaN(thePCOldX)){
_local5 = (thePC.x - thePCOldX);
_local6 = (thePC.y - thePCOldY);
if ((((((_local5 > 0)) && ((thePC.x > _local2)))) || ((((_local5 < -20)) && ((thePC.x < _local1)))))){
this.x = (this.x - _local5);
stage.quality = lessQuality;
_local7 = 0;
while (_local7 < theBGs1.length) {
theBGs1[_local7].x = (theBGs1[_local7].x + (_local5 / 2));
_local7++;
};
} else {
stage.quality = highQuality;
};
};
thePCOldX = thePC.x;
thePCOldY = thePC.y;
};
}
public function addHitbox(_arg1){
var _local2:int;
var _local3:Point;
_local2 = hitBoxes.indexOf(_arg1);
if (_local2 == -1){
hitBoxes.push(_arg1);
globalHitBox.addChildAt(new (Object(_arg1).constructor), (hitBoxes.length - 1));
_local3 = _arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y));
globalHitBox.getChildAt((hitBoxes.length - 1)).transform.matrix = _arg1.transform.matrix;
globalHitBox.getChildAt((hitBoxes.length - 1)).x = _local3.x;
globalHitBox.getChildAt((hitBoxes.length - 1)).y = _local3.y;
globalHitBox.getChildAt((hitBoxes.length - 1)).visible = false;
_arg1.visible = false;
};
}
public function setCheckpoint(){
checkPointPC.x = thePC.x;
checkPointPC.y = thePC.y;
}
private function PCDecelerateX(_arg1:Number, _arg2:Number, _arg3:String){
if (((!((thePC.currentState == "idle"))) && ((((_arg1 > 1)) || ((_arg1 < -1)))))){
thePC.xSpeed = (thePC.xSpeed / 2);
return ("stoprun");
};
thePC.xSpeed = 0;
if (thePC.currentState == "run"){
return ("idle");
};
return (_arg3);
}
private function frameLoop(_arg1:Event):void{
var _local2:int;
fpscounter.update();
_local2 = int(theHUD.pointText.text);
if (_local2 >= (totalPoints - 15)){
theHUD.pointText.text = totalPoints;
if (finishUp){
finishUp = false;
endCount++;
};
} else {
theHUD.pointText.text = (_local2 + 15);
if (thePC.x >= endPoint){
musicChan.stop();
soundChan1.stop();
soundChan1 = new soundCoin().play();
};
};
}
private function addspecialBox(_arg1){
var _local2:int;
specialBoxes.push(_arg1);
specialBoxes.sort(xCoordSort);
specialBoxesCoords.length = 0;
_local2 = 0;
while (_local2 < specialBoxes.length) {
specialBoxesCoords.push((specialBoxes[_local2].parent.localToGlobal(new Point(specialBoxes[_local2].x, specialBoxes[_local2].y)).x - root.x));
_local2++;
};
_arg1.visible = false;
}
private function fixDepth(){
var _local1:*;
_local1 = 0;
while (_local1 < depth.length) {
if (getChildAt(_local1) != null){
swapChildren(depth[_local1], getChildAt(_local1));
} else {
setChildIndex(depth[_local1], _local1);
};
_local1++;
};
}
private function startCheck(_arg1:Event){
var _local2:Number;
if (this.currentFrame > 2){
stop();
if (dumbCount == 1){
gameTimer.removeEventListener(TimerEvent.TIMER, startCheck);
initLevel();
};
dumbCount++;
} else {
stop();
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
if (_local2 != 1){
loader.bar.width = (_local2 * 628);
loader.rayne.x = (loader.bar.x + loader.bar.width);
} else {
if (dumbCount == 0){
loader.rayne.x = (loader.bar.x + loader.bar.width);
soundChan1 = new soundJump().play();
} else {
if (dumbCount < 50){
loader.rayne.y = (loader.rayne.y - (15 - dumbCount));
loader.rayne.x = (loader.rayne.x + 5);
} else {
Game(root).gotoAndStop(3);
dumbCount = 0;
};
};
dumbCount++;
};
};
}
public function restartPlayer(_arg1:Boolean){
var _local2:int;
if (!_arg1){
thePC.x = checkPointPC.x;
thePC.y = checkPointPC.y;
updateCamera();
totalPoints = lastPoints;
} else {
thePC.x = checkPointPCFirst.x;
thePC.y = checkPointPCFirst.y;
currentTip = 0;
totalPoints = 0;
lastPoints = 0;
nextCheckpoint = 0;
updateCamera();
_local2 = 0;
while (_local2 < theBGs1.length) {
theBGs1[_local2].x = theBGs1[_local2].startX;
_local2++;
};
};
thePC.isDead = false;
if (gravity < 0.5){
gravity = (gravity * 3);
} else {
if (gravity < 1){
gravity = (gravity * 2);
};
};
thePC.isBraman = false;
thePC.isInvincible = false;
thePC.removeChild(thePC.anim);
thePC.anim = null;
thePC.anim = new PCAnimMain();
thePC.addChild(thePC.anim);
jumpCount = 0;
jumpNow = false;
testJumpNow = false;
Obj(thePC).verticeArray = Obj(thePC).oneVert;
if (thePC.isBig){
thePC.isBig = false;
thePC.height = (thePC.height / 2);
};
_local2 = 0;
while (_local2 < theEnemies.length) {
theEnemies[_local2].resetVariables();
if (((theEnemies[_local2].isSleeping) && (!((theEnemies[_local2] is Plant))))){
theEnemies[_local2].wakeUp();
};
_local2++;
};
_local2 = 0;
while (_local2 < theBlocks.length) {
theBlocks[_local2].reset();
_local2++;
};
_local2 = 0;
while (_local2 < theCoins.length) {
theCoins[_local2].reset();
_local2++;
};
_local2 = 0;
while (_local2 < depth.length) {
if ((((depth[_local2] is Powerup)) && (!((depth[_local2] is Coin))))){
Obj(depth[_local2]).sleep();
removeChild(depth[_local2]);
_local2--;
};
_local2++;
};
theEndBuilding.girlHot.visible = true;
theEndBuilding.girlHot.play();
theEndBuilding.girlCute.visible = true;
theEndBuilding.girlCute.play();
theEndBuilding.girlUgly.visible = true;
theEndBuilding.girlUgly.play();
endCount = 0;
finishUp = false;
isFrozen = false;
isOver = false;
}
private function upKey(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
pressedLeft = false;
} else {
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
pressedRight = false;
} else {
if (_arg1.keyCode == 32){
pressedJump = false;
jumpStillPressed = false;
} else {
if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){
pressedDuck = false;
} else {
if (_arg1.keyCode == 17){
pressedShoot = false;
} else {
if (_arg1.keyCode == 17){
pressedRestart = false;
};
};
};
};
};
};
}
private function childNewHandler(_arg1:Event=null, _arg2=null){
var _local3:*;
var _local4:Number;
if (_arg2 != null){
_local3 = _arg2;
} else {
if (_arg1 != null){
_local3 = _arg1.target;
} else {
return;
};
};
if ((((_local3.parent == this)) && ((currentFrame > 2)))){
depth.push(_local3);
depth.sort(depthSort);
fixDepth();
if ((_local3 is Obj)){
_local4 = 0;
while (_local4 < _local3.numChildren) {
if ((_local3.getChildAt(_local4) is HitBox)){
newShape(_local3.getChildAt(_local4), "Box", false);
} else {
if ((_local3.getChildAt(_local4) is HitBoxStatic)){
newShape(_local3.getChildAt(_local4), "Box", true);
} else {
if ((_local3.getChildAt(_local4) is SpecialBox)){
addspecialBox(_local3.getChildAt(_local4));
};
};
};
_local4++;
};
if ((_local3 is MainPC)){
thePC = _local3;
setCheckpoint();
};
} else {
if (_local3.name == "parallax1"){
_local3.startX = _local3.x;
_local3.cacheAsBitmap = true;
theBGs1.push(_local3);
} else {
if ((_local3 is HUD)){
theHUD = _local3;
theHUD.tipText.alpha = 0;
theHUD.tipBubble.alpha = 0;
} else {
if ((_local3 is mainMenu)){
theMainMenu = _local3;
} else {
if ((_local3 is creditsMenu)){
theCredits = _local3;
theCredits.visible = false;
} else {
if ((_local3 is CheckPoint)){
theCheckpoints.push(_local3.x);
theCheckpoints.sort(Array.NUMERIC);
} else {
if ((_local3 is EndBuildingFront)){
endPoint = _local3.x;
} else {
if ((_local3 is EndBuildingBack)){
theEndBuilding = _local3;
};
};
};
};
};
};
};
};
} else {
if (currentFrame == 1){
if ((_local3 is creditsMenu)){
_local3.visible = false;
};
};
};
}
private function removespecialBox(_arg1){
var _local2:int;
var _local3:int;
_local2 = specialBoxes.length;
_local3 = specialBoxes.indexOf(_arg1);
if (_local3 != -1){
specialBoxes.splice(_local3, 1);
specialBoxes.length = (_local2 - 1);
specialBoxesCoords.splice(_local3, 1);
specialBoxesCoords.length = (_local2 - 1);
};
}
private function menuMain(){
restartPlayer(true);
theCredits.visible = false;
theMainMenu.visible = true;
theMainMenu.gotoAndPlay(1);
menuUp = 1;
isFrozen = true;
soundChan1.stop();
soundChan1 = new soundWind().play(0, 1000);
}
private function newShape(_arg1:Sprite, _arg2:String, _arg3:Boolean){
_arg1.visible = false;
if (!_arg3){
if ((((_arg1.name == "duckBox")) && ((Obj(_arg1.parent).verticeArray.length == 1)))){
Obj(_arg1.parent).smallVerts = Obj(_arg1.parent).verticeArray;
Obj(_arg1.parent).oneVert = new Array(_arg1);
} else {
if ((((_arg1.name == "baseBox")) && ((Obj(_arg1.parent).verticeArray.length == 1)))){
Obj(_arg1.parent).smallVerts.push(_arg1);
Obj(_arg1.parent).oneVert = Obj(_arg1.parent).verticeArray;
};
};
Obj(_arg1.parent).verticeArray.push(_arg1);
if ((((((_arg1.name == "duckBox")) || ((_arg1.name == "baseBox")))) && ((Obj(_arg1.parent).verticeArray.length == 2)))){
Obj(_arg1.parent).bigVerts = Obj(_arg1.parent).verticeArray;
Obj(_arg1.parent).verticeArray = Obj(_arg1.parent).oneVert;
};
};
if (((((!((((_arg1.parent is Character)) && (!((_arg1.parent is Plant)))))) && (!((_arg1.parent is Powerup))))) && (!((_arg1 is SpecialBox))))){
addHitbox(_arg1);
Obj(_arg1.parent).sleep();
};
}
public function updateSpecialBoxes(){
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
if (fixSpecialBoxes.length > 0){
fixSpecialBoxes.sort(xCoordSort);
_local1 = new Array();
_local2 = 0;
_local3 = 0;
while (_local3 < fixSpecialBoxes.length) {
_local4 = fixSpecialBoxes.length;
_local5 = 0;
while (_local5 < fixSpecialBoxes.length) {
if (((!((_local5 == _local3))) && ((fixSpecialBoxes[_local5] == fixSpecialBoxes[_local3])))){
fixSpecialBoxes.splice(_local5, 1);
fixSpecialBoxes.length = (_local4 - 1);
_local4--;
_local5--;
};
_local5++;
};
_local4 = specialBoxes.length;
_local5 = 0;
while (_local5 < specialBoxes.length) {
if (specialBoxes[_local5] == fixSpecialBoxes[_local3]){
specialBoxes.splice(_local5, 1);
specialBoxes.length = (_local4 - 1);
specialBoxesCoords.splice(_local5, 1);
specialBoxesCoords.length = (_local4 - 1);
_local4--;
_local5 = specialBoxes.length;
};
_local5++;
};
if (fixSpecialBoxes[_local3] != null){
_local1.push((fixSpecialBoxes[_local3].parent.localToGlobal(new Point(fixSpecialBoxes[_local3].x, fixSpecialBoxes[_local3].y)).x - root.x));
};
_local3++;
};
_local5 = 0;
while (_local5 < specialBoxes.length) {
if (_local1[_local2] < specialBoxesCoords[_local5]){
specialBoxes.splice(_local5, 0, fixSpecialBoxes[_local2]);
specialBoxesCoords.splice(_local5, 0, _local1[_local2]);
_local2++;
_local5--;
if (_local2 == _local1.length){
_local5 = specialBoxes.length;
};
} else {
if (fixSpecialBoxes[_local2] == specialBoxes[_local5]){
specialBoxes.splice(_local5, 1);
_local5--;
};
};
_local5++;
};
if (_local5 == specialBoxes.length){
_local5 = _local2;
while (_local5 < _local1.length) {
specialBoxes.push(fixSpecialBoxes[_local5]);
specialBoxesCoords.push(_local1[_local5]);
_local5++;
};
};
fixSpecialBoxes.length = 0;
};
}
public function updateHitboxes(){
var _local1:int;
var _local2:Point;
var _local3:Matrix;
globalHitBox.x = -(this.x);
globalHitBox.y = -(this.y);
_local1 = 0;
while (_local1 < hitBoxes.length) {
_local2 = hitBoxes[_local1].parent.localToGlobal(new Point(hitBoxes[_local1].x, hitBoxes[_local1].y));
_local3 = hitBoxes[_local1].transform.matrix;
_local3.concat(hitBoxes[_local1].parent.transform.matrix);
globalHitBox.getChildAt(_local1).transform.matrix = _local3;
globalHitBox.getChildAt(_local1).x = _local2.x;
globalHitBox.getChildAt(_local1).y = _local2.y;
_local1++;
};
}
public static function angleFix(_arg1:Number):Number{
while (_arg1 < -(Math.PI)) {
_arg1 = (_arg1 + (2 * Math.PI));
};
while (_arg1 >= Math.PI) {
_arg1 = (_arg1 - (2 * Math.PI));
};
return ((Math.round((_arg1 / (Math.PI / 6))) * (Math.PI / 6)));
}
}
}//package
Section 43
//Goomba (Goomba)
package {
public dynamic class Goomba extends Character {
}
}//package
Section 44
//Ground (Ground)
package {
public dynamic class Ground extends Obj {
}
}//package
Section 45
//HitBox (HitBox)
package {
import flash.display.*;
public dynamic class HitBox extends Sprite {
}
}//package
Section 46
//HitBoxStatic (HitBoxStatic)
package {
import flash.display.*;
public dynamic class HitBoxStatic extends Sprite {
}
}//package
Section 47
//HUD (HUD)
package {
import flash.display.*;
import flash.text.*;
public dynamic class HUD extends MovieClip {
public var tipBubble:MovieClip;
public var tipText:TextField;
public var qualityText:TextField;
public var pointText:TextField;
}
}//package
Section 48
//LadyBlock (LadyBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class LadyBlock extends Block {
public function LadyBlock(){
addFrameScript(9, frame10);
}
function frame10(){
if (Block(this).used){
gotoAndStop((currentFrame + 1));
} else {
gotoAndStop(1);
};
}
}
}//package
Section 49
//Lipstick (Lipstick)
package {
public dynamic class Lipstick extends Powerup {
}
}//package
Section 50
//mainMenu (mainMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mainMenu extends MovieClip {
public var qualityText:TextField;
}
}//package
Section 51
//MainPC (MainPC)
package {
public dynamic class MainPC extends Character {
}
}//package
Section 52
//Obj (Obj)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Obj extends MovieClip {
public var isSleeping:Boolean;// = true
public var xBounce:Boolean;// = false
public var ySpeed:Number;// = 0
public var yBounce:Boolean;// = false
public var oldYSpeed:Number;// = 0
public var bigVerts:Array;
public var xSpeed:Number;// = 0
public var smallVerts:Array;
public var verticeArray:Array;
public var oneVert:Array;
public function Obj():void{
isSleeping = true;
xSpeed = 0;
ySpeed = 0;
oldYSpeed = 0;
xBounce = false;
yBounce = false;
verticeArray = new Array();
super();
wakeUp();
}
public function wakeUp(){
addEventListener(Event.ENTER_FRAME, mainLoop, false, 1, true);
if ((this is Character)){
Character(this).addCharEvents();
};
this.visible = true;
isSleeping = false;
}
public function bounce(){
xSpeed = (xSpeed * -0.5);
this.gotoAndPlay("fall");
Powerup(this).used = true;
Game(root).soundChan2 = new soundBottle().play();
}
private function detectCollision(){
var _local1:int;
var _local2:int;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Boolean;
_local1 = 5;
if ((this is Character)){
if (Character(this).isDead){
return;
};
if ((((((this is MainPC)) && ((this.x <= (-(root.x) + (this.widthInit / 2)))))) && ((xSpeed < 0)))){
this.x = (-(root.x) + (this.widthInit / 2));
xSpeed = 0;
};
} else {
if ((this is ThrowBottle)){
if ((((this.y > (Game(root).stage.stageHeight + 100))) || ((Math.abs((this.x - Game(root).thePC.x)) > 450)))){
Powerup(this).destroy();
return;
};
if (!Powerup(this).used){
Game(root).interactions.push(this);
Game(root).interactionDirection.push(new Point(Obj(this).xSpeed, 0));
ySpeed = 0;
};
};
};
_local2 = 0;
while (_local2 < verticeArray.length) {
_local3 = this.localToGlobal(new Point(verticeArray[_local2].x, verticeArray[_local2].y));
_local3.x = (_local3.x - root.x);
_local3.y = (_local3.y - root.y);
_local4 = Game(root).posNeg(xSpeed);
_local5 = Game(root).posNeg(ySpeed);
_local6 = (Math.round(((_local3.x + (30 * _local4)) / 30)) * 30);
_local7 = (Math.round(((_local3.y + (30 * _local5)) / 30)) * 30);
_local8 = false;
_local9 = false;
if (Game(root).globalHitBox.hitTestPoint((_local6 + 15), ((Math.round((_local3.y / 30)) * 30) + 15), true)){
_local8 = true;
};
if (((Game(root).globalHitBox.hitTestPoint((_local3.x + 5), (_local7 + 15), true)) || (Game(root).globalHitBox.hitTestPoint((_local3.x + 25), (_local7 + 15), true)))){
_local9 = true;
};
if (_local8){
if (!xBounce){
xSpeed = 0;
this.x = (this.x + ((_local6 - (15 * (_local4 - 1))) - (_local3.x + (15 * (_local4 + 1)))));
} else {
if (((!((this is Character))) || (!(Character(this).isDead)))){
if ((((this is ThrowBottle)) && (!(Powerup(this).used)))){
bounce();
} else {
if ((((this is Character)) && (!((Character(this).currentState == "stomped"))))){
Character(this).turn = true;
} else {
xSpeed = (xSpeed * -1);
};
};
};
};
};
if (((_local9) && (!((this is ThrowBottle))))){
if (!yBounce){
ySpeed = 0;
this.y = (this.y + ((_local7 - (15 * (_local5 - 1))) - (_local3.y + (15 * (_local5 + 1)))));
} else {
ySpeed = (ySpeed * -1);
};
};
_local2++;
};
}
public function sleep(){
removeEventListener(Event.ENTER_FRAME, mainLoop);
if ((((this is Character)) && (!((this is Plant))))){
Character(this).removeCharEvents();
this.visible = false;
};
isSleeping = true;
}
private function mainLoop(_arg1:Event){
if (((!(Game(root).isFrozen)) && (Game(root).initialized))){
ySpeed = (ySpeed + Game(root).gravity);
oldYSpeed = ySpeed;
detectCollision();
if (Math.abs(xSpeed) > 25){
xSpeed = (25 * (xSpeed / Math.abs(xSpeed)));
};
if (Math.abs(ySpeed) > 25){
ySpeed = (25 * (ySpeed / Math.abs(ySpeed)));
};
this.x = (this.x + xSpeed);
this.y = (this.y + ySpeed);
if ((((this.y > 5000)) && (!((this is MainPC))))){
sleep();
};
};
}
}
}//package
Section 53
//OneCoinBlock (OneCoinBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class OneCoinBlock extends Block {
public function OneCoinBlock(){
addFrameScript(9, frame10);
}
function frame10(){
if (Block(this).used){
gotoAndStop((currentFrame + 1));
} else {
gotoAndStop(1);
};
}
}
}//package
Section 54
//PCAnimBraman (PCAnimBraman)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class PCAnimBraman extends MovieClip {
public var animation:MovieClip;
public function PCAnimBraman(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame13(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 55
//PCAnimInvinc (PCAnimInvinc)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class PCAnimInvinc extends MovieClip {
public var animation:MovieClip;
public function PCAnimInvinc(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 56
//PCAnimMain (PCAnimMain)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class PCAnimMain extends MovieClip {
public var animation:MovieClip;
public function PCAnimMain(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 57
//Plant (Plant)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Plant extends Character {
public function Plant(){
addFrameScript(0, frame1, 110, frame111, 148, frame149);
}
function frame149(){
stop();
}
function frame1(){
stop();
}
function frame111(){
stop();
Character(this).currentState = "idle";
}
}
}//package
Section 58
//pointText (pointText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class pointText extends Sprite {
public var amnt:TextField;
}
}//package
Section 59
//Powerup (Powerup)
package {
import flash.display.*;
public class Powerup extends Obj {
public var theBox:Sprite;
public var ready:Boolean;// = false
public var used:Boolean;// = false
public function Powerup():void{
var _local1:Number;
used = false;
ready = false;
super();
if ((((((this is Biggie)) || ((this is Bottle)))) || ((this is Lipstick)))){
Obj(this).xSpeed = 0;
Obj(this).xBounce = true;
_local1 = 0;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) is SpecialBox)){
theBox = Sprite(getChildAt(_local1));
_local1 = this.numChildren;
};
_local1++;
};
} else {
if (((!((root == null))) && ((this is Coin)))){
Game(root).theCoins.push(this);
};
};
if ((this is ThrowBottle)){
Obj(this).xBounce = true;
} else {
Obj(this).sleep();
};
}
public function destroy():void{
if ((((this is Coin)) && (this.visible))){
} else {
Obj(this).sleep();
Game(root).removeChild(this);
};
this.used = true;
this.visible = false;
}
public function collect():void{
gotoAndPlay("collect");
}
public function reset():void{
gotoAndStop(1);
this.used = false;
this.visible = true;
}
}
}//package
Section 60
//SomeBlock (SomeBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class SomeBlock extends Block {
public function SomeBlock(){
addFrameScript(9, frame10, 10, frame11, 22, frame23);
}
function frame10(){
gotoAndStop(1);
}
function frame11(){
}
function frame23(){
stop();
}
}
}//package
Section 61
//soundBlock (soundBlock)
package {
import flash.media.*;
public dynamic class soundBlock extends Sound {
}
}//package
Section 62
//soundBottle (soundBottle)
package {
import flash.media.*;
public dynamic class soundBottle extends Sound {
}
}//package
Section 63
//soundBreak (soundBreak)
package {
import flash.media.*;
public dynamic class soundBreak extends Sound {
}
}//package
Section 64
//soundChomp (soundChomp)
package {
import flash.media.*;
public dynamic class soundChomp extends Sound {
}
}//package
Section 65
//soundCoin (soundCoin)
package {
import flash.media.*;
public dynamic class soundCoin extends Sound {
}
}//package
Section 66
//soundDeath (soundDeath)
package {
import flash.media.*;
public dynamic class soundDeath extends Sound {
}
}//package
Section 67
//soundDrinkUp (soundDrinkUp)
package {
import flash.media.*;
public dynamic class soundDrinkUp extends Sound {
}
}//package
Section 68
//soundJump (soundJump)
package {
import flash.media.*;
public dynamic class soundJump extends Sound {
}
}//package
Section 69
//soundLady (soundLady)
package {
import flash.media.*;
public dynamic class soundLady extends Sound {
}
}//package
Section 70
//soundMusic (soundMusic)
package {
import flash.media.*;
public dynamic class soundMusic extends Sound {
}
}//package
Section 71
//soundPopup (soundPopup)
package {
import flash.media.*;
public dynamic class soundPopup extends Sound {
}
}//package
Section 72
//soundPowerDown (soundPowerDown)
package {
import flash.media.*;
public dynamic class soundPowerDown extends Sound {
}
}//package
Section 73
//soundPowerUp (soundPowerUp)
package {
import flash.media.*;
public dynamic class soundPowerUp extends Sound {
}
}//package
Section 74
//soundShell (soundShell)
package {
import flash.media.*;
public dynamic class soundShell extends Sound {
}
}//package
Section 75
//soundShoot (soundShoot)
package {
import flash.media.*;
public dynamic class soundShoot extends Sound {
}
}//package
Section 76
//soundStomp (soundStomp)
package {
import flash.media.*;
public dynamic class soundStomp extends Sound {
}
}//package
Section 77
//soundStompTurtle (soundStompTurtle)
package {
import flash.media.*;
public dynamic class soundStompTurtle extends Sound {
}
}//package
Section 78
//soundWind (soundWind)
package {
import flash.media.*;
public dynamic class soundWind extends Sound {
}
}//package
Section 79
//SpawnBlock (SpawnBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class SpawnBlock extends Block {
public function SpawnBlock(){
addFrameScript(9, frame10);
}
function frame10(){
if (Block(this).used){
gotoAndStop((currentFrame + 1));
} else {
gotoAndStop(1);
};
}
}
}//package
Section 80
//SpecialBox (SpecialBox)
package {
import flash.display.*;
public dynamic class SpecialBox extends Sprite {
}
}//package
Section 81
//TheLoader (TheLoader)
package {
import flash.display.*;
public dynamic class TheLoader extends MovieClip {
public var bar:MovieClip;
public var rayne:MovieClip;
}
}//package
Section 82
//ThrowBottle (ThrowBottle)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class ThrowBottle extends Powerup {
public function ThrowBottle(){
addFrameScript(16, frame17);
}
function frame17(){
gotoAndPlay(1);
}
}
}//package
Section 83
//Turtle1 (Turtle1)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Turtle1 extends Character {
public function Turtle1(){
addFrameScript(41, frame42, 49, frame50, 67, frame68);
}
function frame42(){
gotoAndPlay(1);
}
function frame50(){
stop();
}
function frame68(){
stop();
}
}
}//package
Section 84
//Turtle2 (Turtle2)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Turtle2 extends Character {
public function Turtle2(){
addFrameScript(43, frame44, 51, frame52, 65, frame66);
}
function frame66(){
stop();
}
function frame44(){
gotoAndPlay(1);
}
function frame52(){
stop();
}
}
}//package
Section 85
//Turtle3 (Turtle3)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Turtle3 extends Character {
public function Turtle3(){
addFrameScript(43, frame44, 51, frame52, 65, frame66);
}
function frame66(){
stop();
}
function frame44(){
gotoAndPlay(1);
}
function frame52(){
stop();
}
}
}//package