Section 1
//audio_clips_30 (pumpkin_evasion_fla.audio_clips_30)
package pumpkin_evasion_fla {
import flash.display.*;
public dynamic class audio_clips_30 extends MovieClip {
public function audio_clips_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package pumpkin_evasion_fla
Section 2
//CancelButton_26 (pumpkin_evasion_fla.CancelButton_26)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class CancelButton_26 extends MovieClip {
public var message_text:TextField;
}
}//package pumpkin_evasion_fla
Section 3
//content_holder_8 (pumpkin_evasion_fla.content_holder_8)
package pumpkin_evasion_fla {
import flash.display.*;
public dynamic class content_holder_8 extends MovieClip {
public function content_holder_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package pumpkin_evasion_fla
Section 4
//LoadBar_6 (pumpkin_evasion_fla.LoadBar_6)
package pumpkin_evasion_fla {
import flash.display.*;
public dynamic class LoadBar_6 extends MovieClip {
public var Fill:MovieClip;
}
}//package pumpkin_evasion_fla
Section 5
//NonobaSubmitBox_22 (pumpkin_evasion_fla.NonobaSubmitBox_22)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class NonobaSubmitBox_22 extends MovieClip {
public var score:TextField;
public var Continue:MovieClip;
}
}//package pumpkin_evasion_fla
Section 6
//PointText_29 (pumpkin_evasion_fla.PointText_29)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PointText_29 extends MovieClip {
public var PointText:TextField;
}
}//package pumpkin_evasion_fla
Section 7
//PreloaderScreen_1 (pumpkin_evasion_fla.PreloaderScreen_1)
package pumpkin_evasion_fla {
import flash.display.*;
public dynamic class PreloaderScreen_1 extends MovieClip {
public var loader:LoadBarSymbol;
}
}//package pumpkin_evasion_fla
Section 8
//smallz_earth_2 (pumpkin_evasion_fla.smallz_earth_2)
package pumpkin_evasion_fla {
import flash.display.*;
public dynamic class smallz_earth_2 extends MovieClip {
public var earth:MovieClip;
}
}//package pumpkin_evasion_fla
Section 9
//SmallzSubmitBox_25 (pumpkin_evasion_fla.SmallzSubmitBox_25)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SmallzSubmitBox_25 extends MovieClip {
public var Submit:MovieClip;
public var user_name:TextField;
public var message_text:TextField;
public var score:TextField;
public var Cancel:MovieClip;
}
}//package pumpkin_evasion_fla
Section 10
//SubmitButton_27 (pumpkin_evasion_fla.SubmitButton_27)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SubmitButton_27 extends MovieClip {
public var message_text:TextField;
}
}//package pumpkin_evasion_fla
Section 11
//submitcancelButton_24 (pumpkin_evasion_fla.submitcancelButton_24)
package pumpkin_evasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class submitcancelButton_24 extends MovieClip {
public var message_text:TextField;
}
}//package pumpkin_evasion_fla
Section 12
//AchievementBox (AchievementBox)
package {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class AchievementBox extends MovieClip {
public var _duration:Number;
public var _isComplete:Boolean;
public var _type:int;
public var achievement_text:TextField;
public var _speed:Number;
public var _scale:Number;
public var _initTime:Number;
public var _spawnState:Boolean;// = true
public var user_name:TextField;
public var _state:String;
public var _defaultAchievementText:String;// = "You know how we do!"
public var _defaultDuration:Number;// = 3
public var _scaleSpeed:Number;// = 250
public var _defalutLoc:Point;
public function AchievementBox():void{
_scaleSpeed = 250;
_defaultDuration = 3;
_defalutLoc = new Point(0, 0);
_defaultAchievementText = "You know how we do!";
_spawnState = true;
super();
deactivate();
}
public function startTimer():void{
_initTime = getTimer();
}
public function activate():void{
_state = "Active";
visible = true;
_spawnState = false;
}
public function transitionIn():void{
_scale = 0.01;
scaleX = _scale;
scaleY = _scale;
_state = "Grow";
}
public function deactivate():void{
_state = "Inactive";
visible = false;
_isComplete = true;
}
public function transitionOut():void{
_state = "Shrink";
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
if (isDone()){
transitionOut();
};
break;
case "Grow":
_scale = (_scale + ((_arg1 * _scaleSpeed) / 100));
if (_scale >= 1){
_scale = 1;
startTimer();
_state = "Active";
};
scaleX = _scale;
scaleY = _scale;
break;
case "Shrink":
_scale = (_scale - ((_arg1 * _scaleSpeed) / 100));
if (_scale <= 0.1){
_scale = 1;
deactivate();
};
scaleX = _scale;
scaleY = _scale;
break;
case "Inactive":
break;
};
}
public function isDone():Boolean{
var _local1:Boolean;
_local1 = false;
if (GameManager.elapsedTime(_initTime) >= _duration){
_local1 = true;
};
return (_local1);
}
}
}//package
Section 13
//AchievementBoxManager (AchievementBoxManager)
package {
import flash.display.*;
public class AchievementBoxManager extends MovieClip {
public var active:Array;
public var clips:Array;
public function AchievementBoxManager():void{
clips = new Array();
active = new Array();
super();
}
public function init(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
clips[_local2] = new AchievementBox();
clips[_local2].alpha = 0.95;
addChild(clips[_local2]);
_local2++;
};
}
public function inactiveAchievementBox():int{
var _local1:int;
var _local2:int;
var _local3:int;
_local2 = -1;
_local3 = clips.length;
_local1 = 0;
while (_local1 < _local3) {
if (clips[_local1]._spawnState){
_local2 = _local1;
break;
};
_local1++;
};
return (_local2);
}
public function deactivateAllAchievementBoxes():void{
var _local1:int;
var _local2:int;
_local2 = clips.length;
_local1 = 0;
while (_local1 < _local2) {
clips[_local1].deactivate();
clips[_local1]._spawnState = true;
_local1++;
};
active = new Array();
}
public function spawn(_arg1:String, _arg2:Number):void{
var clipIndex:int;
var achievementText = _arg1;
var duration = _arg2;
clipIndex = inactiveAchievementBox();
if (clipIndex >= 0){
var _local4 = clips[clipIndex];
with (_local4) {
activate();
scaleX = 1;
scaleY = 1;
x = (15 + (201 * clipIndex));
y = (480 - (height + 25));
user_name.text = GameManager._userName;
achievement_text.text = achievementText;
_duration = duration;
transitionIn();
_isComplete = false;
active.push(clips[clipIndex]);
};
};
}
public function update(_arg1:Number):void{
var index:int;
var clipCount:int;
var elapsedTime = _arg1;
clipCount = active.length;
index = 0;
while (index < clipCount) {
var _local3 = active[index];
with (_local3) {
if (_state == "Inactive"){
_spawnState = true;
active.splice(index, 1);
index--;
clipCount--;
} else {
update(elapsedTime);
};
};
index = (index + 1);
};
}
}
}//package
Section 14
//AchievementRecord (AchievementRecord)
package {
public class AchievementRecord {
public var _experiencePoints:int;
public var _achievementKey:String;
public var _achievementName:String;
public var _isAchieved:Boolean;
public function AchievementRecord(_arg1:String, _arg2:String, _arg3:int):void{
_achievementName = _arg1;
_achievementKey = _arg2;
_experiencePoints = _arg3;
_isAchieved = false;
}
}
}//package
Section 15
//Background (Background)
package {
import flash.display.*;
public class Background extends MovieClip {
public var _state:String;
public function Background():void{
deactivate();
}
public function activate():void{
_state = "Active";
visible = true;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
y = -((GameManager.distance - GameManager.viewportY));
break;
};
}
}
}//package
Section 16
//Cloud (Cloud)
package {
import flash.geom.*;
import flash.display.*;
public class Cloud extends MovieClip {
public var _type:int;
public var _velocity:Point;
public var _speed:Number;
public var _scale:Number;
public var _spawnState:Boolean;// = true
public var _state:String;
public var _angle:Number;
public function Cloud():void{
_spawnState = true;
_velocity = new Point(500, 0);
super();
deactivate();
cacheAsBitmap = true;
}
public function activate():void{
_velocity.x = ((Math.random() * 25) + 150);
_state = "Active";
visible = true;
_spawnState = false;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
x = (x + (_velocity.x * _arg1));
if (x > (GameManager.screenWidth + (width * 0.5))){
deactivate();
};
break;
};
}
}
}//package
Section 17
//CloudManager (CloudManager)
package {
import flash.display.*;
import flash.utils.*;
public class CloudManager extends MovieClip {
public var active:Array;
public var clips:Array;
public var spawnInitTime:Number;
public var spawnDelay:Number;// = 3
public function CloudManager():void{
clips = new Array();
active = new Array();
spawnDelay = 3;
spawnInitTime = getTimer();
super();
}
public function init(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
clips[_local2] = new Cloud();
addChild(clips[_local2]);
clips[_local2]._type = (int((Math.random() * totalFrames)) + 1);
clips[_local2].gotoAndStop(clips[_local2]._type);
_local2++;
};
}
public function inactiveClip():int{
var _local1:int;
var _local2:int;
var _local3:int;
_local2 = -1;
_local3 = clips.length;
_local1 = 0;
while (_local1 < _local3) {
if (clips[_local1]._spawnState){
_local2 = _local1;
break;
};
_local1++;
};
return (_local2);
}
public function spawn():void{
var clipIndex:int;
clipIndex = inactiveClip();
if (clipIndex >= 0){
var _local2 = clips[clipIndex];
with (_local2) {
activate();
_type = (int((Math.random() * totalFrames)) + 1);
gotoAndStop(_type);
x = -(width);
y = (Math.random() * 480);
_scale = 1;
scaleX = _scale;
scaleY = _scale;
alpha = 0.35;
active.push(clips[clipIndex]);
};
};
}
public function spawnCheck():void{
if (GameManager.elapsedTime(spawnInitTime) > spawnDelay){
spawnInitTime = getTimer();
spawn();
};
}
public function deactivateAll():void{
var _local1:int;
var _local2:int;
_local2 = clips.length;
_local1 = 0;
while (_local1 < _local2) {
clips[_local1].deactivate();
clips[_local1]._spawnState = true;
_local1++;
};
active = new Array();
}
public function update(_arg1:Number):void{
var index:int;
var count:int;
var elapsedTime = _arg1;
count = active.length;
index = 0;
while (index < count) {
var _local3 = active[index];
with (_local3) {
if (_state == "Inactive"){
_spawnState = true;
active.splice(index, 1);
index--;
count--;
} else {
update(elapsedTime);
};
};
index = (index + 1);
};
}
}
}//package
Section 18
//CloudSymbol_1 (CloudSymbol_1)
package {
import flash.display.*;
public dynamic class CloudSymbol_1 extends MovieClip {
}
}//package
Section 19
//CloudSymbol_2 (CloudSymbol_2)
package {
import flash.display.*;
public dynamic class CloudSymbol_2 extends MovieClip {
}
}//package
Section 20
//CloudSymbol_3 (CloudSymbol_3)
package {
import flash.display.*;
public dynamic class CloudSymbol_3 extends MovieClip {
}
}//package
Section 21
//CloudSymbol_4 (CloudSymbol_4)
package {
import flash.display.*;
public dynamic class CloudSymbol_4 extends MovieClip {
}
}//package
Section 22
//CloudSymbol_5 (CloudSymbol_5)
package {
import flash.display.*;
public dynamic class CloudSymbol_5 extends MovieClip {
}
}//package
Section 23
//CreditsScreen (CreditsScreen)
package {
import flash.display.*;
import flash.events.*;
public class CreditsScreen extends MovieClip {
public var _state:String;
public var Continue:MovieClip;
public function CreditsScreen():void{
x = 0;
y = 0;
_state = "Inactive";
visible = false;
}
public function activate():void{
_state = "Active";
visible = true;
}
public function check_rollovers(){
if (Continue.hitTestPoint(mouseX, mouseY)){
Continue.scaleX = 1.25;
Continue.scaleY = 1.25;
} else {
Continue.scaleX = 1;
Continue.scaleY = 1;
};
}
public function menu_mouseUp(_arg1:MouseEvent){
if (Continue.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "MainMenu";
};
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
switch (_state){
case "Active":
break;
};
}
}
}//package
Section 24
//Dude (Dude)
package {
import flash.display.*;
public class Dude extends MovieClip {
public var collision_ball:MovieClip;
public var _type:int;
public var _speed:Number;
public var _scale:Number;
public var _damage:Number;// = 0
public var _state:String;
public var body:MovieClip;
public var _hitPoints:Number;// = 500
public function Dude():void{
_hitPoints = 500;
_damage = 0;
super();
deactivate();
_scale = 0.5;
scaleX = _scale;
scaleY = _scale;
}
public function activate():void{
_state = "Active";
visible = true;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
x = stage.mouseX;
y = stage.mouseY;
break;
};
}
}
}//package
Section 25
//GameManager (GameManager)
package {
import flash.geom.*;
import flash.utils.*;
public class GameManager {
public static var _highScores:Array;
public static var ScorePopUpControl:ScorePopUpManager;
public static var _gameTitle:String = "Pumpkin Evasion";
public static var gameID:int = 203;
public static var _nonobaHighScoresEnabled:Boolean = true;
public static var _nonobaDebuggerEnabled:Boolean = false;
public static var _highScoresLoaded:Boolean = false;
public static var centerLoc:Point = new Point((screenWidth / 2), (screenHeight / 2));
public static var playerScore:uint = 0;
public static var Debug:Boolean = false;
public static var screenWidth:Number = 640;
public static var _nonobaAchievementsEnabled:Boolean = true;
public static var isMochi:Boolean = true;
public static var screenHeight:Number = 480;
public static var gameState:String = "MainMenu";
public static var clockPulseInitTime:Number = getTimer();
public static var isNonoba:Boolean = false;
public static var _userName:String;
public static var _nonobaSendEnabled:Boolean = true;
public static var health:Number = 100;
public static var mochiID:String = "0c1715f7dbc2de1e";
public static var _highScoresEnabled:Boolean = true;
public static var LevelControl:LevelManager;
public static var UI_Game:GameUIScreen;
public static var viewportY:Number;
public static var _detailLevel:String = "";
public static var distance:Number;
public function GameManager():void{
}
public static function updateUI():void{
UI_Game.score.text = ("Score " + playerScore);
}
public static function initUI(_arg1:GameUIScreen, _arg2:LevelManager):void{
UI_Game = _arg1;
LevelControl = _arg2;
}
public static function initScorePopUpManager(_arg1:ScorePopUpManager):void{
ScorePopUpControl = _arg1;
}
public static function timeString(_arg1:int):String{
var _local2:int;
var _local3:String;
_local2 = Math.floor((_arg1 / 60));
_arg1 = (_arg1 - (_local2 * 60));
_local3 = ((_local2 + ":") + String((_arg1 + 100)).substr(1, 2));
return (_local3);
}
public static function clockPulse():Number{
var _local1:Number;
_local1 = elapsedTime(clockPulseInitTime);
clockPulseInitTime = getTimer();
return (_local1);
}
public static function decrementHealth(_arg1:Number):void{
health = (health - _arg1);
if (health < 0){
health = 0;
};
}
public static function incrementHealth(_arg1:Number):void{
health = (health + _arg1);
if (health > 100){
health = 100;
};
}
public static function scorePopUp(_arg1:String, _arg2:Point):void{
ScorePopUpControl.activate(_arg2, _arg1);
}
public static function resetGame():void{
playerScore = 0;
health = 100;
viewportY = distance;
}
public static function incrementScore(_arg1:int):void{
playerScore = (playerScore + _arg1);
updateUI();
}
public static function elapsedTime(_arg1:Number):Number{
var _local2:Number;
_local2 = ((getTimer() - _arg1) / 1000);
return (_local2);
}
}
}//package
Section 26
//GameUIScreen (GameUIScreen)
package {
import flash.display.*;
import flash.text.*;
public class GameUIScreen extends MovieClip {
public var score:TextField;
public var _state:String;
public function GameUIScreen():void{
x = 0;
y = 0;
deactivate();
}
public function activate():void{
_state = "Active";
visible = true;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
switch (_state){
case "Active":
break;
};
}
}
}//package
Section 27
//GrayBallSymbol (GrayBallSymbol)
package {
import flash.display.*;
public dynamic class GrayBallSymbol extends MovieClip {
}
}//package
Section 28
//HighScoreListingSymbol (HighScoreListingSymbol)
package {
import flash.display.*;
import flash.text.*;
public dynamic class HighScoreListingSymbol extends MovieClip {
public var User:TextField;
public var Rank:TextField;
public var Score:TextField;
}
}//package
Section 29
//HighScoreManager (HighScoreManager)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class HighScoreManager extends MovieClip {
public function HighScoreManager():void{
}
public function load_highscores(_arg1:int):void{
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:URLLoader;
_local2 = new URLRequest("http://games.smallzworld.com/RecordManagement.php");
_local3 = new URLVariables();
_local3.Routine = "AS3LoadHighScores";
_local3.Game_ID = _arg1;
_local2.data = _local3;
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.VARIABLES;
_local4.addEventListener(Event.COMPLETE, highscores_handler);
_local4.load(_local2);
GameManager.gameState = "Loading";
GameManager._highScoresLoaded = false;
trace("high scores sent");
}
private function highscores_handler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:int;
var _local4:Array;
_local2 = URLLoader(_arg1.target);
_local4 = new Array();
trace("high scores handler");
_local3 = 1;
while (_local3 <= 10) {
if (_local2.data[("Score_" + _local3)]){
_local4[(_local3 - 1)] = new HighScoreRecord(_local3, _local2.data[("User_" + _local3)], _local2.data[("Score_" + _local3)], 0, "");
};
_local3++;
};
GameManager._highScores = _local4;
GameManager._highScoresLoaded = true;
GameManager.gameState = "HighScores";
}
public function save_highscore(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:String):void{
var _local8:URLRequest;
var _local9:URLVariables;
var _local10:URLLoader;
_local8 = new URLRequest("http://games.smallzworld.com/RecordManagement.php");
_local9 = new URLVariables();
_local9.Routine = "AddHighScore";
_local9.Game_ID = _arg1;
_local9.Profile_ID = _arg2;
_local9.UserName = _arg3;
_local9.Level = _arg4;
_local9.Score = _arg5;
_local9.TimeScore = _arg6;
_local9.Comment = _arg7;
_local8.data = _local9;
_local10 = new URLLoader();
_local10.dataFormat = URLLoaderDataFormat.VARIABLES;
_local10.addEventListener(Event.COMPLETE, save_highscore_handler);
_local10.load(_local8);
GameManager.gameState = "Saving";
trace("Sent High Score");
}
private function save_highscore_handler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:int;
_local2 = URLLoader(_arg1.target);
trace("Back from save high score");
GameManager.gameState = "HighScores";
}
}
}//package
Section 30
//HighScoreRecord (HighScoreRecord)
package {
public class HighScoreRecord {
public var _comment:String;
public var _level:int;
public var _rank:int;
public var _user:String;
public var _score:Number;
public function HighScoreRecord(_arg1:int, _arg2:String, _arg3:Number, _arg4:int, _arg5:String):void{
_rank = _arg1;
_user = _arg2;
_score = _arg3;
_level = _arg4;
_comment = _arg5;
}
}
}//package
Section 31
//HighScoresScreen (HighScoresScreen)
package {
import flash.display.*;
import flash.events.*;
public class HighScoresScreen extends MovieClip {
public var score_10:HighScoreListingSymbol;
public var _state:String;
public var score_2:HighScoreListingSymbol;
public var score_6:HighScoreListingSymbol;
public var score_7:HighScoreListingSymbol;
public var score_9:HighScoreListingSymbol;
public var score_3:HighScoreListingSymbol;
public var Continue:MovieClip;
public var score_5:HighScoreListingSymbol;
public var score_8:HighScoreListingSymbol;
public var score_1:HighScoreListingSymbol;
public var score_4:HighScoreListingSymbol;
public function HighScoresScreen():void{
x = 0;
y = 0;
_state = "Inactive";
visible = false;
}
public function activate():void{
var _local1:int;
_state = "Active";
visible = true;
_local1 = 1;
while (_local1 <= 10) {
this[("score_" + _local1)].visible = false;
_local1++;
};
}
public function check_rollovers():void{
if (Continue.hitTestPoint(mouseX, mouseY)){
Continue.scaleX = 1.25;
Continue.scaleY = 1.25;
} else {
Continue.scaleX = 1;
Continue.scaleY = 1;
};
}
public function menu_mouseUp(_arg1:MouseEvent):void{
if (Continue.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "MainMenu";
};
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
var index:int;
var score_count:int;
var score_index:int;
score_count = GameManager._highScores.length;
index = 0;
while (index < score_count) {
var _local2 = GameManager;
with (_local2) {
score_index = (index + 1);
this[("score_" + score_index)].Rank.text = String(_highScores[index]._rank);
this[("score_" + score_index)].Score.text = String(_highScores[index]._score);
this[("score_" + score_index)].User.text = _highScores[index]._user;
this[("score_" + score_index)].visible = true;
};
index = (index + 1);
};
}
}
}//package
Section 32
//InstructionsScreen (InstructionsScreen)
package {
import flash.display.*;
import flash.events.*;
public class InstructionsScreen extends MovieClip {
public var _state:String;
public var Continue:MovieClip;
public function InstructionsScreen():void{
x = 0;
y = 0;
_state = "Inactive";
visible = false;
}
public function activate():void{
_state = "Active";
visible = true;
}
public function check_rollovers():void{
if (Continue.hitTestPoint(mouseX, mouseY)){
Continue.scaleX = 1.25;
Continue.scaleY = 1.25;
} else {
Continue.scaleX = 1;
Continue.scaleY = 1;
};
}
public function menu_mouseUp(_arg1:MouseEvent):void{
if (Continue.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "MainMenu";
};
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
switch (_state){
case "Active":
break;
};
}
}
}//package
Section 33
//LevelManager (LevelManager)
package {
import flash.utils.*;
public class LevelManager {
public var _collected:int;
public var _targetColor:int;
public var _orbCount:Number;
public var _type:String;
public var _caption:String;
public var _currentLevel:int;
public var _spawnDelay:Number;
public var _duration:Number;
public var _timerInit:Number;
public var _orbColorCount:Number;
public var _description:String;
public var _targetCount:int;
public function LevelManager():void{
}
public function startTimer():void{
_timerInit = getTimer();
}
public function timerValue():Number{
var _local1:Number;
_local1 = GameManager.elapsedTime(_timerInit);
return (_local1);
}
public function nextLevel():void{
_currentLevel++;
}
public function initLevel():void{
trace(("current level : " + _currentLevel));
switch (_currentLevel){
case 1:
_type = "Collect";
_duration = 60;
_caption = "I like red orbs!";
_description = "You have 1 minute to collect as many red orbs as you can, without touching any orbs of another color.";
_orbCount = 15;
_orbColorCount = 3;
_targetColor = 1;
_targetCount = 5;
_collected = 0;
break;
case 2:
_type = "Push";
_duration = 60;
_caption = "Yellow Push";
_description = "Now it's time to push the Yellow orbs into each other. You have 1 minute to clear all the yellow orbs.";
_orbCount = 18;
_orbColorCount = 3;
_targetColor = 2;
_targetCount = 6;
_collected = 0;
break;
};
}
}
}//package
Section 34
//LoadBarSymbol (LoadBarSymbol)
package {
import flash.display.*;
public dynamic class LoadBarSymbol extends MovieClip {
public var load_bar:MovieClip;
}
}//package
Section 35
//MainMenuScreen (MainMenuScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class MainMenuScreen extends MovieClip {
public var PlayGame:MovieClip;
public var HighScores:MovieClip;
public var _state:String;
public var Credits:MovieClip;
public var nonoba_text:TextField;
public var Instructions:MovieClip;
public var game_title:TextField;
public var LeaderBoards:MovieClip;
public function MainMenuScreen():void{
x = 0;
y = 0;
_state = "Inactive";
visible = false;
game_title.text = GameManager._gameTitle;
}
public function activate():void{
_state = "Active";
visible = true;
}
public function check_rollovers():void{
if (PlayGame.hitTestPoint(mouseX, mouseY)){
PlayGame.scaleX = 1.25;
PlayGame.scaleY = 1.25;
} else {
PlayGame.scaleX = 1;
PlayGame.scaleY = 1;
};
if (Instructions.hitTestPoint(mouseX, mouseY)){
Instructions.scaleX = 1.25;
Instructions.scaleY = 1.25;
} else {
Instructions.scaleX = 1;
Instructions.scaleY = 1;
};
if (Credits.hitTestPoint(mouseX, mouseY)){
Credits.scaleX = 1.25;
Credits.scaleY = 1.25;
} else {
Credits.scaleX = 1;
Credits.scaleY = 1;
};
if (HighScores.hitTestPoint(mouseX, mouseY)){
HighScores.scaleX = 1.25;
HighScores.scaleY = 1.25;
} else {
HighScores.scaleX = 1;
HighScores.scaleY = 1;
};
if (LeaderBoards.hitTestPoint(mouseX, mouseY)){
LeaderBoards.scaleX = 1.25;
LeaderBoards.scaleY = 1.25;
} else {
LeaderBoards.scaleX = 1;
LeaderBoards.scaleY = 1;
};
}
public function menu_mouseUp(_arg1:MouseEvent){
var _local2:URLRequest;
if (PlayGame.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "Reset";
};
if (Instructions.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "Instructions";
};
if (Credits.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "Credits";
};
if (((HighScores.hitTestPoint(_arg1.stageX, _arg1.stageY)) && (!(GameManager.isNonoba)))){
deactivate();
GameManager.gameState = "HighScores";
};
if (((LeaderBoards.hitTestPoint(_arg1.stageX, _arg1.stageY)) && (!(GameManager.isNonoba)))){
_local2 = new URLRequest(("http://games.smallzworld.com/Main.php?PageType=DisplayHighScores&Game_ID=" + GameManager.gameID));
navigateToURL(_local2);
};
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
switch (_state){
case "Active":
break;
};
}
}
}//package
Section 36
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 37
//MoonSymbol (MoonSymbol)
package {
import flash.display.*;
public dynamic class MoonSymbol extends MovieClip {
}
}//package
Section 38
//MuteButton (MuteButton)
package {
import flash.display.*;
public dynamic class MuteButton extends MovieClip {
}
}//package
Section 39
//MyArial (MyArial)
package {
import flash.text.*;
public dynamic class MyArial extends Font {
}
}//package
Section 40
//NonobaAPI (NonobaAPI)
package {
import flash.display.*;
import flash.events.*;
import flash.system.*;
import flash.net.*;
public class NonobaAPI {
public static const SUCCESS:String = "success";
public static const ERROR:String = "error";
public static const NOT_LOGGED_IN:String = "user not logged in";
private static var isInited:Boolean = false;
private static var cachedRequests:Array = [];
private static var api:Object;
private static var loading:Boolean = false;
private static var failed:Boolean = false;
public function NonobaAPI(){
throw (new Error("You cannot create an instance of the NonobaAPI class!"));
}
public static function SubmitScore(_arg1:Stage, _arg2:String, _arg3:Number, _arg4:Function=null){
var stage = _arg1;
var key = _arg2;
var score = _arg3;
var callback = _arg4;
if (!isInited){
init(stage);
};
if (failed){
if (callback != null){
callback(ERROR);
};
return;
};
if (((api.content) && (api.content.SubmitScore))){
api.content.SubmitScore(stage, key, score, callback);
} else {
cachedRequests.push(function (){
SubmitScore(stage, key, score, callback);
});
};
}
private static function handleLoadCompleate(_arg1:Event){
emptyQueue();
}
private static function emptyQueue(){
var _local1:int;
_local1 = 0;
while (_local1 < cachedRequests.length) {
var _local2 = cachedRequests;
_local2[_local1]();
_local1++;
};
cachedRequests = [];
}
private static function init(_arg1:Stage){
var _local2:Object;
var _local3:URLRequest;
isInited = true;
_local2 = LoaderInfo(_arg1.root.loaderInfo).parameters;
if (!_local2.nonoba$apicodeas3){
enterErrorState();
return;
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
api = new Loader();
_local3 = new URLRequest(_local2.nonoba$apicodeas3);
api.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadCompleate);
api.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, enterErrorState);
api.load(_local3);
}
private static function enterErrorState(_arg1:Event=null){
failed = true;
emptyQueue();
}
public static function GetUserData(_arg1:Stage, _arg2:String, _arg3:Function=null){
var stage = _arg1;
var key = _arg2;
var callback = _arg3;
if (!isInited){
init(stage);
};
if (failed){
if (callback != null){
callback(ERROR);
};
return;
};
if (((api.content) && (api.content.GetUserData))){
api.content.GetUserData(stage, key, callback);
} else {
cachedRequests.push(function (){
GetUserData(stage, key, callback);
});
};
}
public static function AwardAchievement(_arg1:Stage, _arg2:String, _arg3:Function=null){
var stage = _arg1;
var key = _arg2;
var callback = _arg3;
if (!isInited){
init(stage);
};
if (failed){
if (callback != null){
callback(ERROR, 0);
};
return;
};
if (((api.content) && (api.content.AwardAchievement))){
api.content.AwardAchievement(stage, key, callback);
} else {
cachedRequests.push(function (){
AwardAchievement(stage, key, callback);
});
};
}
public static function GetUsername(_arg1:Stage, _arg2:Function=null){
var stage = _arg1;
var callback = _arg2;
if (!isInited){
init(stage);
};
if (failed){
if (callback != null){
callback(ERROR, "");
};
return;
};
if (((api.content) && (api.content.GetUsername))){
api.content.GetUsername(stage, callback);
} else {
cachedRequests.push(function (){
GetUsername(stage, callback);
});
};
}
public static function SetUserData(_arg1:Stage, _arg2:String, _arg3:String, _arg4:Function=null){
var stage = _arg1;
var key = _arg2;
var value = _arg3;
var callback = _arg4;
if (!isInited){
init(stage);
};
if (failed){
if (callback != null){
callback(ERROR);
};
return;
};
if (((api.content) && (api.content.SetUserData))){
api.content.SetUserData(stage, key, value, callback);
} else {
cachedRequests.push(function (){
SetUserData(stage, key, value, callback);
});
};
}
}
}//package
Section 41
//NonobaDebugBox (NonobaDebugBox)
package {
import flash.display.*;
import flash.text.*;
public dynamic class NonobaDebugBox extends MovieClip {
public var log:TextField;
}
}//package
Section 42
//NonobaManager (NonobaManager)
package {
import flash.display.*;
import flash.utils.*;
public class NonobaManager extends MovieClip {
public var _achievements:Array;
public var _userName:String;// = "Default"
public var AchievementBoxControl:AchievementBoxManager;
public var _state:String;
public var _debugToggleDelay:Number;// = 0.25
public var _debugBox:NonobaDebugBox;
public var _debugToggleInitTime:Number;
public function NonobaManager():void{
_userName = "Default";
_achievements = new Array();
_debugToggleDelay = 0.25;
super();
AchievementBoxControl = new AchievementBoxManager();
addChild(AchievementBoxControl);
AchievementBoxControl.init(15);
if (GameManager._nonobaDebuggerEnabled){
_debugBox = new NonobaDebugBox();
addChild(_debugBox);
_debugToggleInitTime = getTimer();
};
}
public function toggleDebugBox():void{
if (((GameManager.isNonoba) && (GameManager._nonobaDebuggerEnabled))){
if (GameManager.elapsedTime(_debugToggleInitTime) > _debugToggleDelay){
trace("toggle it");
if (_debugBox.visible){
_debugBox.visible = false;
} else {
trace("hide");
_debugBox.visible = true;
};
_debugToggleInitTime = getTimer();
};
};
}
public function resetAchievements():void{
var _local1:int;
var _local2:int;
_local2 = _achievements.length;
_local1 = 0;
while (_local1 < _local2) {
_achievements[_local1]._isAchieved = false;
_local1++;
};
}
public function markAchievement(_arg1:String):void{
var _local2:int;
var _local3:int;
_local3 = _achievements.length;
_local2 = 0;
while (_local2 < _local3) {
if (_achievements[_local2]._achievementKey == _arg1){
setAchievement(_arg1);
_achievements[_local2]._isAchieved = true;
spawnAchievementBox((("Congrats, you achieved " + _achievements[_local2]._achievementName) + "!"), 3);
break;
};
_local2++;
};
}
public function getUsername():void{
_userName = "Error Clown Sent";
NonobaAPI.GetUsername(stage, function (_arg1:String, _arg2:String){
switch (_arg1){
case NonobaAPI.SUCCESS:
_userName = _arg2;
break;
case NonobaAPI.NOT_LOGGED_IN:
_arg2 = "Clown";
break;
case NonobaAPI.ERROR:
_arg2 = "Error Clown";
break;
};
_userName = _arg2;
GameManager._userName = _userName;
});
}
public function updateDebugBox():void{
if (((GameManager.isNonoba) && (GameManager._nonobaDebuggerEnabled))){
_debugBox.log.text = achievementsLogString();
};
}
public function spawnAchievementBox(_arg1:String, _arg2:Number):void{
AchievementBoxControl.spawn(_arg1, _arg2);
}
public function setAchievement(_arg1:String):void{
var achievementKey = _arg1;
if (GameManager._nonobaSendEnabled){
NonobaAPI.AwardAchievement(this.stage, achievementKey, function (_arg1:String, _arg2:Number){
switch (_arg1){
case NonobaAPI.SUCCESS:
trace("The achievement was successfully awarded.");
trace((("It has been awarded " + _arg2) + " times."));
break;
case NonobaAPI.NOT_LOGGED_IN:
trace("The user is not logged in.");
break;
case NonobaAPI.ERROR:
trace("An error occurred.");
break;
};
});
};
}
public function isAchieved(_arg1:String):Boolean{
var _local2:int;
var _local3:int;
var _local4:Boolean;
_local3 = _achievements.length;
_local2 = 0;
while (_local2 < _local3) {
if (_achievements[_local2]._achievementKey == _arg1){
_local4 = _achievements[_local2]._isAchieved;
break;
};
_local2++;
};
return (_local4);
}
public function saveHighscore(_arg1:String, _arg2:Number):void{
var keyName = _arg1;
var playerScore = _arg2;
if (GameManager._nonobaSendEnabled){
NonobaAPI.SubmitScore(this.stage, keyName, playerScore, function (_arg1:String){
switch (_arg1){
case NonobaAPI.SUCCESS:
break;
case NonobaAPI.NOT_LOGGED_IN:
break;
case NonobaAPI.ERROR:
break;
};
});
};
}
public function achievementsLogString():String{
var _local1:String;
var _local2:int;
var _local3:int;
_local1 = "";
_local3 = _achievements.length;
_local2 = 0;
while (_local2 < _local3) {
_local1 = ((((_local1 + _achievements[_local2]._achievementName) + " : ") + String(_achievements[_local2]._isAchieved)) + "\n");
_local2++;
};
return (_local1);
}
public function addAchievement(_arg1:String, _arg2:String, _arg3:int):void{
_achievements[_achievements.length] = new AchievementRecord(_arg1, _arg2, _arg3);
}
}
}//package
Section 43
//PopUp (PopUp)
package {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class PopUp extends MovieClip {
public var _duration:Number;
public var _isComplete:Boolean;
public var box_text:TextField;
public var _scale:Number;
public var _initTime:Number;
public var _state:String;
public var _defaultCaption:String;// = "You know how we do!"
public var title_text:TextField;
public var _defaultDuration:Number;// = 3
public var _scaleSpeed:Number;// = 250
public var _defalutLoc:Point;
public var _defaultBody:String;// = "This is where you put popup text"
public function PopUp():void{
_scaleSpeed = 250;
_defaultDuration = 3;
_defalutLoc = new Point(0, 0);
_defaultCaption = "You know how we do!";
_defaultBody = "This is where you put popup text";
super();
deactivate();
}
public function startTimer():void{
_initTime = getTimer();
}
public function activate(_arg1, _arg2:String, _arg3:Point, _arg4:Number):void{
x = _arg3.x;
y = _arg3.y;
_state = "Active";
title_text.text = _arg1;
box_text.text = _arg2;
_duration = _arg4;
transitionIn();
_isComplete = false;
visible = true;
}
public function transitionIn():void{
_scale = 0.01;
scaleX = _scale;
scaleY = _scale;
_state = "Grow";
}
public function deactivate():void{
_state = "Inactive";
visible = false;
_isComplete = true;
}
public function transitionOut():void{
_state = "Shrink";
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
if (isDone()){
transitionOut();
};
break;
case "Grow":
_scale = (_scale + ((_arg1 * _scaleSpeed) / 100));
if (_scale >= 1){
_scale = 1;
startTimer();
_state = "Active";
};
scaleX = _scale;
scaleY = _scale;
break;
case "Shrink":
_scale = (_scale - ((_arg1 * _scaleSpeed) / 100));
if (_scale <= 0.1){
_scale = 1;
deactivate();
};
scaleX = _scale;
scaleY = _scale;
break;
case "Inactive":
break;
};
}
public function isDone():Boolean{
var _local1:Boolean;
_local1 = false;
if (GameManager.elapsedTime(_initTime) >= _duration){
_local1 = true;
};
return (_local1);
}
}
}//package
Section 44
//Pumpkin (Pumpkin)
package {
import flash.geom.*;
import flash.display.*;
public class Pumpkin extends MovieClip {
public var _type:int;
public var _speed:Number;
public var _scale:Number;
public var _targetLoc:Point;
public var _spawnState:Boolean;// = true
public var _state:String;
public var _velocityVector:Point;
public var _originLoc:Point;
public var _angle:Number;
public function Pumpkin():void{
_spawnState = true;
super();
addFrameScript(50, frame51);
deactivate();
_originLoc = new Point(0, 0);
_targetLoc = new Point(0, 0);
_velocityVector = new Point(0, 0);
cacheAsBitmap = true;
}
public function activate():void{
_state = "Active";
visible = true;
_spawnState = false;
gotoAndPlay(1);
}
public function deactivate():void{
gotoAndStop(1);
_state = "Inactive";
visible = false;
}
public function getNewTargetLoc():void{
_originLoc = new Point(x, y);
_targetLoc = new Point((Math.random() * 640), (Math.random() * 480));
_angle = smallzMath.pGetAngle(_originLoc, _targetLoc);
if (x > _targetLoc.x){
scaleX = _scale;
} else {
scaleX = -(_scale);
};
}
public function update(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
switch (_state){
case "Active":
_velocityVector.x = ((_speed * _arg1) * Math.cos(_angle));
_velocityVector.y = ((_speed * _arg1) * Math.sin(_angle));
x = (x + _velocityVector.x);
y = (y + _velocityVector.y);
_local2 = smallzMath.pDistance(_originLoc, new Point(x, y));
_local3 = smallzMath.pDistance(_originLoc, _targetLoc);
if (_local2 > _local3){
deactivate();
GameManager.incrementScore(25);
};
break;
};
}
function frame51(){
this.gotoAndPlay(1);
}
}
}//package
Section 45
//pumpkin_evasion (pumpkin_evasion)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
public dynamic class pumpkin_evasion extends MovieClip {
private var faultCount:int;// = 0
private var UI_MainMenu:MainMenuScreen;
public var _jumpTimer:Timer;
private var UI_Submit:SubmitScoreScreen;
public var Mute:MuteButton;
private var TheBackground:Background;
public var _timerCount:Number;
public var ScorePopUpControl:ScorePopUpManager;
public var spawnTimer:Timer;
public var _countdown:Array;
private var UI_Game:GameUIScreen;
public var PumpkinControl:PumpkinManager;
public var NonobaControl:NonobaManager;
public var RainControl:RainManager;
private var UI_HighScores:HighScoresScreen;
public var PopUp_UI:PopUp;
public var FPS_Display:smallzFPS;
public var _loader:Loader;
public var HighScoreControl:HighScoreManager;
public var KeyboardControl:smallzKeyboardManager;
public var LevelControl:LevelManager;
public var PlayerDude:Dude;
public var CloudControl:CloudManager;
private var UI_Instructions:InstructionsScreen;
private var Soundtrack:SoundtrackMusic;
private var UI_Credits:CreditsScreen;
public var load_screen:MovieClip;
public var _browser:MovieClip;
private var load_percent:Number;
public static var Debug:smallzDebug;
public function pumpkin_evasion(){
faultCount = 0;
super();
addFrameScript(0, frame1, 2, frame3, 3, frame4);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://games.smallzworld.com/crossdomain.xml");
}
public function faultCheck(_arg1:Number):Number{
if (_arg1 > 0.2){
faultCount++;
_arg1 = 0.2;
if (faultCount > 80){
stage.quality = StageQuality.MEDIUM;
GameManager._detailLevel = "low detail";
};
};
return (_arg1);
}
public function preload(){
stop();
this.addEventListener(Event.ENTER_FRAME, showProgress);
}
public function initApplication(){
loadBrowser("http://games.smallzworld.com/media/flash/headers/browser.swf");
Soundtrack = new SoundtrackMusic();
SoundManager.addSound("Soundtrack", Soundtrack);
TheBackground = new Background();
addChild(TheBackground);
TheBackground.activate();
GameManager.distance = TheBackground.height;
LevelControl = new LevelManager();
NonobaControl = new NonobaManager();
addChild(NonobaControl);
PumpkinControl = new PumpkinManager();
addChild(PumpkinControl);
PumpkinControl.init(25);
PlayerDude = new Dude();
addChild(PlayerDude);
UI_Game = new GameUIScreen();
addChild(UI_Game);
UI_MainMenu = new MainMenuScreen();
addChild(UI_MainMenu);
UI_Instructions = new InstructionsScreen();
addChild(UI_Instructions);
UI_Credits = new CreditsScreen();
addChild(UI_Credits);
UI_HighScores = new HighScoresScreen();
addChild(UI_HighScores);
UI_Submit = new SubmitScoreScreen();
addChild(UI_Submit);
PopUp_UI = new PopUp();
addChild(PopUp_UI);
GameManager.initUI(UI_Game, LevelControl);
ScorePopUpControl = new ScorePopUpManager();
addChild(ScorePopUpControl);
ScorePopUpControl.init(10);
GameManager.initScorePopUpManager(ScorePopUpControl);
Mute = new MuteButton();
addChild(Mute);
Mute.gotoAndStop(1);
Mute.x = 10;
Mute.y = 10;
HighScoreControl = new HighScoreManager();
KeyboardControl = new smallzKeyboardManager();
addChild(KeyboardControl);
KeyboardControl.init();
stage.addEventListener(Event.ENTER_FRAME, mainLoop);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
if (GameManager.isNonoba){
NonobaControl.getUsername();
defineAchievements();
UI_MainMenu.LeaderBoards.visible = false;
UI_MainMenu.HighScores.visible = false;
};
CloudControl = new CloudManager();
CloudControl.init(5);
addChild(CloudControl);
RainControl = new RainManager();
RainControl.init(35);
addChild(RainControl);
SoundManager.loopSound("Soundtrack");
addChild(_browser);
}
public function adjustSpawnRate(_arg1:TimerEvent){
PumpkinControl.spawnDelay = (PumpkinControl.spawnDelay * 0.95);
trace(PumpkinControl.spawnDelay);
}
public function showProgress(_arg1:Event):void{
load_percent = Math.round(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
load_screen.loader.load_bar.Fill.width = (198 * (load_percent / 100));
trace("Preloading");
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
trace("Done loading");
this.removeEventListener(Event.ENTER_FRAME, showProgress);
load_screen.visible = false;
showAds(GameManager.mochiID, GameManager.isMochi);
};
}
private function checkAchievements():void{
}
private function checkEndLevelAchievements():void{
}
public function mouseDownHandler(_arg1:MouseEvent){
if (Mute.hitTestPoint(mouseX, mouseY)){
if (!SoundManager._mute){
SoundManager._mute = true;
SoundManager.stopSound("Soundtrack");
Mute.gotoAndStop(2);
} else {
SoundManager._mute = false;
SoundManager.restartSound("Soundtrack", 999);
Mute.gotoAndStop(1);
};
};
switch (GameManager.gameState){
case "Game":
break;
case "LevelPrompt":
PopUp_UI._duration = 0;
break;
case "MainMenu":
UI_MainMenu.menu_mouseUp(_arg1);
break;
case "Instructions":
UI_Instructions.menu_mouseUp(_arg1);
break;
case "Credits":
UI_Credits.menu_mouseUp(_arg1);
break;
case "HighScores":
UI_HighScores.menu_mouseUp(_arg1);
break;
case "GameOver":
UI_Submit.menu_mouseUp(_arg1);
break;
};
}
function frame3(){
stop();
}
function frame4(){
gotoAndPlay(2);
}
public function showAds(_arg1:String, _arg2:Boolean){
stop();
if (_arg2){
MochiAd.showPreGameAd({clip:root, id:_arg1, res:"640x480", background:39423, color:204, outline:0xFFFFFF, ad_finished:adFinished});
} else {
adFinished();
};
}
function frame1(){
preload();
}
private function defineAchievements():void{
}
private function processInput(){
if (KeyboardControl.isPressed(37)){
};
if (KeyboardControl.isPressed(38)){
};
if (KeyboardControl.isPressed(39)){
};
if (KeyboardControl.isPressed(40)){
};
if (KeyboardControl.isPressed(32)){
NonobaControl.toggleDebugBox();
};
}
private function checkEndGameAchievements():void{
}
function browserLoadedHandler(_arg1:Event):void{
trace(((_browser.height + " : ") + stage.height));
_browser.addChild(_loader.content);
_browser.x = 0;
trace(((_browser.height + " : ") + stage.height));
_browser.y = 175;
}
function loadBrowser(_arg1:String):void{
var _local2:URLRequest;
_local2 = new URLRequest(((_arg1 + "?") + String(getTimer())));
_browser = new MovieClip();
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, browserLoadedHandler);
_loader.load(_local2);
}
public function adFinished():void{
load_screen.visible = false;
GameManager.gameState = "MainMenu";
gotoAndPlay(2);
initApplication();
}
private function mainLoop(_arg1:Event){
var _local2:Number;
var _local3:String;
_local2 = GameManager.clockPulse();
_local2 = faultCheck(_local2);
processInput();
if (GameManager.isNonoba){
NonobaControl.AchievementBoxControl.update(_local2);
};
if (GameManager.gameState != "MainMenu"){
_browser.visible = false;
} else {
_browser.visible = true;
};
CloudControl.spawnCheck();
CloudControl.update(_local2);
RainControl.spawnCheck();
RainControl.update(_local2);
switch (GameManager.gameState){
case "Game":
if (UI_Game._state == "Inactive"){
UI_Game.activate();
PlayerDude.activate();
Mouse.hide();
spawnTimer = new Timer(5000, 0);
spawnTimer.start();
spawnTimer.addEventListener(TimerEvent.TIMER, adjustSpawnRate);
};
if (((GameManager.isNonoba) && (GameManager._nonobaAchievementsEnabled))){
checkAchievements();
NonobaControl.updateDebugBox();
};
PumpkinControl.spawnCheck();
PumpkinControl.update(_local2);
PlayerDude.update(_local2);
if (PumpkinControl.checkCollision(PlayerDude)){
Mouse.show();
GameManager.gameState = "GameOver";
};
TheBackground.update(_local2);
break;
case "MainMenu":
if (UI_MainMenu._state == "Inactive"){
UI_MainMenu.activate();
UI_Game.deactivate();
_browser.visible = true;
};
if (GameManager.isNonoba){
UI_MainMenu.nonoba_text.text = (("Welcome " + NonobaControl._userName) + "!\nGood luck in Template, and don't forget to check out my profile for new games!");
} else {
UI_MainMenu.nonoba_text.visible = false;
};
UI_MainMenu.check_rollovers();
break;
case "LevelSetup":
GameManager.gameState = "LevelPrompt";
break;
case "LevelPrompt":
if (PopUp_UI._state == "Inactive"){
PopUp_UI.activate("Get Ready!", "Avoid the pumpkins!\n\nClick to begin", GameManager.centerLoc, 3000);
};
PopUp_UI.update(_local2);
if (PopUp_UI._isComplete){
GameManager.gameState = "Game";
};
break;
case "Instructions":
if (UI_Instructions._state == "Inactive"){
UI_Instructions.activate();
};
UI_Instructions.check_rollovers();
break;
case "Credits":
if (UI_Credits._state == "Inactive"){
UI_Credits.activate();
};
UI_Credits.check_rollovers();
break;
case "GameOver":
if (UI_Submit._state == "Inactive"){
spawnTimer.removeEventListener(TimerEvent.TIMER, adjustSpawnRate);
UI_Submit.activate();
if (GameManager.isNonoba){
if (GameManager._nonobaAchievementsEnabled){
checkEndGameAchievements();
};
if (GameManager._nonobaHighScoresEnabled){
NonobaControl.saveHighscore("highscores", GameManager.playerScore);
};
};
};
UI_Submit.check_rollovers();
break;
case "SaveHighScore":
if (GameManager._highScoresEnabled){
if (GameManager.isNonoba){
_local3 = ("Nonoba - " + GameManager._userName);
} else {
_local3 = GameManager._userName;
};
HighScoreControl.save_highscore(GameManager.gameID, 0, _local3, LevelControl._currentLevel, GameManager.playerScore, 0, "No Comment");
if (GameManager.isMochi){
MochiAd.showInterLevelAd({clip:root, id:GameManager.mochiID, res:"640x480", background:39423, color:204, outline:0xFFFFFF});
};
};
break;
case "HighScores":
if (UI_HighScores._state == "Inactive"){
UI_HighScores.activate();
HighScoreControl.load_highscores(GameManager.gameID);
};
if (GameManager._highScoresLoaded){
UI_HighScores.update();
GameManager._highScoresLoaded = false;
};
UI_HighScores.check_rollovers();
break;
case "Reset":
GameManager.resetGame();
NonobaControl.resetAchievements();
LevelControl._currentLevel = 1;
PumpkinControl.deactivateAll();
PumpkinControl.spawnDelay = 0.9;
GameManager.updateUI();
GameManager.gameState = "LevelSetup";
break;
};
}
}
}//package
Section 46
//PumpkinManager (PumpkinManager)
package {
import flash.display.*;
import flash.utils.*;
public class PumpkinManager extends MovieClip {
public var active:Array;
public var clips:Array;
public var spawnInitTime:Number;
public var spawnDelay:Number;// = 1.5
public function PumpkinManager():void{
clips = new Array();
active = new Array();
spawnDelay = 1.5;
spawnInitTime = getTimer();
super();
}
public function init(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
clips[_local2] = new Pumpkin();
addChild(clips[_local2]);
clips[_local2]._type = 1;
clips[_local2].gotoAndStop(clips[_local2]._type);
_local2++;
};
}
public function checkCollision(_arg1:Dude):Boolean{
var _local2:int;
var _local3:int;
var _local4:Boolean;
_local3 = active.length;
_local4 = false;
_local2 = 0;
while (_local2 < _local3) {
if (active[_local2].hitTestObject(_arg1.collision_ball)){
_local4 = true;
};
_local2++;
};
return (_local4);
}
public function inactiveClip():int{
var _local1:int;
var _local2:int;
var _local3:int;
_local2 = -1;
_local3 = clips.length;
_local1 = 0;
while (_local1 < _local3) {
if (clips[_local1]._spawnState){
_local2 = _local1;
break;
};
_local1++;
};
return (_local2);
}
public function spawn():void{
var clipIndex:int;
var originAngle:Number;
var targetAngle:Number;
var radiusX:Number;
var radiusY:Number;
clipIndex = inactiveClip();
radiusX = 400;
radiusY = 320;
originAngle = ((Math.random() * 360) + 1);
targetAngle = ((originAngle + 140) + (Math.random() * 80));
if (targetAngle > 360){
targetAngle = (targetAngle - 360);
};
originAngle = ((originAngle * Math.PI) / 180);
targetAngle = ((targetAngle * Math.PI) / 180);
if (clipIndex >= 0){
var _local2 = clips[clipIndex];
with (_local2) {
activate();
_originLoc.x = (GameManager.centerLoc.x + (radiusX * Math.cos(originAngle)));
_originLoc.y = (GameManager.centerLoc.y + (radiusY * Math.sin(originAngle)));
_targetLoc.x = (GameManager.centerLoc.x + (radiusX * Math.cos(targetAngle)));
_targetLoc.y = (GameManager.centerLoc.y + (radiusY * Math.sin(targetAngle)));
x = _originLoc.x;
y = _originLoc.y;
_speed = ((Math.random() * 100) + 150);
_angle = smallzMath.pGetAngle(_originLoc, _targetLoc);
_scale = 0.1;
scaleX = _scale;
scaleY = _scale;
active.push(clips[clipIndex]);
};
};
}
public function spawnCheck():void{
if (GameManager.elapsedTime(spawnInitTime) > spawnDelay){
spawnInitTime = getTimer();
spawn();
};
}
public function deactivateAll():void{
var _local1:int;
var _local2:int;
_local2 = clips.length;
_local1 = 0;
while (_local1 < _local2) {
clips[_local1].deactivate();
clips[_local1]._spawnState = true;
_local1++;
};
active = new Array();
}
public function update(_arg1:Number):void{
var index:int;
var count:int;
var elapsedTime = _arg1;
count = active.length;
index = 0;
while (index < count) {
var _local3 = active[index];
with (_local3) {
if (_state == "Inactive"){
_spawnState = true;
active.splice(index, 1);
index--;
count--;
} else {
update(elapsedTime);
};
};
index = (index + 1);
};
}
}
}//package
Section 47
//RainDrop (RainDrop)
package {
import flash.geom.*;
import flash.display.*;
public class RainDrop extends MovieClip {
public var _type:int;
public var _velocity:Point;
public var _speed:Number;
public var _scale:Number;
public var _targetLoc:Point;
public var _spawnState:Boolean;// = true
public var _state:String;
public var _velocityVector:Point;
public var _originLoc:Point;
public var _angle:Number;
public function RainDrop():void{
_spawnState = true;
_velocity = new Point(500, 1000);
super();
deactivate();
cacheAsBitmap = true;
}
public function activate():void{
_velocity.x = ((Math.random() * 300) + 400);
_state = "Active";
visible = true;
_spawnState = false;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
x = (x + (_velocity.x * _arg1));
y = (y + (_velocity.y * _arg1));
if ((((y > GameManager.screenHeight)) || ((x > GameManager.screenWidth)))){
deactivate();
};
break;
};
}
}
}//package
Section 48
//RainManager (RainManager)
package {
import flash.display.*;
import flash.utils.*;
public class RainManager extends MovieClip {
public var active:Array;
public var clips:Array;
public var spawnInitTime:Number;
public var spawnDelay:Number;// = 0.03
public function RainManager():void{
clips = new Array();
active = new Array();
spawnDelay = 0.03;
spawnInitTime = getTimer();
super();
}
public function init(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
clips[_local2] = new RainDrop();
addChild(clips[_local2]);
clips[_local2]._type = 1;
clips[_local2].gotoAndStop(clips[_local2]._type);
_local2++;
};
}
public function inactiveClip():int{
var _local1:int;
var _local2:int;
var _local3:int;
_local2 = -1;
_local3 = clips.length;
_local1 = 0;
while (_local1 < _local3) {
if (clips[_local1]._spawnState){
_local2 = _local1;
break;
};
_local1++;
};
return (_local2);
}
public function spawn():void{
var clipIndex:int;
clipIndex = inactiveClip();
if (clipIndex >= 0){
var _local2 = clips[clipIndex];
with (_local2) {
activate();
x = ((Math.random() * (GameManager.screenWidth + 600)) - 200);
y = -(height);
_scale = 1;
scaleX = _scale;
scaleY = _scale;
active.push(clips[clipIndex]);
};
};
}
public function spawnCheck():void{
if (GameManager.elapsedTime(spawnInitTime) > spawnDelay){
spawnInitTime = getTimer();
spawn();
spawn();
spawn();
};
}
public function deactivateAll():void{
var _local1:int;
var _local2:int;
_local2 = clips.length;
_local1 = 0;
while (_local1 < _local2) {
clips[_local1].deactivate();
clips[_local1]._spawnState = true;
_local1++;
};
active = new Array();
}
public function update(_arg1:Number):void{
var index:int;
var count:int;
var elapsedTime = _arg1;
count = active.length;
index = 0;
while (index < count) {
var _local3 = active[index];
with (_local3) {
if (_state == "Inactive"){
_spawnState = true;
active.splice(index, 1);
index--;
count--;
} else {
update(elapsedTime);
};
};
index = (index + 1);
};
}
}
}//package
Section 49
//ScorePopUp (ScorePopUp)
package {
import flash.display.*;
import classes.smallz.*;
import classes.game.*;
public class ScorePopUp extends MovieClip {
public var _speed;// = 35
public var _spawnState:Boolean;// = true
public var _state:String;
public var _scoreValue:String;
public var PointText:MovieClip;
public function ScorePopUp():void{
_speed = 35;
_spawnState = true;
super();
addFrameScript(44, frame45);
deactivate();
}
public function activate():void{
visible = true;
_state = "Active";
_spawnState = false;
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
function frame45(){
this.stop();
}
public function update(_arg1:Number):void{
switch (_state){
case "Active":
y = (y - (_arg1 * _speed));
if (PointText){
if (PointText.PointText){
PointText.PointText.text = _scoreValue;
};
};
if (currentFrame == totalFrames){
deactivate();
};
break;
};
}
}
}//package
Section 50
//ScorePopUpManager (ScorePopUpManager)
package {
import flash.geom.*;
import flash.display.*;
public class ScorePopUpManager extends MovieClip {
public var active:Array;
public var popups:Array;
public var _scale:Number;// = 0.5
public function ScorePopUpManager():void{
popups = new Array();
active = new Array();
_scale = 0.5;
super();
}
public function inactive_popup():int{
var _local1:int;
var _local2:int;
var _local3:int;
_local2 = -1;
_local3 = popups.length;
_local1 = 0;
while (_local1 < _local3) {
if (popups[_local1]._spawnState){
_local2 = _local1;
break;
};
_local1++;
};
return (_local2);
}
public function activate(_arg1:Point, _arg2:String):void{
var popupIndex:int;
var screenLoc = _arg1;
var scoreString = _arg2;
popupIndex = inactive_popup();
active.push(popups[popupIndex]);
var _local4 = popups[popupIndex];
with (_local4) {
activate();
x = screenLoc.x;
y = screenLoc.y;
scaleX = _scale;
scaleY = _scale;
_scoreValue = scoreString;
gotoAndPlay(1);
};
}
public function init(_arg1:int){
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
popups[_local2] = new ScorePopUp();
addChild(popups[_local2]);
_local2++;
};
}
public function deactivateAllPopups():void{
var _local1:int;
var _local2:int;
_local2 = popups.length;
_local1 = 0;
while (_local1 < _local2) {
popups[_local1].deactivate();
popups[_local1]._spawnState = true;
_local1++;
};
active = new Array();
}
public function update(_arg1:Number):void{
var index:int;
var popupCount:int;
var elapsedTime = _arg1;
popupCount = active.length;
index = 0;
while (index < popupCount) {
var _local3 = active[index];
with (_local3) {
if (_state == "Inactive"){
_spawnState = true;
active.splice(index, 1);
index--;
popupCount--;
} else {
update(elapsedTime);
};
};
index = (index + 1);
};
}
}
}//package
Section 51
//smallzDebug (smallzDebug)
package {
import flash.text.*;
import flash.filters.*;
public class smallzDebug {
private var _log:Array;
private var _active:Boolean;
public var _window:TextField;
public function smallzDebug(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local4:DropShadowFilter;
var _local5:GlowFilter;
var _local6:TextFormat;
super();
_local4 = new DropShadowFilter(2, 45, 0, 25, 3, 3, 2, 2);
_local5 = new GlowFilter(0, 100, 2, 2, 2000, 1, false, false);
_active = _arg3;
_window = new TextField();
_window.x = _arg1;
_window.y = _arg2;
_window.multiline = true;
_window.wordWrap = true;
_window.width = 640;
_window.height = 480;
_window.selectable = false;
_window.text = "";
_window.filters = [_local5];
_log = new Array();
_local6 = new TextFormat();
_local6.font = "Arial";
_local6.bold = true;
_local6.size = 16;
_local6.color = 0xFFFFFF;
_window.defaultTextFormat = _local6;
}
public function update():void{
var _local1:int;
if (_active){
if (!_window.visible){
_window.visible = true;
};
_window.text = "";
_local1 = 0;
while (_local1 <= (_log.length - 1)) {
_window.appendText(_log[_local1]);
_window.appendText("\n");
_local1++;
};
} else {
if (_window.visible){
_window.visible = false;
};
};
}
public function add_trace(_arg1:String):void{
if (GameManager.Debug){
_log.push(_arg1);
};
}
public function clear_log():void{
var _local1:int;
var _local2:int;
_local2 = _log.length;
_local1 = 0;
while (_local1 < _local2) {
_log.pop();
_local1++;
};
}
public function deactivate():void{
_active = false;
}
public function activate():void{
_active = true;
}
}
}//package
Section 52
//smallzFPS (smallzFPS)
package {
import flash.text.*;
import flash.utils.*;
public class smallzFPS {
private var _frameCount:int;
private var _initTime:Number;
private var _fps:Number;
private var _curTime:Number;
private var _sampleSize:int;
public var _fpsCounter:TextField;
public function smallzFPS(_arg1:Number, _arg2:Number, _arg3:int):void{
var _local4:Font;
var _local5:TextFormat;
super();
_local4 = new MyArial();
_local5 = new TextFormat();
_local5.font = _local4.fontName;
_local5.bold = true;
_local5.size = 14;
_local5.color = 0xFFFFFF;
_initTime = getTimer();
_sampleSize = _arg3;
_frameCount = 0;
_fps = 0;
_fpsCounter = new TextField();
_fpsCounter.embedFonts = true;
_fpsCounter.defaultTextFormat = _local5;
_fpsCounter.x = _arg1;
_fpsCounter.y = _arg2;
}
public function get_fps():Number{
return (_fps);
}
public function update(){
var _local1:Number;
_frameCount++;
_curTime = getTimer();
if (_frameCount == _sampleSize){
_local1 = (_curTime - _initTime);
_fps = ((_frameCount / _local1) * 1000);
_initTime = _curTime;
_frameCount = 0;
_fpsCounter.text = String(("FPS : " + int(_fps)));
};
}
}
}//package
Section 53
//smallzKeyboardManager (smallzKeyboardManager)
package {
import flash.display.*;
import flash.events.*;
public class smallzKeyboardManager extends Sprite {
public var pressed:Array;
public function smallzKeyboardManager(){
pressed = new Array();
super();
}
public function init(){
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
}
public function kill(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
}
public function isPressed(_arg1:int){
if (pressed.indexOf(_arg1) == -1){
return (false);
};
return (true);
}
public function keyPressed(_arg1:KeyboardEvent){
var _local2:int;
_local2 = pressed.indexOf(_arg1.keyCode);
if (_local2 == -1){
pressed.push(_arg1.keyCode);
};
}
public function keyReleased(_arg1:KeyboardEvent){
var _local2:int;
_local2 = pressed.indexOf(_arg1.keyCode);
if (_local2 != -1){
pressed.splice(_local2, 1);
};
}
}
}//package
Section 54
//smallzMath (smallzMath)
package {
import flash.geom.*;
public class smallzMath {
public static function random_point(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
_local3 = new Point(0, 0);
_local3.x = (Math.random() * _arg1);
_local3.y = (Math.random() * _arg2);
return (_local3);
}
public static function pGetAngle(_arg1:Point, _arg2:Point):Number{
return (Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
public static function pDistance(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
_local3 = Math.sqrt((((_arg1.x - _arg2.x) * (_arg1.x - _arg2.x)) + ((_arg1.y - _arg2.y) * (_arg1.y - _arg2.y))));
return (_local3);
}
public static function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
_local5 = Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4))));
return (_local5);
}
public static function get_angle_point(_arg1:Point, _arg2:Point):Number{
return (Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
public static function getAngle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)));
}
}
}//package
Section 55
//SoundManager (SoundManager)
package {
import flash.media.*;
public class SoundManager {
public static var _sounds:Array = new Array();
public static var _mute:Boolean = false;
public function SoundManager():void{
}
public static function loopSound(_arg1:String):void{
var _local2:int;
var _local3:int;
_local3 = _sounds.length;
if (!_mute){
_local2 = 0;
while (_local2 < _local3) {
if (_sounds[_local2]._identifier == _arg1){
_sounds[_local2]._channel = _sounds[_local2]._sound.play(0, 999, _sounds[_local2]._transform);
break;
};
_local2++;
};
};
}
public static function restartSound(_arg1:String, _arg2:int=0):void{
var _local3:int;
var _local4:int;
_local4 = _sounds.length;
_local3 = 0;
while (_local3 < _local4) {
if (_sounds[_local3]._identifier == _arg1){
_sounds[_local3]._channel = _sounds[_local3]._sound.play(_sounds[_local3]._position, _arg2);
break;
};
_local3++;
};
}
public static function stopAllSounds():void{
var _local1:int;
var _local2:int;
_local2 = _sounds.length;
_local1 = 0;
while (_local1 < _local2) {
_local1++;
};
}
public static function playSound(_arg1:String):void{
var _local2:int;
var _local3:int;
_local3 = _sounds.length;
if (!_mute){
_local2 = 0;
while (_local2 < _local3) {
if (_sounds[_local2]._identifier == _arg1){
_sounds[_local2]._channel = _sounds[_local2]._sound.play(0, 0, _sounds[_local2]._transform);
break;
};
_local2++;
};
};
}
public static function stopSound(_arg1:String):void{
var _local2:int;
var _local3:int;
_local3 = _sounds.length;
_local2 = 0;
while (_local2 < _local3) {
if (_sounds[_local2]._identifier == _arg1){
_sounds[_local2]._position = _sounds[_local2]._channel.position;
_sounds[_local2]._channel.stop();
break;
};
_local2++;
};
}
public static function addSound(_arg1:String, _arg2:Sound):void{
var _local3:SoundRecord;
var _local4:SoundChannel;
var _local5:SoundTransform;
_local5 = new SoundTransform();
_local5.volume = 1;
_local3 = new SoundRecord(_arg1, _arg2, _local4, _local5);
_sounds.push(_local3);
}
}
}//package
Section 56
//SoundRecord (SoundRecord)
package {
import flash.media.*;
public class SoundRecord {
public var _channel:SoundChannel;
public var _position:Number;
public var _transform:SoundTransform;
public var _identifier:String;
public var _sound:Sound;
public function SoundRecord(_arg1:String, _arg2:Sound, _arg3:SoundChannel, _arg4:SoundTransform):void{
_identifier = _arg1;
_sound = _arg2;
_channel = _arg3;
_transform = _arg4;
_position = 0;
}
}
}//package
Section 57
//SoundtrackMusic (SoundtrackMusic)
package {
import flash.media.*;
public dynamic class SoundtrackMusic extends Sound {
}
}//package
Section 58
//SubmitScoreScreen (SubmitScoreScreen)
package {
import flash.display.*;
import flash.events.*;
public class SubmitScoreScreen extends MovieClip {
public var _state:String;
public var nonoba_box:MovieClip;
public var smallz_box:MovieClip;
public function SubmitScoreScreen():void{
x = 0;
y = 0;
_state = "Inactive";
visible = false;
}
public function activate():void{
_state = "Active";
visible = true;
if (GameManager.isNonoba){
nonoba_box.visible = true;
smallz_box.visible = false;
nonoba_box.x = 190;
nonoba_box.y = 180;
nonoba_box.score.text = ("Final Score " + String(GameManager.playerScore));
} else {
nonoba_box.visible = false;
smallz_box.visible = true;
smallz_box.x = 190;
smallz_box.y = 180;
smallz_box.score.text = ("Final Score " + String(GameManager.playerScore));
};
}
public function check_rollovers():void{
if (GameManager.isNonoba){
if (nonoba_box.Continue.hitTestPoint(mouseX, mouseY)){
nonoba_box.Continue.scaleX = 1.25;
nonoba_box.Continue.scaleY = 1.25;
} else {
nonoba_box.Continue.scaleX = 1;
nonoba_box.Continue.scaleY = 1;
};
} else {
if (smallz_box.Submit.hitTestPoint(mouseX, mouseY)){
smallz_box.Submit.scaleX = 1.25;
smallz_box.Submit.scaleY = 1.25;
} else {
smallz_box.Submit.scaleX = 1;
smallz_box.Submit.scaleY = 1;
};
if (smallz_box.Cancel.hitTestPoint(mouseX, mouseY)){
smallz_box.Cancel.scaleX = 1.25;
smallz_box.Cancel.scaleY = 1.25;
} else {
smallz_box.Cancel.scaleX = 1;
smallz_box.Cancel.scaleY = 1;
};
};
}
public function menu_mouseUp(_arg1:MouseEvent):void{
if (GameManager.isNonoba){
if (nonoba_box.Continue.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "MainMenu";
};
} else {
if (smallz_box.Cancel.hitTestPoint(_arg1.stageX, _arg1.stageY)){
deactivate();
GameManager.gameState = "MainMenu";
};
if (((smallz_box.Submit.hitTestPoint(_arg1.stageX, _arg1.stageY)) && (smallz_box.Submit.visible))){
deactivate();
GameManager._userName = smallz_box.user_name.text;
GameManager.gameState = "SaveHighScore";
};
};
}
public function deactivate():void{
_state = "Inactive";
visible = false;
}
public function update():void{
switch (_state){
case "Active":
break;
};
}
}
}//package
Section 59
//Tombstone_01 (Tombstone_01)
package {
import flash.display.*;
public dynamic class Tombstone_01 extends MovieClip {
}
}//package