Section 1
//Background (Bimmin.Background)
package Bimmin {
import flash.display.*;
import flash.geom.*;
public class Background extends Sprite {
private var bush:Sprite;
private var front_tree:Sprite;
private var back_tree:Sprite;
private var mountains:Sprite;
private var clouds:Sprite;
public function Background(){
bush = new Sprite();
front_tree = new Sprite();
back_tree = new Sprite();
mountains = new Sprite();
clouds = new Sprite();
super();
var _local1:bg_layer_5 = new bg_layer_5();
clouds.addChild(_local1);
var _local2:bg_layer_4 = new bg_layer_4();
mountains.addChild(_local2);
var _local3:bg_layer_3 = new bg_layer_3();
back_tree.addChild(_local3);
var _local4:bg_layer_2 = new bg_layer_2();
front_tree.addChild(_local4);
var _local5:bg_layer_1 = new bg_layer_1();
bush.addChild(_local5);
this.addChild(clouds);
this.addChild(mountains);
this.addChild(back_tree);
this.addChild(front_tree);
this.addChild(bush);
}
public function updateBackground(_arg1:Number):void{
var _local3:*;
var _local4:Point;
var _local5:bg_layer_1;
var _local6:bg_layer_2;
var _local7:bg_layer_3;
var _local8:bg_layer_5;
bush.x = (bush.x - _arg1);
front_tree.x = (front_tree.x - ((_arg1 / 4) * 3));
back_tree.x = (back_tree.x - ((_arg1 / 4) * 2));
clouds.x = (clouds.x - (_arg1 / 4));
var _local2:int = (bush.numChildren - 1);
while (_local2 > -1) {
_local3 = bush.getChildAt(_local2);
_local4 = new Point(_local3.x, _local3.y);
_local4 = bush.localToGlobal(_local4);
if ((((_local4.x < 0)) && (!(_local3.ignoreNow)))){
_local3.ignoreNow = true;
_local5 = new bg_layer_1();
_local5.x = (_local3.x + _local3.width);
bush.addChild(_local5);
};
if ((_local4.x + _local3.width) < 0){
bush.removeChild(_local3);
};
_local2--;
};
_local2 = (front_tree.numChildren - 1);
while (_local2 > -1) {
_local3 = front_tree.getChildAt(_local2);
_local4 = new Point(_local3.x, _local3.y);
_local4 = front_tree.localToGlobal(_local4);
if ((((_local4.x < 0)) && (!(_local3.ignoreNow)))){
_local3.ignoreNow = true;
_local6 = new bg_layer_2();
_local6.x = (_local3.x + _local3.width);
front_tree.addChild(_local6);
};
if ((_local4.x + _local3.width) < 0){
front_tree.removeChild(_local3);
};
_local2--;
};
_local2 = (back_tree.numChildren - 1);
while (_local2 > -1) {
_local3 = back_tree.getChildAt(_local2);
_local4 = new Point(_local3.x, _local3.y);
_local4 = back_tree.localToGlobal(_local4);
if ((((_local4.x < 0)) && (!(_local3.ignoreNow)))){
_local3.ignoreNow = true;
_local7 = new bg_layer_3();
_local7.x = (_local3.x + _local3.width);
back_tree.addChild(_local7);
};
if ((_local4.x + _local3.width) < 0){
back_tree.removeChild(_local3);
};
_local2--;
};
_local2 = (clouds.numChildren - 1);
while (_local2 > -1) {
_local3 = clouds.getChildAt(_local2);
_local4 = new Point(_local3.x, _local3.y);
_local4 = clouds.localToGlobal(_local4);
if ((((_local4.x < 0)) && (!(_local3.ignoreNow)))){
_local3.ignoreNow = true;
_local8 = new bg_layer_5();
_local8.x = (_local3.x + _local3.width);
clouds.addChild(_local8);
};
if ((_local4.x + _local3.width) < 0){
clouds.removeChild(_local3);
};
_local2--;
};
}
}
}//package Bimmin
Section 2
//KeyObject (Bimmin.KeyObject)
package Bimmin {
public class KeyObject {
public static const KEY_1:uint = 49;
public static const KEY_2:uint = 50;
public static const KEY_3:uint = 51;
public static const KEY_4:uint = 52;
public static const KEY_5:uint = 53;
public static const KEY_A:uint = 65;
public static const KEY_D:uint = 68;
public static const KEY_J:uint = 74;
public static const KEY_K:uint = 75;
public static const KEY_L:uint = 76;
public static const KEY_Q:uint = 81;
public static const KEY_R:uint = 82;
public static const KEY_S:uint = 83;
public static const KEY_W:uint = 87;
public static const KEY_Z:uint = 90;
public static const KEY_Space:uint = 32;
public static const KEY_ESC:uint = 27;
public static const KEY_UP:uint = 38;
public static const KEY_DOWN:uint = 40;
public static const KEY_LEFT:uint = 37;
public static const KEY_RIGHT:uint = 39;
public static const KEY_SHIFT:uint = 16;
public static var DOWN_1:Boolean;
public static var DOWN_2:Boolean;
public static var DOWN_3:Boolean;
public static var DOWN_4:Boolean;
public static var DOWN_5:Boolean;
public static var DOWN_A:Boolean;
public static var DOWN_D:Boolean;
public static var DOWN_J:Boolean;
public static var DOWN_K:Boolean;
public static var DOWN_L:Boolean;
public static var DOWN_Q:Boolean;
public static var DOWN_R:Boolean;
public static var DOWN_S:Boolean;
public static var DOWN_W:Boolean;
public static var DOWN_Z:Boolean;
public static var DOWN_Space:Boolean;
public static var DOWN_ESC:Boolean;
public static var DOWN_Mouse:Boolean;
public static var DOWN_Up:Boolean;
public static var DOWN_Down:Boolean;
public static var DOWN_Left:Boolean;
public static var DOWN_Right:Boolean;
public static var DOWN_Shift:Boolean;
public static function initAll(){
DOWN_1 = false;
DOWN_2 = false;
DOWN_3 = false;
DOWN_4 = false;
DOWN_5 = false;
DOWN_A = false;
DOWN_D = false;
DOWN_J = false;
DOWN_K = false;
DOWN_L = false;
DOWN_Q = false;
DOWN_R = false;
DOWN_S = false;
DOWN_W = false;
DOWN_Z = false;
DOWN_Space = false;
DOWN_ESC = false;
DOWN_Mouse = false;
DOWN_Up = false;
DOWN_Right = false;
DOWN_Left = false;
DOWN_Down = false;
DOWN_Shift = false;
}
}
}//package Bimmin
Section 3
//Main (Bimmin.Main)
package Bimmin {
import flash.events.*;
import mochi.as3.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Main extends MovieClip {
private const STAGE_WIDTH_OVER_2:int = 360;
private const SCREEN_QUARTERS:int = 180;
private const SCREEN_ADVANCMENT_LIMIT:int = 540;
private const NUMBER_OF_SECTIONS:int = 35;
public var dist_best:TextField;
public var mc_buyCloud9:MovieClip;
public var mc_cloud9:MovieClip;
public var mc_bimmin:MovieClip;
public var character_btn:MovieClip;
public var mc_brickgalaxy:MovieClip;
public var mc_dayofvalor:MovieClip;
public var mc_buyBrickGalaxy:MovieClip;
public var info_btn:MovieClip;
public var score_best:TextField;
public var mc_bimmin2:MovieClip;
public var credits_btn:MovieClip;
public var audio_tog:MovieClip;
public var mc_dracula:MovieClip;
public var mc_pumpking:MovieClip;
public var retry_btn:MovieClip;
public var mc_buyDayofValor:MovieClip;
public var text_score:TextField;
public var submit_btn:MovieClip;
public var hcLogo:MovieClip;
public var mc_robocity:MovieClip;
public var mc_buyRobocity:MovieClip;
public var text_distance:TextField;
public var play_btn:MovieClip;
public var btn_bored:SimpleButton;
public var mc_buyHereToCollect:MovieClip;
public var mc_buyBimmin2:MovieClip;
public var mc_heretocollect:MovieClip;
public var mc_zombie:MovieClip;
public var dev_link:MovieClip;
private var sectionDict:Dictionary;
private var timer:Timer;
private var gameState:String;
private var lastTime:Number;
private var player:Player;
private var rex:Rex;
private var shakeScreen:Boolean;// = false
private var verticleChange:Number;
private var horizontalChange:Number;
private var mymask:GameMask;
private var myGUI:UI;
public var sndMgr:SoundManager;
public var audio:String;// = "on"
private var background:Background;
private var gamelevel:Sprite;
private var terrain:Sprite;
private var DistanceRan:Number;
private var lastDistanceRan:Number;
private var score:Number;// = 0
private var meatCollected:int;// = 0
private var multiplier:int;// = 0
private var GameOver:Boolean;// = false
private var bimmin2Bought:Boolean;// = false
private var brickgalaxyBought:Boolean;// = false
private var cloud9Bought:Boolean;// = false
private var dayofvalorBought:Boolean;// = false
private var heretocollectBought:Boolean;// = false
private var robocityBought:Boolean;// = false
public static var CURRENT_CHARACTER:int = 1;
public function Main(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 98, frame99, 99, frame100, 109, frame110, 119, frame120, 129, frame130);
var _local1:ContextMenu = new ContextMenu();
var _local2:ContextMenuItem = new ContextMenuItem("Copyright © hardcircle.com");
var _local3:ContextMenuItem = new ContextMenuItem("Artist:");
var _local4:ContextMenuItem = new ContextMenuItem(" Michael Opada");
var _local5:ContextMenuItem = new ContextMenuItem("Programmer:");
var _local6:ContextMenuItem = new ContextMenuItem("Thomas Martin");
_local1.hideBuiltInItems();
_local3.separatorBefore = true;
_local5.separatorBefore = true;
_local4.enabled = false;
_local6.enabled = false;
_local1.customItems.push(_local2);
_local1.customItems.push(_local3);
_local1.customItems.push(_local4);
_local1.customItems.push(_local5);
_local1.customItems.push(_local6);
this.contextMenu = _local1;
sndMgr = SoundManager.getInstance();
sndMgr.addLibrarySound(sfx_Chomp, "Chomp");
sndMgr.addLibrarySound(sfx_Fruit, "Fruit");
sndMgr.addLibrarySound(sfx_GameOver, "Game Over");
sndMgr.addLibrarySound(sfx_Hit, "Hit");
sndMgr.addLibrarySound(sfx_Jump, "Jump");
sndMgr.addLibrarySound(JungleRomp, "BGM");
sndMgr.addLibrarySound(sfx_Press, "Press");
sndMgr.addLibrarySound(sfx_aStomp, "Stomp");
sndMgr.addLibrarySound(sfx_extraLife, "Multi");
root["audio_tog"].stop();
root["audio_tog"].buttonMode = true;
root["audio_tog"].addEventListener(MouseEvent.MOUSE_DOWN, Mute);
MochiBot.track(this, "f55055d7");
}
public function addedToStage(_arg1:Event=null):void{
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
launchApp();
}
public function launchApp():void{
play();
}
public function devClick(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.hardcircle.com/");
navigateToURL(_local2, "_blank");
}
public function boredClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.bored.com/"), "_blank");
}
public function hcSplashClick(_arg1:MouseEvent):void{
sndMgr.playSound("Press", 0.3);
stage.removeEventListener(MouseEvent.CLICK, hcSplashClick);
navigateToURL(new URLRequest("http://www.hardcircle.com"), "_blank");
}
public function checkLoaded(_arg1:ProgressEvent):void{
var _local2:Number = Math.ceil(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
if (_local2 >= 100){
gotoAndPlay("connect");
};
}
public function connectServices():void{
}
public function initialize():void{
KeyObject.initAll();
sectionDict = new Dictionary();
addSectionToDict(terrain_1, "1");
addSectionToDict(terrain_2, "2");
addSectionToDict(terrain_3, "3");
addSectionToDict(terrain_4, "4");
addSectionToDict(terrain_5, "5");
addSectionToDict(terrain_6, "6");
addSectionToDict(terrain_7, "7");
addSectionToDict(terrain_8, "8");
addSectionToDict(terrain_9, "9");
addSectionToDict(terrain_10, "10");
addSectionToDict(terrain_11, "11");
addSectionToDict(terrain_12, "12");
addSectionToDict(terrain_13, "13");
addSectionToDict(terrain_14, "14");
addSectionToDict(terrain_15, "15");
addSectionToDict(terrain_16, "16");
addSectionToDict(terrain_17, "17");
addSectionToDict(terrain_18, "18");
addSectionToDict(terrain_19, "19");
addSectionToDict(terrain_20, "20");
addSectionToDict(terrain_21, "21");
addSectionToDict(terrain_22, "22");
addSectionToDict(terrain_23, "23");
addSectionToDict(terrain_24, "24");
addSectionToDict(terrain_25, "25");
addSectionToDict(terrain_26, "26");
addSectionToDict(terrain_27, "27");
addSectionToDict(terrain_28, "28");
addSectionToDict(terrain_29, "29");
addSectionToDict(terrain_30, "30");
addSectionToDict(terrain_31, "31");
addSectionToDict(terrain_32, "32");
addSectionToDict(terrain_33, "33");
addSectionToDict(terrain_34, "34");
addSectionToDict(terrain_35, "35");
MochiSocial.addEventListener(MochiCoins.ITEM_OWNED, updateCostumes);
MochiSocial.addEventListener(MochiCoins.ITEM_NEW, updateCostumes);
MochiServices.connect("95ed86b28a742876", this);
}
private function addSectionToDict(_arg1, _arg2:String):void{
sectionDict[_arg2] = _arg1;
}
public function realizeCharacters():void{
stop();
root["mc_buyBimmin2"].buttonMode = true;
root["mc_buyBimmin2"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyBimmin2"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyBimmin2"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_buyBrickGalaxy"].buttonMode = true;
root["mc_buyBrickGalaxy"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyBrickGalaxy"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyBrickGalaxy"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_buyCloud9"].buttonMode = true;
root["mc_buyCloud9"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyCloud9"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyCloud9"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_buyDayofValor"].buttonMode = true;
root["mc_buyDayofValor"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyDayofValor"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyDayofValor"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_buyHereToCollect"].buttonMode = true;
root["mc_buyHereToCollect"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyHereToCollect"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyHereToCollect"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_buyRobocity"].buttonMode = true;
root["mc_buyRobocity"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_buyRobocity"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_buyRobocity"].addEventListener(MouseEvent.CLICK, openStore);
root["mc_dracula"].buttonMode = true;
root["mc_dracula"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_dracula"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_dracula"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_bimmin"].buttonMode = true;
root["mc_bimmin"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_bimmin"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_bimmin"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_zombie"].buttonMode = true;
root["mc_zombie"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_zombie"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_zombie"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_pumpking"].buttonMode = true;
root["mc_pumpking"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_pumpking"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_pumpking"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_bimmin2"].buttonMode = true;
root["mc_bimmin2"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_bimmin2"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_bimmin2"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_cloud9"].buttonMode = true;
root["mc_cloud9"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_cloud9"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_cloud9"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_brickgalaxy"].buttonMode = true;
root["mc_brickgalaxy"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_brickgalaxy"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_brickgalaxy"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_heretocollect"].buttonMode = true;
root["mc_heretocollect"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_heretocollect"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_heretocollect"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_dayofvalor"].buttonMode = true;
root["mc_dayofvalor"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_dayofvalor"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_dayofvalor"].addEventListener(MouseEvent.CLICK, selectCharacter);
root["mc_robocity"].buttonMode = true;
root["mc_robocity"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["mc_robocity"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["mc_robocity"].addEventListener(MouseEvent.CLICK, selectCharacter);
if (bimmin2Bought){
root["mc_bimmin2"].visible = true;
root["mc_buyBimmin2"].visible = false;
} else {
root["mc_bimmin2"].visible = false;
root["mc_buyBimmin2"].visible = true;
};
if (brickgalaxyBought){
root["mc_brickgalaxy"].visible = true;
root["mc_buyBrickGalaxy"].visible = false;
} else {
root["mc_brickgalaxy"].visible = false;
root["mc_buyBrickGalaxy"].visible = true;
};
if (cloud9Bought){
root["mc_cloud9"].visible = true;
root["mc_buyCloud9"].visible = false;
} else {
root["mc_cloud9"].visible = false;
root["mc_buyCloud9"].visible = true;
};
if (dayofvalorBought){
root["mc_dayofvalor"].visible = true;
root["mc_buyDayofValor"].visible = false;
} else {
root["mc_dayofvalor"].visible = false;
root["mc_buyDayofValor"].visible = true;
};
if (heretocollectBought){
root["mc_heretocollect"].visible = true;
root["mc_buyHereToCollect"].visible = false;
} else {
root["mc_heretocollect"].visible = false;
root["mc_buyHereToCollect"].visible = true;
};
if (robocityBought){
root["mc_robocity"].visible = true;
root["mc_buyRobocity"].visible = false;
} else {
root["mc_robocity"].visible = false;
root["mc_buyRobocity"].visible = true;
};
}
private function openStore(_arg1:MouseEvent):void{
if (_arg1.currentTarget == root["mc_buyBimmin2"]){
MochiCoins.showItem({item:"9c911e49e9200a8f"});
} else {
if (_arg1.currentTarget == root["mc_buyHereToCollect"]){
MochiCoins.showItem({item:"df6890d5b7866d25"});
} else {
if (_arg1.currentTarget == root["mc_buyBrickGalaxy"]){
MochiCoins.showItem({item:"31636b705abc959e"});
} else {
if (_arg1.currentTarget == root["mc_buyDayofValor"]){
MochiCoins.showItem({item:"b3630f34c143f7c7"});
} else {
if (_arg1.currentTarget == root["mc_buyCloud9"]){
MochiCoins.showItem({item:"d1d91ef292f62823"});
} else {
if (_arg1.currentTarget == root["mc_buyRobocity"]){
MochiCoins.showItem({item:"cab8afa4eadc1d23"});
};
};
};
};
};
};
}
private function updateCostumes(_arg1:Object):void{
if (_arg1.id == "9c911e49e9200a8f"){
bimmin2Bought = true;
root["mc_bimmin2"].visible = true;
root["mc_buyBimmin2"].visible = false;
} else {
if (_arg1.id == "cab8afa4eadc1d23"){
robocityBought = true;
root["mc_robocity"].visible = true;
root["mc_buyRobocity"].visible = false;
} else {
if (_arg1.id == "df6890d5b7866d25"){
heretocollectBought = true;
root["mc_heretocollect"].visible = true;
root["mc_buyHereToCollect"].visible = false;
} else {
if (_arg1.id == "b3630f34c143f7c7"){
dayofvalorBought = true;
root["mc_dayofvalor"].visible = true;
root["mc_buyDayofValor"].visible = false;
} else {
if (_arg1.id == "d1d91ef292f62823"){
cloud9Bought = true;
root["mc_cloud9"].visible = true;
root["mc_buyCloud9"].visible = false;
} else {
if (_arg1.id == "31636b705abc959e"){
brickgalaxyBought = true;
root["mc_brickgalaxy"].visible = true;
root["mc_buyBrickGalaxy"].visible = false;
};
};
};
};
};
};
}
private function selectCharacter(_arg1:MouseEvent):void{
if (_arg1.currentTarget == root["mc_zombie"]){
CURRENT_CHARACTER = 1;
} else {
if (_arg1.currentTarget == root["mc_heretocollect"]){
CURRENT_CHARACTER = 2;
} else {
if (_arg1.currentTarget == root["mc_bimmin2"]){
CURRENT_CHARACTER = 3;
} else {
if (_arg1.currentTarget == root["mc_brickgalaxy"]){
CURRENT_CHARACTER = 4;
} else {
if (_arg1.currentTarget == root["mc_cloud9"]){
CURRENT_CHARACTER = 5;
} else {
if (_arg1.currentTarget == root["mc_dayofvalor"]){
CURRENT_CHARACTER = 6;
} else {
if (_arg1.currentTarget == root["mc_dracula"]){
CURRENT_CHARACTER = 7;
} else {
if (_arg1.currentTarget == root["mc_bimmin"]){
CURRENT_CHARACTER = 8;
} else {
if (_arg1.currentTarget == root["mc_pumpking"]){
CURRENT_CHARACTER = 9;
} else {
if (_arg1.currentTarget == root["mc_robocity"]){
CURRENT_CHARACTER = 10;
};
};
};
};
};
};
};
};
};
};
PlayGame();
}
public function realizeMainMenu():void{
stop();
sndMgr.playSound("Game Over", 0.5, 0, 999);
root["play_btn"].buttonMode = true;
root["play_btn"].addEventListener(MouseEvent.MOUSE_DOWN, clickToStart);
root["play_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["play_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["info_btn"].buttonMode = true;
root["info_btn"].addEventListener(MouseEvent.MOUSE_DOWN, showInfo);
root["info_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["info_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["credits_btn"].addEventListener(MouseEvent.MOUSE_DOWN, showCredits);
root["credits_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["credits_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
}
public function buttonOverState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("over");
}
public function buttonOutState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("up");
}
public function spaceToStart(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == KeyObject.KEY_Space){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, spaceToStart);
sndMgr.playSound("Press");
CharacterSelect();
};
}
public function clickToStart(_arg1:MouseEvent):void{
if (this.currentLabel == "gameover"){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, spaceToStart);
};
sndMgr.playSound("Press");
CharacterSelect();
}
private function showInfo(_arg1:MouseEvent):void{
var _local2:info_menu = new info_menu();
addChild(_local2);
}
private function showCredits(_arg1:MouseEvent):void{
var _local2:credits_menu = new credits_menu();
addChild(_local2);
}
public function CharacterSelect():void{
gotoAndStop("characters");
}
public function PlayGame(_arg1:MouseEvent=null):void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, spaceToStart);
stage.focus = stage;
gotoAndStop("gameplay");
}
public function StartGame():void{
var box:Shape;
var bcount:int;
var blur:Function;
blur = function (_arg1:Event){
bcount++;
if (bcount == 1){
bcount = 0;
box.alpha = (box.alpha - 0.2);
};
if (box.alpha <= 0){
box.removeEventListener(Event.ENTER_FRAME, blur);
gamelevel.removeChild(box);
};
};
sndMgr.stopAllSounds();
sndMgr.playSound("BGM", 0.5, 0, 999);
KeyObject.initAll();
DistanceRan = 0;
lastDistanceRan = 0;
score = 0;
meatCollected = 0;
multiplier = 1;
shakeScreen = false;
mymask = new GameMask();
mymask.x = 5;
mymask.y = 5;
addChild(mymask);
gamelevel = new Sprite();
terrain = new Sprite();
addChild(gamelevel);
gamelevel.mask = mymask;
background = new Background();
gamelevel.addChild(background);
gamelevel.addChild(terrain);
var t:terrain_1 = new terrain_1();
t.x = 0;
t.y = 310;
terrain.addChild(t);
player = new Player();
player.x = 210;
player.y = 270;
player.xSpeed = 2;
player.ySpeed = 0;
player.jumpHeight = 0;
player.jumpPower = 0;
player.jumping = false;
player.hitObject = false;
player.currentAnim = "none";
player.newAnim = "none";
rex = new Rex();
rex.eatPlayer = false;
rex.y = (player.y - 60);
rex.x = -100;
gamelevel.addChild(player);
gamelevel.addChild(rex);
horizontalChange = player.xSpeed;
myGUI = new UI();
myGUI.score_text.text = String(score);
myGUI.dist_text.text = String((DistanceRan + " m."));
myGUI.multi.stop();
addChild(myGUI);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressRelease);
gameState = "Play";
GameOver = false;
lastTime = getTimer();
timer = new Timer(20);
timer.addEventListener(TimerEvent.TIMER, MainLoop);
timer.start();
box = new Shape();
box.graphics.beginFill(19999, 1);
box.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
box.graphics.endFill();
box.alpha = 1;
gamelevel.addChild(box);
box.addEventListener(Event.ENTER_FRAME, blur);
bcount = 0;
}
private function MainLoop(_arg1:TimerEvent):void{
var _local2:Number = (getTimer() - lastTime);
if ((((_local2 > 0)) && ((gameState == "Play")))){
lastTime = getTimer();
if ((_arg1.currentTarget.currentCount % 10) == 0){
DistanceRan = (DistanceRan + (player.xSpeed / 10));
};
if ((DistanceRan - lastDistanceRan) >= 1){
score = (score + (10 * multiplier));
lastDistanceRan = DistanceRan;
};
myGUI.score_text.text = String(score);
myGUI.dist_text.text = String(((Math.round((DistanceRan * 10)) / 10) + " m."));
myGUI.multi_text.text = String(("x" + multiplier.toString()));
trace(multiplier, myGUI.multi_text.text);
if ((_arg1.currentTarget.currentCount % 15) == 0){
player.xSpeed = (player.xSpeed + 0.75);
if (player.x < SCREEN_ADVANCMENT_LIMIT){
player.x = (player.x + 1.5);
};
};
if ((_arg1.currentTarget.currentCount % 10) == 0){
if (shakeScreen){
if ((((gamelevel.x == 0)) || ((gamelevel.y == 0)))){
gamelevel.x = 3.5;
gamelevel.y = 3.5;
} else {
gamelevel.x = 0;
gamelevel.y = 0;
};
sndMgr.playSound("Stomp", 0.1);
};
};
updatePlayer();
updateRex();
checkTerrainSlide();
background.updateBackground(player.xSpeed);
};
if (GameOver){
GameCleanUp();
};
}
private function GameCleanUp():void{
var box:Shape;
var bcount:int;
var blur:Function;
blur = function (_arg1:Event){
bcount++;
if (bcount == 1){
bcount = 0;
box.alpha = (box.alpha + 0.1);
};
if (box.alpha >= 1){
box.removeEventListener(Event.ENTER_FRAME, blur);
gamelevel.removeChild(box);
removeChild(gamelevel);
removeChild(myGUI);
gotoAndStop("gameover");
};
};
timer.removeEventListener(TimerEvent.TIMER, MainLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyPressRelease);
sndMgr.stopAllSounds();
sndMgr.playSound("Game Over", 0.5, 0, 999);
box = new Shape();
box.graphics.beginFill(0, 1);
box.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
box.graphics.endFill();
box.alpha = 0;
gamelevel.addChild(box);
box.addEventListener(Event.ENTER_FRAME, blur);
bcount = 0;
}
public function realizeGameOver():void{
root["text_score"].text = score;
root["text_distance"].text = String(((Math.round((DistanceRan * 10)) / 10) + " m"));
var _local1:Number = SaveController.Load("score");
var _local2:Number = SaveController.Load("distance");
if (score > _local1){
SaveController.Save("score", score);
};
if (DistanceRan > _local2){
SaveController.Save("distance", (Math.round((DistanceRan * 10)) / 10));
};
root["score_best"].text = SaveController.Load("score");
root["dist_best"].text = String((SaveController.Load("distance") + " M"));
stage.addEventListener(KeyboardEvent.KEY_DOWN, spaceToStart);
root["retry_btn"].buttonMode = true;
root["retry_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["retry_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["retry_btn"].addEventListener(MouseEvent.MOUSE_DOWN, PlayGame);
root["character_btn"].buttonMode = true;
root["character_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["character_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["character_btn"].addEventListener(MouseEvent.MOUSE_DOWN, clickToStart);
root["submit_btn"].buttonMode = true;
root["submit_btn"].addEventListener(MouseEvent.MOUSE_OUT, buttonOutState);
root["submit_btn"].addEventListener(MouseEvent.MOUSE_OVER, buttonOverState);
root["submit_btn"].addEventListener(MouseEvent.MOUSE_DOWN, submitPlayerScore);
}
private function submitPlayerScore(_arg1:MouseEvent):void{
var e = _arg1;
var o:Object = {n:[7, 15, 5, 15, 15, 9, 9, 6, 2, 14, 12, 15, 10, 7, 0, 4], f:function (_arg1:Number, _arg2:String):String{
if (_arg2.length == 16){
return (_arg2);
};
return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16))));
}};
var boardID:String = o.f(0, "");
MochiScores.showLeaderboard({boardID:boardID, score:score});
}
private function updatePlayer():void{
if (player.xSpeed >= 11){
player.xSpeed = 11;
};
if ((((player.xSpeed == 11)) && ((((player.currentAnim == "run_x1")) || ((player.currentAnim == "run_x2")))))){
player.player_dust.visible = true;
} else {
player.player_dust.visible = false;
};
if (((((KeyObject.DOWN_Space) && (!(player.jumping)))) && (!((player.currentLabel == "stumble"))))){
if (player.jumpPower <= 20){
if (player.jumpPower < 15){
player.jumpPower = 15;
} else {
player.jumpPower = (player.jumpPower + 3);
};
if (player.jumpPower > 20){
player.jumpPower = 0;
player.jumping = true;
};
};
if (player.jumpPower > 0){
player.jumpHeight = player.jumpPower;
player.newAnim = String((("jump" + "_") + player.speedMod));
};
};
if (player.jumping){
if (player.jumpHeight > 0){
player.jumpHeight = (player.jumpHeight - 1);
};
};
player.ySpeed = ((player.y + 8) - player.jumpHeight);
var _local1:Number = player.x;
var _local2:Number = player.ySpeed;
checkHorizontalCollision(player.x, player.y);
_local2 = checkVerticalCollision(_local1, _local2);
_local1 = checkVerticalWalls(_local1, _local2);
updateTerrainPosition(player.xSpeed, 0);
player.x = _local1;
player.y = _local2;
if (player.currentLabel == "stumble"){
player.x = (player.x - 3);
};
if (player.x < 180){
rex.eatPlayer = true;
};
if (player.y > 335){
sndMgr.playSound("Game Over");
GameOver = true;
};
player.updateAnimation(player.newAnim);
}
private function updateRex():void{
var _local1:Number = (player.x - 180);
rex.x = (-(_local1) - 100);
if (_local1 < 60){
shakeScreen = true;
} else {
shakeScreen = false;
};
if (player.currentLabel == "stumble"){
rex.gotoAndStop("gape");
} else {
rex.gotoAndStop(1);
};
if (rex.eatPlayer){
rex.y = player.y;
player.x = (player.x - 40);
rex.gotoAndPlay(1);
sndMgr.playSound("Chomp");
GameOver = true;
};
}
private function checkVerticalCollision(_arg1:Number, _arg2:Number):Number{
var _local3:Number = _arg2;
while (terrain.hitTestPoint(_arg1, _local3, true)) {
_local3 = (_local3 - 0.3);
player.jumping = false;
player.jumpHeight = 0;
player.newAnim = String((("run" + "_") + player.speedMod));
if ((_arg2 - _local3) >= 50){
_local3 = _arg2;
break;
};
};
return (_local3);
}
private function checkVerticalWalls(_arg1:Number, _arg2:Number):Number{
while (terrain.hitTestPoint(_arg1, _arg2, true)) {
_arg1 = (_arg1 - 0.1);
};
return (_arg1);
}
private function checkHorizontalCollision(_arg1, _arg2):void{
var PlayerHitObject:Function;
var i:int;
var section:*;
var ix:int;
var temp:*;
var p:Point;
var m:int;
var co:*;
var po:Point;
var xVal = _arg1;
var yVal = _arg2;
PlayerHitObject = function (_arg1:Event){
_arg1.target.rotation = (_arg1.target.rotation - 20);
_arg1.target.x = (_arg1.target.x - 7);
_arg1.target.y = (_arg1.target.y + 4);
if (_arg1.target.x < 0){
_arg1.target.removeEventListener(Event.ENTER_FRAME, PlayerHitObject);
m = (gamelevel.numChildren - 1);
while (m > -1) {
if (gamelevel.getChildAt(m) == _arg1.target){
gamelevel.removeChild(gamelevel.getChildAt(m));
};
m--;
};
};
};
if (terrain.hitTestPoint(xVal, yVal, true)){
i = (terrain.numChildren - 1);
while (i > -1) {
section = terrain.getChildAt(i);
ix = (section.numChildren - 1);
while (ix > -1) {
if ((section.getChildAt(ix) is Mushroom_L)){
if (player.hitTestObject(section.getChildAt(ix))){
player.updateAnimation("stumble");
player.hitObject = true;
sndMgr.playSound("Hit");
temp = section.getChildAt(ix);
section.removeChild(temp);
p = new Point(temp.x, temp.y);
p = section.localToGlobal(p);
temp.x = p.x;
temp.y = p.y;
gamelevel.addChild(temp);
player.xSpeed = (player.xSpeed - 5);
player.speedMod = "x1";
meatCollected = 0;
multiplier = 1;
myGUI.multi.gotoAndStop((meatCollected + 1));
if (player.xSpeed < 2){
player.xSpeed = 2;
};
temp.num = gamelevel.getChildIndex(temp);
temp.addEventListener(Event.ENTER_FRAME, PlayerHitObject);
break;
};
};
if ((section.getChildAt(ix) is Mushroom_M)){
if (player.hitTestObject(section.getChildAt(ix))){
player.updateAnimation("stumble");
player.hitObject = true;
sndMgr.playSound("Hit");
temp = section.getChildAt(ix);
section.removeChild(temp);
p = new Point(temp.x, temp.y);
p = section.localToGlobal(p);
temp.x = p.x;
temp.y = p.y;
gamelevel.addChild(temp);
player.xSpeed = (player.xSpeed - 5);
player.speedMod = "x1";
multiplier = 1;
meatCollected = 0;
myGUI.multi.gotoAndStop((meatCollected + 1));
if (player.xSpeed < 2){
player.xSpeed = 2;
};
temp.num = gamelevel.getChildIndex(temp);
temp.addEventListener(Event.ENTER_FRAME, PlayerHitObject);
break;
};
};
if ((section.getChildAt(ix) is Rock)){
if (player.hitTestObject(section.getChildAt(ix))){
player.updateAnimation("stumble");
player.hitObject = true;
sndMgr.playSound("Hit");
temp = section.getChildAt(ix);
section.removeChild(temp);
p = new Point(temp.x, temp.y);
p = section.localToGlobal(p);
temp.x = p.x;
temp.y = p.y;
gamelevel.addChild(temp);
player.xSpeed = (player.xSpeed - 5);
player.speedMod = "x1";
multiplier = 1;
meatCollected = 0;
myGUI.multi.gotoAndStop((meatCollected + 1));
if (player.xSpeed < 2){
player.xSpeed = 2;
};
temp.num = gamelevel.getChildIndex(temp);
temp.addEventListener(Event.ENTER_FRAME, PlayerHitObject);
break;
};
};
if ((section.getChildAt(ix) is Stump)){
if (player.hitTestObject(section.getChildAt(ix))){
player.updateAnimation("stumble");
player.hitObject = true;
sndMgr.playSound("Hit");
temp = section.getChildAt(ix);
section.removeChild(temp);
p = new Point(temp.x, temp.y);
p = section.localToGlobal(p);
temp.x = p.x;
temp.y = p.y;
gamelevel.addChild(temp);
player.xSpeed = (player.xSpeed - 5);
player.speedMod = "x1";
multiplier = 1;
meatCollected = 0;
myGUI.multi.gotoAndStop((meatCollected + 1));
if (player.xSpeed < 2){
player.xSpeed = 2;
};
temp.num = gamelevel.getChildIndex(temp);
temp.addEventListener(Event.ENTER_FRAME, PlayerHitObject);
break;
};
};
ix = (ix - 1);
};
i = (i - 1);
};
};
i = (terrain.numChildren - 1);
while (i > -1) {
section = terrain.getChildAt(i);
ix = (section.numChildren - 1);
while (ix > -1) {
co = section.getChildAt(ix);
if ((co is Collectable)){
if (player.hitTestObject(co)){
po = new Point(co.x, co.y);
po = section.localToGlobal(po);
co.x = po.x;
co.y = po.y;
gamelevel.addChild(co);
co.play();
if (co.currentLabel == "apple"){
score = (score + (500 * multiplier));
sndMgr.playSound("Fruit", 0.25, 500);
};
if (co.currentLabel == "meat"){
meatCollected++;
sndMgr.playSound("Fruit", 0.25, 500);
if ((((meatCollected == 3)) && ((multiplier == 1)))){
player.speedMod = "x2";
multiplier = 2;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 2)))){
player.speedMod = "x2";
multiplier = 3;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 3)))){
player.speedMod = "x2";
multiplier = 4;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 4)))){
player.speedMod = "x2";
multiplier = 5;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 5)))){
player.speedMod = "x2";
multiplier = 6;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 6)))){
player.speedMod = "x2";
multiplier = 7;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 7)))){
player.speedMod = "x2";
multiplier = 8;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 8)))){
player.speedMod = "x2";
multiplier = 9;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
} else {
if ((((meatCollected == 3)) && ((multiplier == 9)))){
player.speedMod = "x2";
multiplier = 10;
meatCollected = 0;
sndMgr.playSound("Multi", 0.5);
};
};
};
};
};
};
};
};
};
myGUI.multi.gotoAndStop((meatCollected + 1));
};
};
};
ix = (ix - 1);
};
i = (i - 1);
};
}
private function updateTerrainPosition(_arg1:Number, _arg2:Number):void{
terrain.x = (terrain.x - _arg1);
terrain.y = (terrain.y + _arg2);
}
private function checkTerrainSlide():void{
var _local2:*;
var _local3:Point;
var _local4:*;
var _local5:Sprite;
var _local6:int;
var _local7:*;
var _local8:Collectable;
var _local1:int = (terrain.numChildren - 1);
while (_local1 > -1) {
_local2 = terrain.getChildAt(_local1);
_local3 = new Point(_local2.x, _local2.y);
_local3 = terrain.localToGlobal(_local3);
if ((((_local3.x < 0)) && (!(_local2.ignoreNow)))){
_local2.ignoreNow = true;
_local4 = sectionDict[String(Math.floor(RandomRange(1, (NUMBER_OF_SECTIONS + 1))))];
_local5 = new (_local4);
_local5.x = (_local2.x + _local2.width);
_local5.y = 310;
_local6 = (_local5.numChildren - 1);
while (_local6 > -1) {
_local7 = _local5.getChildAt(_local6);
if ((_local7 is Node)){
_local8 = new Collectable();
if (Math.floor(RandomRange(1, 4)) == 3){
_local8.gotoAndStop("meat");
} else {
_local8.gotoAndStop("apple");
};
_local8.x = _local7.x;
_local8.y = _local7.y;
_local5.addChild(_local8);
};
_local6--;
};
terrain.addChild(_local5);
};
if ((_local3.x + _local2.width) < 0){
terrain.removeChild(_local2);
};
_local1--;
};
}
private function keyPressedDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case KeyObject.KEY_W:
case KeyObject.KEY_Space:
case KeyObject.KEY_UP:
case KeyObject.KEY_J:
KeyObject.DOWN_Space = true;
break;
};
}
private function keyPressRelease(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case KeyObject.KEY_W:
case KeyObject.KEY_Space:
case KeyObject.KEY_UP:
case KeyObject.KEY_J:
KeyObject.DOWN_Space = false;
player.jumpPower = 0;
player.jumping = true;
break;
};
}
private function RandomRange(_arg1:Number, _arg2:Number){
var _local3:Number = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function Mute(_arg1:MouseEvent):void{
if (audio == "on"){
audio = "off";
sndMgr.muteAllSounds();
sndMgr.disableSound();
} else {
if (audio == "off"){
audio = "on";
sndMgr.unmuteAllSounds();
sndMgr.enableSound();
};
};
root["audio_tog"].gotoAndStop(audio);
}
function frame1(){
if (this.stage){
this.addedToStage();
} else {
stop();
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
return;
};
dev_link.buttonMode = true;
dev_link.addEventListener(MouseEvent.MOUSE_DOWN, devClick);
btn_bored.addEventListener(MouseEvent.MOUSE_DOWN, boredClick);
}
function frame2(){
connectServices();
}
function frame10(){
initialize();
stage.addEventListener(MouseEvent.CLICK, hcSplashClick);
}
function frame99(){
stage.removeEventListener(MouseEvent.CLICK, hcSplashClick);
}
function frame100(){
MochiSocial.showLoginWidget();
realizeMainMenu();
}
function frame110(){
StartGame();
}
function frame120(){
realizeGameOver();
}
function frame130(){
MochiSocial.showLoginWidget();
realizeCharacters();
}
}
}//package Bimmin
Section 4
//MochiBot (Bimmin.MochiBot)
package Bimmin {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package Bimmin
Section 5
//Player (Bimmin.Player)
package Bimmin {
import flash.display.*;
public class Player extends MovieClip {
public var player_dust:MovieClip;
public var i:int;
public var mc:MovieClip;
public var xSpeed:Number;// = 2
public var ySpeed:Number;// = 0
public var jumping:Boolean;// = false
public var jumpPower:Number;// = 0
public var jumpHeight:Number;// = 0
public var hitObject:Boolean;// = false
public var newAnim:String;// = "none"
public var currentAnim:String;// = "none"
public var speedMod:String;// = "x1"
public function Player(){
addFrameScript(0, frame1, 2, frame3, 4, frame5, 6, frame7, 8, frame9, 10, frame11, 12, frame13, 13, frame14, 16, frame17, 19, frame20, 22, frame23, 23, frame24, 26, frame27, 29, frame30, 30, frame31, 33, frame34, 36, frame37, 39, frame40, 42, frame43, 45, frame46, 47, frame48, 49, frame50, 51, frame52, 53, frame54, 55, frame56, 57, frame58, 59, frame60, 60, frame61, 62, frame63, 64, frame65, 66, frame67, 68, frame69, 70, frame71, 72, frame73, 74, frame75, 75, frame76, 77, frame78, 80, frame81, 83, frame84, 84, frame85, 87, frame88, 90, frame91, 93, frame94, 96, frame97, 97, frame98, 99, frame100, 102, frame103, 105, frame106, 108, frame109, 111, frame112, 114, frame115, 117, frame118, 118, frame119, 121, frame122, 124, frame125, 127, frame128, 130, frame131, 133, frame134, 134, frame135, 137, frame138, 140, frame141, 143, frame144, 146, frame147, 149, frame150, 152, frame153, 155, frame156, 158, frame159, 161, frame162);
}
public function updateAnimation(_arg1:String):void{
if (this.currentLabel == "stumble"){
return;
};
if (_arg1 != currentAnim){
this.gotoAndPlay(_arg1);
currentAnim = _arg1;
};
}
function frame1(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame3(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame5(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame7(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame9(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame11(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame13(){
gotoAndPlay("run_x1");
}
function frame14(){
MovieClip(root).sndMgr.playSound("Jump", 0.25);
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame17(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame20(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame23(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame24(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame27(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame30(){
gotoAndPlay("jump_loop");
}
function frame31(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame34(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame37(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame40(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame43(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame46(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame48(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame50(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame52(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame54(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame56(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame58(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame60(){
gotoAndPlay("run_x2_loop");
}
function frame61(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame63(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame65(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame67(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame69(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame71(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame73(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame75(){
gotoAndPlay("run_x4_loop");
}
function frame76(){
MovieClip(root).sndMgr.playSound("Jump", 0.25);
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame78(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame81(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame84(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame85(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame88(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame91(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame94(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame97(){
gotoAndPlay("jump_x2_loop");
}
function frame98(){
MovieClip(root).sndMgr.playSound("Jump", 0.25);
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame100(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame103(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame106(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame109(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame112(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame115(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame118(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame119(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame122(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame125(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame128(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame131(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame134(){
gotoAndPlay("jump_x4_loop");
}
function frame135(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame138(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame141(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame144(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame147(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame150(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame153(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame156(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame159(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
function frame162(){
i = 0;
while (i < numChildren) {
mc = (getChildAt(i) as MovieClip);
if (mc != player_dust){
mc.gotoAndStop(Main.CURRENT_CHARACTER);
};
i++;
};
}
}
}//package Bimmin
Section 6
//SaveController (Bimmin.SaveController)
package Bimmin {
import flash.net.*;
public class SaveController {
public static function Save(_arg1:String, _arg2:Number):void{
var _local3:SharedObject = SharedObject.getLocal("beta1");
_local3.data[_arg1] = _arg2;
_local3.flush();
}
public static function Load(_arg1:String):Number{
var _local2:SharedObject = SharedObject.getLocal("beta1");
if (_local2.data[_arg1] == undefined){
return (0);
};
return (_local2.data[_arg1]);
}
}
}//package Bimmin
Section 7
//SoundManager (Bimmin.SoundManager)
package Bimmin {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SoundManager {
private var _soundDict:Dictionary;
private var _sounds:Array;
private static var _instance:SoundManager;
private static var _allowInstance:Boolean;
private static var MaxNumSound:int = 40;
private static var NumSounds:int = 0;
private static var disableSounds:Boolean = false;
private static var mutedAllSounds:Boolean = false;
public function SoundManager(){
this._soundDict = new Dictionary(true);
this._sounds = new Array();
if (!SoundManager._allowInstance){
throw (new Error("Error: Only 1 instance of SoundManager is necessary"));
};
}
public function addLibrarySound(_arg1, _arg2:String):Boolean{
var _local3:int;
while (_local3 < this._sounds.length) {
if (this._sounds[_local3].name == _arg2){
return (false);
};
_local3++;
};
var _local4:Object = new Object();
var _local5:Sound = new (_arg1);
_local4.name = _arg2;
_local4.sound = _local5;
_local4.channel = new SoundChannel();
_local4.position = 0;
_local4.paused = true;
_local4.volume = 1;
_local4.startTime = 0;
_local4.loops = 0;
_local4.pausedByAll = false;
this._soundDict[_arg2] = _local4;
this._sounds.push(_local4);
return (true);
}
public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{
if ((((NumSounds >= MaxNumSound)) || (disableSounds))){
return;
};
var _local5:Object = this._soundDict[_arg1];
if (_local5 == null){
trace("No Sound");
return;
};
NumSounds++;
_local5.volume = _arg2;
_local5.startTime = _arg3;
_local5.loops = _arg4;
if (_local5.paused){
_local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume));
} else {
_local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume));
};
if (mutedAllSounds){
this.setSoundVolume(_arg1, 0);
};
_local5.paused = false;
if (_local5.channel != null){
_local5.channel.addEventListener(Event.SOUND_COMPLETE, FreeSoundChannel);
};
}
public function muteAllSounds():void{
var _local2:String;
mutedAllSounds = true;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
this.setSoundVolume(_local2, 0);
_local1++;
};
}
public function stopSound(_arg1:String):void{
var _local2:Object = this._soundDict[_arg1];
_local2.paused = true;
if (_local2.channel != null){
_local2.channel.stop();
_local2.position = _local2.channel.position;
};
FreeSoundChannel(new Event(Event.COMPLETE));
}
public function stopAllSounds(_arg1:Boolean=true):void{
var _local3:String;
NumSounds = 0;
var _local2:int;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundDict[_local3].paused){
this._soundDict[_local3].pausedByAll = true;
this.stopSound(_local3);
};
} else {
this.stopSound(_local3);
};
_local2++;
};
}
public function disableSound():void{
disableSounds = true;
muteAllSounds();
}
public function enableSound():void{
disableSounds = false;
unmuteAllSounds();
}
public function toggleEnableSound():void{
disableSounds = !(disableSounds);
if (disableSounds){
disableSound();
} else {
enableSound();
};
}
public function get soundDisabled():Boolean{
return (disableSounds);
}
public function unmuteAllSounds():void{
var _local2:String;
var _local3:Object;
var _local4:SoundTransform;
mutedAllSounds = false;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._soundDict[_local2];
if (_local3.channel != null){
_local4 = _local3.channel.soundTransform;
_local4.volume = _local3.volume;
_local3.channel.soundTransform = _local4;
};
_local1++;
};
}
public function setSoundVolume(_arg1:String, _arg2:Number):void{
var _local3:Object = this._soundDict[_arg1];
var _local4:SoundTransform = _local3.channel.soundTransform;
if (_local3.channel != null){
_local4.volume = _arg2;
_local3.channel.soundTransform = _local4;
};
}
public function getSoundObject(_arg1:String):Object{
return (this._soundDict[_arg1]);
}
public function SoundLimit(_arg1:uint):void{
MaxNumSound = _arg1;
}
private function FreeSoundChannel(_arg1:Event):void{
NumSounds--;
}
public function toString():String{
return (getQualifiedSuperclassName(this));
}
public static function getInstance():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package Bimmin
Section 8
//back_57 (Bimmin_fla.back_57)
package Bimmin_fla {
import flash.display.*;
public dynamic class back_57 extends MovieClip {
public function back_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 9
//Bim_Jog_20 (Bimmin_fla.Bim_Jog_20)
package Bimmin_fla {
import flash.display.*;
public dynamic class Bim_Jog_20 extends MovieClip {
public function Bim_Jog_20(){
addFrameScript(18, frame19);
}
function frame19(){
gotoAndPlay(1);
}
}
}//package Bimmin_fla
Section 10
//bimmin2_38 (Bimmin_fla.bimmin2_38)
package Bimmin_fla {
import flash.display.*;
public dynamic class bimmin2_38 extends MovieClip {
public function bimmin2_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 11
//Bimmindrop_19 (Bimmin_fla.Bimmindrop_19)
package Bimmin_fla {
import flash.display.*;
public dynamic class Bimmindrop_19 extends MovieClip {
public function Bimmindrop_19(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Bimmin_fla
Section 12
//brickgalaxy_43 (Bimmin_fla.brickgalaxy_43)
package Bimmin_fla {
import flash.display.*;
public dynamic class brickgalaxy_43 extends MovieClip {
public function brickgalaxy_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 13
//buyBimmin2_28 (Bimmin_fla.buyBimmin2_28)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyBimmin2_28 extends MovieClip {
public function buyBimmin2_28(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 14
//buyBrickGalaxy_33 (Bimmin_fla.buyBrickGalaxy_33)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyBrickGalaxy_33 extends MovieClip {
public function buyBrickGalaxy_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 15
//buyCloud9_31 (Bimmin_fla.buyCloud9_31)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyCloud9_31 extends MovieClip {
public function buyCloud9_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 16
//buyDayofValor_32 (Bimmin_fla.buyDayofValor_32)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyDayofValor_32 extends MovieClip {
public function buyDayofValor_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 17
//buyHereToCollect_30 (Bimmin_fla.buyHereToCollect_30)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyHereToCollect_30 extends MovieClip {
public function buyHereToCollect_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 18
//buyRobocity_29 (Bimmin_fla.buyRobocity_29)
package Bimmin_fla {
import flash.display.*;
public dynamic class buyRobocity_29 extends MovieClip {
public function buyRobocity_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 19
//characters_27 (Bimmin_fla.characters_27)
package Bimmin_fla {
import flash.display.*;
public dynamic class characters_27 extends MovieClip {
public function characters_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 20
//cloud9_41 (Bimmin_fla.cloud9_41)
package Bimmin_fla {
import flash.display.*;
public dynamic class cloud9_41 extends MovieClip {
public function cloud9_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 21
//credits_btn_23 (Bimmin_fla.credits_btn_23)
package Bimmin_fla {
import flash.display.*;
public dynamic class credits_btn_23 extends MovieClip {
public function credits_btn_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 22
//dayofvalor_42 (Bimmin_fla.dayofvalor_42)
package Bimmin_fla {
import flash.display.*;
public dynamic class dayofvalor_42 extends MovieClip {
public function dayofvalor_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 23
//dracula_37 (Bimmin_fla.dracula_37)
package Bimmin_fla {
import flash.display.*;
public dynamic class dracula_37 extends MovieClip {
public function dracula_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 24
//facebook_59 (Bimmin_fla.facebook_59)
package Bimmin_fla {
import flash.display.*;
public dynamic class facebook_59 extends MovieClip {
public function facebook_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 25
//flag_icon_119 (Bimmin_fla.flag_icon_119)
package Bimmin_fla {
import flash.display.*;
public dynamic class flag_icon_119 extends MovieClip {
public function flag_icon_119(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 26
//gameover_24 (Bimmin_fla.gameover_24)
package Bimmin_fla {
import flash.display.*;
public dynamic class gameover_24 extends MovieClip {
public function gameover_24(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package Bimmin_fla
Section 27
//gui_multi_49 (Bimmin_fla.gui_multi_49)
package Bimmin_fla {
import flash.display.*;
public dynamic class gui_multi_49 extends MovieClip {
public function gui_multi_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 28
//heretocollect_40 (Bimmin_fla.heretocollect_40)
package Bimmin_fla {
import flash.display.*;
public dynamic class heretocollect_40 extends MovieClip {
public function heretocollect_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 29
//info_btn_22 (Bimmin_fla.info_btn_22)
package Bimmin_fla {
import flash.display.*;
public dynamic class info_btn_22 extends MovieClip {
public function info_btn_22(){
addFrameScript(0, frame1, 5, frame6);
}
function frame1(){
stop();
}
function frame6(){
}
}
}//package Bimmin_fla
Section 30
//logo_11 (Bimmin_fla.logo_11)
package Bimmin_fla {
import flash.display.*;
public dynamic class logo_11 extends MovieClip {
public var mc_logo:MovieClip;
public function logo_11(){
addFrameScript(90, frame91);
}
function frame91(){
stop();
}
}
}//package Bimmin_fla
Section 31
//original_34 (Bimmin_fla.original_34)
package Bimmin_fla {
import flash.display.*;
public dynamic class original_34 extends MovieClip {
public function original_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 32
//play_21 (Bimmin_fla.play_21)
package Bimmin_fla {
import flash.display.*;
public dynamic class play_21 extends MovieClip {
public function play_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 33
//pumpking_36 (Bimmin_fla.pumpking_36)
package Bimmin_fla {
import flash.display.*;
public dynamic class pumpking_36 extends MovieClip {
public function pumpking_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 34
//retry_25 (Bimmin_fla.retry_25)
package Bimmin_fla {
import flash.display.*;
public dynamic class retry_25 extends MovieClip {
public function retry_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 35
//robocity_39 (Bimmin_fla.robocity_39)
package Bimmin_fla {
import flash.display.*;
public dynamic class robocity_39 extends MovieClip {
public function robocity_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 36
//Rock_54 (Bimmin_fla.Rock_54)
package Bimmin_fla {
import flash.display.*;
public dynamic class Rock_54 extends MovieClip {
public function Rock_54(){
addFrameScript(0, frame1, 33, frame34);
}
function frame1(){
this.gotoAndPlay((Math.ceil((Math.random() * (this.totalFrames - 1))) + 1));
}
function frame34(){
this.gotoAndPlay(2);
}
}
}//package Bimmin_fla
Section 37
//submit_26 (Bimmin_fla.submit_26)
package Bimmin_fla {
import flash.display.*;
public dynamic class submit_26 extends MovieClip {
public function submit_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 38
//twitter_60 (Bimmin_fla.twitter_60)
package Bimmin_fla {
import flash.display.*;
public dynamic class twitter_60 extends MovieClip {
public function twitter_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 39
//zombie_35 (Bimmin_fla.zombie_35)
package Bimmin_fla {
import flash.display.*;
public dynamic class zombie_35 extends MovieClip {
public function zombie_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Bimmin_fla
Section 40
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_SHOW:String = "StoreShow";
public static const STORE_HIDE:String = "StoreHide";
public static const ITEM_OWNED:String = "ItemOwned";
public static const ITEM_NEW:String = "ItemNew";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static var _inventory:MochiInventory;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 41
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Fragment:Number;
private var Sibling:MochiDigits;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function get value():Number{
return (Number(this.toString()));
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
}
}//package mochi.as3
Section 42
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
}
}//package mochi.as3
Section 43
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
public class MochiEvents {
public static const ACHIEVEMENTS_OWNED:String = "AchievementOwned";
public static const ACHIEVEMENT_NEW:String = "AchievementReceived";
public static const GAME_ACHIEVEMENTS:String = "GameAchievements";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IOError";
public static const IO_PENDING:String = "IOPending";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_CENTER:String = "ALIGN_C";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const FORMAT_SHORT:String = "ShortForm";
public static const FORMAT_LONG:String = "LongForm";
public static const FORMAT_NONE:String = "NoForm";
private static var gameStart:Number;
private static var levelStart:Number;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function getAchievements(_arg1:Object=null):void{
MochiServices.send("events_getAchievements", _arg1);
}
public static function unlockAchievement(_arg1:Object):void{
MochiServices.send("events_unlockAchievement", _arg1);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function showAwards(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("events_showAwards", _arg1);
}
public static function setNotifications(_arg1:Object):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("events_setNotifications", _arg1, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
}
}//package mochi.as3
Section 44
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _consumableProperties:Object;
private var _syncPending:Boolean;
private var _outstandingID:Number;
private var _syncID:Number;
private var _names:Array;
private var _storeSync:Object;
private static const CONSUMER_KEY:String = "MochiConsumables";
private static const KEY_SALT:String = " syncMaint";
public static const READY:String = "InvReady";
public static const WRITTEN:String = "InvWritten";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
public static const VALUE_ERROR:String = "InvValueError";
public static const NOT_READY:String = "InvNotReady";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 45
//MochiScores (mochi.as3.MochiScores)
package mochi.as3 {
import flash.display.*;
import flash.text.*;
public class MochiScores {
public static var onCloseHandler:Object;
public static var onErrorHandler:Object;
private static var boardID:String;
public static function onClose(_arg1:Object=null):void{
if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiServices.warnID(_arg1, true);
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
delete options.clip;
MochiServices.setContainer();
MochiServices.bringToTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local2:Object = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
}
}//package mochi.as3
Section 46
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _id:String;
private static var _container:Object;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _timer:Timer;
private static var _preserved:Object;
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
private static var _services:String = "services.swf";
private static var _mochiLC:String = "MochiLC.swf";
private static var _swfVersion:String;
private static var _listenChannelName:String = "__ms_";
private static var _sendChannel:LocalConnection;
private static var _sendChannelName:String;
private static var _connecting:Boolean = false;
private static var _connected:Boolean = false;
public static var netup:Boolean = true;
public static var netupAttempted:Boolean = false;
public static var onError:Object;
public static var widget:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _queue:Array;
private static var _nextCallbackID:Number;
private static var _callbacks:Object;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function get id():String{
return (_id);
}
public static function get clip():Object{
return (_container);
}
public static function get childClip():Object{
return (_clip);
}
public static function getVersion():String{
return ("3.9.4 as3");
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
public static function get connected():Boolean{
return (_connected);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} catch(error:Error) {
};
};
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
MochiServices.onError("NotConnected");
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
private static function detach(_arg1:Event):void{
var _local2:LoaderInfo = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader = new Loader();
var _local3:String = (_servURL + _mochiLC);
var _local4:URLRequest = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError("NotConnected");
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError("NotConnected");
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://link.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 47
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const LOGGED_OUT:String = "LoggedOut";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_CANCELED:String = "onCancel";
public static const ACTION_COMPLETE:String = "onComplete";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function showProfile(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("social_showProfile", _arg1);
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 48
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var _loader:URLLoader;
public var key:String;// = null
public var data;// = null
public var error:Event;// = null
public var operation:String;// = null
public var callback:Function;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function getEvent():void{
request("get", serialize(null));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 49
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.display.*;
public dynamic class BrandingLogo extends MovieClip {
public function BrandingLogo(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spill.localisation
Section 50
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectBox extends MovieClip {
}
}//package spill.localisation
Section 51
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc)
package spill.localisation {
import flash.display.*;
import flash.text.*;
public dynamic class LanguageSelectBox_mc extends MovieClip {
public var languageName_text:TextField;
public var flag:MovieClip;
}
}//package spill.localisation
Section 52
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_ar:MovieClip;
public var l_pt:MovieClip;
public var l_en_uk:MovieClip;
public var l_br:MovieClip;
public var l_ru:MovieClip;
public var l_se:MovieClip;
public var l_in:MovieClip;
public var l_es:MovieClip;
public var l_fr:MovieClip;
public var l_de:MovieClip;
public var l_jp:MovieClip;
public var l_nl:MovieClip;
public var l_pl:MovieClip;
public var l_es_ar:MovieClip;
public var l_id:MovieClip;
public var l_en_us:MovieClip;
public var l_it:MovieClip;
public var l_es_mx:MovieClip;
public var l_cn:MovieClip;
}
}//package spill.localisation
Section 53
//LocalizedTextField (spill.localisation.LocalizedTextField)
package spill.localisation {
import flash.display.*;
public dynamic class LocalizedTextField extends MovieClip {
}
}//package spill.localisation
Section 54
//SpilGamesLink (spill.localisation.SpilGamesLink)
package spill.localisation {
import flash.display.*;
public dynamic class SpilGamesLink extends SimpleButton {
}
}//package spill.localisation
Section 55
//bg_layer_1 (bg_layer_1)
package {
import flash.display.*;
public dynamic class bg_layer_1 extends Sprite {
}
}//package
Section 56
//bg_layer_2 (bg_layer_2)
package {
import flash.display.*;
public dynamic class bg_layer_2 extends Sprite {
}
}//package
Section 57
//bg_layer_3 (bg_layer_3)
package {
import flash.display.*;
public dynamic class bg_layer_3 extends Sprite {
}
}//package
Section 58
//bg_layer_4 (bg_layer_4)
package {
import flash.display.*;
public dynamic class bg_layer_4 extends MovieClip {
}
}//package
Section 59
//bg_layer_5 (bg_layer_5)
package {
import flash.display.*;
public dynamic class bg_layer_5 extends MovieClip {
}
}//package
Section 60
//Collectable (Collectable)
package {
import flash.display.*;
public dynamic class Collectable extends MovieClip {
public function Collectable(){
addFrameScript(13, frame14, 27, frame28);
}
function frame14(){
stop();
parent.removeChild(this);
}
function frame28(){
stop();
parent.removeChild(this);
}
}
}//package
Section 61
//credits_menu (credits_menu)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class credits_menu extends MovieClip {
public var btn_twitter:MovieClip;
public var cred_back_btn:MovieClip;
public var btn_facebook:MovieClip;
public var dev_link:MovieClip;
public function credits_menu(){
addFrameScript(4, frame5);
}
public function credClickToPlay(_arg1:MouseEvent):void{
parent.removeChild(this);
}
public function credBackClick(_arg1:MouseEvent):void{
parent.removeChild(this);
}
public function credOverState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("over");
}
public function credOutState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("up");
}
public function devClick(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.hardcircle.com/");
navigateToURL(_local2, "_blank");
}
public function faceClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.facebook.com/pages/Hard-Circle/175774795794010"), "_blank");
}
public function twitClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://twitter.com/#!/HardCircle"), "_blank");
}
function frame5(){
stop();
cred_back_btn.buttonMode = true;
dev_link.buttonMode = true;
cred_back_btn.addEventListener(MouseEvent.MOUSE_DOWN, credBackClick);
cred_back_btn.addEventListener(MouseEvent.MOUSE_OVER, credOverState);
cred_back_btn.addEventListener(MouseEvent.MOUSE_OUT, credOutState);
dev_link.addEventListener(MouseEvent.MOUSE_DOWN, devClick);
btn_facebook.buttonMode = true;
btn_facebook.addEventListener(MouseEvent.MOUSE_DOWN, faceClick);
btn_facebook.addEventListener(MouseEvent.MOUSE_OVER, credOverState);
btn_facebook.addEventListener(MouseEvent.MOUSE_OUT, credOutState);
btn_twitter.buttonMode = true;
btn_twitter.addEventListener(MouseEvent.MOUSE_DOWN, twitClick);
btn_twitter.addEventListener(MouseEvent.MOUSE_OVER, credOverState);
btn_twitter.addEventListener(MouseEvent.MOUSE_OUT, credOutState);
}
}
}//package
Section 62
//fog_1 (fog_1)
package {
import flash.display.*;
public dynamic class fog_1 extends MovieClip {
public function fog_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 63
//GameMask (GameMask)
package {
import flash.display.*;
public dynamic class GameMask extends Sprite {
}
}//package
Section 64
//info_menu (info_menu)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class info_menu extends MovieClip {
public var info_back_btn:MovieClip;
public function info_menu(){
addFrameScript(4, frame5);
}
public function infoClickToPlay(_arg1:MouseEvent):void{
parent.removeChild(this);
}
public function infoBackClick(_arg1:MouseEvent):void{
parent.removeChild(this);
}
public function infoOverState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("over");
}
public function infoOutState(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop("up");
}
function frame5(){
stop();
info_back_btn.buttonMode = true;
info_back_btn.addEventListener(MouseEvent.MOUSE_DOWN, infoBackClick);
info_back_btn.addEventListener(MouseEvent.MOUSE_OVER, infoOverState);
info_back_btn.addEventListener(MouseEvent.MOUSE_OUT, infoOutState);
}
}
}//package
Section 65
//JungleRomp (JungleRomp)
package {
import flash.media.*;
public dynamic class JungleRomp extends Sound {
}
}//package
Section 66
//Mushroom_L (Mushroom_L)
package {
import flash.display.*;
public dynamic class Mushroom_L extends Sprite {
}
}//package
Section 67
//Mushroom_M (Mushroom_M)
package {
import flash.display.*;
public dynamic class Mushroom_M extends Sprite {
}
}//package
Section 68
//Node (Node)
package {
import flash.display.*;
public dynamic class Node extends MovieClip {
}
}//package
Section 69
//Rex (Rex)
package {
import flash.display.*;
public dynamic class Rex extends MovieClip {
public function Rex(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package
Section 70
//Rock (Rock)
package {
import flash.display.*;
public dynamic class Rock extends Sprite {
}
}//package
Section 71
//sfx_aStomp (sfx_aStomp)
package {
import flash.media.*;
public dynamic class sfx_aStomp extends Sound {
}
}//package
Section 72
//sfx_Chomp (sfx_Chomp)
package {
import flash.media.*;
public dynamic class sfx_Chomp extends Sound {
}
}//package
Section 73
//sfx_extraLife (sfx_extraLife)
package {
import flash.media.*;
public dynamic class sfx_extraLife extends Sound {
}
}//package
Section 74
//sfx_Fruit (sfx_Fruit)
package {
import flash.media.*;
public dynamic class sfx_Fruit extends Sound {
}
}//package
Section 75
//sfx_GameOver (sfx_GameOver)
package {
import flash.media.*;
public dynamic class sfx_GameOver extends Sound {
}
}//package
Section 76
//sfx_Hit (sfx_Hit)
package {
import flash.media.*;
public dynamic class sfx_Hit extends Sound {
}
}//package
Section 77
//sfx_Jump (sfx_Jump)
package {
import flash.media.*;
public dynamic class sfx_Jump extends Sound {
}
}//package
Section 78
//sfx_Press (sfx_Press)
package {
import flash.media.*;
public dynamic class sfx_Press extends Sound {
}
}//package
Section 79
//Stump (Stump)
package {
import flash.display.*;
public dynamic class Stump extends Sprite {
}
}//package
Section 80
//terrain_0 (terrain_0)
package {
import flash.display.*;
public dynamic class terrain_0 extends Sprite {
}
}//package
Section 81
//terrain_1 (terrain_1)
package {
import flash.display.*;
public dynamic class terrain_1 extends Sprite {
}
}//package
Section 82
//terrain_10 (terrain_10)
package {
import flash.display.*;
public dynamic class terrain_10 extends MovieClip {
}
}//package
Section 83
//terrain_11 (terrain_11)
package {
import flash.display.*;
public dynamic class terrain_11 extends MovieClip {
}
}//package
Section 84
//terrain_12 (terrain_12)
package {
import flash.display.*;
public dynamic class terrain_12 extends MovieClip {
}
}//package
Section 85
//terrain_13 (terrain_13)
package {
import flash.display.*;
public dynamic class terrain_13 extends MovieClip {
}
}//package
Section 86
//terrain_14 (terrain_14)
package {
import flash.display.*;
public dynamic class terrain_14 extends MovieClip {
}
}//package
Section 87
//terrain_15 (terrain_15)
package {
import flash.display.*;
public dynamic class terrain_15 extends MovieClip {
}
}//package
Section 88
//terrain_16 (terrain_16)
package {
import flash.display.*;
public dynamic class terrain_16 extends MovieClip {
}
}//package
Section 89
//terrain_17 (terrain_17)
package {
import flash.display.*;
public dynamic class terrain_17 extends Sprite {
}
}//package
Section 90
//terrain_18 (terrain_18)
package {
import flash.display.*;
public dynamic class terrain_18 extends Sprite {
}
}//package
Section 91
//terrain_19 (terrain_19)
package {
import flash.display.*;
public dynamic class terrain_19 extends Sprite {
}
}//package
Section 92
//terrain_2 (terrain_2)
package {
import flash.display.*;
public dynamic class terrain_2 extends MovieClip {
}
}//package
Section 93
//terrain_20 (terrain_20)
package {
import flash.display.*;
public dynamic class terrain_20 extends Sprite {
}
}//package
Section 94
//terrain_21 (terrain_21)
package {
import flash.display.*;
public dynamic class terrain_21 extends Sprite {
}
}//package
Section 95
//terrain_22 (terrain_22)
package {
import flash.display.*;
public dynamic class terrain_22 extends Sprite {
}
}//package
Section 96
//terrain_23 (terrain_23)
package {
import flash.display.*;
public dynamic class terrain_23 extends Sprite {
}
}//package
Section 97
//terrain_24 (terrain_24)
package {
import flash.display.*;
public dynamic class terrain_24 extends Sprite {
}
}//package
Section 98
//terrain_25 (terrain_25)
package {
import flash.display.*;
public dynamic class terrain_25 extends Sprite {
}
}//package
Section 99
//terrain_26 (terrain_26)
package {
import flash.display.*;
public dynamic class terrain_26 extends Sprite {
}
}//package
Section 100
//terrain_27 (terrain_27)
package {
import flash.display.*;
public dynamic class terrain_27 extends Sprite {
}
}//package
Section 101
//terrain_28 (terrain_28)
package {
import flash.display.*;
public dynamic class terrain_28 extends MovieClip {
}
}//package
Section 102
//terrain_29 (terrain_29)
package {
import flash.display.*;
public dynamic class terrain_29 extends Sprite {
}
}//package
Section 103
//terrain_3 (terrain_3)
package {
import flash.display.*;
public dynamic class terrain_3 extends MovieClip {
}
}//package
Section 104
//terrain_30 (terrain_30)
package {
import flash.display.*;
public dynamic class terrain_30 extends Sprite {
}
}//package
Section 105
//terrain_31 (terrain_31)
package {
import flash.display.*;
public dynamic class terrain_31 extends Sprite {
}
}//package
Section 106
//terrain_32 (terrain_32)
package {
import flash.display.*;
public dynamic class terrain_32 extends Sprite {
}
}//package
Section 107
//terrain_33 (terrain_33)
package {
import flash.display.*;
public dynamic class terrain_33 extends Sprite {
}
}//package
Section 108
//terrain_34 (terrain_34)
package {
import flash.display.*;
public dynamic class terrain_34 extends Sprite {
}
}//package
Section 109
//terrain_35 (terrain_35)
package {
import flash.display.*;
public dynamic class terrain_35 extends Sprite {
}
}//package
Section 110
//terrain_4 (terrain_4)
package {
import flash.display.*;
public dynamic class terrain_4 extends MovieClip {
}
}//package
Section 111
//terrain_5 (terrain_5)
package {
import flash.display.*;
public dynamic class terrain_5 extends MovieClip {
}
}//package
Section 112
//terrain_6 (terrain_6)
package {
import flash.display.*;
public dynamic class terrain_6 extends MovieClip {
}
}//package
Section 113
//terrain_7 (terrain_7)
package {
import flash.display.*;
public dynamic class terrain_7 extends MovieClip {
}
}//package
Section 114
//terrain_8 (terrain_8)
package {
import flash.display.*;
public dynamic class terrain_8 extends MovieClip {
}
}//package
Section 115
//terrain_9 (terrain_9)
package {
import flash.display.*;
public dynamic class terrain_9 extends MovieClip {
}
}//package
Section 116
//UI (UI)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UI extends MovieClip {
public var multi:MovieClip;
public var multi_text:TextField;
public var dist_text:TextField;
public var score_text:TextField;
}
}//package