Section 1
//GenericXMLLoader (com.madebymn.caprisun.gameshell.common.GenericXMLLoader)
package com.madebymn.caprisun.gameshell.common {
import flash.net.*;
import flash.events.*;
import flash.utils.*;
public class GenericXMLLoader extends EventDispatcher {
private var loader:URLLoader;
public var xml:XML;
private var url:String;
private var vars:URLVariables;
public function GenericXMLLoader(_arg1:String, _arg2:URLVariables=null){
this.url = _arg1;
this.vars = _arg2;
trace("here2");
loadXML();
}
private function handleComplete(_arg1:Event):void{
var evt = _arg1;
try {
xml = new XML(evt.target.data);
parseXML();
} catch(e:TypeError) {
trace("couldnt load the xml");
trace(e.message);
};
}
public function destroy():void{
xml = null;
loader.removeEventListener(Event.COMPLETE, handleComplete);
loader.close();
loader = null;
}
public function loadXML():void{
var _local1:URLRequest;
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, handleComplete);
_local1 = new URLRequest(url);
_local1.method = URLRequestMethod.POST;
_local1.data = vars;
loader.load(_local1);
}
public function parseXML():void{
dispatch();
}
public function dispatch():void{
dispatchEvent(new Event("xmlLoaded"));
}
}
}//package com.madebymn.caprisun.gameshell.common
Section 2
//SwfLoader (com.madebymn.caprisun.gameshell.common.SwfLoader)
package com.madebymn.caprisun.gameshell.common {
import flash.net.*;
import flash.events.*;
import flash.display.*;
public class SwfLoader extends EventDispatcher {
public var loadedContent:DisplayObject;
public var percent:int;// = 0
public function SwfLoader(_arg1:String):void{
percent = 0;
super();
startLoad(_arg1);
}
private function onCompleteHandler(_arg1:Event):void{
loadedContent = _arg1.currentTarget.content;
dispatchEvent(new Event("complete"));
}
private function startLoad(_arg1:String):void{
var _local2:Loader;
var _local3:URLRequest;
_local2 = new Loader();
_local3 = new URLRequest(_arg1);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
_local2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
_local2.load(_local3);
}
private function onProgressHandler(_arg1:ProgressEvent):void{
percent = int(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
dispatchEvent(new Event("progress"));
}
}
}//package com.madebymn.caprisun.gameshell.common
Section 3
//ErrorController (com.madebymn.caprisun.gameshell.controllers.ErrorController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
import flash.utils.*;
public class ErrorController extends GenericController {
private var duration:uint;// = 3000
public function ErrorController(_arg1:Object):void{
var _local2:Timer;
duration = 3000;
super(_arg1);
view = new errorView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop(_arg1.ref);
view.closeBtn.visible = false;
view.field.htmlText = initObj.status;
_local2 = new Timer(duration, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler, false, 0, true);
_local2.start();
}
private function timerHandler(_arg1:TimerEvent):void{
Timer(_arg1.target).removeEventListener(TimerEvent.TIMER_COMPLETE, timerHandler);
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 4
//ExternalController (com.madebymn.caprisun.gameshell.controllers.ExternalController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
import flash.utils.*;
public class ExternalController extends GenericController {
public function ExternalController(_arg1:Object):void{
super(_arg1);
view = new externalView();
view.addEventListener("ready", onViewReady, false, 0, true);
container.addChild(view);
view.init(_arg1.ref);
}
private function onViewReady(_arg1:Event):void{
trace((this + " RECIEVED VIEW READY"));
switch (_arg1.target.ref){
case "gameIntro":
view.playBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickPlay, false, 0, true);
view.controlsBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickControls, false, 0, true);
break;
case "gameOutro":
trace("setting up game outro");
view.playAgainBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickPlayAgain, false, 0, true);
view.highscoresBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickHighscores, false, 0, true);
view.linkBackBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickLinkBack, false, 0, true);
break;
case "controls":
if (!view.playBtn.hasEventListener(MouseEvent.MOUSE_DOWN)){
view.playBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickPlay, false, 0, true);
};
break;
};
}
private function clickPlay(_arg1:MouseEvent):void{
trace("clicked play");
main.goGame();
}
private function clickPlayAgain(_arg1:MouseEvent):void{
trace("clicked play again");
main.goGame();
}
private function clickLinkBack(_arg1:MouseEvent):void{
trace("clicked link back");
main.goLinkBack();
}
private function clickHighscores(_arg1:MouseEvent):void{
trace("clicked Highscores");
main.goShowHighscores();
}
private function clickControls(_arg1:MouseEvent):void{
trace("clicked controls");
view.init("controls");
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 5
//GenericAccountController (com.madebymn.caprisun.gameshell.controllers.GenericAccountController)
package com.madebymn.caprisun.gameshell.controllers {
public class GenericAccountController extends GenericController {
public static var resultingCallback:Function;
public function GenericAccountController(_arg1:Object):void{
super(_arg1);
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 6
//GenericController (com.madebymn.caprisun.gameshell.controllers.GenericController)
package com.madebymn.caprisun.gameshell.controllers {
import gs.*;
import flash.events.*;
import com.madebymn.caprisun.gameshell.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
public class GenericController extends EventDispatcher {
private var bg:Sprite;
public var callback:Function;
public var initObj:Object;
public var targetAlpha:Number;// = 0.6
private var waitClip:MovieClip;
public var main:Main;
public var view:MovieClip;
public static var container:Sprite;
public function GenericController(_arg1:Object){
targetAlpha = 0.6;
super();
initObj = _arg1;
callback = initObj.callback;
main = Main.instance;
}
private function initSubmit():void{
submitForm();
view.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
view.submitBtn.removeEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
}
public function removePageElements():void{
var _local1:uint;
_local1 = (view.numChildren - 1);
while (_local1 > 0) {
view.removeChildAt(_local1);
_local1--;
};
}
private function mouseHandler(_arg1:MouseEvent):void{
initSubmit();
}
public function showWaitingClip(_arg1:Boolean=true):void{
if (_arg1){
if (!waitClip){
waitClip = new waitingClip();
waitClip.x = (main.sw / 2);
waitClip.y = (main.sh / 2);
view.addChild(waitClip);
};
} else {
if (waitClip){
view.removeChild(waitClip);
waitClip = null;
};
};
}
public function initRemoveView():void{
removePageElements();
TweenLite.to(bg, 0.2, {alpha:0.2, onComplete:onFinished});
}
public function initSubmitButton():void{
view.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler, false, 0, true);
view.submitBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler, false, 0, true);
view.submitBtn.mouseChildren = false;
view.submitBtn.buttonMode = true;
}
public function initView():void{
bg = new Sprite();
bg.graphics.lineStyle();
bg.graphics.beginFill(0);
bg.graphics.drawRect(0, 0, main.sw, main.sh);
bg.graphics.endFill();
bg.alpha = 0;
view.addChildAt(bg, 0);
view.closeBtn.addEventListener(MouseEvent.MOUSE_DOWN, closeBtnHandler, false, 0, true);
view.closeBtn.buttonMode = true;
TweenLite.to(bg, 0.4, {alpha:targetAlpha});
}
public function closeBtnHandler(_arg1:MouseEvent):void{
callback = null;
initRemoveView();
}
private function keyHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
initSubmit();
};
}
public function onFinished():void{
if (callback != null){
callback(initObj);
} else {
main.clearCurrentPage();
};
}
public function submitForm():void{
}
public function destroyView():void{
container.removeChild(view);
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 7
//GenericOverlay (com.madebymn.caprisun.gameshell.controllers.GenericOverlay)
package com.madebymn.caprisun.gameshell.controllers {
import flash.display.*;
public class GenericOverlay extends GenericController {
public static var container:Sprite;
public function GenericOverlay(_arg1:Object){
super(_arg1);
}
override public function onFinished():void{
main.removeOverlay();
}
override public function destroyView():void{
container.removeChild(view);
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 8
//HighscoresController (com.madebymn.caprisun.gameshell.controllers.HighscoresController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class HighscoresController extends GenericController {
private var yspeed:Number;// = -2
private var holder:Sprite;
private var waitingClip:MovieClip;
public function HighscoresController(_arg1:Object):void{
yspeed = -2;
super(_arg1);
view = new highscoresView();
container.addChild(view);
view.titleClip.gotoAndStop("hiScores");
view.backBtn.addEventListener(MouseEvent.MOUSE_DOWN, closeBtnHandler, false, 0, true);
view.backBtn.buttonMode = true;
view.backBtn.mouseChildren = false;
initView();
view.maskClip.visible = false;
showWaitingClip();
main.getHighscores(buildTable);
}
private function animateTable(_arg1:Event):void{
var _local2:Sprite;
var _local3:Number;
_local2 = holder;
_local3 = 55;
if ((_local2.y + _local2.height) < (main.sh - _local3)){
_local2.y = ((main.sh - _local3) - _local2.height);
yspeed = (yspeed * -1);
} else {
if (_local2.y > _local3){
_local2.y = _local3;
yspeed = (yspeed * -1);
};
};
_local2.y = (_local2.y + yspeed);
}
private function buildTable(_arg1:XML):void{
var i:uint;
var rank:*;
var hs_name:*;
var hs_value:*;
var col:uint;
var txtFormat:*;
var hsClip:*;
var scoresXML = _arg1;
showWaitingClip(false);
try {
holder = new Sprite();
i = 0;
while (i < (scoresXML.*.length() - 1)) {
rank = (i + 1);
hs_name = scoresXML.*[i].@hs_name;
hs_value = scoresXML.*[i].@hs_value;
col = ((hs_name == initObj.shortname)) ? 0xFF6600 : 0xCC0000;
txtFormat = new TextFormat(null, null, col);
hsClip = new highscoreItem();
hsClip.rankField.defaultTextFormat = txtFormat;
hsClip.nameField.defaultTextFormat = txtFormat;
hsClip.scoreField.defaultTextFormat = txtFormat;
hsClip.rankField.text = rank;
hsClip.nameField.text = hs_name;
hsClip.scoreField.text = hs_value;
hsClip.y = ((i * hsClip.height) * 0.8);
holder.addChild(hsClip);
i = (i + 1);
};
holder.x = (main.sw / 2);
holder.y = hsClip.height;
holder.mask = view.maskClip;
view.addChild(holder);
if (holder.height > holder.mask.height){
view.addEventListener(Event.ENTER_FRAME, animateTable, false, 0, true);
};
} catch(e:Error) {
view.titleClip.hiScoresTitle.text = "No scores yet...";
};
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 9
//InitialsController (com.madebymn.caprisun.gameshell.controllers.InitialsController)
package com.madebymn.caprisun.gameshell.controllers {
public class InitialsController extends GenericController {
public function InitialsController(_arg1:Object):void{
super(_arg1);
view = new initialsView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("initials");
view.inputClip1.bg.gotoAndStop("narrow");
view.inputClip1.field.text = "";
view.inputClip1.field.restrict = "A-Z";
view.inputClip1.field.maxChars = 3;
view.inputClip1.field.tabIndex = 1;
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
override public function submitForm():void{
initObj.name = view.inputClip1.field.text;
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 10
//LoginController (com.madebymn.caprisun.gameshell.controllers.LoginController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
public class LoginController extends GenericAccountController {
public function LoginController(_arg1:Object):void{
resultingCallback = _arg1.resultingCallback;
super(_arg1);
view = new loginView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("login");
view.inputClip1.bg.gotoAndStop("wide");
view.inputClip1.field.text = _arg1.username;
view.inputClip1.field.tabIndex = 1;
view.inputClip2.bg.gotoAndStop("wide");
view.inputClip2.field.displayAsPassword = true;
view.inputClip2.field.text = _arg1.password;
view.inputClip2.field.tabIndex = 2;
view.noPassBtn.buttonMode = true;
view.noPassBtn.mouseChildren = false;
view.noPassBtn.addEventListener(MouseEvent.MOUSE_DOWN, btnClick, false, 0, true);
view.regBtn.buttonMode = true;
view.regBtn.mouseChildren = false;
view.regBtn.addEventListener(MouseEvent.MOUSE_DOWN, btnClick, false, 0, true);
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
private function btnClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case view.noPassBtn:
main.goNoPass();
break;
case view.regBtn:
main.goRegister();
break;
};
}
override public function submitForm():void{
initObj.username = view.inputClip1.field.text;
initObj.password = view.inputClip2.field.text;
initObj.resultingCallback = resultingCallback;
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 11
//NoPassController (com.madebymn.caprisun.gameshell.controllers.NoPassController)
package com.madebymn.caprisun.gameshell.controllers {
public class NoPassController extends GenericAccountController {
public function NoPassController(_arg1:Object):void{
resultingCallback = _arg1.resultingCallback;
super(_arg1);
view = new noPassView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("noPass");
view.inputClip1.bg.gotoAndStop("wide");
view.inputClip1.field.text = _arg1.username;
view.inputClip1.field.tabIndex = 1;
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
override public function submitForm():void{
initObj.username = view.inputClip1.field.text;
initObj.resultingCallback = resultingCallback;
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 12
//RatingController (com.madebymn.caprisun.gameshell.controllers.RatingController)
package com.madebymn.caprisun.gameshell.controllers {
import gs.*;
import flash.events.*;
import flash.display.*;
public class RatingController extends GenericController {
private var clips:Array;
private var rating:int;
private var holder:Sprite;
public function RatingController(_arg1:Object):void{
super(_arg1);
targetAlpha = 0.8;
view = new ratingView();
container.addChild(view);
initView();
view.closeBtn.visible = false;
if (_arg1.storyMode){
view.titleClip.gotoAndStop("rateGame");
} else {
view.titleClip.gotoAndStop("rateLevel");
};
initStars();
}
private function updateRating(_arg1:MouseEvent=null):void{
var _local2:*;
var _local3:uint;
var _local4:*;
_local2 = clips.length;
rating = Math.ceil(Math.min(_local2, Math.max(1, ((((holder.width / 2) + holder.mouseX) / holder.width) * _local2))));
_local3 = 0;
while (_local3 < clips.length) {
_local4 = clips[_local3];
if ((_local3 + 1) <= rating){
_local4.gotoAndStop("on");
} else {
_local4.gotoAndStop("off");
};
_local3++;
};
}
private function submitRating():void{
view.removeEventListener(MouseEvent.MOUSE_DOWN, execRating);
view.removeEventListener(MouseEvent.MOUSE_MOVE, updateRating);
showWaitingClip(true);
main.sendRating(rating);
}
private function execRating(_arg1:MouseEvent):void{
var _local2:Object;
var _local3:uint;
var _local4:*;
_local3 = 0;
while (_local3 < clips.length) {
_local4 = clips[_local3];
if (_local3 == 0){
_local2 = {scaleX:1.5, scaleY:1.5, alpha:0, onComplete:submitRating};
} else {
_local2 = {scaleX:1.5, scaleY:1.5, alpha:0};
};
TweenLite.to(_local4, 0.4, _local2);
_local3++;
};
}
private function initStars():void{
var _local1:uint;
var _local2:Number;
var _local3:uint;
var _local4:MovieClip;
_local1 = 5;
clips = [];
holder = new Sprite();
holder.x = (main.sw / 2);
holder.y = (main.sh / 2);
_local2 = 110;
_local3 = 0;
while (_local3 < _local1) {
_local4 = new starClip();
new starClip().scaleX = (_local4.scaleY = 0);
_local4.alpha = 0;
TweenLite.to(_local4, 0.6, {delay:(_local3 * 0.2), x:((_local3 - int((_local1 / 2))) * _local2), alpha:1, scaleX:1, scaleY:1, rotation:360});
clips.push(_local4);
holder.addChild(_local4);
_local3++;
};
view.addChild(holder);
view.addEventListener(MouseEvent.MOUSE_DOWN, execRating, false, 0, true);
view.addEventListener(MouseEvent.MOUSE_MOVE, updateRating, false, 0, true);
updateRating();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 13
//Register2Controller (com.madebymn.caprisun.gameshell.controllers.Register2Controller)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
public class Register2Controller extends GenericAccountController {
public function Register2Controller(_arg1:Object):void{
resultingCallback = _arg1.resultingCallback;
super(_arg1);
view = new register2View();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("register2");
view.inputClip1.bg.gotoAndStop("wide");
view.inputClip1.field.text = _arg1.username;
view.inputClip1.field.tabIndex = 1;
view.inputClip2.bg.gotoAndStop("wide");
view.inputClip2.field.displayAsPassword = true;
view.inputClip2.field.text = "";
view.inputClip2.field.tabIndex = 2;
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
override public function submitForm():void{
initObj.stageID = "stage2";
initObj.username = view.inputClip1.field.text;
initObj.password = view.inputClip2.field.text;
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 14
//RegisterController (com.madebymn.caprisun.gameshell.controllers.RegisterController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
public class RegisterController extends GenericAccountController {
public function RegisterController(_arg1:Object):void{
resultingCallback = _arg1.resultingCallback;
super(_arg1);
view = new registerView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("register");
view.inputClip1.bg.gotoAndStop("wide");
view.inputClip1.field.text = "";
view.inputClip1.field.tabIndex = 1;
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
override public function submitForm():void{
initObj.userhandle = view.inputClip1.field.text;
initObj.stageID = "stage1";
initObj.resultingCallback = resultingCallback;
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 15
//SaveLevelController (com.madebymn.caprisun.gameshell.controllers.SaveLevelController)
package com.madebymn.caprisun.gameshell.controllers {
import flash.events.*;
public class SaveLevelController extends GenericController {
public static var storedLevelname:String = "";
public function SaveLevelController(_arg1:Object):void{
super(_arg1);
view = new saveLevelView();
container.addChild(view);
initView();
view.titleClip.gotoAndStop("saveLevel");
view.inputClip1.bg.gotoAndStop("wide");
view.inputClip1.field.text = storedLevelname;
view.inputClip1.field.tabIndex = 1;
view.loggedinField.text = ("Logged in as: " + initObj.userhandle);
view.logoutBtn.addEventListener(MouseEvent.MOUSE_DOWN, logoutBtnHandler, false, 0, true);
view.logoutBtn.mouseChildren = false;
view.logoutBtn.buttonMode = true;
view.stage.focus = view.inputClip1.field;
initSubmitButton();
}
private function logoutBtnHandler(_arg1:MouseEvent):void{
main.goLogout();
}
override public function submitForm():void{
initObj.title = (storedLevelname = view.inputClip1.field.text);
initRemoveView();
}
}
}//package com.madebymn.caprisun.gameshell.controllers
Section 16
//ExternalView (com.madebymn.caprisun.gameshell.views.ExternalView)
package com.madebymn.caprisun.gameshell.views {
import flash.events.*;
import com.madebymn.caprisun.gameshell.*;
import flash.display.*;
public class ExternalView extends MovieClip {
public var playNow_mc:MovieClip;
public var playAgain_mc:MovieClip;
public var playAgainBtn:SimpleButton;
public var highscoresBtn:SimpleButton;
public var playBtn:SimpleButton;
public var ref:String;
public var playNow_btn:SimpleButton;
public var linkBack_mc:MovieClip;
public var logo_mc:MovieClip;
public var linkBackBtn:SimpleButton;
public var controlsBtn:SimpleButton;
private var main:Main;
public var gameTitle_mc:MovieClip;
public function ExternalView(){
main = Main.instance;
x = (main.sw / 2);
y = (main.sh / 2);
}
public function init(_arg1:String):void{
gotoAndPlay(_arg1);
}
public function ready(_arg1:String):void{
ref = _arg1;
dispatchEvent(new Event("ready"));
}
}
}//package com.madebymn.caprisun.gameshell.views
Section 17
//PreloaderView (com.madebymn.caprisun.gameshell.views.PreloaderView)
package com.madebymn.caprisun.gameshell.views {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class PreloaderView extends MovieClip {
private var count:uint;// = 0
public var bgClip:MovieClip;
public var healthMessageClip:MovieClip;
public var percentField:TextField;
public function PreloaderView(){
count = 0;
super();
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
private function init(_arg1:Event):void{
addEventListener(Event.ENTER_FRAME, tick, false, 0, true);
}
public function set percent(_arg1:uint):void{
percentField.htmlText = (_arg1 + "%");
}
public function set loadMessage(_arg1:XMLList):void{
healthMessageClip.msgClip.field.htmlText = _arg1[int((Math.random() * _arg1.length()))];
}
private function tick(_arg1:Event):void{
count++;
if ((count % 3) == 0){
animateBG();
};
}
private function animateBG():void{
var _local1:Number;
_local1 = (1 + (Math.random() * 0.5));
bgClip.scaleX = (bgClip.scaleY = _local1);
}
}
}//package com.madebymn.caprisun.gameshell.views
Section 18
//DataIO (com.madebymn.caprisun.gameshell.DataIO)
package com.madebymn.caprisun.gameshell {
import flash.net.*;
import flash.events.*;
import com.madebymn.caprisun.gameshell.common.*;
public class DataIO extends EventDispatcher {
public var failCallback:Function;
public var callback:Function;
public var xml:XML;
private var urlv:URLVariables;
private var dataIn:GenericXMLLoader;
public var scriptpath:String;
public var game:String;
public var IOStatus:String;
public static var instance:DataIO;
public function DataIO(){
instance = this;
}
public function sendLoginData(_arg1:Object, _arg2:Function, _arg3:Function):void{
callback = _arg2;
failCallback = _arg3;
urlv = new URLVariables();
urlv.username = _arg1.username;
urlv.password = _arg1.password;
urlv.action = "login";
loadData();
}
public function sendWorldData(_arg1:Object, _arg2:Function, _arg3:Function):void{
callback = _arg2;
failCallback = _arg3;
urlv = new URLVariables();
urlv.title = _arg1.title;
urlv.userid = _arg1.userid;
urlv.game = game;
urlv.flashvars = (("<level><data>" + _arg1.leveldata.join(":")) + "</data></level>");
urlv.action = "save_game_level";
loadData();
}
public function sendRatingData(_arg1:Object):void{
callback = null;
failCallback = null;
urlv = new URLVariables();
urlv.game = game;
urlv.level = _arg1.level;
urlv.rating = _arg1.rating;
urlv.action = "add_game_rating";
loadData();
}
private function dataInHandler(_arg1:Event):void{
var evt = _arg1;
try {
xml = dataIn.xml;
if (urlv.action == "get_game_scores"){
xml.success = "1";
};
if (urlv.action == "save_game_level"){
Main.instance.newLevel = int(xml.newLevel);
};
IOStatus = xml.success;
dispatchEvent(new Event("dataLoaded"));
} catch(e:Error) {
trace("dataInHandler... cant handle 2 simulatanious responses (see tracking events in Main.as)");
};
}
public function sendRegisterData(_arg1:Object, _arg2:Function, _arg3:Function):void{
callback = _arg2;
failCallback = _arg3;
urlv = new URLVariables();
urlv.game = game;
urlv.username = _arg1.username;
urlv.password = _arg1.password;
urlv.handle = _arg1.userhandle;
urlv.action = "save_register";
loadData();
}
public function sendInitialsData(_arg1:Object, _arg2:Function, _arg3:Function):void{
callback = _arg2;
failCallback = _arg3;
urlv = new URLVariables();
urlv.game = game;
urlv.name = _arg1.name;
if (_arg1.level){
urlv.level = _arg1.level;
};
urlv.score = _arg1.score;
urlv.action = "save_game_score";
loadData();
}
public function getWorldData(_arg1:uint, _arg2:Function):void{
callback = _arg2;
urlv = new URLVariables();
urlv.game = game;
urlv.level = _arg1;
urlv.action = "get_game_level";
loadData();
}
public function sendTrackingData(_arg1:Object):void{
callback = null;
failCallback = null;
urlv = new URLVariables();
urlv.location = _arg1.location;
urlv.game = game;
urlv.action = _arg1.action;
if (_arg1.level){
urlv.level = _arg1.level;
};
if (_arg1.gender){
switch (_arg1.gender.toLowerCase()){
case "boy":
case "male":
case "man":
urlv.gender = "m";
break;
case "girl":
case "female":
case "lady":
urlv.gender = "f";
break;
};
};
loadData();
}
public function sendNoPassData(_arg1:Object, _arg2:Function, _arg3:Function):void{
callback = _arg2;
failCallback = _arg3;
urlv = new URLVariables();
urlv.username = _arg1.username;
urlv.action = "password_reminder";
loadData();
}
public function getHighscores(_arg1:Function, _arg2:String):void{
trace(((this + "getHighscores, callback = ") + callback));
callback = _arg1;
urlv = new URLVariables();
urlv.game = game;
urlv.action = "get_game_scores";
urlv.limit = 50;
urlv.level = _arg2;
loadData();
}
private function loadData():void{
trace(((this + " :: loadData urlv = ") + unescape(urlv.toString())));
IOStatus = "Sending";
dataIn = new GenericXMLLoader(scriptpath, urlv);
dataIn.addEventListener("xmlLoaded", dataInHandler, false, 0, true);
}
public static function getInstance():DataIO{
if (instance == null){
instance = new (DataIO);
};
return (instance);
}
}
}//package com.madebymn.caprisun.gameshell
Section 19
//Main (com.madebymn.caprisun.gameshell.Main)
package com.madebymn.caprisun.gameshell {
import flash.net.*;
import flash.events.*;
import flash.display.*;
import com.madebymn.caprisun.utils.*;
import com.madebymn.caprisun.gameshell.controllers.*;
import com.madebymn.caprisun.gameshell.common.*;
import flash.text.*;
import flash.ui.*;
import flash.external.*;
import flash.system.*;
public class Main extends MovieClip {
public var liveSiteURL:String;// = "http://www.capri-sun.co.uk/bft/"
public var basedir:String;
private var overlay:GenericController;
private var dataIO:DataIO;
public var sh:uint;// = 365
public var sw:uint;// = 650
private var storyMode:Boolean;
public var flashCookie:FlashCookie;
private var preloader:MovieClip;
public var container:Sprite;
public var externalPageContainer:Sprite;
private var preloaderContainer:Sprite;
private var gameLevel:int;// = 0
private var officialDomains:Array;
public var isExternalInstance:Boolean;
public var configURL:String;
private var storyLevelID:int;// = 0
public var externalPage:GenericController;
public var config:ShellConfigLoader;
private var prevPage:String;
private var storymodelevels:Array;
private var controller:GenericController;
private var gameName:String;// = "sumo_slam"
public var newLevel:int;
public var loaderInfoObj:LoaderInfo;
private var frameRate:uint;// = 31
public var game:MovieClip;
public var _stage:Stage;
public static var instance:Main;
public function Main(_arg1:Stage, _arg2:String=""){
var _local3:*;
var _local4:*;
var _local5:Array;
var _local6:*;
frameRate = 31;
gameName = "sumo_slam";
sw = 650;
sh = 365;
liveSiteURL = "http://www.capri-sun.co.uk/bft/";
storyLevelID = 0;
gameLevel = 0;
super();
if (!instance){
instance = this;
};
_stage = _arg1;
if (_arg2 == "external"){
isExternalInstance = true;
};
loaderInfoObj = _stage.loaderInfo;
_local3 = loaderInfoObj.parameters.gameName;
if (_local3 != undefined){
gameName = _local3;
};
_local4 = loaderInfoObj.parameters.gameLevel;
if (_local4 != undefined){
gameLevel = int(_local4);
};
_local5 = loaderInfoObj.url.split("/");
_local5.splice(-1, 1);
configURL = (_local5.join("/") + "/");
officialDomains = ["test.capri-sun.co.uk", "capri-sun.co.uk", "www.capri-sun.co.uk"];
for (_local6 in officialDomains) {
Security.allowDomain(officialDomains[_local6]);
};
if (isExternalInstance){
configURL = (liveSiteURL + "assets/swf/");
};
_stage.frameRate = frameRate;
_stage.scaleMode = StageScaleMode.NO_SCALE;
_stage.stageFocusRect = false;
loadConfig();
_stage.addEventListener(KeyboardEvent.KEY_DOWN, tmpKeyDown);
}
public function goError(_arg1:Object=null):void{
if (!_arg1){
_arg1 = {};
};
_arg1.ref = "error";
_arg1.status = getIOStatus(dataIO.IOStatus);
_arg1.callback = (_arg1.callback) ? _arg1.callback : clearCurrentPage;
changePage("error", _arg1);
}
public function goSaveLevel(_arg1:Object):void{
var initObj = _arg1;
if (!checkLoggedIn()){
goLogin({resultingCallback:function (){
goSaveLevel(initObj);
}});
return;
};
initObj.userid = getCookieValue("userid");
initObj.userhandle = getCookieValue("userhandle");
initObj.callback = sendWorldData;
changePage("saveLevel", initObj);
}
public function goSuccess(_arg1):void{
changePage("success", {ref:"success", callback:_arg1, status:getIOStatus(dataIO.IOStatus)});
}
public function sendLoginData(_arg1:Object):void{
var loginData = _arg1;
addToCookie("username", loginData.username);
addToCookie("password", loginData.password);
if (!validateEmail(loginData.username)){
return;
};
if (!validatePasswordLength(loginData.password)){
return;
};
dataIO.sendLoginData(loginData, function (){
loginSuccess(loginData.resultingCallback);
}, goError);
}
private function getIOStatus(_arg1:String):String{
var _local2:*;
var _local3:uint;
_local2 = config.xml.ioerrors.*;
_local3 = 0;
while (_local3 < _local2.length()) {
if (_arg1 == _local2[_local3].@id){
return (_local2[_local3]);
};
_local3++;
};
return ("no IOStatus");
}
private function validatePasswordLength(_arg1:String):Boolean{
if (_arg1.length < 4){
dataIO.IOStatus = "97";
goError();
return (false);
};
return (true);
}
private function validateEmail(_arg1:String):Boolean{
if (!StringUtility.isValidEmail(_arg1)){
dataIO.IOStatus = "96";
goError();
return (false);
};
return (true);
}
public function goShowHighscores(_arg1:Object=null):void{
if (!_arg1){
_arg1 = {};
};
_arg1.shortname = getCookieValue("shortname");
changePage("showHighscores", _arg1);
}
private function noPassSuccess(_arg1:Function):void{
addToCookie("userid", dataIO.xml.userid.toString());
goSuccess(_arg1);
}
public function getCookieValue(_arg1:String):String{
var _local2:*;
var _local3:String;
_local2 = flashCookie.useKey(_arg1);
_local3 = (((!((_local2 == null))) && ((_local2.length > 0)))) ? _local2 : "";
return (_local3);
}
private function onGameLoadProgress(_arg1:Event):void{
preloader.percent = _arg1.target.percent;
}
public function getHighscores(_arg1:Function):void{
var _local2:*;
_local2 = (storyMode) ? "0" : gameLevel;
dataIO.getHighscores(_arg1, _local2);
}
private function changePage(_arg1:String, _arg2:Object=null):void{
if (controller){
controller.destroyView();
controller = null;
};
removeOverlay();
switch (_arg1){
case "externalIntro":
controller = new ExternalController({ref:"gameIntro"});
break;
case "externalOutro":
controller = new ExternalController({ref:"gameOutro"});
break;
case "login":
controller = new LoginController(_arg2);
break;
case "noPass":
controller = new NoPassController(_arg2);
break;
case "register":
controller = new RegisterController(_arg2);
break;
case "register2":
controller = new Register2Controller(_arg2);
break;
case "error":
controller = new ErrorController(_arg2);
break;
case "success":
controller = new ErrorController(_arg2);
break;
case "initials":
controller = new InitialsController(_arg2);
break;
case "showHighscores":
controller = new HighscoresController(_arg2);
break;
case "saveLevel":
controller = new SaveLevelController(_arg2);
break;
};
prevPage = _arg1;
}
private function loginSuccess(_arg1:Function):void{
addToCookie("userid", dataIO.xml.userid.toString());
addToCookie("userhandle", dataIO.xml.userhandle.toString());
goSuccess(_arg1);
dropMenuJSCall();
}
private function addOverlay(_arg1:String, _arg2:Object):void{
removeOverlay();
switch (_arg1){
case "initials":
overlay = new InitialsController(_arg2);
break;
case "rating":
overlay = new RatingController(_arg2);
break;
};
}
public function addToCookie(_arg1:String, _arg2):void{
flashCookie.add(_arg1, _arg2);
}
private function tmpKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.F12){
goRating({});
};
}
public function sendRegisterData(_arg1:Object):void{
var regData = _arg1;
switch (regData.stageID){
case "stage1":
if (regData.userhandle.length < 4){
dataIO.IOStatus = "95";
goError({callback:goRegister});
return;
};
if (containsSwearing(regData.userhandle)){
dataIO.IOStatus = "99";
goError({callback:goRegister});
return;
};
goRegister2({userhandle:regData.userhandle});
break;
case "stage2":
if (!validateEmail(regData.username)){
return;
};
if (!validatePasswordLength(regData.password)){
return;
};
dataIO.sendRegisterData(regData, function (){
loginSuccess(regData.resultingCallback);
}, goError);
break;
};
}
private function showExternalPage(_arg1:String):void{
removeExternalPage();
switch (_arg1){
case "intro":
externalPage = new ExternalController({ref:"gameIntro"});
break;
case "outro":
externalPage = new ExternalController({ref:"gameOutro"});
break;
};
}
public function goLogout():void{
flashCookie.clear();
dataIO.IOStatus = "94";
goSuccess(clearCurrentPage);
}
public function get numLevels():int{
return (storymodelevels.length);
}
public function goRating(_arg1:Object):void{
if (!_arg1){
_arg1 = {};
};
_arg1 = {storyMode:storyMode};
addOverlay("rating", _arg1);
}
public function sendTrackingData(_arg1:Object):void{
_arg1.level = gameLevel;
_arg1.location = (isExternalInstance) ? "ext" : "bft";
dataIO.sendTrackingData(_arg1);
if (storyMode){
if ((((_arg1.action == "game_played")) && ((storyLevelID == 0)))){
_arg1.action = "load_story_mode";
dataIO.sendTrackingData(_arg1);
} else {
if (_arg1.action == "level_completed"){
if (storyLevelID >= (storymodelevels.length - 1)){
_arg1.action = "completed_story_mode";
dataIO.sendTrackingData(_arg1);
};
};
};
};
}
public function goNoPass():void{
var _local1:*;
_local1 = {};
_local1.username = getCookieValue("username");
_local1.callback = sendNoPassData;
changePage("noPass", _local1);
}
public function goInitials(_arg1:int):void{
var gl:*;
var initObj:*;
var score = _arg1;
trace(("SHELL initials :: score ::" + score));
gl = (storyMode) ? 0 : gameLevel;
if (getCookieValue((((gameName + "_") + gl) + "_rated")) != "true"){
goRating({callback:function (){
goInitials(score);
}});
return;
};
if (score <= 0){
return;
};
initObj = {};
initObj.score = score;
initObj.callback = sendInitials;
addOverlay("initials", initObj);
}
private function navToNewLevel(_arg1:Object):void{
navigateToURL(new URLRequest((((basedir + gameName) + "/") + newLevel)), "_top");
}
public function goExternalOutro(_arg1:Object=null):void{
trace("goExternalOutro()....");
showExternalPage("outro");
}
public function goLinkBack():void{
navigateToURL(new URLRequest((basedir + gameName)));
}
private function init(_arg1:Event):void{
var _local2:SwfLoader;
basedir = config.xml.basedir;
_stage.addChild(new backgroundView());
container = new Sprite();
_stage.addChild(container);
externalPageContainer = new Sprite();
_stage.addChild(externalPageContainer);
GenericController.container = new Sprite();
_stage.addChild(GenericController.container);
GenericOverlay.container = new Sprite();
_stage.addChild(GenericOverlay.container);
preloaderContainer = new Sprite();
_stage.addChild(preloaderContainer);
_stage.addChild(new frameView());
preloader = new preloaderView();
preloader.loadMessage = config.xml.loadermessages.*;
preloaderContainer.addChild(preloader);
_local2 = new SwfLoader((((basedir + "assets/games/") + gameName) + "/game.swf"));
_local2.addEventListener("progress", onGameLoadProgress, false, 0, true);
_local2.addEventListener("complete", onGameLoadComplete, false, 0, true);
storymodelevels = config.xml.storymodelevels.split(",");
dataIO = DataIO.getInstance();
dataIO.scriptpath = config.xml.scriptpath;
dataIO.game = gameName;
dataIO.addEventListener("dataLoaded", onDataLoaded);
setUpFlashCookie();
}
public function goGame():void{
removeExternalPage();
clearCurrentPage();
storyLevelID = 0;
game.init(this, gameLevel);
}
public function clearCurrentPage(_arg1:Object=null):void{
changePage("");
}
public function removeOverlay():void{
if (overlay){
overlay.destroyView();
overlay = null;
};
}
public function sendRating(_arg1:int):void{
var _local2:Object;
var _local3:*;
_local2 = {rating:_arg1, level:""};
if (!storyMode){
_local2.level = gameLevel;
};
dataIO.sendRatingData(_local2);
_local3 = (storyMode) ? 0 : gameLevel;
addToCookie((((gameName + "_") + _local3) + "_rated"), "true");
removeOverlay();
}
private function onGameLoadComplete(_arg1:Event):void{
var _local2:*;
game = (_arg1.target.loadedContent as MovieClip);
container.addChild(game);
if (isExternalInstance){
goExternalIntro();
} else {
goGame();
};
_local2 = new gatesView();
container.addChild(_local2);
_local2.gotoAndPlay("open1");
_stage.removeChild(preloaderContainer);
}
public function sendInitials(_arg1:Object):void{
var finalCallback:*;
var initialsData = _arg1;
if (containsSwearing(initialsData.name, true)){
dataIO.IOStatus = "99";
goError({callback:function (){
goInitials(initialsData.score);
}});
return;
};
addToCookie("shortname", initialsData.name);
initialsData.level = (storyMode) ? "0" : gameLevel;
finalCallback = (isExternalInstance) ? goExternalOutro : clearCurrentPage;
dataIO.sendInitialsData(initialsData, function (){
goSuccess(finalCallback);
}, goError);
}
private function containsSwearing(_arg1:String="", _arg2:Boolean=false):Boolean{
return (SwearChecker.checkSwearing(_arg1, _arg2, false));
}
public function goLogin(_arg1:Object):void{
_arg1.callback = sendLoginData;
_arg1.username = getCookieValue("username");
_arg1.password = getCookieValue("password");
changePage("login", _arg1);
}
public function goExternalIntro():void{
trace("goExternalIntro()....");
showExternalPage("intro");
}
private function checkLoggedIn():Boolean{
var _local1:*;
_local1 = getCookieValue("userid");
if (_local1.length == 0){
return (false);
};
return (true);
}
private function onDataLoaded(_arg1:Event):void{
var _local2:*;
_local2 = DataIO(_arg1.target);
trace("============onDataLoaded=============");
trace(("====> data in status ID " + _local2.IOStatus));
trace(("====> data in status String " + getIOStatus(_local2.IOStatus)));
trace("==================xml in==================");
trace(_local2.xml);
if (_local2.IOStatus == "1"){
if (_local2.callback){
_local2.callback(_local2.xml);
};
} else {
if (_local2.failCallback){
_local2.failCallback();
};
};
}
private function setUpFlashCookie():void{
var _local1:Date;
flashCookie = new FlashCookie(gameName);
if (!getCookieValue("returning")){
trace("setting cookie...");
_local1 = new Date();
_local1.setDate((_local1.getDate() + 1));
flashCookie.expires(_local1);
addToCookie("returning", "true");
addToCookie("shortName", "");
} else {
flashCookie.traceCookieContents();
};
}
private function removeExternalPage():void{
if (!externalPage){
return;
};
externalPage.destroyView();
externalPage = null;
}
public function getWorldData(_arg1:int, _arg2:Function):void{
trace(("getWorldData :: " + _arg1));
if ((((_arg1 <= numLevels)) || (storyMode))){
if (_arg1 > numLevels){
_arg1 = 0;
};
storyMode = true;
storyLevelID = _arg1;
gameLevel = int(storymodelevels[_arg1]);
} else {
storyMode = false;
gameLevel = _arg1;
};
dataIO.getWorldData(gameLevel, _arg2);
}
public function setStageQuality(_arg1:String):void{
switch (_arg1){
case "hi":
case "high":
default:
_stage.quality = StageQuality.HIGH;
break;
case "med":
case "medium":
_stage.quality = StageQuality.MEDIUM;
break;
case "lo":
case "low":
_stage.quality = StageQuality.LOW;
break;
};
}
public function goRegister(_arg1:Object=null):void{
if (!_arg1){
_arg1 = {};
};
_arg1.username = getCookieValue("username");
_arg1.callback = sendRegisterData;
_arg1.resultingCallback = clearCurrentPage;
changePage("register", _arg1);
}
public function sendWorldData(_arg1:Object):void{
var worldData = _arg1;
if (worldData.title.length < 4){
dataIO.IOStatus = "98";
goError();
return;
};
if (containsSwearing(worldData.title)){
dataIO.IOStatus = "99";
goError();
return;
};
dataIO.sendWorldData(worldData, function (){
goSuccess(navToNewLevel);
}, goError);
}
private function dropMenuJSCall():void{
ExternalInterface.call("makeRequest", ("login-mylevels.php?g=" + gameName));
}
private function loadConfig():void{
config = new ShellConfigLoader((((configURL + "shellconfig_") + gameName) + ".xml"));
config.addEventListener("xmlLoaded", init, false, 0, true);
}
public function goRegister2(_arg1:Object):void{
_arg1.callback = sendRegisterData;
changePage("register2", _arg1);
}
public function sendNoPassData(_arg1:Object):void{
var loginData = _arg1;
if (!validateEmail(loginData.username)){
return;
};
dataIO.sendNoPassData(loginData, function (){
noPassSuccess(loginData.resultingCallback);
}, goError);
}
}
}//package com.madebymn.caprisun.gameshell
Section 20
//ShellConfigLoader (com.madebymn.caprisun.gameshell.ShellConfigLoader)
package com.madebymn.caprisun.gameshell {
import flash.events.*;
import com.madebymn.caprisun.gameshell.common.*;
public class ShellConfigLoader extends GenericXMLLoader {
public function ShellConfigLoader(_arg1:String){
super(_arg1);
}
override public function parseXML():void{
trace("-----CONFIG-----");
trace(("scriptpath = " + xml.scriptpath));
trace(("gamename = " + xml.gamename));
dispatch();
}
}
}//package com.madebymn.caprisun.gameshell
Section 21
//FlashCookie (com.madebymn.caprisun.utils.FlashCookie)
package com.madebymn.caprisun.utils {
import flash.net.*;
public class FlashCookie {
private var _sharedObject:SharedObject;
private var _name:String;
public function FlashCookie(_arg1:String){
_name = _arg1.toLowerCase();
_sharedObject = SharedObject.getLocal(_name);
}
public function add(_arg1:String, _arg2):void{
var _local3:String;
var _local4:*;
_local3 = typeof(_arg2);
_local4 = _arg2;
switch (_local3){
case "string":
_local4 = _encode(_local4);
break;
case "number":
case "boolean":
break;
};
_sharedObject.data[_arg1] = _local4;
}
public function toString():String{
return ((("FlashCookie (" + _name) + ")"));
}
private function _decode(_arg1:String):String{
var _local2:Array;
var _local3:Number;
var _local4:Number;
if (_arg1 == null){
return (null);
};
_local2 = new Array("~", "%", "&", "\\", ";", ":", "\"", "'", ",", "<", ">", "?", "#");
_local4 = _local2.length;
_local3 = 0;
while (_local3 < _local4) {
_arg1 = _arg1.split((("{{" + _local3) + "}}")).join(_local2[_local3]);
_local3++;
};
return (_arg1);
}
public function traceCookieContents():void{
var _local1:String;
var _local2:String;
trace((("'" + _name) + "':"));
for (_local1 in _sharedObject.data) {
_local2 = _sharedObject.data[_local1];
trace((((" " + _local1) + ": ") + _decode(_local2)));
};
trace("");
}
private function _encode(_arg1:String):String{
var _local2:Array;
var _local3:Number;
var _local4:Number;
_local2 = new Array("~", "%", "&", "\\", ";", ":", "\"", "'", ",", "<", ">", "?", "#");
_local4 = _local2.length;
_local3 = 0;
while (_local3 < _local4) {
_arg1 = _arg1.split(_local2[_local3]).join((("{{" + _local3) + "}}"));
_local3++;
};
return (_arg1);
}
private function _isValidCookie():Boolean{
var _local1:String;
var _local2:Array;
var _local3:Date;
var _local4:Date;
var _local5:Number;
if (((!((_local1 == null))) && ((_local1 == _decode(_sharedObject.data["_expires"]))))){
_local2 = _local1.split(":");
_local3 = new Date(_local2[0], _local2[1], _local2[2], _local2[3], _local2[4]);
_local4 = new Date();
_local5 = (_local3.valueOf() - _local4.valueOf());
if (_local5 > 0){
return (true);
};
return (false);
};
return (true);
}
public function useKey(_arg1:String):String{
var _local2:String;
if (_isValidCookie()){
_local2 = _sharedObject.data[_arg1];
return (((_local2)==null) ? null : _decode(_local2));
//unresolved jump
};
return (null);
}
public function getSharedObject():SharedObject{
return (_sharedObject);
}
public function expires(_arg1:Date):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:String;
_local2 = _arg1.getFullYear();
_local3 = _arg1.getMonth();
_local4 = _arg1.getDate();
_local5 = _arg1.getHours();
_local6 = _arg1.getMinutes();
_local7 = ((((((((_local2 + ":") + _local3) + ":") + _local4) + ":") + _local5) + ":") + _local6);
add("_expires", _local7);
}
public function clear():void{
_sharedObject.clear();
}
public function save():Object{
return (_sharedObject.flush());
}
}
}//package com.madebymn.caprisun.utils
Section 22
//StringUtility (com.madebymn.caprisun.utils.StringUtility)
package com.madebymn.caprisun.utils {
public class StringUtility {
public static var _trimItems:Array = new Array(" ", "\t", "\n", "\r", "\t");
public function toString():String{
return ("StringUtility");
}
public static function camelise(_arg1:String):String{
var _local2:String;
var _local3:Array;
var _local4:Number;
_local2 = "";
_local3 = _arg1.split("-");
_local4 = 0;
while (_local4 < _local3.length) {
_local2 = (_local2 + StringUtility.ucFirst(_local3[_local4]));
_local4++;
};
return (StringUtility.lcFirstChr(_local2));
}
public static function encodeToXML(_arg1:String):XML{
var _local2:Number;
var _local3:String;
var _local4:String;
_local2 = _arg1.toLowerCase().indexOf("onload");
_local3 = _arg1;
if (_local2 > 0){
_local3 = _arg1.substr(0, (_local2 - 1));
};
_local4 = unescape(_local3);
return (new XML(_local4));
}
public static function clean(_arg1:String, _arg2:String, _arg3:String):String{
return (_arg1.split(((_arg2) || (" "))).join(((_arg3) || (""))));
}
public static function isValidEmail(_arg1:String):Boolean{
var _local2:RegExp;
_local2 = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
return (!((_arg1.match(_local2) == null)));
}
public static function toBoolean(_arg1:String):Boolean{
switch (_arg1.toLowerCase()){
case "1":
case "true":
return (true);
case "0":
case "false":
default:
return (false);
};
}
public static function ltrim(_arg1:String, _arg2:String=null):String{
var _local3:Array;
var _local4:Number;
_local3 = new Array();
if (_arg2){
_local3[0] = _arg2;
} else {
_local3 = StringUtility._trimItems;
};
_local4 = 0;
while (_local4 < _local3.length) {
if ((((_arg1.charAt(0) == _local3[_local4])) && ((_arg1.length > 0)))){
return (StringUtility.ltrim(_arg1.slice(1)));
};
_local4++;
};
return (_arg1);
}
public static function ucFirst(_arg1:String):String{
return ((_arg1.substr(0, 1).toUpperCase() + _arg1.substr(1).toLowerCase()));
}
public static function isValid(_arg1:String, _arg2:Number):Boolean{
if (!_arg1){
return (false);
};
if ((((((((((((((_arg1 == "")) || ((_arg1 == " ")))) || ((_arg1 == "null")))) || ((_arg1 == "undefined")))) || ((_arg1 == "false")))) || ((_arg1 == "0")))) || ((_arg1 == "-1")))){
return (false);
};
if (!isNaN(_arg2)){
if (_arg1.toString().length > _arg2){
return (true);
};
return (false);
};
return (true);
}
public static function lcFirstChr(_arg1:String):String{
return ((_arg1.substr(0, 1).toLowerCase() + _arg1.substr(1)));
}
public static function lcFirst(_arg1:String):String{
return ((_arg1.substr(0, 1).toLowerCase() + _arg1.substr(1).toUpperCase()));
}
public static function trim(_arg1:String):String{
var _local2:String;
_local2 = StringUtility.ltrim(_arg1);
return (StringUtility.rtrim(_local2));
}
public static function rtrim(_arg1:String, _arg2:String=null):String{
var _local3:Array;
var _local4:Number;
_local3 = new Array();
if (_arg2){
_local3[0] = _arg2;
} else {
_local3 = StringUtility._trimItems;
};
_local4 = 0;
while (_local4 < _local3.length) {
if ((((_arg1.charAt((_arg1.length - 1)) == _local3[_local4])) && ((_arg1.length > 0)))){
return (StringUtility.rtrim(_arg1.slice(0, (_arg1.length - 1))));
};
_local4++;
};
return (_arg1);
}
}
}//package com.madebymn.caprisun.utils
Section 23
//SwearChecker (com.madebymn.caprisun.utils.SwearChecker)
package com.madebymn.caprisun.utils {
public class SwearChecker {
public static function checkSwearing(_arg1:String, _arg2:Boolean, _arg3:Boolean):Boolean{
var _local4:Boolean;
var _local5:Boolean;
var _local6:String;
var _local7:String;
var _local8:Number;
var _local9:Array;
var _local10:Array;
_local4 = _arg3;
_local5 = false;
_local6 = _arg1;
_arg1 = _arg1.replace(/\s/, "");
if (_local4){
trace((("checking: " + _local6) + "..."));
};
_local9 = new Array("FUK", "SHT", "ARS", "WNK", "CNT", "FKR", "SEX", "COK", "KOK", "COC", "DIC", "DIK", "FUC", "JIZ", "CUM", "POO", "BUM", "GIT", "NOB", "VAJ", "VAG", "KUM", "KNT", "FCK", "PIS", "TIT", "GAY", "LEZ", "ASS", "MUF", "KKK", "JEW", "GOD", "BNP", "FOK", "WEE");
_local10 = new Array("arse", "arsenal", "arsenals", "arsenate", "arsenates", "arsenic", "arsenical", "arsenicalism", "arsenics", "arsenide", "arsenides", "arsenious", "arsenite", "arsenites", "arsenium", "arseniuret", "arseniuretted", "arsenopyrite", "arsenotherapies", "arsenotherapy", "arsenous", "arsenoxide", "carse", "catharses", "charset", "coarse", "coarsely", "coarsen", "coarsened", "coarseness", "coarsening", "coarsens", "coarser", "coarsest", "farsee", "farseeing", "farseing", "hearse", "hearsed", "hearses", "hoarse", "hoarsely", "hoarsen", "hoarsened", "hoarseness", "hoarsening", "hoarsens", "hoarser", "hoarsest", "katharses", "larsen", "marse", "Marseillaise", "marseille", "marseilles", "marses", "parse", "parsec", "parsecs", "parsed", "parsee", "parser", "parsers", "parses", "psychocatharses", "rehearse", "rehearsed", "rehearser", "rehearsers", "rehearses", "sarsen", "sarsenet", "sarsent", "sparse", "sparsely", "sparseness", "sparser", "sparsest", "tarsectomies", "tarsectomy", "unrehearse", "unrehearsed", "asshole", "asswipe", "blowjob", "blow-job", "bollock", "boner", "deboner", "bonk", "bonkers", "bullshit", "bugger", "debugger", "debuggers", "humbugger", "humbuggers", "jitterbugger", "bunghole", "candy-ass", "chuffnuts", "clit", "anaclitic", "asynclitism", "choroidocyclitis", "clitellum", "clitia", "clitic", "clition", "clitoral", "clitoric", "clitoridean", "clitoridectomies", "clitoridectomy", "clitoridis", "clitoriditis", "clitoris", "clitorises", "clitoritis", "cyclitis", "cyclitol", "enclitic", "enclitically", "glaucomatocyclitic", "heraclitus", "heteroclite", "iridocyclitis", "Polyclitus", "proclitic", "synclitic", "clitty", "cock", "alcock", "babcock", "ballcock", "bawcock", "bibcock", "billycock", "blackcock", "cock-a-doodle-doo", "cock-a-hoop", "cock-a-leekie", "cock-eyed", "cock-of-the-rock", "cock-sparrow", "cockade", "cockaded", "cockades", "Cockaigne", "cockalorum", "cockamamie", "cockarouse", "cockateel", "cockateels", "cockatiel", "cockatoo", "cockatoos", "cockatrice", "cockatrices", "Cockayne", "cockbilled", "cockboat", "Cockburn", "cockchafer", "Cockcroft", "cockcrow", "cockcrows", "cocked", "cocker", "cockerel", "cockerels", "cockers", "cockeye", "cockeyed", "cockeyes", "cockfight", "cockfighting", "cockfights", "cockhorse", "cockhorses", "cockier", "cockiest", "cockily", "cockiness", "cocking", "cockish", "cockle", "cockleboat", "cocklebur", "cockled", "cockles", "cockleshell", "cockleshells", "cockloft", "cockness", "cockney", "cockneyfy", "cockneyism", "cockneys", "cockoldries", "cockpit", "cockpits", "cockroach", "cockroaches", "cocks", "cockscomb", "cockscombs", "cocksfoot", "cockshy", "cockspur", "cockspurs", "cocksure", "cockswain", "cocktail", "cocktailed", "cocktails", "cockup", "cockups", "cocky", "corncockle", "gamecock", "gamecocking", "gamecocks", "gorcock", "half-cock", "half-cocked", "hancock", "haycock", "haycocks", "hitchcock", "Leacock", "moorcock", "peacock", "peacocked", "peacockier", "peacocking", "peacocks", "petcock", "petcocks", "pinchcock", "poppycock", "seacock", "shuttlecock", "shuttlecocks", "spatchcock", "spatchcocked", "spatchcocking", "spitchcock", "stopcock", "stopcocks", "storm-cock", "turncock", "uncock", "weathercock", "weathercocks", "woodcock", "woodcocking", "woodcocks", "cojones", "coon", "barracoon", "cocoon", "cocooned", "cocooning", "cocoons", "cooncan", "coonhound", "coonhounds", "coons", "coonskin", "coonskins", "coontie", "laocoon", "puccoon", "raccoon", "raccoons", "racoon", "racoons", "tycoon", "tycoons", "cum", "accumbent", "accumulable", "accumulate", "accumulated", "accumulates", "accumulating", "accumulation", "accumulations", "accumulative", "accumulatively", "accumulativeness", "accumulator", "accumulators", "acumen", "acumens", "acuminata", "acuminate", "acuminated", "acuminating", "acumination", "altocumulus", "cacuminal", "caecum", "canonicum", "capsicum", "capsicums", "caroticum", "cecum", "circum", "circum-", "circumambience", "circumambient", "circumambulate", "circumambulated", "circumambulates", "circumambulating", "circumambulation", "circumambulations", "circumanal", "circumarticular", "circumbendibus", "circumcircle", "circumcise", "circumcised", "circumcises", "circumcising", "circumcision", "circumcisions", "circumcorneal", "circumduction", "circumductions", "circumference", "circumferences", "circumferential", "circumflex", "circumflexes", "circumfluent", "circumfluous", "circumforaneous", "circumfuse", "circumfusion", "circumgyration", "circuminsular", "circumjacence", "circumjacent", "circumlental", "circumlocution", "circumlocutions", "circumlocutory", "circumlunar", "circumnavigate", "circumnavigated", "circumnavigates", "circumnavigating", "circumnavigation", "circumnavigations", "circumnavigator", "circumnutate", "circumoral", "circumpolar", "circumrotation", "circumscissile", "circumscribe", "circumscribed", "circumscribes", "circumscribing", "circumscription", "circumscriptions", "circumsolar", "circumspect", "circumspection", "circumspectly", "circumspectness", "circumsphere", "circumstance", "circumstanced", "circumstances", "circumstantial", "circumstantiality", "circumstantially", "circumstantiate", "circumstantiated", "circumstantiates", "circumstantiating", "circumstantiation", "circumstantiations", "circumstantibus", "circumvallate", "circumvallation", "circumvascular", "circumvent", "circumventable", "circumvented", "circumventing", "circumvention", "circumventions", "circumvents", "circumvolution", "circumvolve", "cirrocumulus", "colchicum", "cucumber", "cucumbers", "Cumae", "Cuman", "cumarin", "cumber", "cumbered", "cumberer", "cumberers", "cumbering", "Cumberland", "cumberlandrian", "Cumbernauld", "cumbers", "cumbersome", "cumbersomeness", "cumbrance", "Cumbria", "cumbrous", "cumbrously", "cumbrousness", "cumin", "cumins", "cummerbund", "cummerbunds", "cummers", "cummin", "cummings", "cummins", "cumquat", "cumquats", "cumshaw", "cumshaws", "cumulate", "cumulated", "cumulates", "cumulating", "cumulation", "cumulative", "cumulatively", "cumulet", "cumuli", "cumuliform", "cumulonimbus", "cumulostratus", "cumulous", "cumulus", "curcuma", "decumbence", "decumbency", "decumbent", "disencumber", "disencumbered", "disencumbering", "disencumbers", "document", "documentable", "documental", "documentaries", "documentarily", "documentary", "documentation", "documented", "documenter", "documenters", "documenting", "documents", "doronicum", "Eboracum", "ecclesiasticum", "ecumenic", "ecumenical", "ecumenicalism", "ecumenically", "ecumenicism", "ecumenicity", "ecumenism", "ecumenist", "elasticum", "encumber", "encumbered", "encumbering", "encumbers", "encumbrance", "encumbrancer", "encumbrances", "fractocumulus", "guaiacum", "hypericum", "ileocecum", "Illyricum", "incumbencies", "incumbency", "incumbent", "incumbently", "incumbents", "incumber", "incumbered", "incumbering", "incumbers", "incumbrance", "incumbrancer", "locum", "locumtenencies", "locumtenency", "Macumba", "mecum", "mecums", "mesocecum", "modicum", "modicums", "molluscum", "nocumetum", "noncumulative", "Noricum", "oecumenical", "procumbent", "publicum", "pyogenicum", "recumbencies", "recumbency", "recumbent", "rusticum", "scum", "scumbag", "scumble", "scumbled", "scumbling", "scummed", "scummers", "scummier", "scummiest", "scumming", "scummy", "scums", "slocum", "stratocumuli", "stratocumulus", "succumb", "succumbed", "succumber", "succumbers", "succumbing", "succumbs", "superincumbent", "talcum", "talcums", "taraxacum", "tecum", "Tecumseh", "tillicum", "triticum", "Tucum", "uncircumcise", "uncircumcised", "uncircumcision", "uncircumstantial", "uncircumstantialy", "uncumber", "uncumbered", "undocument", "undocumented", "unencumber", "unencumbered", "unincumber", "unincumbered", "vademecum", "viaticum", "viaticums", "cunny", "cunt", "Scunthorpe", "crap", "crapaud", "crape", "craped", "crapes", "craping", "crapper", "crappers", "crappie", "crappieness", "crappier", "crappies", "crappiest", "crappiness", "crapping", "crappy", "craps", "crapshooter", "crapshooters", "crapulence", "crapulent", "crapulous", "scrap", "scrapbook", "scrapbooks", "scrape", "scraped", "scraper", "scraperboard", "scrapers", "scrapes", "scrapheap", "scrapie", "scraping", "scrapings", "scrappage", "scrapped", "scrapper", "scrappers", "scrappier", "scrappiest", "scrappily", "scrappiness", "scrapping", "scrapple", "scrapples", "scrappy", "scraps", "skyscrape", "skyscraper", "skyscrapers", "skyscraping", "dago", "dagoba", "dagobas", "dagoes", "Dagon", "pedagog", "pedagogic", "pedagogical", "pedagogically", "pedagogics", "pedagogies", "pedagogs", "pedagogue", "pedagogues", "pedagogy", "solidago", "solidagos", "darkie", "dickhead", "dipstick", "dong", "ding-dong", "dingdong", "dingdonged", "dingdongs", "donga", "Dongola", "dongs", "quandong", "dork", "Dorking", "fanny", "feak", "fecal", "fecalith", "fecaloid", "felch", "fellate", "feltch", "fuck", "furbox", "furburger", "gayboy", "ginch", "gnikcuf", "hardon", "honkers", "hussy", "kcid", "kcuf", "lactoids", "lesbo", "blesbok", "Middlesboro", "Middlesborough", "lesbyterian", "lezzie", "lezzo", "man-root", "nestlecock", "nigger", "snigger", "sniggered", "sniggering", "sniggeringly", "sniggers", "nympho", "nympholepsies", "nympholepsy", "nympholept", "nympholeptic", "nymphomania", "nymphomaniac", "nymphomaniacal", "nymphomaniacs", "onanism", "piss", "inspissate", "inspissated", "inspissating", "inspissation", "inspissator", "Nipissing", "pissant", "pissants", "Pissarro", "pissoir", "pissoirs", "spissitude", "pissoff", "prick", "pinprick", "pinpricked", "pinpricks", "pricked", "pricket", "prickier", "prickiest", "pricking", "prickle", "prickled", "prickles", "pricklier", "prickliest", "prickliness", "prickling", "prickly", "pricks", "pricky", "pussies", "pussy", "pussycat", "pussycats", "pussyfoot", "pussyfooted", "pussyfooting", "pussyfoots", "pusy", "puta", "amputate", "amputated", "amputates", "amputating", "amputation", "amputations", "amputator", "computability", "computable", "computation", "computational", "computations", "computative", "deputation", "deputational", "deputations", "deputative", "disputability", "disputable", "disputably", "disputant", "disputants", "disputation", "disputations", "disputatious", "disputatiously", "disputatiousness", "disreputability", "disreputable", "disreputably", "imputable", "imputation", "imputations", "imputative", "incomputable", "incomputably", "indisputable", "indisputableness", "indisputably", "laputa", "laputan", "miscomputation", "nonimputability", "nonimputable", "putamen", "putamina", "putative", "putatively", "Rajputana", "reamputation", "reputability", "reputable", "reputableness", "reputably", "reputation", "reputations", "sputa", "supputation", "undisputable", "queef", "queve", "quim", "equimolecular", "Esquimau", "Quimper", "quimsteak", "qveer", "rimadonna", "primadonna", "primadonnas", "rimming", "brimming", "primming", "trimming", "trimmings", "untrimming", "rootle", "rootless", "rootlessness", "rootlet", "rootlets", "sappho", "scumbag", "scumber", "sexpot", "shag", "shagbark", "shagbarks", "shagreen", "shagbucket", "shagstress", "shirtlifter", "shit", "brushite", "Cushitic", "Peshitta", "shittah", "Shittim", "Yamashita", "snarf", "sodomite", "sodomy", "spic", "allspice", "allspices", "aspic", "aspics", "auspicate", "auspice", "auspices", "auspicial", "auspicious", "auspiciously", "auspiciousness", "conspicuity", "conspicuous", "conspicuously", "conspicuousness", "despicable", "despicably", "extispicious", "haruspical", "hospice", "hospices", "imperspicuity", "inauspicious", "inauspiciously", "inauspiciousness", "inconspicuous", "inconspicuously", "inconspicuousness", "mispickel", "oversuspicious", "perspicacious", "perspicaciously", "perspicaciousness", "perspicacity", "perspicuity", "perspicuous", "perspicuously", "perspicuousness", "spica", "spicaes", "spicas", "spicate", "spiccato", "spice", "spiceberry", "spicebush", "spiced", "spicer", "spicers", "spicery", "spices", "spicey", "spicier", "spiciest", "spicily", "spiciness", "spicing", "spick", "spick-and-span", "spics", "spicula", "spicular", "spiculate", "spiculated", "spiculation", "spicule", "spicules", "spiculum", "spicy", "suspicion", "suspicions", "suspicious", "suspiciously", "suspiciousness", "transpicuous", "unauspicious", "unconspicuous", "unsuspicious", "unsuspiciously", "strollop", "suckster", "titties", "tnuc", "toggaf", "tosser", "tribadist", "turd", "saturday", "saturdayish", "saturdays", "sturdier", "sturdies", "sturdiest", "sturdily", "sturdiness", "sturdy", "turdiform", "turdine", "twank", "twat", "atwater", "cutwater", "Derwentwater", "heartwater", "meltwater", "saltwater", "twattle", "Witwatersrand", "wristwatch", "wristwatches", "wank", "swank", "swanked", "swanker", "swankers", "swankest", "swankier", "swankiest", "swankily", "swanking", "swanks", "swanky", "twankay", "whore", "wiseass", "wizzer", "wog", "golliwog", "golliwogs", "hornswoggle", "hornswoggled", "hornswoggling", "polliwog", "polliwogs", "pollywog", "pollywogs", "woggle");
if (_arg2 == true){
_local6 = _arg1.toUpperCase();
for (_local7 in _local9) {
if (_local6 == _local9[_local7]){
_local5 = true;
if (_local4){
trace(((("!!! " + _local6) + " == ") + _local9[_local7]));
};
break;
} else {
if (_local4){
trace((((" => " + _local6) + " != ") + _local9[_local7]));
};
};
};
return (_local5);
//unresolved jump
};
_local6 = _arg1.toLowerCase();
_local8 = 0;
while (_local8 < _local10.length) {
if (_local6.split(_local10[_local8]).length > 1){
_local5 = true;
if (_local4){
trace(((("!!! " + _local6) + " == ") + _local10[_local8]));
};
break;
} else {
if (_local4){
trace((((" => " + _local6) + " != ") + _local10[_local8]));
};
};
_local8++;
};
return (_local5);
}
}
}//package com.madebymn.caprisun.utils
Section 24
//_allTitles_3 (game_loader_wide_external_as3_fla._allTitles_3)
package game_loader_wide_external_as3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class _allTitles_3 extends MovieClip {
public var hiScoresTitle:TextField;
public function _allTitles_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 25
//arrowBtn_4 (game_loader_wide_external_as3_fla.arrowBtn_4)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class arrowBtn_4 extends MovieClip {
public function arrowBtn_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 26
//B_47 (game_loader_wide_external_as3_fla.B_47)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class B_47 extends MovieClip {
public function B_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 27
//blob_35 (game_loader_wide_external_as3_fla.blob_35)
package game_loader_wide_external_as3_fla {
import flash.net.*;
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class blob_35 extends MovieClip {
public var blob1_mc:MovieClip;
public function blob_35(){
addFrameScript(0, frame1);
}
function frame1(){
blob1_mc.addEventListener(Event.ENTER_FRAME, function (_arg1:Event){
this._xscale = (this._yscale = (90 + Math.round((Math.random() * 70))));
});
}
}
}//package game_loader_wide_external_as3_fla
Section 28
//closeBtn_2 (game_loader_wide_external_as3_fla.closeBtn_2)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class closeBtn_2 extends MovieClip {
public function closeBtn_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 29
//controls_74 (game_loader_wide_external_as3_fla.controls_74)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class controls_74 extends MovieClip {
public var text_mc:MovieClip;
public function controls_74(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
text_mc.gotoAndStop(1);
}
}
}//package game_loader_wide_external_as3_fla
Section 30
//F_50 (game_loader_wide_external_as3_fla.F_50)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class F_50 extends MovieClip {
public function F_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 31
//forgotPassBtn_9 (game_loader_wide_external_as3_fla.forgotPassBtn_9)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class forgotPassBtn_9 extends MovieClip {
public function forgotPassBtn_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 32
//G_49 (game_loader_wide_external_as3_fla.G_49)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class G_49 extends MovieClip {
public function G_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 33
//healthMessageClip_23 (game_loader_wide_external_as3_fla.healthMessageClip_23)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class healthMessageClip_23 extends MovieClip {
public var msgClip:MovieClip;
}
}//package game_loader_wide_external_as3_fla
Section 34
//healthMessageGfx_24 (game_loader_wide_external_as3_fla.healthMessageGfx_24)
package game_loader_wide_external_as3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class healthMessageGfx_24 extends MovieClip {
public var field:TextField;
}
}//package game_loader_wide_external_as3_fla
Section 35
//I_48 (game_loader_wide_external_as3_fla.I_48)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class I_48 extends MovieClip {
public function I_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 36
//inputClip_bg_7 (game_loader_wide_external_as3_fla.inputClip_bg_7)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class inputClip_bg_7 extends MovieClip {
public function inputClip_bg_7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 37
//linkback2_84 (game_loader_wide_external_as3_fla.linkback2_84)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class linkback2_84 extends MovieClip {
public function linkback2_84(){
addFrameScript(10, frame11, 14, frame15);
}
function frame15(){
stop();
}
function frame11(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 38
//logoAnims_46 (game_loader_wide_external_as3_fla.logoAnims_46)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class logoAnims_46 extends MovieClip {
public function logoAnims_46(){
addFrameScript(186, frame187);
}
function frame187(){
gotoAndPlay("loop");
}
}
}//package game_loader_wide_external_as3_fla
Section 39
//logoMasked_45 (game_loader_wide_external_as3_fla.logoMasked_45)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class logoMasked_45 extends MovieClip {
public var logoAnim_mc:MovieClip;
}
}//package game_loader_wide_external_as3_fla
Section 40
//MainTimeline (game_loader_wide_external_as3_fla.MainTimeline)
package game_loader_wide_external_as3_fla {
import com.madebymn.caprisun.gameshell.*;
import flash.display.*;
public dynamic class MainTimeline extends MovieClip {
public var main:Main;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
main = new Main(stage, "external");
}
}
}//package game_loader_wide_external_as3_fla
Section 41
//notRegisteredBtn_11 (game_loader_wide_external_as3_fla.notRegisteredBtn_11)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class notRegisteredBtn_11 extends MovieClip {
public function notRegisteredBtn_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 42
//playAgain_78 (game_loader_wide_external_as3_fla.playAgain_78)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class playAgain_78 extends MovieClip {
public var text_mc:MovieClip;
public function playAgain_78(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
text_mc.gotoAndStop(1);
}
}
}//package game_loader_wide_external_as3_fla
Section 43
//playNow_63 (game_loader_wide_external_as3_fla.playNow_63)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class playNow_63 extends MovieClip {
public var text_mc:MovieClip;
public function playNow_63(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
text_mc.gotoAndStop(1);
}
}
}//package game_loader_wide_external_as3_fla
Section 44
//viewhighscores_83 (game_loader_wide_external_as3_fla.viewhighscores_83)
package game_loader_wide_external_as3_fla {
import flash.display.*;
public dynamic class viewhighscores_83 extends MovieClip {
public function viewhighscores_83(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package game_loader_wide_external_as3_fla
Section 45
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _endTarget:Object;
private var _sound:SoundTransform;
public var target:Object;
public var duration:Number;
public var startTime:uint;
public var extraTweens:Object;
protected var _color:ColorTransform;
protected var _active:Boolean;
protected var _endColor:ColorTransform;
public var vars:Object;
public var tweens:Object;
public var initTime:uint;
private static var _sprite:Sprite = new Sprite();
private static var _timer:Timer = new Timer(2000);
private static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = killTweensOf;
public static var version:Number = 5.83;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = _arg2;
this.delay = ((_arg3.delay) || (0));
if (_arg2 == 0){
this.duration = 0.001;
if (this.delay == 0){
this.vars.runBackwards = true;
};
};
this.target = (_endTarget = _arg1);
if (!(this.vars.ease is Function)){
this.vars.ease = easeOut;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (this.vars.mcColor != null){
this.vars.tint = this.vars.mcColor;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
};
this.tweens = {};
this.extraTweens = {};
this.initTime = getTimer();
if (this.vars.runBackwards == true){
initTweenVals();
};
_active = false;
if ((((_arg2 == 0)) && ((this.delay == 0)))){
complete(true);
} else {
if (!_listening){
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
};
}
public function set endTarget(_arg1:Object):void{
delete _all[_endTarget][this];
_endTarget = _arg1;
if (_all[_arg1] == undefined){
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
}
public function get colorProxy():Number{
return (0);
}
public function get endTarget():Object{
return (_endTarget);
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((getTimer() - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (this.vars.runBackwards != true){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function initTweenVals():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local7:TweenLite;
var _local8:Object;
_local1 = (this.delay - ((getTimer() - this.initTime) / 1000));
if ((this.target is Array)){
_local4 = ((this.vars.endArray) || ([]));
_local5 = 0;
while (_local5 < _local4.length) {
if (((!((this.target[_local5] == _local4[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens[_local5.toString()] = {o:this.target, s:this.target[_local5], c:(_local4[_local5] - this.target[_local5])};
};
_local5++;
};
} else {
for (_local2 in this.vars) {
if ((((((((((((((((((((((((((((_local2 == "delay")) || ((_local2 == "ease")))) || ((_local2 == "overwrite")))) || ((_local2 == "onComplete")))) || ((_local2 == "onCompleteParams")))) || ((_local2 == "runBackwards")))) || ((_local2 == "onUpdate")))) || ((_local2 == "onUpdateParams")))) || ((_local2 == "autoAlpha")))) || ((_local2 == "_autoAlpha")))) || ((_local2 == "onStart")))) || ((_local2 == "onStartParams")))) || ((_local2 == "easeParams")))) || ((_local2 == "mcColor")))){
} else {
if ((((_local2 == "tint")) && ((this.target is DisplayObject)))){
_color = this.target.transform.colorTransform;
_endColor = new ColorTransform();
if (this.vars.alpha != undefined){
_endColor.alphaMultiplier = this.vars.alpha;
delete this.vars.alpha;
delete this.tweens.alpha;
} else {
_endColor.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars[_local2] == null))) && (!((this.vars[_local2] == ""))))){
_endColor.color = this.vars[_local2];
};
_local6 = new TweenLite(this, this.duration, {colorProxy:1, delay:_local1, overwrite:false, ease:this.vars.ease, runBackwards:this.vars.runBackwards});
_local6.endTarget = this.target;
} else {
if ((((_local2 == "volume")) && ((this.target is MovieClip)))){
_sound = this.target.soundTransform;
_local7 = new TweenLite(this, this.duration, {volumeProxy:this.vars[_local2], ease:easeOut, delay:_local1, overwrite:false, runBackwards:this.vars.runBackwards});
_local7.endTarget = this.target;
} else {
if (this.target.hasOwnProperty(_local2)){
if (typeof(this.vars[_local2]) == "number"){
_local3 = (this.vars[_local2] - this.target[_local2]);
} else {
_local3 = Number(this.vars[_local2]);
};
this.tweens[_local2] = {o:this.target, s:this.target[_local2], c:_local3};
} else {
this.extraTweens[_local2] = {o:this.target, s:0, c:0, v:this.vars[_local2]};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
for (_local2 in this.tweens) {
_local8 = this.tweens[_local2];
this.tweens[_local2].s = (_local8.s + _local8.c);
_local8.c = (_local8.c * -1);
if (_local8.c != 0){
_local8.o[_local2] = _local8.s;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
}
public function render(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:String;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 > this.duration){
_local2 = this.duration;
};
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
for (_local5 in this.tweens) {
_local4 = this.tweens[_local5];
_local4.o[_local5] = (_local4.s + (_local3 * _local4.c));
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function set colorProxy(_arg1:Number):void{
var _local2:Number;
_local2 = (1 - _arg1);
this.target.transform.colorTransform = new ColorTransform(((_color.redMultiplier * _local2) + (_endColor.redMultiplier * _arg1)), ((_color.greenMultiplier * _local2) + (_endColor.greenMultiplier * _arg1)), ((_color.blueMultiplier * _local2) + (_endColor.blueMultiplier * _arg1)), ((_color.alphaMultiplier * _local2) + (_endColor.alphaMultiplier * _arg1)), ((_color.redOffset * _local2) + (_endColor.redOffset * _arg1)), ((_color.greenOffset * _local2) + (_endColor.greenOffset * _arg1)), ((_color.blueOffset * _local2) + (_endColor.blueOffset * _arg1)), ((_color.alphaOffset * _local2) + (_endColor.alphaOffset * _arg1)));
}
public function get volumeProxy():Number{
return (_sound.volume);
}
public function set volumeProxy(_arg1:Number):void{
_sound.volume = _arg1;
this.target.soundTransform = _sound;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
this.startTime = 0;
render((this.duration * 1000));
return;
};
if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){
this.target.visible = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
removeTween(this);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.endTarget] == undefined))))){
delete _all[_arg1.endTarget][_arg1];
};
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:Object;
var _local3:int;
var _local4:Boolean;
var _local5:Object;
var _local6:Object;
var _local7:Object;
_local2 = _all;
_local3 = 0;
for (_local5 in _local2) {
_local4 = false;
for (_local6 in _local2[_local5]) {
_local4 = true;
break;
};
if (!_local4){
delete _local2[_local5];
} else {
_local3++;
};
};
if (_local3 == 0){
_sprite.removeEventListener(Event.ENTER_FRAME, executeAll);
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function executeAll(_arg1:Event):void{
var _local2:Object;
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_local2 = _all;
_local3 = getTimer();
for (_local4 in _local2) {
for (_local5 in _local2[_local4]) {
_local6 = _local2[_local4][_local5];
if (((!((_local6 == null))) && (_local6.active))){
_local6.render(_local3);
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
}
}//package gs
Section 46
//backgroundView (backgroundView)
package {
import flash.display.*;
public dynamic class backgroundView extends Sprite {
}
}//package
Section 47
//errorView (errorView)
package {
import flash.display.*;
import flash.text.*;
public dynamic class errorView extends MovieClip {
public var field:TextField;
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function errorView(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 48
//externalView (externalView)
package {
import com.madebymn.caprisun.gameshell.views.*;
public dynamic class externalView extends ExternalView {
public function externalView(){
addFrameScript(0, frame1, 50, frame51, 100, frame101, 101, frame102, 128, frame129, 163, frame164);
}
function frame164(){
stop();
ready("gameOutro");
}
function frame102(){
stop();
ready("controls");
}
function frame1(){
stop();
}
function frame101(){
stop();
ready("gameIntro");
}
function frame129(){
stop();
}
function frame51(){
stop();
}
}
}//package
Section 49
//frameView (frameView)
package {
import flash.display.*;
public dynamic class frameView extends MovieClip {
}
}//package
Section 50
//gatesView (gatesView)
package {
import flash.display.*;
public dynamic class gatesView extends MovieClip {
public function gatesView(){
addFrameScript(0, frame1, 4, frame5, 9, frame10, 24, frame25, 29, frame30, 44, frame45, 49, frame50, 64, frame65);
}
function frame65(){
gotoAndStop("done");
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("done");
}
function frame5(){
stop();
}
function frame30(){
play();
}
function frame45(){
gotoAndStop("done");
}
function frame50(){
play();
}
}
}//package
Section 51
//highscoreItem (highscoreItem)
package {
import flash.display.*;
import flash.text.*;
public dynamic class highscoreItem extends MovieClip {
public var rankField:TextField;
public var nameField:TextField;
public var scoreField:TextField;
}
}//package
Section 52
//highscoresView (highscoresView)
package {
import flash.display.*;
public dynamic class highscoresView extends MovieClip {
public var backBtn:MovieClip;
public var closeBtn:MovieClip;
public var maskClip:MovieClip;
public var titleClip:MovieClip;
public function highscoresView(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 53
//initialsView (initialsView)
package {
import flash.display.*;
public dynamic class initialsView extends MovieClip {
public var submitBtn:MovieClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function initialsView(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 54
//inputFieldClip (inputFieldClip)
package {
import flash.display.*;
import flash.text.*;
public dynamic class inputFieldClip extends MovieClip {
public var field:TextField;
public var bg:MovieClip;
}
}//package
Section 55
//loginView (loginView)
package {
import flash.display.*;
public dynamic class loginView extends MovieClip {
public var submitBtn:MovieClip;
public var inputClip2:inputFieldClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var regBtn:MovieClip;
public var noPassBtn:MovieClip;
public var titleClip:MovieClip;
public function loginView(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 56
//noPassView (noPassView)
package {
import flash.display.*;
public dynamic class noPassView extends MovieClip {
public var submitBtn:MovieClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function noPassView(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package
Section 57
//preloaderView (preloaderView)
package {
import com.madebymn.caprisun.gameshell.views.*;
public dynamic class preloaderView extends PreloaderView {
}
}//package
Section 58
//ratingView (ratingView)
package {
import flash.display.*;
public dynamic class ratingView extends MovieClip {
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function ratingView(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 59
//register2View (register2View)
package {
import flash.display.*;
public dynamic class register2View extends MovieClip {
public var submitBtn:MovieClip;
public var inputClip2:inputFieldClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function register2View(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 60
//registerView (registerView)
package {
import flash.display.*;
public dynamic class registerView extends MovieClip {
public var submitBtn:MovieClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var titleClip:MovieClip;
public function registerView(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 61
//saveLevelView (saveLevelView)
package {
import flash.display.*;
import flash.text.*;
public dynamic class saveLevelView extends MovieClip {
public var loggedinField:TextField;
public var submitBtn:MovieClip;
public var inputClip1:inputFieldClip;
public var closeBtn:MovieClip;
public var logoutBtn:MovieClip;
public var titleClip:MovieClip;
public function saveLevelView(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 62
//starClip (starClip)
package {
import flash.display.*;
public dynamic class starClip extends MovieClip {
public function starClip(){
addFrameScript(0, frame1, 9, frame10, 30, frame31, 37, frame38);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame38(){
stop();
}
function frame31(){
stop();
}
}
}//package
Section 63
//waitingClip (waitingClip)
package {
import flash.display.*;
public dynamic class waitingClip extends MovieClip {
}
}//package