Section 1
//CBP_persiana_56 (Cannonbolt_fla.CBP_persiana_56)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class CBP_persiana_56 extends MovieClip {
public function CBP_persiana_56(){
addFrameScript(58, frame59);
}
function frame59(){
stop();
}
}
}//package Cannonbolt_fla
Section 2
//CBPcheckmov_94 (Cannonbolt_fla.CBPcheckmov_94)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class CBPcheckmov_94 extends MovieClip {
public function CBPcheckmov_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Cannonbolt_fla
Section 3
//cpbuttonmov2_54 (Cannonbolt_fla.cpbuttonmov2_54)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class cpbuttonmov2_54 extends MovieClip {
public function cpbuttonmov2_54(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package Cannonbolt_fla
Section 4
//cpnumbers_lifes_21 (Cannonbolt_fla.cpnumbers_lifes_21)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class cpnumbers_lifes_21 extends MovieClip {
public function cpnumbers_lifes_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Cannonbolt_fla
Section 5
//MainTimeline (Cannonbolt_fla.MainTimeline)
package Cannonbolt_fla {
import flash.events.*;
import flash.display.*;
import com.utils.*;
public dynamic class MainTimeline extends MovieClip {
public var mcSelectStage:MovieClip;
public var mcMenu:MovieClip;
public var mcInstructions:MovieClip;
public var mcCanvasGame:MovieClip;
public var mcCutscene:MovieClip;
public var mcLoad:mc_LoadingScreen;
public var mcHightScore:MovieClip;
public function MainTimeline(){
addFrameScript(1, frame2, 20, frame21, 30, frame31, 40, frame41, 50, frame51, 60, frame61, 68, frame69, 75, frame76, 84, frame85);
}
function frame76(){
mainCannonbolt.ScreenHightScorePromoQuick(this, "GAME");
}
function frame85(){
gotoAndStop("GAME");
}
function frame21(){
mainCannonbolt.setXMLvariables();
mainCannonbolt.ScreenIntructions(this, this.mcMenu, "INSTRUCTIONS");
}
function frame31(){
if (((mainCannonbolt.isActiveLevel2) && (mainCannonbolt.isActiveLevel1))){
mainCannonbolt.ScreenIntructions3(this, mcInstructions, "CUTSCENE");
} else {
mainCannonbolt.ScreenIntructions2(this, mcInstructions, "SELECTSTAGE");
};
}
function frame41(){
mainCannonbolt.ScreenGame(this, this.mcCutscene, "GAME");
}
function frame2(){
stop();
clsXMLLoader.loadXML("CannonboltSettings.xml");
this.addEventListener("enterFrame", onEnterFrame, false, 0, true);
}
public function onEnterFrame(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = this.loaderInfo.bytesLoaded;
_local3 = this.loaderInfo.bytesTotal;
_local4 = ((_local2 / _local3) * 100);
ProgressLoad(_local4);
if ((((this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal)) && (clsXMLLoader.doneLoading))){
this.removeEventListener("enterFrame", onEnterFrame);
if (clsXMLLoader.correctlyLoaded){
this.removeEventListener("enterFrame", onEnterFrame);
gotoAndStop("MAINMENU");
};
};
}
function frame51(){
this.stage.quality = "medium";
mainCannonbolt.onLoadGame(mcCanvasGame, this);
}
public function ProgressLoad(_arg1:Number){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = (_arg1 % 10);
_local3 = (Math.floor((_arg1 / 10)) % 10);
_local4 = Math.floor((_arg1 / 100));
this.mcLoad.mcLod_u.gotoAndStop(("N" + _local2));
this.mcLoad.mcLod_d.gotoAndStop(("N" + _local3));
this.mcLoad.mcLod_c.gotoAndStop(("N" + _local4));
}
function frame61(){
mainCannonbolt.ScreenSelectStage(this, this.mcSelectStage, "CUTSCENE");
}
function frame69(){
mainCannonbolt.ScreenHightScore(this, mcHightScore, "INSTRUCTIONS");
}
}
}//package Cannonbolt_fla
Section 6
//mc_SelectStage_90 (Cannonbolt_fla.mc_SelectStage_90)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class mc_SelectStage_90 extends MovieClip {
public var stage1:MovieClip;
public var checkStage1:MovieClip;
public var checkStage2:MovieClip;
public var stage2:MovieClip;
public var Stage1Block:MovieClip;
public var Stage2Block:MovieClip;
public function mc_SelectStage_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Cannonbolt_fla
Section 7
//mcCutscene_69 (Cannonbolt_fla.mcCutscene_69)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class mcCutscene_69 extends MovieClip {
public var btnCutscene:SimpleButton;
}
}//package Cannonbolt_fla
Section 8
//mcHelp2_55 (Cannonbolt_fla.mcHelp2_55)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class mcHelp2_55 extends MovieClip {
public var btnNext:SimpleButton;
public function mcHelp2_55(){
addFrameScript(58, frame59);
}
function frame59(){
stop();
}
}
}//package Cannonbolt_fla
Section 9
//mcHighscore_99 (Cannonbolt_fla.mcHighscore_99)
package Cannonbolt_fla {
import flash.display.*;
import flash.events.*;
public dynamic class mcHighscore_99 extends MovieClip {
public var mcBSC_mlll:MovieClip;
public var mcBSC_ml:MovieClip;
public var mcSC_u:MovieClip;
public var mcSC_ml:MovieClip;
public var btnStartOver:SimpleButton;
public var mcSC_mll:MovieClip;
public var mcSC_mlll:MovieClip;
public var mcBSC_d:MovieClip;
public var mcBSC_c:MovieClip;
public var mcBSC_mll:MovieClip;
public var mcBSC_u:MovieClip;
public var mcBSC_m:MovieClip;
public var mcSC_c:MovieClip;
public var mcSC_d:MovieClip;
public var mcSC_m:MovieClip;
public function mcHighscore_99(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
btnStartOver.addEventListener(MouseEvent.CLICK, mainCannonbolt.clickBtn3, false, 0, true);
}
}
}//package Cannonbolt_fla
Section 10
//titlecard_32 (Cannonbolt_fla.titlecard_32)
package Cannonbolt_fla {
import flash.display.*;
public dynamic class titlecard_32 extends MovieClip {
public var btnPlay:SimpleButton;
}
}//package Cannonbolt_fla
Section 11
//MovieClipLoader (com.cartoonnetwork.net.MovieClipLoader)
package com.cartoonnetwork.net {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class MovieClipLoader extends Loader {
private var _errorCallback:Function;
private var _callback:Function;
public function MovieClipLoader(){
contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete, false, 0, true);
contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoaderIOError, false, 0, true);
contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onLoaderSecurityError, false, 0, true);
}
private function onLoaderComplete(_arg1:Event):void{
var _local2:LoaderInfo;
var _local3:MovieClip;
_local2 = LoaderInfo(_arg1.target);
_local3 = MovieClip(_local2.content);
unload();
_callback(_local3);
}
public function loadAsync(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:URLRequest;
_callback = _arg2;
_errorCallback = _arg3;
_local4 = new URLRequest(_arg1);
load(_local4);
}
private function onLoaderIOError(_arg1:Event):void{
trace(((this + ".onLoaderIOError(e:Event) : ") + _arg1));
_errorCallback();
}
override public function toString():String{
return ("<< MovieClipLoader >>");
}
private function onLoaderSecurityError(_arg1:Event):void{
trace(((this + ".onLoaderSecurityError(e:Event) : ") + _arg1));
_errorCallback();
}
}
}//package com.cartoonnetwork.net
Section 12
//TopScoreModuleProxy (com.cartoonnetwork.topscore.TopScoreModuleProxy)
package com.cartoonnetwork.topscore {
import flash.display.*;
import com.cartoonnetwork.net.*;
public class TopScoreModuleProxy extends Sprite {
private static var _inputBarrier:Sprite;
private static var _topScoreModule;
public function TopScoreModuleProxy():void{
}
override public function toString():String{
return ("<< TopScoreModuleProxy >>");
}
public static function getInputBarrier(_arg1:int, _arg2:int):Sprite{
var _local3:Sprite;
var _local4:Graphics;
_local3 = new Sprite();
_local4 = _local3.graphics;
_local4.beginFill(0, 0);
_local4.drawRect(0, 0, _arg1, _arg2);
_local4.endFill();
_local3.buttonMode = true;
_local3.useHandCursor = false;
return (_local3);
}
public static function submitAsync(_arg1:DisplayObjectContainer, _arg2:Object, _arg3:int, _arg4:Function, _arg5:Function):void{
var deferred_callback:Function;
var deferred_errorCallback:Function;
var doc = _arg1;
var params = _arg2;
var score = _arg3;
var callback = _arg4;
var errorCallback = _arg5;
trace(((((((((("submitAsync(doc:DisplayObjectContainer, params:Object, score:int, callback:Function, errorCallback:Function) : " + doc) + ", ") + params) + ", ") + score) + ", ") + callback) + ", ") + errorCallback));
if (topScoresEnabled(params)){
if (_topScoreModule == null){
_inputBarrier = getInputBarrier(doc.stage.stageWidth, doc.stage.stageHeight);
loadAsync(doc, params, function ():void{
submitAsync(doc, params, score, callback, errorCallback);
}, errorCallback);
} else {
doc.addChild(_inputBarrier);
doc.addChild(_topScoreModule);
deferred_callback = function ():void{
doc.removeChild(_topScoreModule);
doc.removeChild(_inputBarrier);
callback();
};
deferred_errorCallback = function ():void{
doc.removeChild(_topScoreModule);
doc.removeChild(_inputBarrier);
errorCallback();
};
_topScoreModule.processScoreAsync(score, deferred_callback, deferred_errorCallback);
};
} else {
trace("TopScores are not enabled for this game.");
callback();
};
}
private static function loadAsync(_arg1:DisplayObjectContainer, _arg2:Object, _arg3:Function, _arg4:Function):void{
var mcl:MovieClipLoader;
var deferred_callback:Function;
var deferred_errorCallback:Function;
var doc = _arg1;
var params = _arg2;
var callback = _arg3;
var errorCallback = _arg4;
mcl = new MovieClipLoader();
doc.addChild(mcl);
deferred_callback = function (_arg1):void{
_topScoreModule = _arg1;
doc.removeChild(mcl);
_topScoreModule.initWithParameters(params);
callback();
};
deferred_errorCallback = function ():void{
doc.removeChild(mcl);
errorCallback();
};
mcl.loadAsync(params.topScoreModulePath, deferred_callback, deferred_errorCallback);
}
public static function topScoresEnabled(_arg1:Object):Boolean{
return (hasAllNecessaryPaths(_arg1));
}
private static function hasAllNecessaryPaths(_arg1:Object):Boolean{
return (((((((((_arg1.submitPath) && (_arg1.topScoreModulePath))) && (_arg1.loginModulePath))) && (_arg1.retrievePath))) && (_arg1.thisGameLeaderboardPath)));
}
}
}//package com.cartoonnetwork.topscore
Section 13
//GameTrack_AS3 (com.Tracker.GameTrack_AS3)
package com.Tracker {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class GameTrack_AS3 {
private var container:DisplayObjectContainer;
private var trkConnection:LocalConnection;
public function GameTrack_AS3(_arg1:DisplayObjectContainer){
container = _arg1;
trkConnection = new LocalConnection();
}
public function sendEventReplay(){
trackNewEvent("replay");
}
public function sendEventCustom(_arg1:String){
trackNewEvent(("cust_" + _arg1));
}
private function trackNewEvent(_arg1:String){
trkConnection.send("trkConnection", "sendTracking", _arg1);
}
public function sendEventWin(){
trackNewEvent("win");
}
private function trkLoadComplete(_arg1:Event):void{
}
public function sendEventLose(){
trackNewEvent("lose");
}
public function loadTracker():void{
var _local1:URLRequest;
var _local2:Loader;
_local1 = new URLRequest("tracker.swf");
_local2 = new Loader();
configureListeners(_local2.contentLoaderInfo);
_local2.load(_local1);
container.addChild(_local2);
}
private function configureListeners(_arg1:IEventDispatcher):void{
_arg1.addEventListener(Event.COMPLETE, trkLoadComplete);
}
}
}//package com.Tracker
Section 14
//clsFade (com.utils.clsFade)
package com.utils {
import flash.events.*;
import flash.display.*;
public class clsFade {
private var mGpx:MovieClip;
private var mCallFunction:String;// = null
private var mCanvas:MovieClip;
private var mClassObject:Object;// = null
public static const HIDDEN:Number = 2;
public static const SHOW:Number = 1;
public function clsFade(_arg1:MovieClip, _arg2:Object){
mClassObject = null;
mCallFunction = null;
super();
this.mCanvas = _arg1;
drawRect(_arg2);
}
private function drawRect(_arg1:Object){
var width:*;
var height:*;
var obj = _arg1;
width = obj.width;
height = obj.height;
mGpx = new MovieClip();
mGpx.x = 0;
mGpx.y = 0;
mCanvas.addChild(mGpx);
var _local3 = mGpx.graphics;
with (_local3) {
beginFill(0, 100);
lineStyle(1, 0, 100);
lineTo(width, 0);
lineTo(width, height);
lineTo(0, height);
lineTo(0, 0);
endFill();
};
mGpx.addEventListener(MouseEvent.CLICK, function (){
});
mGpx.useHandCursor = false;
mGpx.x = 0;
mGpx.y = 0;
mGpx.alpha = 0;
}
public function free():void{
mCanvas.removeChild(mGpx);
}
private function hiddenFade(_arg1:Object, _arg2:String){
mGpx.alpha = 1;
mClassObject = _arg1;
mCallFunction = _arg2;
mGpx.addEventListener(Event.ENTER_FRAME, onEnterFrameHidden);
}
private function onEnterFrameHidden(_arg1:Event):void{
mGpx.alpha = (mGpx.alpha - 0.1);
if (mGpx.alpha <= 0){
mGpx.removeEventListener(Event.ENTER_FRAME, onEnterFrameHidden);
var _local2 = mClassObject;
_local2[mCallFunction]();
};
}
private function onEnterFrameShow(_arg1:Event):void{
mGpx.alpha = (mGpx.alpha + 0.05);
if (mGpx.alpha >= 1){
mGpx.removeEventListener(Event.ENTER_FRAME, onEnterFrameShow);
var _local2 = mClassObject;
_local2[mCallFunction]();
};
}
private function showFade(_arg1:Object, _arg2:String){
mGpx.alpha = 0;
mClassObject = _arg1;
mCallFunction = _arg2;
mGpx.addEventListener(Event.ENTER_FRAME, onEnterFrameShow);
}
public function startFade(_arg1:Number, _arg2:Object, _arg3:String){
switch (_arg1){
case SHOW:
showFade(_arg2, _arg3);
break;
case HIDDEN:
hiddenFade(_arg2, _arg3);
break;
};
}
}
}//package com.utils
Section 15
//clsXMLLoader (com.utils.clsXMLLoader)
package com.utils {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public class clsXMLLoader {
public static var doneLoading:Boolean = false;
public static var myXML:XML = null;
public static var correctlyLoaded:Boolean = false;
public static function loadXML(_arg1:String){
var _local2:URLLoader;
var _local3:URLRequest;
doneLoading = false;
correctlyLoaded = false;
_local2 = new URLLoader();
_local3 = new URLRequest(_arg1);
_local2.dataFormat = URLLoaderDataFormat.TEXT;
_local2.addEventListener(Event.COMPLETE, xmlcompleted);
_local2.load(_local3);
}
private static function xmlcompleted(_arg1:Event):void{
var event = _arg1;
try {
myXML = new XML(event.target.data);
correctlyLoaded = true;
} catch(e:TypeError) {
correctlyLoaded = false;
};
doneLoading = true;
}
}
}//package com.utils
Section 16
//ColorMatrix (com.utils.ColorMatrix)
package com.utils {
import flash.filters.*;
public class ColorMatrix {
public var matrix:Array;
private static const STANDARD_CONTRAST:Number = 0;
private static const IDENTITY:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
private static const STANDARD_BRIGHTNESS:Number = 0;
private static const STANDARD_SATURATION:Number = 100;
private static const MAX_CONTRAST:Number = 500;
private static const B_LUM:Number = 0.072169;
private static const G_LUM:Number = 0.71516;
private static const MAX_SATURATION:Number = 300;
private static const MIN_CONTRAST:Number = -200;
private static const MAX_BRIGHTNESS:Number = 100;
private static const R_LUM:Number = 0.212671;
private static const MIN_BRIGHTNESS:Number = -100;
private static const MIN_SATURATION:Number = -300;
public function ColorMatrix(_arg1:Object=null){
if ((_arg1 is ColorMatrix)){
matrix = _arg1.matrix.concat();
} else {
if ((_arg1 is Array)){
matrix = _arg1.concat();
} else {
reset();
};
};
}
public function setContrast(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Array;
_local2 = checkValue(MIN_CONTRAST, MAX_CONTRAST, _arg1);
_local2 = (_local2 / 100);
_local3 = (_local2 + 1);
_local4 = (128 * (1 - _local3));
_local5 = [_local3, 0, 0, 0, _local4, 0, _local3, 0, 0, _local4, 0, 0, _local3, 0, _local4, 0, 0, 0, 1, 0];
concat(_local5);
}
private function checkValue(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (Math.min(_arg2, Math.max(_arg1, _arg3)));
}
public function setBrightness(_arg1:Number):void{
var _local2:Number;
var _local3:Array;
_local2 = checkValue(MIN_BRIGHTNESS, MAX_BRIGHTNESS, _arg1);
_local2 = ((0xFF * _local2) / 100);
_local3 = [1, 0, 0, 0, _local2, 0, 1, 0, 0, _local2, 0, 0, 1, 0, _local2, 0, 0, 0, 1, 0];
concat(_local3);
}
public function getBrightness():Number{
var _local1:Number;
_local1 = (((matrix[4] + matrix[9]) + matrix[14]) / 3);
if (_local1 != 0){
_local1 = ((_local1 * 100) / 0xFF);
};
return (Math.round(_local1));
}
public function reset():void{
matrix = IDENTITY.concat();
}
public function setSaturation(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
_local2 = checkValue(MIN_SATURATION, MAX_SATURATION, _arg1);
_local2 = (_local2 / 100);
_local3 = (1 - _local2);
_local4 = (_local3 * R_LUM);
_local5 = (_local3 * G_LUM);
_local6 = (_local3 * B_LUM);
_local7 = [(_local4 + _local2), _local5, _local6, 0, 0, _local4, (_local5 + _local2), _local6, 0, 0, _local4, _local5, (_local6 + _local2), 0, 0, 0, 0, 0, 1, 0];
concat(_local7);
}
public function getSaturation():Number{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = (1 - (matrix[1] / G_LUM));
_local2 = (1 - (matrix[2] / B_LUM));
_local3 = (1 - (matrix[5] / R_LUM));
_local4 = Math.round((((_local1 + _local2) + _local3) / 3));
_local4 = (_local4 * 100);
return (_local4);
}
public function getContrast():Number{
var _local1:Number;
_local1 = (((matrix[0] + matrix[6]) + matrix[12]) / 3);
_local1 = ((_local1 - 1) * 100);
return (_local1);
}
public function concat(_arg1:Array):void{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = new Array();
_local3 = 0;
_local4 = 0;
while (_local4 < 4) {
_local5 = 0;
while (_local5 < 5) {
_local2[(_local3 + _local5)] = (((((_arg1[_local3] * matrix[_local5]) + (_arg1[(_local3 + 1)] * matrix[(_local5 + 5)])) + (_arg1[(_local3 + 2)] * matrix[(_local5 + 10)])) + (_arg1[(_local3 + 3)] * matrix[(_local5 + 15)])) + ((_local5 == 4)) ? _arg1[(_local3 + 4)] : 0);
_local5++;
};
_local3 = (_local3 + 5);
_local4++;
};
matrix = _local2;
}
public function clone():ColorMatrix{
return (new ColorMatrix(matrix));
}
public function get filter():ColorMatrixFilter{
return (new ColorMatrixFilter(matrix));
}
}
}//package com.utils
Section 17
//common (com.utils.common)
package com.utils {
import flash.display.*;
import flash.filters.*;
import flash.utils.*;
public class common {
public static function execCommand(_arg1, _arg2:String, _arg3:int=0, _arg4:Object=null):void{
var object:Object;
var internalAction:Function;
var caller = _arg1;
var nameFunction = _arg2;
var time = _arg3;
var params = _arg4;
internalAction = function ():void{
clearInterval(arguments[0].interval);
if (arguments[0].params != null){
var _local2 = arguments[0].caller;
_local2[arguments[0].nameFunction](arguments[0].params);
} else {
_local2 = arguments[0].caller;
_local2[arguments[0].nameFunction]();
};
arguments[0] = null;
};
object = new Object();
object.caller = caller;
object.nameFunction = (nameFunction as String);
object.interval = setInterval(internalAction, time, object);
object.params = params;
}
public static function tint(_arg1:MovieClip, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=1):void{
var _local6:Array;
var _local7:ColorMatrixFilter;
_local6 = [_arg2, 0, 0, 0, 0, 0, _arg3, 0, 0, 0, 0, 0, _arg4, 0, 0, 0, 0, 0, _arg5, 0];
_local7 = new ColorMatrixFilter(_local6);
_arg1.filters = [_local7];
}
public static function hit(_arg1:MovieClip, _arg2:Number=500, _arg3=null, _arg4:String=null):void{
var object:Object;
var internalAction:Function;
var clip = _arg1;
var time = _arg2;
var caller = _arg3;
var nameFunction = _arg4;
internalAction = function ():void{
clearInterval(arguments[0].interval);
if (arguments[0].clip){
common.tint(arguments[0].clip, 1, 1, 1);
};
if (arguments[0].caller != null){
var _local2 = arguments[0].caller;
_local2[arguments[0].nameFunction]();
};
arguments[0] = null;
};
object = new Object();
object.clip = (clip as MovieClip);
object.caller = caller;
object.nameFunction = (nameFunction as String);
object.interval = setInterval(internalAction, time, object);
tint(object.clip, 1, 0, 0);
}
public static function gotoAndStop(_arg1:MovieClip, _arg2:String, _arg3:String):void{
var object:Object;
var internalAction:Function;
var content = _arg1;
var mcAnimation = _arg2;
var nameFrame = _arg3;
internalAction = function ():void{
clearInterval(arguments[0].interval);
if (arguments[0].content[arguments[0].mcAnimation] != null){
arguments[0].content[arguments[0].mcAnimation].gotoAndStop(arguments[0].nameFrame);
};
arguments[0] = null;
};
object = new Object();
object.content = (content as MovieClip);
object.mcAnimation = (mcAnimation as String);
object.nameFrame = (nameFrame as String);
object.interval = setInterval(internalAction, 5, object);
}
}
}//package com.utils
Section 18
//loadAsset (com.utils.loadAsset)
package com.utils {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class loadAsset {
private var mLoader:Loader;
private var mUrl:String;
private var mRequest:URLRequest;
public var onLoadProgress:Function;
public var onLoadInit:Function;
private var mParent:MovieClip;
public var onLoadComplete:Function;
public function loadAsset(_arg1:String, _arg2:MovieClip){
mUrl = _arg1;
mLoader = new Loader();
mRequest = new URLRequest(mUrl);
mParent = _arg2;
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
mLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loaderIoError);
mLoader.contentLoaderInfo.addEventListener(Event.INIT, loaderInit);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loaderProgress);
mLoader.load(mRequest);
mParent.addChild(mLoader);
}
public function loaderInit(_arg1:Event):void{
if (onLoadInit != null){
onLoadInit(mLoader.contentLoaderInfo.content);
};
}
public function loaderComplete(_arg1:Event):void{
if (onLoadComplete != null){
onLoadComplete(mLoader.content);
};
}
public function loaderIoError(_arg1:IOErrorEvent):void{
}
private function loaderProgress(_arg1:ProgressEvent):void{
if (onLoadProgress != null){
onLoadProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
public function unload():void{
trace(("unloading swf " + mLoader));
mLoader.unload();
mLoader = null;
trace(("unloaded swf " + mLoader));
}
}
}//package com.utils
Section 19
//SoundMgr (com.utils.SoundMgr)
package com.utils {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SoundMgr {
private var isPlaying:Array;
private var soundChannels:Array;
private var soundList:Array;
public var MAX_LOOP:Number;// = 99999999
public function SoundMgr():void{
MAX_LOOP = 99999999;
super();
soundList = new Array();
soundChannels = new Array();
isPlaying = new Array();
}
public function createSound(_arg1:String):void{
var _local2:Class;
_local2 = (getDefinitionByName(_arg1) as Class);
soundList[_arg1] = (new (_local2) as Sound);
isPlaying[_arg1] = (false as Boolean);
}
public function stopSound(_arg1:String):void{
if (soundChannels[_arg1]){
soundChannels[_arg1].stop();
isPlaying[_arg1] = false;
};
}
public function muteSound(_arg1:String):void{
var _local2:SoundTransform;
if (soundChannels[_arg1]){
_local2 = soundChannels[_arg1].soundTransform;
_local2.volume = 0;
soundChannels[_arg1].soundTransform = _local2;
};
}
public function playLoop(_arg1:String, _arg2:Number=1):void{
var _local3:SoundTransform;
if (soundList[_arg1] == undefined){
createSound(_arg1);
};
if (isPlaying[_arg1] == false){
soundChannels[_arg1] = (soundList[_arg1].play(0, MAX_LOOP) as SoundChannel);
isPlaying[_arg1] = true;
if (_arg2 < 1){
_local3 = soundChannels[_arg1].soundTransform;
_local3.volume = _arg2;
soundChannels[_arg1].soundTransform = _local3;
};
};
}
public function playSound(_arg1:String, _arg2:Number=1):void{
var _local3:SoundChannel;
var _local4:SoundTransform;
if (soundList[_arg1] == undefined){
createSound(_arg1);
};
_local3 = soundList[_arg1].play();
if (_arg2 < 1){
_local4 = _local3.soundTransform;
_local4.volume = _arg2;
_local3.soundTransform = _local4;
};
}
public function unmuteSound(_arg1:String):void{
var _local2:SoundTransform;
if (soundChannels[_arg1]){
_local2 = soundChannels[_arg1].soundTransform;
_local2.volume = 1;
soundChannels[_arg1].soundTransform = _local2;
};
}
}
}//package com.utils
Section 20
//bgmCircus1 (bgmCircus1)
package {
import flash.media.*;
public dynamic class bgmCircus1 extends Sound {
}
}//package
Section 21
//mainCannonbolt (mainCannonbolt)
package {
import flash.events.*;
import flash.display.*;
import com.utils.*;
import flash.net.*;
import com.Tracker.*;
import com.cartoonnetwork.topscore.*;
import flash.ui.*;
public class mainCannonbolt {
public static var lives:int = 0;
public static var isActiveLevel1:Boolean;
public static var isActiveLevel2:Boolean;
public static var level1url:String = "";
private static var startingScore:Number = 0;
public static var tracker:GameTrack_AS3;
static var HELP:MovieClip;
private static var originalFinalTableNumber:int;
public static var startingTableNumber:int;
static var CANVAS:MovieClip;
public static var soundMng;
public static var finalTableNumber:int;
static var SCREEN:String;
public static var gameTimes:Number = 0;
public static var level2url:String = "";
public static var fade:clsFade;
public static var scene:MovieClip;
public static var maxScore:Number = 0;
public static var score:Number = 0;
public static var DATA_SCORE:SharedObject = null;
private static var startingLives:int = 5;
public static var ballsgiven:int = 1;
private static var mLoadAsset:loadAsset;
private static var canProceed:Boolean = true;
public static var isHaveNextLevel:Boolean;
private static var mClipLoader:MovieClip;
public static var usetracker:Boolean = true;
private static var originalStartTableNumber:int;
private static var beatenLevel1:Boolean = false;
private static var beatenLevel2:Boolean = false;
private static var beatenLevel3:Boolean = false;
private static var mLoadingClip:MovieClip;
public static function clickBtn4(_arg1:MouseEvent){
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
gameTimes++;
CANVAS.gotoAndStop("GAME");
soundMng.stopSound("bgmCircus1");
if (usetracker){
tracker.sendEventReplay();
};
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
}
public static function clickBtn5(_arg1:MouseEvent){
if (originalFinalTableNumber == 3){
setActiveLevel(2);
} else {
setActiveLevel(1);
if (usetracker){
tracker.sendEventReplay();
};
};
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
CANVAS.gotoAndStop("GAME");
soundMng.stopSound("bgmCircus1");
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
}
public static function unloadSWF():void{
if (mLoadAsset){
trace((" MClipper 1 " + mClipLoader));
mClipLoader = null;
trace((" MClipper 2 " + mClipLoader));
mLoadAsset.unload();
};
}
public static function getMaxScore():Number{
return (maxScore);
}
public static function clickBtn2(_arg1:MouseEvent){
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
gameTimes++;
CANVAS.gotoAndStop("GAME");
soundMng.stopSound("bgmCircus1");
if (usetracker){
tracker.sendEventReplay();
};
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
}
public static function clickBtn3(_arg1:MouseEvent){
if (!canProceed){
return;
};
setActiveLevel();
beatenLevel1 = false;
beatenLevel2 = false;
beatenLevel3 = false;
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
score = startingScore;
lives = startingLives;
gameTimes = 0;
ballsgiven = 1;
CANVAS.gotoAndStop("GAME");
soundMng.stopSound("bgmCircus1");
if (usetracker){
tracker.sendEventReplay();
};
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
}
public static function onLoadInit(_arg1):void{
}
public static function getStartingTableNumber():int{
return (startingTableNumber);
}
public static function setBeatenLevel(_arg1:Boolean, _arg2:int):void{
if (_arg2 == 1){
beatenLevel1 = _arg1;
} else {
if (_arg2 == 2){
beatenLevel2 = _arg1;
} else {
if (_arg2 == 3){
beatenLevel3 = _arg1;
};
};
};
}
public static function ScreenIntructions(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
SCREEN = _arg3;
CANVAS = _arg1;
soundMng = new SoundMgr();
soundMng.createSound("bgmCircus1");
soundMng.playLoop("bgmCircus1", 1);
CANVAS.stage.addEventListener(KeyboardEvent.KEY_DOWN, pressSpace, false, 0, true);
_arg2.btnPlay.addEventListener(MouseEvent.CLICK, clickBtn, false, 0, true);
if (usetracker){
tracker = new GameTrack_AS3(_arg1);
tracker.loadTracker();
};
}
public static function ScreenSelectStage(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
var _local4:ColorMatrix;
SCREEN = _arg3;
CANVAS = _arg1;
CANVAS.stage.addEventListener(KeyboardEvent.KEY_DOWN, pressSpaceStage, false, 0, true);
_local4 = new ColorMatrix();
_local4.setContrast(10);
_local4.setSaturation(0);
_local4.setContrast(0);
_local4.setBrightness(10);
if (isActiveLevel1){
_arg2.Stage1Block.level = 1;
_arg2.Stage1Block.buttonMode = true;
_arg2.Stage1Block.gotoAndStop("off");
_arg2.Stage1Block.addEventListener(MouseEvent.MOUSE_OVER, onOverButtonStage, false, 0, true);
_arg2.Stage1Block.addEventListener(MouseEvent.MOUSE_OUT, onOutButtonStage, false, 0, true);
_arg2.Stage1Block.addEventListener(MouseEvent.CLICK, onReleaseButtonStage, false, 0, true);
} else {
_arg2.Stage1Block.gotoAndStop("comming_soon");
_arg2.stage1.filters = [_local4.filter];
};
if (isActiveLevel2){
_arg2.Stage2Block.level = 2;
_arg2.Stage2Block.buttonMode = true;
_arg2.Stage2Block.gotoAndStop("off");
_arg2.Stage2Block.addEventListener(MouseEvent.MOUSE_OVER, onOverButtonStage, false, 0, true);
_arg2.Stage2Block.addEventListener(MouseEvent.MOUSE_OUT, onOutButtonStage, false, 0, true);
_arg2.Stage2Block.addEventListener(MouseEvent.CLICK, onReleaseButtonStage, false, 0, true);
} else {
_arg2.Stage2Block.gotoAndStop("comming_soon");
_arg2.stage2.filters = [_local4.filter];
};
}
public static function onSubWin(_arg1:Number, _arg2:int, _arg3:Boolean, _arg4:int):void{
score = _arg1;
lives = _arg2;
ballsgiven = _arg4;
isHaveNextLevel = _arg3;
assignMaxScore();
}
public static function pressSpaceStage(_arg1:KeyboardEvent){
setActiveLevel();
if (_arg1.keyCode == Keyboard.SPACE){
valuePress();
};
}
public static function pressSpaceScore2():void{
if (usetracker){
tracker.sendEventReplay();
};
gameTimes++;
valuePress();
}
public static function getActiveLevel2():Boolean{
return (isActiveLevel2);
}
public static function ScreenHightScore(_arg1:MovieClip, _arg2:MovieClip, _arg3:String):void{
SCREEN = _arg3;
CANVAS = _arg1;
_arg2.btnStartOver.visible = true;
canProceed = false;
assignMaxScore();
trace(" ANNOUNCING FOR LEADERBOARD ");
trace(((("HERES THE SCORE " + score) + " AND THE HIGH SCORE ") + maxScore));
trace(" //----------------------\\ ");
TopScoreModuleProxy.submitAsync(CANVAS, getParameters(), int(score), proceedWithGameAfterLeaderBoards, proceedWithGameAfterLeaderBoards);
setGraphicsScoreFinal(_arg2, score, "mcSC");
setGraphicsScoreFinal(_arg2, maxScore, "mcBSC");
isHaveNextLevel = false;
}
public static function ScreenIntructions2(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
SCREEN = _arg3;
CANVAS = _arg1;
CANVAS.stage.addEventListener(KeyboardEvent.KEY_DOWN, pressSpace, false, 0, true);
_arg2.btnNext.addEventListener(MouseEvent.CLICK, clickBtn, false, 0, true);
}
public static function ScreenIntructions3(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
SCREEN = _arg3;
CANVAS = _arg1;
setActiveLevel(1);
CANVAS.stage.addEventListener(KeyboardEvent.KEY_DOWN, pressSpace, false, 0, true);
_arg2.btnNext.addEventListener(MouseEvent.CLICK, clickBtn, false, 0, true);
}
public static function setActiveLevel(_arg1:Number=1):void{
switch (_arg1){
case 1:
startingTableNumber = 0;
originalStartTableNumber = 0;
finalTableNumber = 3;
originalFinalTableNumber = 3;
break;
case 2:
startingTableNumber = 4;
originalStartTableNumber = 4;
finalTableNumber = 7;
originalFinalTableNumber = 7;
break;
case 3:
startingTableNumber = 8;
originalStartTableNumber = 8;
finalTableNumber = 8;
originalFinalTableNumber = 8;
break;
};
}
public static function onLoadGameComplete(_arg1):void{
mClipLoader = _arg1;
mClipLoader.getStartingTableNumber = getStartingTableNumber;
mClipLoader.getFinalTableNumber = getFinalTableNumber;
mClipLoader.onGameOver = onGameOver;
mClipLoader.setIsHaveNextLevel = setIsHaveNextLevel;
mClipLoader.onWin = onWin;
mClipLoader.onLevelChange = onLevelChange;
mClipLoader.moveToNextLevel = moveToNextLevel;
mClipLoader.onSubWin = onSubWin;
mClipLoader.addGameTime = addGameTime;
mClipLoader.getActiveLevel1 = getActiveLevel1;
mClipLoader.getActiveLevel2 = getActiveLevel2;
mClipLoader.getScore = getScore;
mClipLoader.getMaxScore = getMaxScore;
mClipLoader.getLives = getLives;
mClipLoader.getBallsGiven = getBallsGiven;
mClipLoader.getGameTimes = getGameTimes;
mClipLoader.cleanLoader = cleanLoader;
mClipLoader.setBeatenLevel = setBeatenLevel;
mClipLoader.getBeatenLevel = getBeatenLevel;
getteringMaxScore();
}
public static function getLives():int{
return (lives);
}
private static function updateLife(_arg1:Number, _arg2:MovieClip):void{
var _local3:Number;
_local3 = (_arg1 % 10);
if (_arg2.mcInfoPlayer){
_arg2.mcInfoPlayer.mcLifes.gotoAndStop(("N" + _local3));
};
}
public static function valuePress():void{
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpaceStage);
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpaceScore);
if (CANVAS.currentFrame == 51){
trace(" patch 1 ");
return;
};
if (SCREEN == "GAME"){
soundMng.stopSound("bgmCircus1");
};
CANVAS.gotoAndStop(SCREEN);
}
private static function updateScore(_arg1:Number, _arg2:MovieClip):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local3 = (_arg1 % 10);
_local4 = (Math.floor((_arg1 / 10)) % 10);
_local5 = (Math.floor((_arg1 / 100)) % 10);
_local6 = (Math.floor((_arg1 / 1000)) % 10);
_local7 = (Math.floor((_arg1 / 10000)) % 10);
_local8 = (Math.floor((_arg1 / 100000)) % 10);
_local9 = (Math.floor((_arg1 / 1000000)) % 10);
if (_arg2.mcSC_u){
_arg2.mcSC_u.gotoAndStop(("N" + _local3));
};
if (_arg2.mcSC_d){
_arg2.mcSC_d.gotoAndStop(("N" + _local4));
};
if (_arg2.mcSC_c){
_arg2.mcSC_c.gotoAndStop(("N" + _local5));
};
if (_arg2.mcSC_m){
_arg2.mcSC_m.gotoAndStop(("N" + _local6));
};
if (_arg2.mcSC_ml){
_arg2.mcSC_ml.gotoAndStop(("N" + _local7));
};
if (_arg2.mcSC_mll){
_arg2.mcSC_mll.gotoAndStop(("N" + _local8));
};
if (_arg2.mcSC_mlll){
_arg2.mcSC_mlll.gotoAndStop(("N" + _local9));
};
}
public static function getActiveLevel1():Boolean{
return (isActiveLevel1);
}
public static function onWin(_arg1:Number, _arg2:int, _arg3:Boolean, _arg4:int):void{
score = _arg1;
lives = _arg2;
ballsgiven = _arg4;
unloadSWF();
isHaveNextLevel = _arg3;
scene.gotoAndStop("HIGHTSCORE");
}
public static function getBallsGiven():int{
return (ballsgiven);
}
private static function onOutButtonStage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = MovieClip(_arg1.target).parent;
_local3 = _local2.level;
_local4 = _local2.parent[("checkStage" + _local3)];
_local2.gotoAndStop("off");
_local4.gotoAndStop("off");
}
public static function moveToNextLevel(_arg1:int):void{
var _local2:Boolean;
_local2 = false;
switch (_arg1){
case 1:
if (originalStartTableNumber == 0){
_local2 = true;
};
break;
case 2:
if ((((originalStartTableNumber == 4)) || ((originalStartTableNumber == 8)))){
_local2 = true;
};
break;
case 3:
if ((((originalStartTableNumber == 8)) || ((originalStartTableNumber == 4)))){
_local2 = true;
};
break;
};
if (_local2){
setActiveLevel(_arg1);
if (usetracker){
tracker.sendEventReplay();
};
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
mClipLoader.gotoAndStop("RESTART");
soundMng.stopSound("bgmCircus1");
} else {
unloadSWF();
setActiveLevel(_arg1);
if (usetracker){
tracker.sendEventReplay();
};
startingTableNumber = originalStartTableNumber;
finalTableNumber = originalFinalTableNumber;
CANVAS.gotoAndStop("RESTART");
soundMng.stopSound("bgmCircus1");
};
}
public static function ScreenHightScorePromoQuick(_arg1:MovieClip, _arg2:String):void{
setActiveLevel(1);
SCREEN = _arg2;
CANVAS = _arg1;
assignMaxScore();
isHaveNextLevel = false;
pressSpaceScore2();
}
private static function onOverButtonStage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = MovieClip(_arg1.target).parent;
_local3 = _local2.level;
_local4 = _local2.parent[("checkStage" + _local3)];
_local2.gotoAndStop("rollover");
_local4.gotoAndStop("on");
}
public static function pressSpace(_arg1:KeyboardEvent){
if (_arg1.keyCode == Keyboard.SPACE){
valuePress();
};
}
public static function ScreenGame(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
SCREEN = _arg3;
CANVAS = _arg1;
CANVAS.stage.addEventListener(KeyboardEvent.KEY_DOWN, pressSpace, false, 0, true);
_arg2.btnCutscene.addEventListener(MouseEvent.CLICK, clickBtn, false, 0, true);
}
public static function getteringMaxScore():void{
DATA_SCORE = SharedObject.getLocal("dataScoreCannonbolt");
if (DATA_SCORE.data.lastScore){
maxScore = DATA_SCORE.data.lastScore;
DATA_SCORE.flush();
};
}
private static function onReleaseButtonStage(_arg1:MouseEvent):void{
var _local2:*;
_local2 = MovieClip(_arg1.target).parent;
setActiveLevel(_local2.level);
clickBtn(null);
}
public static function proceedWithGameAfterLeaderBoards():void{
canProceed = true;
}
public static function getBeatenLevel(_arg1:int):Boolean{
if (_arg1 == 1){
return (beatenLevel1);
};
if (_arg1 == 2){
return (beatenLevel2);
};
if (_arg1 == 3){
return (beatenLevel3);
};
return (beatenLevel1);
}
public static function clickBtn(_arg1:MouseEvent){
if (SCREEN == "GAME"){
soundMng.stopSound("bgmCircus1");
};
CANVAS.gotoAndStop(SCREEN);
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpace);
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpaceStage);
CANVAS.stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressSpaceScore);
}
public static function ScreenWin(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
SCREEN = _arg3;
CANVAS = _arg1;
_arg2.btnPlayAgain.visible = false;
isHaveNextLevel = true;
common.execCommand(mainCannonbolt, "onFadeHightScore", 4200);
}
public static function addGameTime(_arg1:int):void{
gameTimes = (gameTimes + _arg1);
}
public static function cleanLoader():void{
if (mLoadingClip){
scene.removeChild(mLoadingClip);
mLoadingClip = null;
};
}
public static function onOutFadeLose():void{
if (fade){
fade.free();
fade = null;
};
}
public static function onLoadProgressGame(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:int;
var _local5:int;
_local3 = _arg1;
_local4 = _arg2;
_local5 = ((_local3 / _local4) * 100);
ProgressLoad(_local5);
}
public static function getGameTimes():int{
return (gameTimes);
}
public static function setXMLvariables():void{
var xml:XML;
var firstLevel:int;
var lastLevel:int;
xml = clsXMLLoader.myXML;
try {
firstLevel = int(xml.gameSettings.activeLevel1.toString());
lastLevel = int(xml.gameSettings.activeLevel2.toString());
isActiveLevel1 = ((firstLevel)==0) ? false : true;
isActiveLevel2 = ((lastLevel)==0) ? false : true;
level1url = xml.gameSettings.level1url.toString();
level2url = xml.gameSettings.level2url.toString();
startingLives = int(xml.gameSettings.startingLives.toString());
startingScore = Number(xml.gameSettings.startingScore.toString());
score = startingScore;
lives = startingLives;
ballsgiven = 1;
trace("XML data loaded into global variables");
} catch(e:TypeError) {
trace("XML data could not be loaded into global variables");
trace(e.message);
};
}
public static function assignMaxScore():void{
if (score > maxScore){
maxScore = score;
DATA_SCORE = SharedObject.getLocal("dataScoreCannonbolt");
DATA_SCORE.data.lastScore = maxScore;
DATA_SCORE.flush();
};
}
public static function pressSpaceScore(_arg1:KeyboardEvent){
if (usetracker){
tracker.sendEventReplay();
};
gameTimes++;
if (_arg1.keyCode == Keyboard.SPACE){
valuePress();
};
}
private static function ProgressLoad(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = (_arg1 % 10);
_local3 = (Math.floor((_arg1 / 10)) % 10);
_local4 = Math.floor((_arg1 / 100));
mLoadingClip.mcLod_u.gotoAndStop(("N" + _local2));
mLoadingClip.mcLod_d.gotoAndStop(("N" + _local3));
mLoadingClip.mcLod_c.gotoAndStop(("N" + _local4));
}
public static function getFinalTableNumber():int{
return (finalTableNumber);
}
public static function getScore():Number{
return (score);
}
private static function getParameters():Object{
return (((mainCannonbolt["HARDCODED_FLASHVARS_FOR_TESTING"]) || (CANVAS.stage.loaderInfo.parameters)));
}
public static function onGameOver(_arg1:Number, _arg2:int, _arg3:int):void{
score = _arg1;
lives = _arg2;
ballsgiven = _arg3;
unloadSWF();
isHaveNextLevel = false;
if (usetracker){
tracker.sendEventLose();
};
scene.gotoAndStop("HIGHTSCORE");
fade = new clsFade(scene, {width:600, height:400});
fade.startFade(clsFade.HIDDEN, mainCannonbolt, "onOutFadeLose");
}
private static function setGraphicsScoreFinal(_arg1:MovieClip, _arg2:Number, _arg3:String):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local4 = (_arg2 % 10);
_local5 = (Math.floor((_arg2 / 10)) % 10);
_local6 = (Math.floor((_arg2 / 100)) % 10);
_local7 = (Math.floor((_arg2 / 1000)) % 10);
_local8 = (Math.floor((_arg2 / 10000)) % 10);
_local9 = (Math.floor((_arg2 / 100000)) % 10);
_local10 = (Math.floor((_arg2 / 1000000)) % 10);
if (_arg1[(_arg3 + "_u")]){
_arg1[(_arg3 + "_u")].gotoAndStop(("N" + _local4));
};
if (_arg1[(_arg3 + "_d")]){
_arg1[(_arg3 + "_d")].gotoAndStop(("N" + _local5));
};
if (_arg1[(_arg3 + "_c")]){
_arg1[(_arg3 + "_c")].gotoAndStop(("N" + _local6));
};
if (_arg1[(_arg3 + "_m")]){
_arg1[(_arg3 + "_m")].gotoAndStop(("N" + _local7));
};
if (_arg1[(_arg3 + "_ml")]){
_arg1[(_arg3 + "_ml")].gotoAndStop(("N" + _local8));
};
if (_arg1[(_arg3 + "_mll")]){
_arg1[(_arg3 + "_mll")].gotoAndStop(("N" + _local9));
};
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].gotoAndStop(("N" + _local10));
};
if (_arg2 <= 99){
if (_arg1[(_arg3 + "_c")]){
_arg1[(_arg3 + "_c")].visible = false;
};
if (_arg1[(_arg3 + "_m")]){
_arg1[(_arg3 + "_m")].visible = false;
};
if (_arg1[(_arg3 + "_ml")]){
_arg1[(_arg3 + "_ml")].visible = false;
};
if (_arg1[(_arg3 + "_mll")]){
_arg1[(_arg3 + "_mll")].visible = false;
};
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].visible = false;
};
} else {
if (_arg2 <= 999){
if (_arg1[(_arg3 + "_m")]){
_arg1[(_arg3 + "_m")].visible = false;
};
if (_arg1[(_arg3 + "_ml")]){
_arg1[(_arg3 + "_ml")].visible = false;
};
if (_arg1[(_arg3 + "_mll")]){
_arg1[(_arg3 + "_mll")].visible = false;
};
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].visible = false;
};
} else {
if (_arg2 <= 9999){
if (_arg1[(_arg3 + "_ml")]){
_arg1[(_arg3 + "_ml")].visible = false;
};
if (_arg1[(_arg3 + "_mll")]){
_arg1[(_arg3 + "_mll")].visible = false;
};
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].visible = false;
};
} else {
if (_arg2 <= 99999){
if (_arg1[(_arg3 + "_mll")]){
_arg1[(_arg3 + "_mll")].visible = false;
};
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].visible = false;
};
} else {
if (_arg2 <= 999999){
if (_arg1[(_arg3 + "_mlll")]){
_arg1[(_arg3 + "_mlll")].visible = false;
};
};
};
};
};
};
}
public static function onLevelChange(_arg1:Number, _arg2:int, _arg3:Boolean, _arg4:int):void{
score = _arg1;
lives = _arg2;
ballsgiven = _arg4;
isHaveNextLevel = _arg3;
assignMaxScore();
}
public static function onLoadGame(_arg1:MovieClip, _arg2:MovieClip):void{
if (originalStartTableNumber == 0){
if (level1url != ""){
mLoadAsset = new loadAsset(level1url, _arg1);
} else {
mLoadAsset = new loadAsset("Cannonbolt_Level1.swf", _arg1);
};
} else {
if (originalStartTableNumber == 4){
if (level2url != ""){
mLoadAsset = new loadAsset(level2url, _arg1);
} else {
mLoadAsset = new loadAsset("Cannonbolt_Level2.swf", _arg1);
};
} else {
if (originalStartTableNumber == 8){
if (level2url != ""){
mLoadAsset = new loadAsset(level2url, _arg1);
} else {
mLoadAsset = new loadAsset("Cannonbolt_Level2.swf", _arg1);
};
};
};
};
mLoadingClip = new mc_LoadingScreen();
scene = _arg2;
scene.addChild(mLoadingClip);
mLoadingClip.x = 300;
mLoadingClip.y = 200;
mLoadAsset.onLoadComplete = onLoadGameComplete;
mLoadAsset.onLoadProgress = onLoadProgressGame;
mLoadAsset.onLoadInit = onLoadInit;
}
public static function setIsHaveNextLevel(_arg1:Boolean):void{
isHaveNextLevel = _arg1;
}
}
}//package
Section 22
//mc_LoadingScreen (mc_LoadingScreen)
package {
import flash.display.*;
public dynamic class mc_LoadingScreen extends MovieClip {
public var mcLod_u:MovieClip;
public var mcLod_c:MovieClip;
public var mcLod_d:MovieClip;
}
}//package
Section 23
//mmm (mmm)
package {
import flash.display.*;
public dynamic class mmm extends MovieClip {
}
}//package