Section 1
//TeletoonLoadingScreen (com.teletoon.games.screens.TeletoonLoadingScreen)
package com.teletoon.games.screens {
import flash.display.*;
import com.zincroe.games.*;
public class TeletoonLoadingScreen extends Screen {
public function TeletoonLoadingScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
}
}//package com.teletoon.games.screens
Section 2
//TeletoonWinScreen (com.teletoon.games.screens.TeletoonWinScreen)
package com.teletoon.games.screens {
import flash.display.*;
import com.zincroe.games.screens.*;
public class TeletoonWinScreen extends WinScreen {
private var _medalContainer:DisplayObjectContainer;
private var _medal:DisplayObject;
public function TeletoonWinScreen(_arg1:MovieClip=null, _arg2:String=null, _arg3:MovieClip=null){
super(_arg1, _arg2, _arg3);
}
public function get medal():DisplayObject{
return (_medal);
}
override public function start():void{
super.start();
if (medalContainer){
while (medalContainer.numChildren) {
medalContainer.removeChildAt(0);
};
if (medal){
medalContainer.addChild(medal);
};
};
}
public function get medalContainer():DisplayObjectContainer{
return (_medalContainer);
}
public function set medalContainer(_arg1:DisplayObjectContainer):void{
_medalContainer = _arg1;
}
public function set medal(_arg1:DisplayObject):void{
_medal = _arg1;
}
}
}//package com.teletoon.games.screens
Section 3
//TeletoonGame (com.teletoon.games.TeletoonGame)
package com.teletoon.games {
import com.zincroe.media.*;
import flash.display.*;
public class TeletoonGame extends MovieClip {
public var cheats:Object;
public var cheatCodeScreen:MovieClip;
public var titleScreen:MovieClip;
public var sound:SimpleSoundManager;
public var settings:TeletoonSettings;
public var music:SimpleSoundManager;
public var setupScreen:MovieClip;
public var engine:MovieClip;
public var winScreen:MovieClip;
public var instructionScreen:MovieClip;
public var levelUpScreen:MovieClip;
public var highScoreScreen:MovieClip;
public var manager:TeletoonScreenManager;
public var loadingScreen:MovieClip;
public var loseScreen:MovieClip;
public function TeletoonGame(){
cheats = ((cheats) || (new Object()));
settings = ((settings) || (new TeletoonSettings(loaderInfo.parameters)));
manager = ((manager) || (new TeletoonScreenManager(settings)));
music = ((music) || (new SimpleSoundManager()));
sound = ((sound) || (new SimpleSoundManager()));
if (engine){
manager.engine = engine;
engine.cheats = cheats;
engine.language = settings.language.toLowerCase();
engine.manager = manager;
engine.music = ((engine.music) || (music));
engine.sound = ((engine.sound) || (sound));
removeChild(engine);
};
if (cheatCodeScreen){
manager.cheatCodeScreen = cheatCodeScreen;
cheatCodeScreen.cheats = cheats;
cheatCodeScreen.language = settings.language.toLowerCase();
cheatCodeScreen.manager = manager;
cheatCodeScreen.music = ((cheatCodeScreen.music) || (music));
cheatCodeScreen.sound = ((cheatCodeScreen.sound) || (sound));
removeChild(cheatCodeScreen);
};
if (highScoreScreen){
manager.highScoreScreen = highScoreScreen;
highScoreScreen.language = settings.language.toLowerCase();
highScoreScreen.manager = manager;
highScoreScreen.music = ((highScoreScreen.music) || (music));
highScoreScreen.sound = ((highScoreScreen.sound) || (sound));
removeChild(highScoreScreen);
};
if (instructionScreen){
manager.instructionScreen = instructionScreen;
instructionScreen.language = settings.language.toLowerCase();
instructionScreen.manager = manager;
instructionScreen.music = ((instructionScreen.music) || (music));
instructionScreen.sound = ((instructionScreen.sound) || (sound));
removeChild(instructionScreen);
};
if (levelUpScreen){
manager.levelUpScreen = levelUpScreen;
levelUpScreen.engine = engine;
levelUpScreen.language = settings.language.toLowerCase();
levelUpScreen.manager = manager;
levelUpScreen.music = ((levelUpScreen.music) || (music));
levelUpScreen.sound = ((levelUpScreen.sound) || (sound));
removeChild(levelUpScreen);
};
if (loadingScreen){
manager.loadingScreen = loadingScreen;
loadingScreen.language = settings.language.toLowerCase();
loadingScreen.manager = manager;
loadingScreen.music = ((loadingScreen.music) || (music));
loadingScreen.sound = ((loadingScreen.sound) || (sound));
removeChild(loadingScreen);
};
if (loseScreen){
manager.loseScreen = loseScreen;
loseScreen.engine = engine;
loseScreen.language = settings.language.toLowerCase();
loseScreen.manager = manager;
loseScreen.music = ((loseScreen.music) || (music));
loseScreen.sound = ((loseScreen.sound) || (sound));
removeChild(loseScreen);
};
if (setupScreen){
manager.setupScreen = setupScreen;
setupScreen.engine = engine;
setupScreen.language = settings.language.toLowerCase();
setupScreen.manager = manager;
setupScreen.music = ((setupScreen.music) || (music));
setupScreen.sound = ((setupScreen.sound) || (sound));
removeChild(setupScreen);
};
if (titleScreen){
manager.titleScreen = titleScreen;
titleScreen.language = settings.language.toLowerCase();
titleScreen.manager = manager;
titleScreen.music = ((titleScreen.music) || (music));
titleScreen.sound = ((titleScreen.sound) || (sound));
removeChild(titleScreen);
};
if (winScreen){
manager.winScreen = winScreen;
winScreen.engine = engine;
winScreen.language = settings.language.toLowerCase();
winScreen.manager = manager;
winScreen.music = ((winScreen.music) || (music));
winScreen.sound = ((winScreen.sound) || (sound));
removeChild(winScreen);
};
addChild(manager);
manager.showTitleScreen(this);
}
}
}//package com.teletoon.games
Section 4
//TeletoonGamePlay (com.teletoon.games.TeletoonGamePlay)
package com.teletoon.games {
public class TeletoonGamePlay {
private var _data:String;
private var _medal:String;
public function TeletoonGamePlay(_arg1:Object=null){
clear();
if (_arg1){
decode(_arg1);
};
}
public function get data():String{
return (_data);
}
public function clear():void{
medal = null;
data = null;
}
public function set medal(_arg1:String):void{
if (((_arg1) && ((_arg1.length > 0)))){
_medal = _arg1;
} else {
_medal = null;
};
}
public function set data(_arg1:String):void{
_data = _arg1;
}
public function decode(_arg1:Object):void{
data = _arg1["gameData"];
medal = _arg1["medal"];
}
public function get medal():String{
return (_medal);
}
}
}//package com.teletoon.games
Section 5
//TeletoonHighScores (com.teletoon.games.TeletoonHighScores)
package com.teletoon.games {
import com.zincroe.games.*;
public dynamic class TeletoonHighScores extends Array {
public function TeletoonHighScores(_arg1:Object=null){
clear();
if (_arg1){
decode(_arg1);
};
}
public function clear():void{
var _local1:String;
for (_local1 in this) {
delete this[_local1];
};
}
public function decode(_arg1:Object):void{
var _local2:uint;
var _local3:String;
var _local4:uint;
var _local5:uint;
clear();
_local2 = 0;
while (_local2 < 10) {
_local3 = _arg1[("user" + _local2)];
_local4 = (_local2 + 1);
_local5 = _arg1[("points" + _local2)];
if (_local3){
this[_local2] = new HighScore(_local3, _local4, _local5);
};
_local2++;
};
}
}
}//package com.teletoon.games
Section 6
//TeletoonScreenManager (com.teletoon.games.TeletoonScreenManager)
package com.teletoon.games {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.zincroe.net.*;
import com.zincroe.games.*;
public class TeletoonScreenManager extends ScreenManager {
private var _highScores:TeletoonHighScores;
private var _loader:URLLoader;
private var _gamePlay:TeletoonGamePlay;
private var _settings:TeletoonSettings;
private var _loadingScreen:MovieClip;
public function TeletoonScreenManager(_arg1:TeletoonSettings=null){
this.settings = _arg1;
}
private function onLoadHighScoresComplete(_arg1:Event=null):void{
if (((_arg1) && (_arg1.target.data))){
highScores = new TeletoonHighScores(new URLVariables(_arg1.target.data));
};
showHighScoreScreen(this);
}
private function get loader():URLLoader{
return (_loader);
}
private function onUpdateGamePlayCompleteLose(_arg1:Event=null):void{
onUpdateGamePlayComplete(_arg1);
showLoseScreen(this);
}
public function get settings():TeletoonSettings{
return (_settings);
}
private function set loader(_arg1:URLLoader):void{
if (loader != _arg1){
if (loader){
loader.removeEventListener(Event.CLOSE, onCreateGamePlayComplete);
loader.removeEventListener(Event.CLOSE, onUpdateGamePlayComplete);
loader.removeEventListener(Event.CLOSE, onUpdateGamePlayCompleteLose);
loader.removeEventListener(Event.CLOSE, onUpdateGamePlayCompleteWin);
loader.removeEventListener(Event.CLOSE, onLoadHighScoresComplete);
loader.close();
};
_loader = _arg1;
};
}
private function onUpdateGamePlayCompleteWin(_arg1:Event=null):void{
onUpdateGamePlayComplete(_arg1);
showWinScreen(this);
}
private function updateGamePlay(_arg1:Function):void{
var _local2:URLRequest;
if (settings.updateGamePlayURL){
_local2 = new URLRequest(settings.updateGamePlayURL);
_local2.method = URLRequestMethod.POST;
_local2.data = new URLVariables();
_local2.data["codewords"] = getEnabledCheatCodes(engine.cheats);
_local2.data["gameData"] = gamePlay.data;
_local2.data["gameID"] = settings.gameID;
_local2.data["language"] = settings.language;
_local2.data["points"] = engine.score;
_local2.data["userID"] = settings.userID;
_local2.data["userName"] = settings.userName;
loader = new URLLoader();
loader.addEventListener(Event.CLOSE, _arg1);
loader.load(_local2);
} else {
_arg1();
};
}
private function onUpdateGamePlayComplete(_arg1:Event=null):void{
clearGamePlay();
if (((_arg1) && (_arg1.target.data))){
gamePlay = new TeletoonGamePlay(new URLVariables(_arg1.target.data));
};
}
private function get highScores():TeletoonHighScores{
return (_highScores);
}
private function createGamePlay():void{
var _local1:URLRequest;
if (settings.createGamePlayURL){
_local1 = new URLRequest(settings.createGamePlayURL);
_local1.method = URLRequestMethod.POST;
_local1.data = new URLVariables();
_local1.data["codewords"] = getEnabledCheatCodes(engine.cheats);
_local1.data["gameID"] = settings.gameID;
_local1.data["gameData"] = "";
_local1.data["language"] = settings.language;
_local1.data["points"] = 0;
_local1.data["userID"] = settings.userID;
_local1.data["userName"] = settings.userName;
loader = new URLLoader();
loader.addEventListener(Event.CLOSE, onCreateGamePlayComplete);
loader.load(_local1);
} else {
onCreateGamePlayComplete();
};
}
public function set loadingScreen(_arg1:MovieClip):void{
_loadingScreen = _arg1;
}
private function clearHighScores():void{
highScores = null;
}
override public function showEngine(_arg1:Object=null):void{
if ((((_arg1 == this)) || ((_arg1 == levelUpScreen)))){
super.showEngine();
} else {
clearGamePlay();
showLoadingScreen();
createGamePlay();
};
}
private function get gamePlay():TeletoonGamePlay{
return (_gamePlay);
}
private function clearGamePlay():void{
gamePlay = null;
}
private function getEnabledCheatCodes(_arg1:Object):String{
var _local2:Array;
var _local3:Cheat;
_local2 = new Array();
for each (_local3 in _arg1) {
if (_local3.enabled){
_local2.push(_local3.code);
};
};
return (_local2.join(","));
}
private function set gamePlay(_arg1:TeletoonGamePlay):void{
_gamePlay = _arg1;
}
override public function showLoseScreen(_arg1:Object=null):void{
if (_arg1 == this){
if (gamePlay){
loseScreen.medal = new Loader();
loseScreen.medal.load(new URLRequest(gamePlay.medal));
} else {
loseScreen.medal = null;
};
super.showLoseScreen();
} else {
clearHighScores();
showLoadingScreen();
updateGamePlay(onUpdateGamePlayCompleteLose);
};
}
public function set settings(_arg1:TeletoonSettings):void{
_settings = _arg1;
}
private function set highScores(_arg1:TeletoonHighScores):void{
_highScores = _arg1;
}
private function onCreateGamePlayComplete(_arg1:Event=null):void{
clearGamePlay();
if (((_arg1) && (_arg1.target.data))){
gamePlay = new TeletoonGamePlay(new URLVariables(_arg1.target.data));
};
showEngine(this);
}
public function showLoadingScreen(_arg1:Object=null):void{
clear();
addChild(loadingScreen);
loadingScreen.start();
}
public function get loadingScreen():MovieClip{
return (_loadingScreen);
}
override public function showHighScoreScreen(_arg1:Object=null):void{
if (_arg1 == this){
highScoreScreen.highScores = highScores;
super.showHighScoreScreen();
} else {
showLoadingScreen();
loadHighScores();
};
}
private function loadHighScores():void{
var _local1:URLRequest;
if (((settings.showHighScoresURL) && (!(highScores)))){
_local1 = new URLRequest(settings.showHighScoresURL);
_local1.method = URLRequestMethod.POST;
_local1.data = new URLVariables();
_local1.data["gameID"] = settings.gameID;
_local1.data["language"] = settings.language;
loader = new URLLoader();
loader.addEventListener(Event.CLOSE, onLoadHighScoresComplete);
loader.load(_local1);
} else {
onLoadHighScoresComplete();
};
}
override public function showWinScreen(_arg1:Object=null):void{
if (_arg1 == this){
if (gamePlay){
winScreen.medal = new Loader();
winScreen.medal.load(new URLRequest(gamePlay.medal));
};
super.showWinScreen();
} else {
clearHighScores();
showLoadingScreen();
updateGamePlay(onUpdateGamePlayCompleteWin);
};
}
}
}//package com.teletoon.games
Section 7
//TeletoonSettings (com.teletoon.games.TeletoonSettings)
package com.teletoon.games {
public class TeletoonSettings {
private var _updateGamePlayURL:String;
private var _userID:uint;
private var _showHighScoresURL:String;
private var _userName:String;
private var _gameID:uint;
private var _createGamePlayURL:String;
private var _language:String;
public function TeletoonSettings(_arg1:Object=null){
clear();
if (_arg1){
decode(_arg1);
};
}
public function set updateGamePlayURL(_arg1:String):void{
_updateGamePlayURL = (((_arg1) && (_arg1.length))) ? _arg1 : null;
}
public function set userID(_arg1:uint):void{
_userID = _arg1;
}
public function get gameID():uint{
return (_gameID);
}
public function clear():void{
gameID = 0;
createGamePlayURL = null;
updateGamePlayURL = null;
showHighScoresURL = null;
language = null;
userID = 0;
userName = null;
}
public function get showHighScoresURL():String{
return (_showHighScoresURL);
}
public function set createGamePlayURL(_arg1:String):void{
_createGamePlayURL = (((_arg1) && (_arg1.length))) ? _arg1 : null;
}
public function set showHighScoresURL(_arg1:String):void{
_showHighScoresURL = (((_arg1) && (_arg1.length))) ? _arg1 : null;
}
public function get language():String{
return (_language);
}
public function set gameID(_arg1:uint):void{
_gameID = _arg1;
}
public function get updateGamePlayURL():String{
return (_updateGamePlayURL);
}
public function get userID():uint{
return (_userID);
}
public function get createGamePlayURL():String{
return (_createGamePlayURL);
}
public function set language(_arg1:String):void{
_language = (((_arg1) && (_arg1.length))) ? _arg1 : "en";
}
public function get userName():String{
return (_userName);
}
public function set userName(_arg1:String):void{
_userName = (((_arg1) && (_arg1.length))) ? _arg1 : null;
}
public function decode(_arg1:Object):void{
clear();
gameID = _arg1["gameID"];
createGamePlayURL = _arg1["createGamePlayURL"];
updateGamePlayURL = _arg1["updateGamePlayURL"];
showHighScoresURL = _arg1["showHighScoresURL"];
language = _arg1["language"];
userID = _arg1["userID"];
userName = _arg1["userName"];
}
}
}//package com.teletoon.games
Section 8
//Document (com.zincroe.display.Document)
package com.zincroe.display {
import flash.display.*;
public class Document extends MovieClip {
public var preloader:DocumentPreloader;
public function Document(){
stop();
}
}
}//package com.zincroe.display
Section 9
//DocumentPreloader (com.zincroe.display.DocumentPreloader)
package com.zincroe.display {
import flash.display.*;
import flash.events.*;
public class DocumentPreloader extends MovieClip {
public var document:Document;
public var bytesTotalBar:MovieClip;
public var bytesLoadedBar:MovieClip;
public function DocumentPreloader(){
stop();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
private function onRemovedFromStage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onAddedToStage(_arg1:Event):void{
gotoAndStop(loaderInfo.parameters.language);
document = (root as Document);
if (document){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
};
}
private function onEnterFrame(_arg1:Event):void{
bytesLoadedBar.scaleX = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
bytesLoadedBar.width = Math.round(bytesLoadedBar.width);
if (loaderInfo.bytesLoaded == loaderInfo.bytesTotal){
if (parent){
parent.removeChild(this);
};
document.gotoAndStop(document.totalFrames);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
};
}
}
}//package com.zincroe.display
Section 10
//CheatCodeEnabled (com.zincroe.games.screens.sounds.CheatCodeEnabled)
package com.zincroe.games.screens.sounds {
import flash.media.*;
public dynamic class CheatCodeEnabled extends Sound {
}
}//package com.zincroe.games.screens.sounds
Section 11
//CheatCodeScreen (com.zincroe.games.screens.CheatCodeScreen)
package com.zincroe.games.screens {
import flash.utils.*;
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import flash.text.*;
import com.zincroe.games.*;
import fl.transitions.easing.*;
public class CheatCodeScreen extends Screen {
private var _cheats:Object;
private var _cheatCodeMessageTween:Tween;
private var _continueButton:DisplayObject;
private var _cheatCodeField:TextField;
private var _cheatCodeMessage:DisplayObject;
private var _cheatCodeMessageTimer:Timer;
public static const SOUND_CHEAT_CODE_ENABLED:String = "com.zincroe.games.screens.sounds.CheatCodeEnabled";
public function CheatCodeScreen(_arg1:MovieClip=null, _arg2:String=null, _arg3:Object=null){
super(_arg1, _arg2);
this.cheats = _arg3;
}
public function get cheats():Object{
return (_cheats);
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case continueButton:
pause();
manager.showInstructionScreen(this);
break;
};
}
public function set cheatCodeMessageTimer(_arg1:Timer):void{
_cheatCodeMessageTimer = _arg1;
}
public function get cheatCodeMessageTimer():Timer{
return (_cheatCodeMessageTimer);
}
public function set cheatCodeMessage(_arg1:DisplayObject):void{
_cheatCodeMessage = _arg1;
}
protected function stopCheatCodeMessageTimer():void{
if (cheatCodeMessageTimer){
cheatCodeMessageTimer.stop();
cheatCodeMessageTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onCheatCodeMessageTimerComplete);
cheatCodeMessageTimer = null;
};
}
public function get cheatCodeMessageTween():Tween{
return (_cheatCodeMessageTween);
}
public function set cheatCodeField(_arg1:TextField):void{
if (cheatCodeField != _arg1){
_cheatCodeField = _arg1;
if (cheatCodeField){
cheatCodeField.multiline = false;
cheatCodeField.text = "";
cheatCodeField.type = TextFieldType.INPUT;
cheatCodeField.wordWrap = false;
};
};
}
public function set cheatCodeMessageTween(_arg1:Tween):void{
_cheatCodeMessageTween = _arg1;
}
public function set cheats(_arg1:Object):void{
_cheats = _arg1;
}
override public function start():void{
super.start();
addEventListener(MouseEvent.CLICK, onClick);
enableCheatCodeField();
hideCheatCodeMessage();
}
protected function stopCheatCodeMessageTween():void{
if (cheatCodeMessageTween){
cheatCodeMessageTween.stop();
cheatCodeMessageTween.removeEventListener(TweenEvent.MOTION_FINISH, onCheatCodeMessageTweenComplete);
cheatCodeMessageTween = null;
};
}
public function get cheatCodeMessage():DisplayObject{
return (_cheatCodeMessage);
}
public function set continueButton(_arg1:DisplayObject):void{
_continueButton = _arg1;
}
protected function disableCheatCodeField():void{
if (cheatCodeField){
cheatCodeField.type = TextFieldType.DYNAMIC;
cheatCodeField.removeEventListener(TextEvent.TEXT_INPUT, onTextInput);
};
}
public function get cheatCodeField():TextField{
return (_cheatCodeField);
}
protected function showCheatCodeMessage():void{
if (cheatCodeMessage){
cheatCodeMessage.alpha = 1;
addChild(cheatCodeMessage);
};
}
public function get continueButton():DisplayObject{
return (_continueButton);
}
protected function startCheatCodeMessageTimer():void{
cheatCodeMessageTimer = new Timer(1000, 1);
cheatCodeMessageTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onCheatCodeMessageTimerComplete);
cheatCodeMessageTimer.start();
}
protected function onCheatCodeMessageTimerComplete(_arg1:TimerEvent=null):void{
stopCheatCodeMessageTimer();
enableCheatCodeField();
startCheatCodeMessageTween();
}
protected function onTextInput(_arg1:TextEvent):void{
var _local2:String;
var _local3:Cheat;
if (_arg1.text == "*"){
_arg1.preventDefault();
_arg1.stopImmediatePropagation();
} else {
_local2 = (cheatCodeField.text + _arg1.text);
for each (_local3 in cheats) {
if (_local3.code == _local2){
_local3.enabled = true;
stopCheatCodeMessageTimer();
stopCheatCodeMessageTween();
disableCheatCodeField();
showCheatCodeMessage();
startCheatCodeMessageTimer();
sound.play(SOUND_CHEAT_CODE_ENABLED);
break;
};
};
};
}
protected function enableCheatCodeField():void{
if (cheatCodeField){
stage.focus = cheatCodeField;
cheatCodeField.type = TextFieldType.INPUT;
cheatCodeField.text = "";
cheatCodeField.setSelection(0, 0);
cheatCodeField.addEventListener(TextEvent.TEXT_INPUT, onTextInput);
};
}
protected function onCheatCodeMessageTweenComplete(_arg1:TweenEvent=null):void{
stopCheatCodeMessageTween();
hideCheatCodeMessage();
}
protected function hideCheatCodeMessage():void{
if (((cheatCodeMessage) && (contains(cheatCodeMessage)))){
removeChild(cheatCodeMessage);
};
}
protected function startCheatCodeMessageTween():void{
cheatCodeMessageTween = new Tween(cheatCodeMessage, "alpha", Strong.easeOut, 1, 0, 1, true);
cheatCodeMessageTween.addEventListener(TweenEvent.MOTION_FINISH, onCheatCodeMessageTweenComplete);
}
override public function pause():void{
super.pause();
removeEventListener(MouseEvent.CLICK, onClick);
stopCheatCodeMessageTimer();
stopCheatCodeMessageTween();
hideCheatCodeMessage();
disableCheatCodeField();
}
}
}//package com.zincroe.games.screens
Section 12
//HighScoreScreen (com.zincroe.games.screens.HighScoreScreen)
package com.zincroe.games.screens {
import flash.display.*;
import flash.events.*;
import com.zincroe.games.*;
public class HighScoreScreen extends Screen {
private var _highScores:Array;
private var _listContainer:MovieClip;
private var _playAgainButton:DisplayObject;
public function HighScoreScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
public function set listContainer(_arg1:MovieClip):void{
_listContainer = _arg1;
}
public function get highScores():Array{
return (_highScores);
}
override public function start():void{
var _local1:uint;
var _local2:Object;
var _local3:MovieClip;
super.start();
_local1 = 0;
while (_local1 < listContainer.numChildren) {
_local3 = (listContainer.getChildByName(("item" + _local1)) as MovieClip);
if (_local3){
_local2 = (highScores) ? highScores[_local1] : null;
if (_local2){
_local3.nameField.text = String(_local2.name);
_local3.rankField.text = String(_local2.rank);
_local3.scoreField.text = String(_local2.score);
} else {
_local3.nameField.text = "";
_local3.rankField.text = "";
_local3.scoreField.text = "";
};
};
_local1++;
};
addEventListener(MouseEvent.CLICK, onClick);
}
public function get listContainer():MovieClip{
return (_listContainer);
}
public function set playAgainButton(_arg1:DisplayObject):void{
_playAgainButton = _arg1;
}
public function set highScores(_arg1:Array):void{
_highScores = _arg1;
}
public function get playAgainButton():DisplayObject{
return (_playAgainButton);
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case playAgainButton:
pause();
manager.showInstructionScreen(this);
break;
};
}
override public function pause():void{
super.pause();
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package com.zincroe.games.screens
Section 13
//InstructionScreen (com.zincroe.games.screens.InstructionScreen)
package com.zincroe.games.screens {
import flash.display.*;
import flash.events.*;
import com.zincroe.games.*;
public class InstructionScreen extends Screen {
private var _continueButton:DisplayObject;
public function InstructionScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
override public function start():void{
super.start();
addEventListener(MouseEvent.CLICK, onClick);
}
public function set continueButton(_arg1:DisplayObject):void{
_continueButton = _arg1;
}
public function get continueButton():DisplayObject{
return (_continueButton);
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case continueButton:
pause();
manager.showSetupScreen(this);
break;
};
}
override public function pause():void{
super.pause();
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package com.zincroe.games.screens
Section 14
//LevelUpScreen (com.zincroe.games.screens.LevelUpScreen)
package com.zincroe.games.screens {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.zincroe.games.*;
public class LevelUpScreen extends Screen {
private var _continueButton:DisplayObject;
private var _scoreField:TextField;
private var _engine:MovieClip;
public function LevelUpScreen(_arg1:MovieClip=null, _arg2:String=null, _arg3:MovieClip=null){
super(_arg1, _arg2);
this.engine = _arg3;
}
public function set scoreField(_arg1:TextField):void{
_scoreField = _arg1;
}
override public function start():void{
super.start();
if (scoreField){
scoreField.text = String(engine.score);
};
addEventListener(MouseEvent.CLICK, onClick);
}
public function get engine():MovieClip{
return (_engine);
}
public function set engine(_arg1:MovieClip):void{
_engine = _arg1;
}
public function set continueButton(_arg1:DisplayObject):void{
_continueButton = _arg1;
}
public function get scoreField():TextField{
return (_scoreField);
}
public function get continueButton():DisplayObject{
return (_continueButton);
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case continueButton:
pause();
manager.showEngine(this);
break;
};
}
override public function pause():void{
super.pause();
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package com.zincroe.games.screens
Section 15
//TitleScreen (com.zincroe.games.screens.TitleScreen)
package com.zincroe.games.screens {
import flash.display.*;
import flash.events.*;
import com.zincroe.games.*;
import flash.ui.*;
public class TitleScreen extends Screen {
private var _highScoreButton:DisplayObject;
private var _playButton:DisplayObject;
public function TitleScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
public function set playButton(_arg1:DisplayObject):void{
_playButton = _arg1;
}
override public function start():void{
super.start();
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
addEventListener(MouseEvent.CLICK, onClick);
}
public function get highScoreButton():DisplayObject{
return (_highScoreButton);
}
public function get playButton():DisplayObject{
return (_playButton);
}
protected function onKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.NUMPAD_MULTIPLY){
pause();
manager.showCheatCodeScreen(this);
};
}
public function set highScoreButton(_arg1:DisplayObject):void{
_highScoreButton = _arg1;
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case highScoreButton:
pause();
manager.showHighScoreScreen(this);
break;
case playButton:
pause();
manager.showInstructionScreen(this);
break;
};
}
override public function pause():void{
super.pause();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package com.zincroe.games.screens
Section 16
//WinScreen (com.zincroe.games.screens.WinScreen)
package com.zincroe.games.screens {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.zincroe.games.*;
public class WinScreen extends Screen {
private var _highScoreButton:DisplayObject;
private var _scoreField:TextField;
private var _engine:MovieClip;
private var _playAgainButton:DisplayObject;
public function WinScreen(_arg1:MovieClip=null, _arg2:String=null, _arg3:MovieClip=null){
super(_arg1, _arg2);
this.engine = _arg3;
}
public function set scoreField(_arg1:TextField):void{
_scoreField = _arg1;
}
override public function start():void{
super.start();
if (scoreField){
scoreField.text = String(engine.score);
};
addEventListener(MouseEvent.CLICK, onClick);
}
public function get engine():MovieClip{
return (_engine);
}
public function set engine(_arg1:MovieClip):void{
_engine = _arg1;
}
public function get scoreField():TextField{
return (_scoreField);
}
public function get highScoreButton():DisplayObject{
return (_highScoreButton);
}
public function set playAgainButton(_arg1:DisplayObject):void{
_playAgainButton = _arg1;
}
public function set highScoreButton(_arg1:DisplayObject):void{
_highScoreButton = _arg1;
}
public function get playAgainButton():DisplayObject{
return (_playAgainButton);
}
protected function onClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case highScoreButton:
pause();
manager.showHighScoreScreen(this);
break;
case playAgainButton:
pause();
manager.showInstructionScreen(this);
break;
};
}
override public function pause():void{
super.pause();
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package com.zincroe.games.screens
Section 17
//Cheat (com.zincroe.games.Cheat)
package com.zincroe.games {
public class Cheat {
private var _enabled:Boolean;
private var _code:String;
public function Cheat(_arg1:String=null, _arg2:Boolean=false){
this.code = _arg1;
this.enabled = _arg2;
}
public function get enabled():Boolean{
return (_enabled);
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
public function get code():String{
return (_code);
}
public function set code(_arg1:String):void{
_code = _arg1;
}
}
}//package com.zincroe.games
Section 18
//Engine (com.zincroe.games.Engine)
package com.zincroe.games {
import flash.display.*;
public class Engine extends Screen {
private var _cheats:Object;
private var _score:int;
public function Engine(_arg1:MovieClip=null, _arg2:String=null, _arg3:Object=null){
super(_arg1, _arg2);
this.cheats = _arg3;
}
public function get cheats():Object{
return (_cheats);
}
public function set score(_arg1:uint):void{
_score = _arg1;
}
public function set cheats(_arg1:Object):void{
_cheats = _arg1;
}
public function get score():uint{
return (_score);
}
}
}//package com.zincroe.games
Section 19
//HighScore (com.zincroe.games.HighScore)
package com.zincroe.games {
public class HighScore {
private var _name:String;
private var _rank:uint;
private var _score:uint;
public function HighScore(_arg1:String=null, _arg2:uint=0, _arg3:uint=0){
this.name = _arg1;
this.rank = _arg2;
this.score = _arg3;
}
public function set score(_arg1:uint):void{
_score = _arg1;
}
public function get name():String{
return (_name);
}
public function get rank():uint{
return (_rank);
}
public function set name(_arg1:String):void{
_name = _arg1;
}
public function set rank(_arg1:uint):void{
_rank = _arg1;
}
public function get score():uint{
return (_score);
}
}
}//package com.zincroe.games
Section 20
//Screen (com.zincroe.games.Screen)
package com.zincroe.games {
import com.zincroe.media.*;
import flash.display.*;
public dynamic class Screen extends MovieClip {
private var _sound:SimpleSoundManager;
private var _music:SimpleSoundManager;
private var _manager:MovieClip;
private var _language:String;
public function Screen(_arg1:MovieClip=null, _arg2:String=null){
this.language = _arg2;
this.manager = _arg1;
stop();
}
public function get sound():SimpleSoundManager{
return (_sound);
}
public function get music():SimpleSoundManager{
return (_music);
}
public function set sound(_arg1:SimpleSoundManager):void{
_sound = _arg1;
}
public function get language():String{
return (_language);
}
public function set manager(_arg1:MovieClip):void{
_manager = _arg1;
}
public function start():void{
}
public function set music(_arg1:SimpleSoundManager):void{
_music = _arg1;
}
public function get manager():MovieClip{
return (_manager);
}
public function set language(_arg1:String):void{
if (language != _arg1){
_language = _arg1;
};
gotoAndStop(language);
}
public function pause():void{
}
}
}//package com.zincroe.games
Section 21
//ScreenManager (com.zincroe.games.ScreenManager)
package com.zincroe.games {
import flash.display.*;
public class ScreenManager extends MovieClip {
private var _instructionScreen:MovieClip;
private var _titleScreen:MovieClip;
private var _highScoreScreen:MovieClip;
private var _engine:MovieClip;
private var _loseScreen:MovieClip;
private var _setupScreen:MovieClip;
private var _cheatCodeScreen:MovieClip;
private var _language:String;
private var _levelUpScreen:MovieClip;
private var _winScreen:MovieClip;
public function ScreenManager(){
stop();
}
public function get cheatCodeScreen():MovieClip{
return (_cheatCodeScreen);
}
public function set cheatCodeScreen(_arg1:MovieClip):void{
_cheatCodeScreen = _arg1;
}
public function get titleScreen():MovieClip{
return (_titleScreen);
}
public function showWinScreen(_arg1:Object=null):void{
clear();
addChild(winScreen);
winScreen.start();
}
public function showInstructionScreen(_arg1:Object=null):void{
if (instructionScreen){
clear();
addChild(instructionScreen);
instructionScreen.start();
} else {
showSetupScreen(_arg1);
};
}
public function set levelUpScreen(_arg1:MovieClip):void{
_levelUpScreen = _arg1;
}
public function set highScoreScreen(_arg1:MovieClip):void{
_highScoreScreen = _arg1;
}
public function set instructionScreen(_arg1:MovieClip):void{
_instructionScreen = _arg1;
}
public function showCheatCodeScreen(_arg1:Object=null):void{
clear();
addChild(cheatCodeScreen);
cheatCodeScreen.start();
}
public function showSetupScreen(_arg1:Object=null):void{
if (setupScreen){
clear();
addChild(setupScreen);
setupScreen.start();
} else {
showEngine(_arg1);
};
}
public function get setupScreen():MovieClip{
return (_setupScreen);
}
public function get engine():MovieClip{
return (_engine);
}
public function set engine(_arg1:MovieClip):void{
_engine = _arg1;
}
public function get winScreen():MovieClip{
return (_winScreen);
}
public function set setupScreen(_arg1:MovieClip):void{
_setupScreen = _arg1;
}
public function get instructionScreen():MovieClip{
return (_instructionScreen);
}
public function showLevelUpScreen(_arg1:Object=null):void{
clear();
addChild(levelUpScreen);
levelUpScreen.start();
}
public function showEngine(_arg1:Object=null):void{
clear();
addChild(engine);
engine.start();
}
protected function clear():void{
var _local1:DisplayObject;
while (numChildren) {
_local1 = getChildAt(0);
removeChild(_local1);
};
}
public function showTitleScreen(_arg1:Object=null):void{
clear();
addChild(titleScreen);
titleScreen.start();
}
public function get highScoreScreen():MovieClip{
return (_highScoreScreen);
}
public function showLoseScreen(_arg1:Object=null):void{
clear();
addChild(loseScreen);
loseScreen.start();
}
public function set loseScreen(_arg1:MovieClip):void{
_loseScreen = _arg1;
}
public function set titleScreen(_arg1:MovieClip):void{
_titleScreen = _arg1;
}
public function set winScreen(_arg1:MovieClip):void{
_winScreen = _arg1;
}
public function get levelUpScreen():MovieClip{
return (_levelUpScreen);
}
public function get loseScreen():MovieClip{
return (_loseScreen);
}
public function showHighScoreScreen(_arg1:Object=null):void{
clear();
addChild(highScoreScreen);
highScoreScreen.start();
}
}
}//package com.zincroe.games
Section 22
//SimpleSound (com.zincroe.media.SimpleSound)
package com.zincroe.media {
import flash.events.*;
import flash.media.*;
import flash.net.*;
import com.zincroe.utils.*;
public class SimpleSound extends EventDispatcher {
private var _sound:Sound;
private var _channels:Array;
private var _defaultOptions:SimpleSoundOptions;
public function SimpleSound(_arg1:Sound, _arg2:Object=null){
setChannels(new Array());
setSound(_arg1);
defaultOptions = new SimpleSoundOptions(_arg2);
}
public function stop():void{
var channels:Array;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.stop();
});
}
private function onSoundStop(_arg1:Event):void{
var _local2:SimpleSoundChannel;
var _local3:Array;
_local2 = (_arg1.target as SimpleSoundChannel);
_local2.removeEventListener(SimpleSoundChannelEvent.FADE_CHANGE, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.FADE_COMPLETE, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.FADE_START, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.FADE_STOP, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.PAN_CHANGE, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.PAN_COMPLETE, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.PAN_START, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.PAN_STOP, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.SOUND_COMPLETE, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.SOUND_STOP, dispatchEvent);
_local2.removeEventListener(SimpleSoundChannelEvent.SOUND_STOP, onSoundStop);
_local3 = getChannels();
_local3 = ArrayUtil.remove(_local3, _local2);
setChannels(_local3);
}
public function get isBuffering():Boolean{
var _local1:Sound;
_local1 = getSound();
return (_local1.isBuffering);
}
public function get bytesTotal():uint{
var _local1:Sound;
_local1 = getSound();
return (_local1.bytesTotal);
}
public function pan(_arg1:Number=0):void{
panStart(0, NaN, _arg1);
}
public function fadeStop():void{
var channels:Array;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.fadeStop();
});
}
public function volume(_arg1:Number=1):void{
fadeStart(0, NaN, _arg1);
}
public function get defaultOptions():SimpleSoundOptions{
return (_defaultOptions);
}
public function get id3():ID3Info{
var _local1:Sound;
_local1 = getSound();
return (_local1.id3);
}
public function get isPlaying():Boolean{
return (getIsPlaying());
}
public function fadeOut(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.fadeOut(duration);
});
}
public function play(_arg1:Object=null):SimpleSoundChannel{
var channel:SimpleSoundChannel;
var channels:Array;
var sound:Sound;
var options = _arg1;
sound = getSound();
options = new SimpleSoundOptions(defaultOptions, options);
if (options.mode === SimpleSoundOptions.PLAY_NEW){
stop();
};
if ((((((options.mode === SimpleSoundOptions.PLAY_ALL)) || ((options.mode === SimpleSoundOptions.PLAY_NEW)))) || (!(isPlaying)))){
try {
channel = new SimpleSoundChannel(sound.play(options.offset, options.loop), this);
channel.volume = options.volume;
channel.pan = options.pan;
channel.addEventListener(SimpleSoundChannelEvent.FADE_CHANGE, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.FADE_COMPLETE, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.FADE_START, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.FADE_STOP, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.PAN_CHANGE, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.PAN_COMPLETE, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.PAN_START, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.PAN_STOP, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.SOUND_COMPLETE, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.SOUND_STOP, dispatchEvent, false, 0, true);
channel.addEventListener(SimpleSoundChannelEvent.SOUND_STOP, onSoundStop, false, 0, true);
channels = getChannels();
channels = ArrayUtil.add(channels, channel);
setChannels(channels);
} catch(error:ArgumentError) {
};
};
return (channel);
}
public function set defaultOptions(_arg1:SimpleSoundOptions):void{
_defaultOptions = _arg1;
}
public function panStop():void{
var channels:Array;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.panStop();
});
}
public function fadeIn(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.fadeIn(duration);
});
}
public function panLeft(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.panLeft(duration);
});
}
public function panStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN):void{
var channels:Array;
var duration = _arg1;
var start = _arg2;
var finish = _arg3;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.panStart(duration, start, finish);
});
}
public function fadeStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN):void{
var channels:Array;
var duration = _arg1;
var start = _arg2;
var finish = _arg3;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.fadeStart(duration, start, finish);
});
}
public function get bytesLoaded():uint{
var _local1:Sound;
_local1 = getSound();
return (_local1.bytesLoaded);
}
private function setChannels(_arg1:Array):void{
_channels = _arg1;
}
private function setSound(_arg1:Sound):void{
if (!_arg1){
throw (new ArgumentError("Sound cannot be null."));
};
_sound = _arg1;
_sound.addEventListener(Event.COMPLETE, dispatchEvent, false, 0, true);
_sound.addEventListener(Event.ID3, dispatchEvent, false, 0, true);
_sound.addEventListener(Event.OPEN, dispatchEvent, false, 0, true);
_sound.addEventListener(IOErrorEvent.IO_ERROR, dispatchEvent, false, 0, true);
_sound.addEventListener(ProgressEvent.PROGRESS, dispatchEvent, false, 0, true);
}
private function getChannels():Array{
return (_channels.concat());
}
public function get channels():Array{
return (getChannels());
}
private function getSound():Sound{
return (_sound);
}
public function panCenter(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.panCenter(duration);
});
}
public function get length():Number{
var _local1:Sound;
_local1 = getSound();
return (_local1.length);
}
public function fadeOutAndStop(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.fadeOutAndStop(duration);
});
}
public function load(_arg1:URLRequest, _arg2:SoundLoaderContext=null):void{
var _local3:Sound;
_local3 = getSound();
_local3.load(_arg1, _arg2);
}
private function getIsPlaying():Boolean{
return (((_channels) && (_channels.length)));
}
public function get url():String{
var _local1:Sound;
_local1 = getSound();
return (_local1.url);
}
public function close():void{
var _local1:Sound;
_local1 = getSound();
_local1.close();
}
public function panRight(_arg1:Number):void{
var channels:Array;
var duration = _arg1;
channels = getChannels();
ArrayUtil.each(channels, function (_arg1:SimpleSoundChannel):void{
_arg1.panRight(duration);
});
}
}
}//package com.zincroe.media
Section 23
//SimpleSoundChannel (com.zincroe.media.SimpleSoundChannel)
package com.zincroe.media {
import flash.events.*;
import flash.media.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public class SimpleSoundChannel extends EventDispatcher {
private var _sound:SimpleSound;
private var _isPlaying:Boolean;
private var _panTween:Tween;
private var _volumeTween:Tween;
private var _channel:SoundChannel;
private var _isPanning:Boolean;
private var _isFading:Boolean;
public function SimpleSoundChannel(_arg1:SoundChannel, _arg2:SimpleSound){
setSound(_arg2);
setChannel(_arg1);
setIsPlaying(true);
}
public function stop():void{
var _local1:SoundChannel;
fadeStop();
panStop();
_local1 = getChannel();
_local1.stop();
setIsPlaying(false);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.SOUND_STOP, false, false, this));
}
public function get isFading():Boolean{
return (getIsFading());
}
private function setIsFading(_arg1:Boolean):void{
_isFading = _arg1;
}
private function onFadeChange(_arg1:TweenEvent):void{
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_CHANGE, false, false, this));
}
private function setIsPanning(_arg1:Boolean):void{
_isPanning = _arg1;
}
private function onPanChange(_arg1:TweenEvent):void{
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_CHANGE, false, false, this));
}
private function getIsPanning():Boolean{
return (_isPanning);
}
public function get leftPeak():Number{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.leftPeak);
}
public function get sound():SimpleSound{
return (getSound());
}
private function onPanComplete(_arg1:TweenEvent):void{
panStop();
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_COMPLETE, false, false, this));
}
public function get volume():Number{
return (getVolume());
}
public function get rightPeak():Number{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.rightPeak);
}
private function setVolume(_arg1:Number):void{
var _local2:SoundChannel;
var _local3:Number;
_local2 = getChannel();
_local3 = getPan();
_local2.soundTransform = new SoundTransform(_arg1, _local3);
}
public function get pan():Number{
return (getPan());
}
public function fadeStop():void{
var _local1:Tween;
_local1 = getVolumeTween();
if (_local1){
_local1.removeEventListener(TweenEvent.MOTION_CHANGE, onFadeChange);
_local1.removeEventListener(TweenEvent.MOTION_FINISH, onFadeComplete);
_local1.stop();
setIsFading(false);
setVolumeTween(null);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_STOP, false, false, this));
};
}
public function get isPlaying():Boolean{
return (getIsPlaying());
}
private function getVolume():Number{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.soundTransform.volume);
}
public function get position():Number{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.position);
}
public function get soundTransform():SoundTransform{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.soundTransform);
}
private function setVolumeTween(_arg1:Tween):void{
_volumeTween = _arg1;
}
public function set volume(_arg1:Number):void{
setVolume(_arg1);
}
public function fadeOut(_arg1:Number):void{
fadeStart(_arg1, NaN, 0);
}
public function set pan(_arg1:Number):void{
setPan(_arg1);
}
private function getVolumeTween():Tween{
return (_volumeTween);
}
public function panStop():void{
var _local1:Tween;
_local1 = getPanTween();
if (_local1){
_local1.removeEventListener(TweenEvent.MOTION_CHANGE, onPanChange);
_local1.removeEventListener(TweenEvent.MOTION_FINISH, onPanComplete);
_local1.stop();
setIsPanning(false);
setPanTween(null);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_STOP, false, false, this));
};
}
private function setChannel(_arg1:SoundChannel):void{
if (!_arg1){
throw (new ArgumentError("Channel cannot be null."));
};
_channel = _arg1;
_channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
}
public function panStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN):void{
var _local4:Tween;
if (isNaN(_arg2)){
_arg2 = pan;
};
if (isNaN(_arg3)){
_arg3 = pan;
};
if (isNaN(_arg1)){
_arg1 = 0;
};
panStop();
if ((((_arg2 === _arg3)) || ((_arg1 <= 0)))){
pan = _arg2;
setIsPanning(true);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_START, false, false, this));
pan = _arg3;
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_CHANGE, false, false, this));
setIsPanning(false);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_STOP, false, false, this));
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_COMPLETE, false, false, this));
} else {
_local4 = new Tween(this, "pan", Regular.easeInOut, _arg2, _arg3, _arg1, true);
_local4.addEventListener(TweenEvent.MOTION_CHANGE, onPanChange);
_local4.addEventListener(TweenEvent.MOTION_FINISH, onPanComplete);
setIsPanning(true);
setPanTween(_local4);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.PAN_START, false, false, this));
};
}
public function fadeStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN):void{
var _local4:Tween;
if (isNaN(_arg2)){
_arg2 = volume;
};
if (isNaN(_arg3)){
_arg3 = volume;
};
if (isNaN(_arg1)){
_arg1 = 0;
};
fadeStop();
if ((((_arg2 === _arg3)) || ((_arg1 <= 0)))){
volume = _arg2;
setIsFading(true);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_START, false, false, this));
volume = _arg3;
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_CHANGE, false, false, this));
setIsFading(false);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_STOP, false, false, this));
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_COMPLETE, false, false, this));
} else {
_local4 = new Tween(this, "volume", Regular.easeInOut, _arg2, _arg3, _arg1, true);
_local4.addEventListener(TweenEvent.MOTION_CHANGE, onFadeChange);
_local4.addEventListener(TweenEvent.MOTION_FINISH, onFadeComplete);
setIsFading(true);
setVolumeTween(_local4);
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_START, false, false, this));
};
}
private function onSoundComplete(_arg1:Event):void{
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.SOUND_COMPLETE, false, false, this));
stop();
}
public function get isPanning():Boolean{
return (getIsPanning());
}
private function setPanTween(_arg1:Tween):void{
_panTween = _arg1;
}
public function set soundTransform(_arg1:SoundTransform):void{
var _local2:SoundChannel;
_local2 = getChannel();
_local2.soundTransform = _arg1;
}
private function getPanTween():Tween{
return (_panTween);
}
private function getSound():SimpleSound{
return (_sound);
}
private function setPan(_arg1:Number):void{
var _local2:SoundChannel;
var _local3:Number;
_local2 = getChannel();
_local3 = getVolume();
_local2.soundTransform = new SoundTransform(_local3, _arg1);
}
private function getChannel():SoundChannel{
return (_channel);
}
public function panCenter(_arg1:Number):void{
panStart(_arg1, NaN, 0);
}
private function onFadeComplete(_arg1:TweenEvent):void{
fadeStop();
dispatchEvent(new SimpleSoundChannelEvent(SimpleSoundChannelEvent.FADE_COMPLETE, false, false, this));
}
private function setSound(_arg1:SimpleSound):void{
_sound = _arg1;
}
public function panLeft(_arg1:Number):void{
panStart(_arg1, NaN, -1);
}
private function getPan():Number{
var _local1:SoundChannel;
_local1 = getChannel();
return (_local1.soundTransform.pan);
}
private function getIsPlaying():Boolean{
return (_isPlaying);
}
private function setIsPlaying(_arg1:Boolean):void{
_isPlaying = _arg1;
}
public function fadeOutAndStop(_arg1:Number):void{
var self:SimpleSoundChannel;
var onComplete:Function;
var onStop:Function;
var duration = _arg1;
onComplete = function (_arg1:Event):void{
self.removeEventListener("fadeComplete", onComplete);
self.removeEventListener("fadeStop", onStop);
};
onStop = function (_arg1:Event):void{
self.removeEventListener("fadeComplete", onComplete);
self.removeEventListener("fadeStop", onStop);
self.stop();
};
self = this;
self.addEventListener("fadeComplete", onComplete);
self.addEventListener("fadeStop", onStop);
fadeOut(duration);
}
private function getIsFading():Boolean{
return (_isFading);
}
public function fadeIn(_arg1:Number):void{
fadeStart(_arg1, NaN, 1);
}
public function panRight(_arg1:Number):void{
panStart(_arg1, NaN, 1);
}
}
}//package com.zincroe.media
Section 24
//SimpleSoundChannelEvent (com.zincroe.media.SimpleSoundChannelEvent)
package com.zincroe.media {
import flash.events.*;
public class SimpleSoundChannelEvent extends Event {
private var _channel:SimpleSoundChannel;
public static const PAN_START:String = "panStart";
public static const SOUND_STOP:String = "soundStop";
public static const FADE_STOP:String = "fadeStop";
public static const SOUND_COMPLETE:String = "soundComplete";
public static const PAN_STOP:String = "panStop";
public static const PAN_CHANGE:String = "panChange";
public static const FADE_CHANGE:String = "fadeChange";
public static const PAN_COMPLETE:String = "panComplete";
public static const FADE_COMPLETE:String = "fadeComplete";
public static const FADE_START:String = "fadeStart";
public function SimpleSoundChannelEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:SimpleSoundChannel=null){
super(_arg1, _arg2, _arg3);
setChannel(_arg4);
}
override public function toString():String{
return (formatToString("SimpleSoundChannelEvent", "type", "bubbles", "cancelable", "channel"));
}
private function getChannel():SimpleSoundChannel{
return (_channel);
}
private function setChannel(_arg1:SimpleSoundChannel):void{
_channel = _arg1;
}
public function get channel():SimpleSoundChannel{
return (_channel);
}
override public function clone():Event{
return (new SimpleSoundChannelEvent(type, bubbles, cancelable, channel));
}
}
}//package com.zincroe.media
Section 25
//SimpleSoundManager (com.zincroe.media.SimpleSoundManager)
package com.zincroe.media {
import flash.utils.*;
import flash.media.*;
import com.zincroe.utils.*;
public class SimpleSoundManager {
private var _nameLookup:Dictionary;
private var _soundList:Array;
private var _nameList:Array;
private var _soundLookup:Dictionary;
public function SimpleSoundManager(){
setNameList(new Array());
setNameLookup(new Dictionary());
setSoundList(new Array());
setSoundLookup(new Dictionary());
}
public function stop(_arg1=null):void{
var sounds:Array;
var names = _arg1;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.stop();
});
}
public function panStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN, _arg4=null):void{
var sounds:Array;
var duration = _arg1;
var start = _arg2;
var finish = _arg3;
var names = _arg4;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.panStart(duration, start, finish);
});
}
public function getChannels(_arg1):Array{
var _local2:Array;
var _local3:Array;
_local3 = getSounds(_arg1);
_local2 = ArrayUtil.map(_local3, mapSoundToChannels);
_local2 = ArrayUtil.flatten(_local2);
_local2 = ArrayUtil.unique(_local2);
_local2 = ArrayUtil.type(_local2, SimpleSoundChannel);
return (_local2);
}
public function getSounds(_arg1=null):Array{
var _local2:Array;
if (_arg1 === null){
_local2 = getSoundList();
} else {
_arg1 = new Array(_arg1);
_arg1 = ArrayUtil.flatten(_arg1);
_local2 = ArrayUtil.map(_arg1, mapNameToSound);
_local2 = ArrayUtil.type(_local2, SimpleSound);
_local2 = ArrayUtil.unique(_local2);
};
return (_local2);
}
private function setNameList(_arg1:Array):void{
_nameList = _arg1;
}
public function fadeStart(_arg1:Number, _arg2:Number=NaN, _arg3:Number=NaN, _arg4=null):void{
var sounds:Array;
var duration = _arg1;
var start = _arg2;
var finish = _arg3;
var names = _arg4;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.fadeStart(duration, start, finish);
});
}
private function mapNameToSound(_arg1:String):SimpleSound{
return (getSound(_arg1));
}
private function setSoundList(_arg1:Array):void{
_soundList = _arg1;
}
public function panLeft(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.panLeft(duration);
});
}
public function fadeIn(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.fadeIn(duration);
});
}
public function unbind(_arg1:String):void{
bind(_arg1, null);
}
private function getSoundList():Array{
return (_soundList.concat());
}
public function createAndBind(_arg1:String, _arg2:Object=null):SimpleSound{
var _local3:SimpleSound;
_local3 = create(_arg1, _arg2);
if (_local3){
bind(_arg1, _local3);
};
return (_local3);
}
private function mapSoundToName(_arg1:SimpleSound){
return (getName(_arg1));
}
public function volume(_arg1:Number=1, _arg2=null):void{
var sounds:Array;
var value = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.volume(value);
});
}
private function getNameLookup():Dictionary{
return (_nameLookup);
}
public function pan(_arg1:Number=0, _arg2=null):void{
var sounds:Array;
var value = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.pan(value);
});
}
private function mapSoundToChannels(_arg1:SimpleSound):Array{
return (_arg1.channels);
}
public function getSound(_arg1:String):SimpleSound{
var _local2:Dictionary;
_local2 = getNameLookup();
return ((_local2[_arg1] as SimpleSound));
}
public function getNames(_arg1=null):Array{
var _local2:Array;
if (_arg1 === null){
_local2 = getNameList();
} else {
_arg1 = new Array(_arg1);
_arg1 = ArrayUtil.flatten(_arg1);
_local2 = ArrayUtil.map(_arg1, mapSoundToName);
_local2 = ArrayUtil.type(_local2, String);
_local2 = ArrayUtil.unique(_local2);
};
return (_local2);
}
public function getName(_arg1:SimpleSound):String{
var _local2:Dictionary;
_local2 = getSoundLookup();
return (((_local2[_arg1]) || (null)));
}
public function isPlaying(_arg1=null):Boolean{
var _local2:Array;
_local2 = getChannels(_arg1);
return ((_local2.length > 0));
}
public function fadeStop(_arg1=null):void{
var sounds:Array;
var names = _arg1;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.fadeStop();
});
}
private function setSoundLookup(_arg1:Dictionary):void{
_soundLookup = _arg1;
}
public function isolate(_arg1=null):void{
var sounds:Array;
var names = _arg1;
sounds = ArrayUtil.remove(getSounds(), getSounds(names));
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.stop();
});
}
public function panRight(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.panRight(duration);
});
}
private function setNameLookup(_arg1:Dictionary):void{
_nameLookup = _arg1;
}
public function fadeOut(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.fadeOut(duration);
});
}
private function getSoundLookup():Dictionary{
return (_soundLookup);
}
public function panCenter(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.panCenter(duration);
});
}
public function fadeOutAndStop(_arg1:Number, _arg2=null):void{
var sounds:Array;
var duration = _arg1;
var names = _arg2;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.fadeOutAndStop(duration);
});
}
public function panStop(_arg1=null):void{
var sounds:Array;
var names = _arg1;
sounds = getSounds(names);
ArrayUtil.each(sounds, function (_arg1:SimpleSound):void{
_arg1.panStop();
});
}
public function play(_arg1:String, _arg2:Object=null):SimpleSoundChannel{
var _local3:SimpleSound;
var _local4:SimpleSoundChannel;
_local3 = getSound(_arg1);
if (_local3){
_arg2 = new SimpleSoundOptions(_local3.defaultOptions, _arg2);
_local4 = _local3.play(_arg2);
} else {
_local3 = create((_arg1 as String), _arg2);
if (_local3){
_local4 = _local3.play(_local3.defaultOptions);
bind(_arg1, _local3);
};
};
return (_local4);
}
public function create(_arg1:String, _arg2:Object=null):SimpleSound{
var sound:Sound;
var simple:SimpleSound;
var classname = _arg1;
var options = _arg2;
try {
sound = (new (getDefinitionByName(classname)) as Sound);
simple = new SimpleSound(sound, options);
} catch(error:ReferenceError) {
} catch(error:ArgumentError) {
};
return (simple);
}
public function bind(_arg1:String, _arg2:SimpleSound):void{
var _local3:Array;
var _local4:Dictionary;
var _local5:Array;
var _local6:Dictionary;
var _local7:SimpleSound;
_local3 = getNameList();
_local4 = getNameLookup();
_local5 = getSoundList();
_local6 = getSoundLookup();
_local7 = getSound(_arg1);
if (_local7 !== _arg2){
if (_local7){
_local7.stop();
_local3 = ArrayUtil.remove(_local3, _arg1);
delete _local4[_arg1];
_local5 = ArrayUtil.remove(_local5, _local7);
delete _local6[_local7];
};
if (_arg2){
_local4[_arg1] = _arg2;
_local3 = ArrayUtil.add(_local3, _arg1);
_local6[_arg2] = _arg1;
_local5 = ArrayUtil.add(_local5, _arg2);
};
setNameList(_local3);
setNameLookup(_local4);
setSoundList(_local5);
setSoundLookup(_local6);
};
}
private function getNameList():Array{
return (_nameList.concat());
}
}
}//package com.zincroe.media
Section 26
//SimpleSoundOptions (com.zincroe.media.SimpleSoundOptions)
package com.zincroe.media {
import com.zincroe.utils.*;
public class SimpleSoundOptions {
private var _volume:Number;
private var _mode:uint;
private var _loop:int;
private var _pan:Number;
private var _offset:Number;
public static const PLAY_NEW:uint = 2;
public static const PLAY_ALL:uint = 0;
public static const PLAY_CURRENT:uint = 1;
public function SimpleSoundOptions(... _args){
offset = 0;
loop = 0;
pan = 0;
volume = 1;
merge(_args);
}
public function set loop(_arg1:int):void{
_loop = Math.abs(_arg1);
}
public function set mode(_arg1:uint):void{
switch (_arg1){
case PLAY_CURRENT:
case PLAY_NEW:
_mode = _arg1;
break;
default:
_mode = PLAY_ALL;
break;
};
}
public function get offset():Number{
return (_offset);
}
public function get volume():Number{
return (_volume);
}
public function get pan():Number{
return (_pan);
}
public function toObject():Object{
return ({loop:loop, mode:mode, offset:offset, pan:pan, volume:volume});
}
public function get mode():uint{
return (_mode);
}
public function set offset(_arg1:Number):void{
if (isNaN(_arg1)){
_offset = 0;
} else {
_offset = _arg1;
};
}
public function get loop():int{
return (_loop);
}
public function toString():String{
var _local1:String;
_local1 = "[SimpleSoundOptions loop=!loop offset=!offset pan=!pan volume=!volume]";
_local1 = _local1.replace("!loop", loop);
_local1 = _local1.replace("!offset", offset);
_local1 = _local1.replace("!pan", pan);
_local1 = _local1.replace("!volume", volume);
return (_local1);
}
public function set volume(_arg1:Number):void{
if (!isNaN(_arg1)){
_volume = _arg1;
};
}
public function merge(... _args):void{
var args = _args;
args = ArrayUtil.flatten(args);
args = ArrayUtil.compact(args);
args = args.reverse();
ArrayUtil.each(args, function (_arg1:Object):void{
if (("loop" in _arg1)){
loop = _arg1.loop;
};
if (("mode" in _arg1)){
mode = _arg1.mode;
};
if (("offset" in _arg1)){
offset = _arg1.offset;
};
if (("pan" in _arg1)){
pan = _arg1.pan;
};
if (("volume" in _arg1)){
volume = _arg1.volume;
};
});
}
public function set pan(_arg1:Number):void{
if (!isNaN(_arg1)){
_pan = _arg1;
};
}
}
}//package com.zincroe.media
Section 27
//URLLoader (com.zincroe.net.URLLoader)
package com.zincroe.net {
import flash.events.*;
import flash.net.*;
public class URLLoader extends URLLoader {
private var _request:URLRequest;
private var _connected:Boolean;
public function URLLoader(_arg1:URLRequest=null){
super(_arg1);
addEventListener(Event.CLOSE, onClose, false, Number.MAX_VALUE);
addEventListener(Event.COMPLETE, onComplete, false, Number.MAX_VALUE);
addEventListener(Event.OPEN, onOpen, false, Number.MAX_VALUE);
addEventListener(IOErrorEvent.IO_ERROR, onError, false, Number.MAX_VALUE);
addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, false, Number.MAX_VALUE);
}
public function get connected():Boolean{
return (_connected);
}
public function get request():URLRequest{
return (_request);
}
private function onOpen(_arg1:Event):void{
if (_connected == true){
_arg1.stopImmediatePropagation();
};
_connected = true;
}
override public function load(_arg1:URLRequest):void{
close();
_request = _arg1;
dispatchEvent(new Event(Event.OPEN));
super.load(_arg1);
}
private function onError(_arg1:Event):void{
dispatchEvent(new Event(Event.CLOSE));
}
private function onClose(_arg1:Event):void{
if (_connected == false){
_arg1.stopImmediatePropagation();
};
_connected = false;
}
override public function close():void{
try {
super.close();
dispatchEvent(new Event(Event.CLOSE));
} catch(error:Error) {
};
}
private function onComplete(_arg1:Event):void{
dispatchEvent(new Event(Event.CLOSE));
}
}
}//package com.zincroe.net
Section 28
//URLVariables (com.zincroe.net.URLVariables)
package com.zincroe.net {
import flash.net.*;
public dynamic class URLVariables extends URLVariables {
public function URLVariables(_arg1:String=null){
super(_arg1);
}
override public function decode(_arg1:String):void{
_arg1 = _arg1.replace(/^&/, "");
_arg1 = _arg1.replace(/&$/, "");
super.decode(_arg1);
}
}
}//package com.zincroe.net
Section 29
//ArrayUtil (com.zincroe.utils.ArrayUtil)
package com.zincroe.utils {
public class ArrayUtil {
public static function unique(_arg1:Array):Array{
var _local2:*;
var _local3:Array;
_local3 = new Array();
for each (_local2 in _arg1) {
if (_local3.indexOf(_local2) < 0){
_local3.push(_local2);
};
};
return (_local3);
}
public static function each(_arg1:Array, _arg2:Function, _arg3:Object=null):void{
var _local4:Array;
var _local5:uint;
var _local6:*;
if (((((_arg1) && (_arg1.length))) && ((_arg2 is Function)))){
_local5 = _arg1.length;
while (_local5--) {
_local6 = _arg1[_local5];
_local4 = [_local6, _local5, _arg1].slice(0, _arg2.length);
if (_arg2.apply(_arg3, _local4) === false){
return;
};
};
};
}
public static function compact(_arg1:Array):Array{
return (ArrayUtil.remove(_arg1, null, undefined));
}
public static function flatten(_arg1:Array):Array{
var _local3:uint;
var _local4:Array;
var _local5:*;
if (((_arg1) && (_arg1.length))){
_local4 = new Array();
_local3 = _arg1.length;
while (_local3--) {
_local5 = _arg1[_local3];
if ((_local5 is Array)){
_local5 = _local5.slice();
_local5 = arguments.callee(_local5);
};
_local4 = [].concat(_local5, _local4);
};
} else {
_local4 = new Array();
};
return (_local4);
}
public static function normalize(_arg1:Array):Array{
var _local2:Array;
if (_arg1){
_local2 = _arg1.concat();
_local2 = ArrayUtil.flatten(_local2);
_local2 = ArrayUtil.unique(_local2);
_local2 = ArrayUtil.compact(_local2);
} else {
_local2 = new Array();
};
return (_local2);
}
public static function add(_arg1:Array, ... _args):Array{
var _local3:Array;
var _local2:Array = ArrayUtil.flatten(_args);
_local2 = ArrayUtil.compact(_local2);
if (_arg1){
_local3 = _arg1.concat();
} else {
_local3 = new Array();
};
_local3 = _local3.concat(_local2);
_local3 = ArrayUtil.unique(_local3);
return (_local3);
}
public static function type(_arg1:Array, _arg2:Class):Array{
var temp:Array;
var array = _arg1;
var type = _arg2;
temp = ArrayUtil.map(array, function (_arg1){
return ((_arg1 as type));
});
temp = ArrayUtil.compact(temp);
return (temp);
}
public static function remove(_arg1:Array, ... _args):Array{
var _local3:uint;
var _local4:Array;
var _local5:*;
if (((((((_arg1) && (_arg1.length))) && (_args))) && (_args.length))){
_local4 = _arg1.slice();
var _local2:Array = ArrayUtil.flatten(_args);
_local3 = _local2.length;
while (_local3--) {
_local5 = _local2[_local3];
while (_local4.indexOf(_local5) >= 0) {
_local4.splice(_local4.indexOf(_local5), 1);
};
};
} else {
_local4 = new Array();
};
return (_local4);
}
public static function map(_arg1:Array, _arg2:Function, _arg3:Object=null):Array{
var _local4:Array;
var _local5:uint;
var _local6:Array;
var _local7:*;
if (((((_arg1) && (_arg1.length))) && ((_arg2 is Function)))){
_local6 = new Array();
_local5 = _arg1.length;
while (_local5--) {
_local7 = _arg1[_local5];
_local4 = [_local7, _local5, _arg1].slice(0, _arg2.length);
_local6.unshift(_arg2.apply(_arg3, _local4));
};
} else {
_local6 = new Array();
};
return (_local6);
}
public static function empty(_arg1:Array):Boolean{
return ((_arg1.length === 0));
}
public static function contains(_arg1:Array, ... _args):Boolean{
var _local3:uint;
var _local4:*;
if (((((((_arg1) && (_arg1.length))) && (_args))) && (_args.length))){
var _local2:Array = ArrayUtil.unique(_args);
_local3 = _local2.length;
while (_local3--) {
_local4 = _local2[_local3];
if (_arg1.indexOf(_local4) < 0){
return (false);
};
};
return (true);
};
return (false);
}
}
}//package com.zincroe.utils
Section 30
//DisplayObjectUtil (com.zincroe.utils.DisplayObjectUtil)
package com.zincroe.utils {
import flash.display.*;
public class DisplayObjectUtil {
public static function stopMovieClips(_arg1:DisplayObjectContainer):void{
var _local3:DisplayObject;
var _local4:uint;
_local4 = _arg1.numChildren;
if (_local4){
while (_local4--) {
_local3 = _arg1.getChildAt(_local4);
if ((_local3 is MovieClip)){
(_local3 as MovieClip).stop();
};
if ((_local3 is DisplayObjectContainer)){
arguments.callee((_local3 as DisplayObjectContainer));
};
};
};
}
public static function children(_arg1:DisplayObjectContainer):Array{
var _local2:uint;
var _local3:Array;
_local3 = new Array();
_local2 = _arg1.numChildren;
if (_local2){
while (_local2--) {
_local3.unshift(_arg1.getChildAt(_local2));
};
};
return (_local3);
}
}
}//package com.zincroe.utils
Section 31
//KeyUtil (com.zincroe.utils.KeyUtil)
package com.zincroe.utils {
import flash.display.*;
import flash.events.*;
public class KeyUtil {
private static var keys:Array;
public static function init(_arg1:Stage):void{
keys = new Array();
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
_arg1.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
_arg1.addEventListener(Event.DEACTIVATE, onReset);
}
private static function onKeyDown(_arg1:KeyboardEvent):void{
keys[_arg1.keyCode] = true;
}
private static function onReset(_arg1:Event):void{
keys = new Array();
}
private static function onKeyUp(_arg1:KeyboardEvent):void{
delete keys[_arg1.keyCode];
}
public static function isDown(_arg1:uint):Boolean{
return (keys[_arg1]);
}
}
}//package com.zincroe.utils
Section 32
//LabelUtil (com.zincroe.utils.LabelUtil)
package com.zincroe.utils {
import flash.utils.*;
import flash.display.*;
public class LabelUtil {
private static var _hash:Object;
public static function totalFrames(_arg1:MovieClip, _arg2:String):uint{
var _local3:Label;
_local3 = LabelUtil.find(_arg1, _arg2);
return ((_local3) ? _local3.totalFrames : 0);
}
public static function repeat(_arg1:MovieClip, _arg2:String, _arg3:Function):void{
var _local4:Label;
_local4 = (LabelUtil.find(_arg1, _arg2) as Label);
if ((((_local4 === null)) || ((_local4.totalFrames === 1)))){
_arg1.stop();
} else {
setTimeout(_arg3, 1);
};
}
public static function firstFrame(_arg1:MovieClip, _arg2:String):uint{
var _local3:Label;
_local3 = LabelUtil.find(_arg1, _arg2);
return ((_local3) ? _local3.firstFrame : 0);
}
public static function lastFrame(_arg1:MovieClip, _arg2:String):uint{
var _local3:Label;
_local3 = LabelUtil.find(_arg1, _arg2);
return ((_local3) ? _local3.lastFrame : 0);
}
public static function find(_arg1:MovieClip, _arg2:String):Label{
var _local3:int;
var _local4:int;
var _local5:String;
var _local6:FrameLabel;
var _local7:int;
var _local8:int;
if (((((((_arg2) && (_arg2.length))) && (_arg1))) && (_arg1.currentLabels.length))){
_local5 = getQualifiedClassName(_arg1);
if (!_hash){
_hash = new Object();
};
if (!_hash[_local5]){
_hash[_local5] = new Object();
_local3 = (_arg1.totalFrames + 1);
_local4 = _arg1.currentLabels.length;
while (_local4--) {
_local6 = _arg1.currentLabels[_local4];
if (_local6.frame < _local3){
_local7 = (_local3 - 1);
_local8 = (_local3 - _local6.frame);
_local3 = _local6.frame;
};
_hash[_local5][_local6.name] = new Label(_local6.name, _local3, _local7, _local8);
};
};
return (((_hash[_local5][_arg2]) || (null)));
};
return (null);
}
public static function play(_arg1:MovieClip, _arg2:String, _arg3:Function):void{
var _local4:Label;
_local4 = (LabelUtil.find(_arg1, _arg2) as Label);
if (_local4 === null){
_arg3();
} else {
_arg1.addFrameScript((_local4.lastFrame - 1), _arg3);
if (_local4.totalFrames === 1){
_arg1.gotoAndStop(_local4.name);
} else {
if (((!((_arg1.currentLabel === _local4.name))) || ((_arg1.currentFrame === _local4.lastFrame)))){
_arg1.gotoAndPlay(_local4.name);
} else {
_arg1.play();
};
};
};
}
public static function exists(_arg1:MovieClip, _arg2:String):Boolean{
return (Boolean(LabelUtil.find(_arg1, _arg2)));
}
}
}//package com.zincroe.utils
class Label {
private var _name:String;
private var _totalFrames:int;
private var _firstFrame:int;
private var _lastFrame:int;
private function Label(_arg1:String, _arg2:int, _arg3:int, _arg4:int){
_firstFrame = _arg2;
_lastFrame = _arg3;
_name = _arg1;
_totalFrames = _arg4;
}
public function get totalFrames():int{
return (_totalFrames);
}
public function get name():String{
return (_name);
}
public function get lastFrame():int{
return (_lastFrame);
}
public function get firstFrame():int{
return (_firstFrame);
}
}
Section 33
//MathUtil (com.zincroe.utils.MathUtil)
package com.zincroe.utils {
public class MathUtil {
public static var ONE_EIGHTY_OVER_PI:Number = 57.2957795130823;
public static var PI_OVER_ONE_EIGHTY:Number = 0.0174532925199433;
public static function degreesToRadians(_arg1:Number):Number{
return ((_arg1 * MathUtil.PI_OVER_ONE_EIGHTY));
}
public static function radiansToDegrees(_arg1:Number):Number{
return ((_arg1 * MathUtil.ONE_EIGHTY_OVER_PI));
}
}
}//package com.zincroe.utils
Section 34
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 35
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 36
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.utils.*;
import flash.display.*;
import flash.events.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 37
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 38
//027_C030_12 (MonsterMash_fla.027_C030_12)
package MonsterMash_fla {
import flash.display.*;
public dynamic class 027_C030_12 extends MovieClip {
public function 027_C030_12(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package MonsterMash_fla
Section 39
//BackgroundContainer1_19 (MonsterMash_fla.BackgroundContainer1_19)
package MonsterMash_fla {
import flash.display.*;
public dynamic class BackgroundContainer1_19 extends MovieClip {
public var boundingBox:MovieClip;
}
}//package MonsterMash_fla
Section 40
//BackgroundContainer2_21 (MonsterMash_fla.BackgroundContainer2_21)
package MonsterMash_fla {
import flash.display.*;
public dynamic class BackgroundContainer2_21 extends MovieClip {
public var boundingBox:MovieClip;
}
}//package MonsterMash_fla
Section 41
//BackgroundContainer3_22 (MonsterMash_fla.BackgroundContainer3_22)
package MonsterMash_fla {
import flash.display.*;
public dynamic class BackgroundContainer3_22 extends MovieClip {
public var boundingBox:MovieClip;
}
}//package MonsterMash_fla
Section 42
//Fonts_4 (MonsterMash_fla.Fonts_4)
package MonsterMash_fla {
import flash.display.*;
public dynamic class Fonts_4 extends MovieClip {
public function Fonts_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package MonsterMash_fla
Section 43
//ForegroundContainer1_50 (MonsterMash_fla.ForegroundContainer1_50)
package MonsterMash_fla {
import flash.display.*;
public dynamic class ForegroundContainer1_50 extends MovieClip {
public var boundingBox:MovieClip;
}
}//package MonsterMash_fla
Section 44
//HighScoreItem_8 (MonsterMash_fla.HighScoreItem_8)
package MonsterMash_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HighScoreItem_8 extends MovieClip {
public var rankField:TextField;
public var nameField:TextField;
public var scoreField:TextField;
}
}//package MonsterMash_fla
Section 45
//HighScoreList_7 (MonsterMash_fla.HighScoreList_7)
package MonsterMash_fla {
import flash.display.*;
public dynamic class HighScoreList_7 extends MovieClip {
public var item2:MovieClip;
public var item6:MovieClip;
public var item7:MovieClip;
public var item3:MovieClip;
public var item4:MovieClip;
public var item5:MovieClip;
public var item9:MovieClip;
public var item8:MovieClip;
public var item0:MovieClip;
public var item1:MovieClip;
}
}//package MonsterMash_fla
Section 46
//TimeMeter_52 (MonsterMash_fla.TimeMeter_52)
package MonsterMash_fla {
import flash.display.*;
public dynamic class TimeMeter_52 extends MovieClip {
public var timeTotalBar:MovieClip;
public var timeRemainingBar:MovieClip;
}
}//package MonsterMash_fla
Section 47
//GameLoop (music.GameLoop)
package music {
import flash.media.*;
public dynamic class GameLoop extends Sound {
}
}//package music
Section 48
//ScreenLoop (music.ScreenLoop)
package music {
import flash.media.*;
public dynamic class ScreenLoop extends Sound {
}
}//package music
Section 49
//Sting (music.Sting)
package music {
import flash.media.*;
public dynamic class Sting extends Sound {
}
}//package music
Section 50
//ButtonClick (sound.ButtonClick)
package sound {
import flash.media.*;
public dynamic class ButtonClick extends Sound {
}
}//package sound
Section 51
//GroupFinish1 (sound.GroupFinish1)
package sound {
import flash.media.*;
public dynamic class GroupFinish1 extends Sound {
}
}//package sound
Section 52
//GroupFinish2 (sound.GroupFinish2)
package sound {
import flash.media.*;
public dynamic class GroupFinish2 extends Sound {
}
}//package sound
Section 53
//GroupFinish3 (sound.GroupFinish3)
package sound {
import flash.media.*;
public dynamic class GroupFinish3 extends Sound {
}
}//package sound
Section 54
//InfoHide (sound.InfoHide)
package sound {
import flash.media.*;
public dynamic class InfoHide extends Sound {
}
}//package sound
Section 55
//PlayerHit (sound.PlayerHit)
package sound {
import flash.media.*;
public dynamic class PlayerHit extends Sound {
}
}//package sound
Section 56
//PlayerMiss (sound.PlayerMiss)
package sound {
import flash.media.*;
public dynamic class PlayerMiss extends Sound {
}
}//package sound
Section 57
//PowerUpHit (sound.PowerUpHit)
package sound {
import flash.media.*;
public dynamic class PowerUpHit extends Sound {
}
}//package sound
Section 58
//TargetHit1 (sound.TargetHit1)
package sound {
import flash.media.*;
public dynamic class TargetHit1 extends Sound {
}
}//package sound
Section 59
//TargetHit2 (sound.TargetHit2)
package sound {
import flash.media.*;
public dynamic class TargetHit2 extends Sound {
}
}//package sound
Section 60
//TargetHit3 (sound.TargetHit3)
package sound {
import flash.media.*;
public dynamic class TargetHit3 extends Sound {
}
}//package sound
Section 61
//Building1 (Building1)
package {
public dynamic class Building1 extends MonsterMashGroup {
}
}//package
Section 62
//Building10 (Building10)
package {
public dynamic class Building10 extends MonsterMashGroup {
}
}//package
Section 63
//Building11 (Building11)
package {
public dynamic class Building11 extends MonsterMashGroup {
}
}//package
Section 64
//Building12 (Building12)
package {
public dynamic class Building12 extends MonsterMashGroup {
}
}//package
Section 65
//Building13 (Building13)
package {
public dynamic class Building13 extends MonsterMashGroup {
}
}//package
Section 66
//Building14 (Building14)
package {
public dynamic class Building14 extends MonsterMashGroup {
}
}//package
Section 67
//Building15 (Building15)
package {
public dynamic class Building15 extends MonsterMashGroup {
}
}//package
Section 68
//Building16 (Building16)
package {
public dynamic class Building16 extends MonsterMashGroup {
}
}//package
Section 69
//Building17 (Building17)
package {
public dynamic class Building17 extends MonsterMashGroup {
}
}//package
Section 70
//Building18 (Building18)
package {
public dynamic class Building18 extends MonsterMashGroup {
}
}//package
Section 71
//Building2 (Building2)
package {
public dynamic class Building2 extends MonsterMashGroup {
}
}//package
Section 72
//Building3 (Building3)
package {
public dynamic class Building3 extends MonsterMashGroup {
}
}//package
Section 73
//Building4 (Building4)
package {
public dynamic class Building4 extends MonsterMashGroup {
}
}//package
Section 74
//Building5 (Building5)
package {
public dynamic class Building5 extends MonsterMashGroup {
}
}//package
Section 75
//Building6 (Building6)
package {
public dynamic class Building6 extends MonsterMashGroup {
}
}//package
Section 76
//Building7 (Building7)
package {
public dynamic class Building7 extends MonsterMashGroup {
}
}//package
Section 77
//Building8 (Building8)
package {
public dynamic class Building8 extends MonsterMashGroup {
}
}//package
Section 78
//Building9 (Building9)
package {
public dynamic class Building9 extends MonsterMashGroup {
}
}//package
Section 79
//Fade (Fade)
package {
import flash.display.*;
import flash.events.*;
import com.zincroe.utils.*;
public class Fade extends MovieClip {
public function Fade(){
stop();
}
public function fadeInComplete():void{
stop();
}
public function fadeOut():void{
LabelUtil.play(this, "fade_out", fadeOutComplete);
}
public function fadeOutComplete():void{
dispatchEvent(new Event("fadeOutComplete"));
stop();
}
public function fadeIn():void{
LabelUtil.play(this, "fade_in", fadeInComplete);
}
}
}//package
Section 80
//Floor1Bottom (Floor1Bottom)
package {
public dynamic class Floor1Bottom extends MonsterMashTarget {
}
}//package
Section 81
//Floor1Middle (Floor1Middle)
package {
public dynamic class Floor1Middle extends MonsterMashTarget {
}
}//package
Section 82
//Floor1Top (Floor1Top)
package {
public dynamic class Floor1Top extends MonsterMashTarget {
}
}//package
Section 83
//Floor2Bottom (Floor2Bottom)
package {
public dynamic class Floor2Bottom extends MonsterMashTarget {
}
}//package
Section 84
//Floor2Middle (Floor2Middle)
package {
public dynamic class Floor2Middle extends MonsterMashTarget {
}
}//package
Section 85
//Floor2Top (Floor2Top)
package {
public dynamic class Floor2Top extends MonsterMashTarget {
}
}//package
Section 86
//Floor3Bottom (Floor3Bottom)
package {
public dynamic class Floor3Bottom extends MonsterMashTarget {
}
}//package
Section 87
//Floor3Middle (Floor3Middle)
package {
public dynamic class Floor3Middle extends MonsterMashTarget {
}
}//package
Section 88
//Floor3Top (Floor3Top)
package {
public dynamic class Floor3Top extends MonsterMashTarget {
}
}//package
Section 89
//Floor4Bottom (Floor4Bottom)
package {
public dynamic class Floor4Bottom extends MonsterMashTarget {
}
}//package
Section 90
//Floor4Middle (Floor4Middle)
package {
public dynamic class Floor4Middle extends MonsterMashTarget {
}
}//package
Section 91
//Floor4Top (Floor4Top)
package {
public dynamic class Floor4Top extends MonsterMashTarget {
}
}//package
Section 92
//Floor5Bottom (Floor5Bottom)
package {
public dynamic class Floor5Bottom extends MonsterMashTarget {
}
}//package
Section 93
//Floor5Middle (Floor5Middle)
package {
public dynamic class Floor5Middle extends MonsterMashTarget {
}
}//package
Section 94
//Floor5Top (Floor5Top)
package {
public dynamic class Floor5Top extends MonsterMashTarget {
}
}//package
Section 95
//Level1 (Level1)
package {
import flash.display.*;
public dynamic class Level1 extends MovieClip {
public var playerArea:MovieClip;
public var boundingBox:MovieClip;
public var player:MonsterMashPlayer;
}
}//package
Section 96
//Level2 (Level2)
package {
import flash.display.*;
public dynamic class Level2 extends MovieClip {
public var playerArea:MovieClip;
public var boundingBox:MovieClip;
public var player:MonsterMashPlayer;
}
}//package
Section 97
//Level3 (Level3)
package {
import flash.display.*;
public dynamic class Level3 extends MovieClip {
public var playerArea:MovieClip;
public var boundingBox:MovieClip;
public var player:MonsterMashPlayer;
}
}//package
Section 98
//LineSegment (LineSegment)
package {
import flash.geom.*;
public class LineSegment {
public var pointA:Point;
public var pointB:Point;
public function LineSegment(_arg1:Point=null, _arg2:Point=null){
this.pointA = _arg1;
this.pointB = _arg2;
}
public static function getIntersectionPoint(_arg1:LineSegment, _arg2:LineSegment):Point{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
if (((((((((((_arg1) && (_arg1.pointA))) && (_arg1.pointB))) && (_arg2))) && (_arg2.pointA))) && (_arg2.pointB))){
_local3 = new Point((_arg1.pointB.x - _arg1.pointA.x), (_arg1.pointB.y - _arg1.pointA.y));
_local4 = new Point((_arg2.pointB.x - _arg2.pointA.x), (_arg2.pointB.y - _arg2.pointA.y));
_local5 = (((-(_local3.y) * (_arg1.pointA.x - _arg2.pointA.x)) + (_local3.x * (_arg1.pointA.y - _arg2.pointA.y))) / ((-(_local4.x) * _local3.y) + (_local3.x * _local4.y)));
_local6 = (((_local4.x * (_arg1.pointA.y - _arg2.pointA.y)) - (_local4.y * (_arg1.pointA.x - _arg2.pointA.x))) / ((-(_local4.x) * _local3.y) + (_local3.x * _local4.y)));
if ((((((((0 <= _local5)) && ((_local5 <= 1)))) && ((0 <= _local6)))) && ((_local6 <= 1)))){
return (new Point((_arg1.pointA.x + (_local6 * _local3.x)), (_arg1.pointA.y + (_local6 * _local3.y))));
};
};
return (null);
}
}
}//package
Section 99
//MonsterMash (MonsterMash)
package {
import com.zincroe.media.*;
import flash.events.*;
import com.teletoon.games.*;
import com.zincroe.games.*;
public class MonsterMash extends TeletoonGame {
public function MonsterMash(){
initMusic();
initSound();
super();
initCheats();
initLevelFactory();
initPowerUpFactory();
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
private function initMusic():void{
music = new SimpleSoundManager();
music.createAndBind("music.GameLoop", {loop:9999, volume:0.5});
music.createAndBind("music.ScreenLoop", {loop:9999, volume:0.5});
music.createAndBind("music.Sting", {volume:0.5});
}
private function initCheats():void{
engine.cheats.size = new Cheat("size");
}
private function initLevelFactory():void{
engine.levelFactory = new MonsterMashLevelFactory();
engine.levelFactory.classnameList = ["Level1", "Level2", "Level3"];
engine.levelFactory.reset();
}
private function initPowerUpFactory():void{
var _local1:MonsterMashPowerUp;
engine.powerUpFactory = new MonsterMashPowerUpFactory();
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(5000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(10000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(20000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(40000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(60000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (15 * stage.frameRate);
engine.powerUpFactory.addPowerUp(80000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(100000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(120000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(140000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(160000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(180000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(200000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(220000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(240000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(260000, _local1);
_local1 = new MonsterMashPowerUp();
_local1.engine = (engine as MonsterMashEngine);
_local1.value = (20 * stage.frameRate);
engine.powerUpFactory.addPowerUp(280000, _local1);
}
private function initSound():void{
sound = new SimpleSoundManager();
music.createAndBind("sound.InfoHide", {volume:0.25});
}
private function onClick(_arg1:MouseEvent):void{
if (_arg1.target.name.match(/button/i)){
sound.play("sound.ButtonClick");
};
}
}
}//package
Section 100
//MonsterMashEngine (MonsterMashEngine)
package {
import flash.geom.*;
import flash.utils.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.zincroe.games.*;
import com.zincroe.utils.*;
public class MonsterMashEngine extends Engine {
public var levelOverFlag:Boolean;
public var powerUpFactory:MonsterMashPowerUpFactory;
public var timeTotal:int;
public var fade:Fade;
public var gameOverFlag:Boolean;
public var targetInfoPool:Array;
public var groupInfoTypes:Array;
public var timeMeter:MovieClip;
public var player:MonsterMashPlayer;
public var scrollBumpers:Rectangle;
public var levelFactory:MonsterMashLevelFactory;
public var scrollArea:Rectangle;
public var scrollRatio:Point;
public var levelContainer:MovieClip;
public var foregroundContainer1:MovieClip;
public var foregroundContainer3:MovieClip;
public var infoContainer:MovieClip;
public var foregroundContainer2:MovieClip;
public var groupInfoPool:Array;
public var scoreField:TextField;
public var backgroundContainer1:MovieClip;
public var backgroundContainer2:MovieClip;
public var backgroundContainer3:MovieClip;
public var timeRemaining:int;
public var groups:Array;
public var levelField:TextField;
public var targetInfoTypes:Array;
public var scrollBounds:Rectangle;
public var powerUps:Array;
public function MonsterMashEngine(){
gameOverFlag = true;
groupInfoTypes = ["MonsterMashGroupInfo1", "MonsterMashGroupInfo2"];
targetInfoTypes = ["MonsterMashTargetInfo1", "MonsterMashTargetInfo4", "MonsterMashTargetInfo2", "MonsterMashTargetInfo5", "MonsterMashTargetInfo3", "MonsterMashTargetInfo6"];
}
public function calculateTotalPoints():int{
var value:int;
value = 0;
ArrayUtil.each(groups, function (_arg1:MonsterMashGroup):void{
var group = _arg1;
value = (value + group.points);
ArrayUtil.each(group.targets, function (_arg1:MonsterMashTarget):void{
value = (value + _arg1.points);
});
});
return (value);
}
public function createTargetInfo():MonsterMashInfo{
if (((!(targetInfoPool)) || (!(targetInfoPool.length)))){
targetInfoPool = targetInfoTypes.concat();
};
return (new (getDefinitionByName(targetInfoPool.pop())));
}
private function onLevelUpFadeOutComplete(_arg1:Event):void{
pause();
manager.showLevelUpScreen(this);
fade.removeEventListener("fadeOutComplete", onLevelUpFadeOutComplete);
}
private function updateGroups():void{
ArrayUtil.each(groups, updateGroup);
}
private function initPlayer():void{
if (!levelContainer){
throw (new Error("levelContainer cannot be null"));
};
if (!levelContainer.player){
throw (new Error("levelContainer.player cannot be null"));
};
if (!levelContainer.playerArea){
throw (new Error("levelContainer.playerArea cannot be null"));
};
if (levelContainer.contains(levelContainer.playerArea)){
levelContainer.removeChild(levelContainer.playerArea);
};
player = levelContainer.player;
player.engine = this;
if (!player.boundaries){
player.boundaries = levelContainer.playerArea.getBounds(levelContainer);
};
player.init();
}
public function createGroupInfo():MonsterMashInfo{
if (((!(groupInfoPool)) || (!(groupInfoPool.length)))){
groupInfoPool = groupInfoTypes.concat();
};
return (new (getDefinitionByName(groupInfoPool.pop())));
}
private function initTime():void{
if (timeTotal <= 0){
timeTotal = (60 * stage.frameRate);
};
timeRemaining = timeTotal;
}
private function updateLevel():void{
if ((player.x - scrollArea.x) < scrollBumpers.left){
scrollArea.x = (scrollArea.x - (scrollBumpers.left - (player.x - scrollArea.x)));
} else {
if ((player.x - scrollArea.x) > scrollBumpers.right){
scrollArea.x = (scrollArea.x - (scrollBumpers.right - (player.x - scrollArea.x)));
};
};
if ((player.y - scrollArea.y) < scrollBumpers.top){
scrollArea.y = (scrollArea.y - (scrollBumpers.top - (player.y - scrollArea.y)));
} else {
if ((player.y - scrollArea.y) > scrollBumpers.bottom){
scrollArea.y = (scrollArea.y - (scrollBumpers.bottom - (player.y - scrollArea.y)));
};
};
scrollArea.x = Math.min(scrollArea.x, (scrollBounds.width - scrollArea.width));
scrollArea.x = Math.max(scrollArea.x, 0);
scrollArea.y = Math.min(scrollArea.y, (scrollBounds.height - scrollArea.height));
scrollArea.y = Math.max(scrollArea.y, 0);
scrollRatio = new Point(Math.abs((scrollArea.x / (scrollBounds.width - scrollArea.width))), Math.abs((scrollArea.y / (scrollBounds.height - scrollArea.height))));
updateContainer(backgroundContainer1);
updateContainer(backgroundContainer2);
updateContainer(backgroundContainer3);
updateContainer(levelContainer);
updateContainer(foregroundContainer1);
updateContainer(foregroundContainer2);
updateContainer(foregroundContainer3);
}
public function drawLevelField():void{
if (levelField){
levelField.text = String(levelFactory.index);
};
}
private function initLevel():void{
var _local1:MovieClip;
_local1 = levelFactory.getNextLevel();
addChildAt(_local1, getChildIndex(levelContainer));
removeChild(levelContainer);
levelContainer = _local1;
initContainer(backgroundContainer1);
initContainer(backgroundContainer2);
initContainer(backgroundContainer3);
initContainer(levelContainer);
initContainer(foregroundContainer1);
initContainer(foregroundContainer2);
initContainer(foregroundContainer3);
scrollArea = new Rectangle(((levelContainer.bounds.width - 700) / 2), (levelContainer.bounds.height - 700), 700, 700);
scrollBounds = new Rectangle(levelContainer.boundingBox.x, levelContainer.boundingBox.y, levelContainer.boundingBox.width, levelContainer.boundingBox.height);
scrollBumpers = new Rectangle((scrollArea.width / 2), (scrollArea.height / 2), 0, 0);
drawLevelField();
}
override public function start():void{
super.start();
if (gameOverFlag){
score = 0;
levelFactory.reset();
gameOverFlag = false;
};
initLevel();
levelOverFlag = false;
initGroups();
initKeys();
initPlayer();
initPowerUps();
initTime();
MusicUtil.playGameLoop(music);
music.fadeStart(2, 0, 0.5, "music.GameLoop");
stage.stageFocusRect = false;
stage.focus = stage;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
fade.fadeIn();
}
public function get hasTime():Boolean{
return ((timeRemaining > 0));
}
private function checkCollisions():void{
var isFirstHit:Boolean;
isFirstHit = true;
if (player.hasMovedDown){
ArrayUtil.each(groups, function (_arg1:MonsterMashGroup):void{
if (player.wasAboveTarget(_arg1.currentTarget)){
while (_arg1.currentTarget) {
if (LineSegment.getIntersectionPoint(player.lineSegment, _arg1.currentTarget.lineSegment)){
if (player.power > _arg1.currentTarget.strength){
player.hit(_arg1.currentTarget);
_arg1.currentTarget.hit(isFirstHit);
_arg1.hit();
isFirstHit = false;
} else {
player.miss(_arg1.currentTarget);
break;
};
} else {
break;
};
};
};
});
};
if (!levelOverFlag){
ArrayUtil.each(powerUps, function (_arg1:MonsterMashPowerUp):void{
var _local2:Point;
_local2 = new Point(_arg1.x, _arg1.y);
_local2 = levelContainer.localToGlobal(_local2);
if (((_arg1.currentLabel.match(/^move/)) && (player.hitTestPoint(_local2.x, _local2.y, true)))){
_arg1.hit();
player.hit(_arg1);
};
});
};
}
public function mapGroupToCurrentTarget(_arg1:MonsterMashGroup):MonsterMashTarget{
return (_arg1.currentTarget);
}
private function onEnterFrame(_arg1:Event):void{
updateGroups();
updatePlayer();
updatePowerUps();
updateLevel();
checkCollisions();
updateScoreField();
updateTime();
updateTimeMeter();
checkGameOver();
}
public function addInfo(_arg1:MonsterMashInfo):void{
if (((infoContainer) && (_arg1))){
_arg1.engine = this;
infoContainer.addChild(_arg1);
_arg1.show();
};
}
public function addPoints(_arg1:int, _arg2:MovieClip):void{
var _local3:Rectangle;
var _local4:MonsterMashPowerUp;
var _local5:Rectangle;
_local4 = powerUpFactory.getPowerUp(score, (score + _arg1));
if (_local4){
_local3 = player.getBounds(levelContainer);
_local5 = _arg2.getBounds(levelContainer);
_local4.x = (_local5.x + (_local5.width / 2));
_local4.y = _local3.top;
_local4.show();
levelContainer.addChild(_local4);
levelContainer.addChild(player);
powerUps.push(_local4);
};
score = (score + _arg1);
}
private function initGroups():void{
groups = DisplayObjectUtil.children(levelContainer);
groups = ArrayUtil.type(groups, MonsterMashGroup);
ArrayUtil.each(groups, initGroup);
}
private function onGameOverFadeOutComplete(_arg1:Event):void{
pause();
manager.showWinScreen(this);
gameOverFlag = true;
fade.removeEventListener("fadeOutComplete", onGameOverFadeOutComplete);
}
public function addTime(_arg1:int):void{
if (_arg1 > 0){
timeRemaining = (timeRemaining + _arg1);
timeRemaining = Math.min(timeRemaining, timeTotal);
};
}
private function checkGameOver():void{
if (((((levelOverFlag) || (!(hasTime)))) || (!(hasTargets)))){
if (levelOverFlag === false){
MusicUtil.stopGameLoop(music);
MusicUtil.playSting(music);
levelOverFlag = true;
} else {
if (((player.hasLanded) && (player.currentLabel.match(/fall|stand|finish|levelup/)))){
if (((hasTargets) || (!(levelFactory.hasNextLevel())))){
if (player.currentLabel !== "finish"){
player.finish();
};
if (player.currentFrame === LabelUtil.lastFrame(player, "finish")){
if (!fade.hasEventListener("fadeOutComplete")){
fade.addEventListener("fadeOutComplete", onGameOverFadeOutComplete);
fade.fadeOut();
};
};
} else {
if (player.currentLabel !== "levelup"){
player.levelUp();
};
if (player.currentFrame === LabelUtil.lastFrame(player, "levelup")){
if (!fade.hasEventListener("fadeOutComplete")){
fade.addEventListener("fadeOutComplete", onLevelUpFadeOutComplete);
fade.fadeOut();
};
};
};
};
};
};
}
public function get hasTargets():Boolean{
return ((ArrayUtil.compact(ArrayUtil.map(groups, mapGroupToCurrentTarget)).length > 0));
}
private function updatePlayer():void{
player.update();
}
public function initPowerUps():void{
powerUps = new Array();
powerUpFactory = ((powerUpFactory) || (new MonsterMashPowerUpFactory()));
powerUpFactory.reset();
}
private function initKeys():void{
KeyUtil.init(stage);
}
private function updateScoreField():void{
if (scoreField){
scoreField.text = String(score);
};
}
private function updateGroup(_arg1:MonsterMashGroup):void{
_arg1.update();
}
private function updateTime():void{
if (timeRemaining > 0){
timeRemaining--;
};
}
private function initGroup(_arg1:MonsterMashGroup):void{
_arg1.engine = this;
_arg1.init();
}
private function initContainer(_arg1:MovieClip):void{
if (_arg1){
if (!_arg1.boundingBox){
throw (new Error("bounding box cannot be null"));
};
if (_arg1.contains(_arg1.boundingBox)){
_arg1.removeChild(_arg1.boundingBox);
};
_arg1.bounds = _arg1.boundingBox.getBounds(_arg1);
_arg1.x = 0;
_arg1.y = 0;
};
}
private function updateContainer(_arg1:MovieClip):void{
if (((_arg1) && (_arg1.bounds))){
_arg1.scrollRect = new Rectangle(((_arg1.bounds.width - scrollArea.width) * scrollRatio.x), ((_arg1.bounds.height - scrollArea.height) * scrollRatio.y), scrollArea.width, scrollArea.height);
};
}
public function updatePowerUps():void{
ArrayUtil.each(powerUps, function (_arg1:MonsterMashPowerUp):void{
_arg1.update();
});
}
private function updateTimeMeter():void{
if (((timeMeter) && (timeMeter.timeRemainingBar))){
timeMeter.timeRemainingBar.scaleX = (timeRemaining / timeTotal);
if (timeRemaining < (stage.frameRate * 10)){
timeMeter.timeRemainingBar.visible = (Math.floor((timeRemaining / 2)) % 2);
} else {
timeMeter.timeRemainingBar.visible = true;
};
};
}
override public function pause():void{
super.pause();
music.stop();
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
}
}//package
Section 101
//MonsterMashGroup (MonsterMashGroup)
package {
import flash.geom.*;
import flash.display.*;
import com.zincroe.utils.*;
public class MonsterMashGroup extends MovieClip {
private var _points:int;
private var _soundHit:String;
private var _currentTarget:MonsterMashTarget;
private var _engine:MonsterMashEngine;
private var _soundFinish:Array;
private var _targets:Array;
public function MonsterMashGroup(){
soundFinish = ["sound.GroupFinish1", "sound.GroupFinish2", "sound.GroupFinish3"];
soundHit = "sound.GroupHit";
stop();
}
public function get points():int{
return (_points);
}
public function set soundHit(_arg1:String):void{
_soundHit = _arg1;
}
public function set soundFinish(_arg1:Array):void{
_soundFinish = _arg1;
}
public function init():void{
targets = DisplayObjectUtil.children(this);
targets = ArrayUtil.type(targets, MonsterMashTarget);
targets.sortOn("y", Array.NUMERIC);
currentTarget = targets[0];
points = (100 * targets.length);
ArrayUtil.each(targets, initTarget);
}
public function get targets():Array{
return (_targets);
}
public function get soundHit():String{
return (_soundHit);
}
public function set targets(_arg1:Array):void{
_targets = _arg1;
}
public function get currentTarget():MonsterMashTarget{
return (_currentTarget);
}
public function get engine():MonsterMashEngine{
return (_engine);
}
public function set engine(_arg1:MonsterMashEngine):void{
_engine = _arg1;
}
public function get soundFinish():Array{
return (_soundFinish);
}
public function getTargetIndex(_arg1:MonsterMashTarget):int{
return (targets.indexOf(_arg1));
}
private function playRandomFinishSound():void{
var _local1:int;
var _local2:String;
var _local3:Array;
_local3 = soundFinish.concat();
while (_local3.length > 0) {
_local1 = Math.floor((Math.random() * _local3.length));
_local2 = _local3[_local1];
if (!engine.sound.isPlaying(_local2)){
engine.sound.play(_local2);
return;
};
_local3.splice(_local1, 1);
};
engine.sound.play(soundFinish[Math.floor((Math.random() * soundFinish.length))]);
}
public function hit():void{
var _local1:MonsterMashInfo;
var _local2:Rectangle;
if (currentTarget){
if (currentTarget.previousTarget){
currentTarget.previousTarget.hide();
};
if (currentTarget.nextTarget){
if (!engine.sound.isPlaying(soundHit)){
engine.sound.play(soundHit);
};
currentTarget = currentTarget.nextTarget;
} else {
playRandomFinishSound();
_local1 = engine.createGroupInfo();
_local2 = currentTarget.getBounds(parent);
_local1.points = points;
_local1.x = ((_local2.x + (_local2.width / 2)) - engine.scrollArea.x);
_local1.y = ((_local2.y + _local2.height) - engine.scrollArea.y);
engine.addPoints(_local1.points, this);
engine.addInfo(_local1);
currentTarget = null;
};
};
}
public function updateTarget(_arg1:MonsterMashTarget):void{
_arg1.update();
}
public function initTarget(_arg1:MonsterMashTarget, _arg2:int):void{
_arg1.engine = engine;
_arg1.group = this;
_arg1.nextTarget = targets[(_arg2 + 1)];
_arg1.points = (100 * (_arg2 + 1));
_arg1.previousTarget = targets[(_arg2 - 1)];
_arg1.init();
}
public function update():void{
ArrayUtil.each(targets, updateTarget);
}
public function set currentTarget(_arg1:MonsterMashTarget):void{
_currentTarget = _arg1;
}
public function set points(_arg1:int):void{
_points = _arg1;
}
}
}//package
Section 102
//MonsterMashGroupInfo1 (MonsterMashGroupInfo1)
package {
public dynamic class MonsterMashGroupInfo1 extends MonsterMashInfo {
}
}//package
Section 103
//MonsterMashGroupInfo2 (MonsterMashGroupInfo2)
package {
public dynamic class MonsterMashGroupInfo2 extends MonsterMashInfo {
}
}//package
Section 104
//MonsterMashInfo (MonsterMashInfo)
package {
import flash.display.*;
import flash.text.*;
import com.zincroe.utils.*;
public class MonsterMashInfo extends MovieClip {
private var _points:int;
private var _pointsField:TextField;
private var _engine:MonsterMashEngine;
private var _hideSound:String;
public function MonsterMashInfo(_arg1:int=0){
this.hideSound = "sound.InfoHide";
this.points = _arg1;
stop();
}
public function get points():int{
return (_points);
}
private function showComplete():void{
hide();
}
public function get engine():MonsterMashEngine{
return (_engine);
}
public function set engine(_arg1:MonsterMashEngine):void{
_engine = _arg1;
}
private function hideComplete():void{
((parent) && (parent.removeChild(this)));
stop();
}
public function set pointsField(_arg1:TextField):void{
if (pointsField !== _arg1){
_pointsField = _arg1;
update();
};
}
public function update():void{
var _local1:String;
if (pointsField){
if (points > 0){
_local1 = ("+" + String(points));
} else {
if (points < 0){
_local1 = ("-" + String(points));
} else {
_local1 = String(points);
};
};
pointsField.text = _local1;
};
}
public function set points(_arg1:int):void{
if (points !== _arg1){
_points = _arg1;
update();
};
}
public function get pointsField():TextField{
return (_pointsField);
}
public function set hideSound(_arg1:String):void{
_hideSound = _arg1;
}
public function get hideSound():String{
return (_hideSound);
}
public function show():void{
LabelUtil.play(this, "show", showComplete);
}
public function hide():void{
LabelUtil.play(this, "hide", hideComplete);
engine.sound.play(hideSound);
}
}
}//package
Section 105
//MonsterMashInstructionScreen (MonsterMashInstructionScreen)
package {
import flash.display.*;
import com.zincroe.games.screens.*;
public class MonsterMashInstructionScreen extends InstructionScreen {
public function MonsterMashInstructionScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
override public function start():void{
super.start();
}
override public function pause():void{
super.pause();
MusicUtil.stopScreenLoop(music);
MusicUtil.playSting(music);
}
}
}//package
Section 106
//MonsterMashLevelFactory (MonsterMashLevelFactory)
package {
import flash.utils.*;
import flash.display.*;
public class MonsterMashLevelFactory {
public var classnameList:Array;
public var index:int;
public var classnamePool:Array;
public function MonsterMashLevelFactory(){
classnameList = new Array();
classnamePool = new Array();
}
public function reset():void{
classnamePool = classnameList.concat();
index = 0;
}
public function hasNextLevel():Boolean{
return ((classnamePool.length > 0));
}
public function getNextLevel():MovieClip{
var _local1:String;
_local1 = classnamePool.shift();
if (_local1){
index++;
return (new (getDefinitionByName(_local1)));
};
return (null);
}
}
}//package
Section 107
//MonsterMashLevelUpScreen (MonsterMashLevelUpScreen)
package {
import flash.display.*;
import com.zincroe.games.screens.*;
public class MonsterMashLevelUpScreen extends LevelUpScreen {
public var animation:MovieClip;
public function MonsterMashLevelUpScreen(_arg1:MovieClip=null, _arg2:String=null, _arg3:MovieClip=null){
super(_arg1, _arg2, _arg3);
}
override public function start():void{
super.start();
if (animation){
animation.gotoAndPlay(1);
animation.addFrameScript((animation.totalFrames - 1), onAnimationComplete);
};
music.play("music.Sting");
}
private function onAnimationComplete():void{
pause();
manager.showEngine(this);
}
override public function pause():void{
super.pause();
if (animation){
animation.stop();
animation.addFrameScript((animation.totalFrames - 1), null);
};
}
}
}//package
Section 108
//MonsterMashPlayer (MonsterMashPlayer)
package {
import flash.geom.*;
import flash.display.*;
import com.zincroe.utils.*;
import flash.ui.*;
public class MonsterMashPlayer extends MovieClip {
private var _maxVelocityX:Number;
private var _friction:Number;
private var _soundFinish:String;
private var _gravity:Number;
private var _soundMiss:String;
private var _soundHit:String;
private var _lastTarget:MonsterMashTarget;
private var _engine:MonsterMashEngine;
private var _center:Point;
private var _defaultY:Number;
private var _velocityX:Number;
private var _defaultX:Number;
private var _velocityY:Number;
private var _lastPosition:Point;
private var _defaultScaleY:Number;
private var _boundaries:Rectangle;
private var _maxVelocityY:Number;
private var _defaultScaleX:Number;
public function MonsterMashPlayer(){
friction = 0.98;
gravity = 2;
maxVelocityX = 25;
maxVelocityY = 50;
soundFinish = "sound.PlayerFinish";
soundHit = "sound.PlayerHit";
soundMiss = "sound.PlayerMiss";
stop();
}
public function get soundHit():String{
return (_soundHit);
}
public function set soundHit(_arg1:String):void{
_soundHit = _arg1;
}
private function hitComplete():void{
idle();
}
public function get maxVelocityX():Number{
return (_maxVelocityX);
}
public function get maxVelocityY():Number{
return (_maxVelocityY);
}
public function set maxVelocityX(_arg1:Number):void{
_maxVelocityX = _arg1;
}
public function set maxVelocityY(_arg1:Number):void{
_maxVelocityY = _arg1;
}
private function moveComplete():void{
LabelUtil.repeat(this, "move", move);
}
public function set velocityX(_arg1:Number):void{
_velocityX = _arg1;
}
public function get defaultX():Number{
return (_defaultX);
}
public function get defaultY():Number{
return (_defaultY);
}
public function set velocityY(_arg1:Number):void{
_velocityY = _arg1;
}
public function get boundaries():Rectangle{
return (_boundaries);
}
public function get engine():MonsterMashEngine{
return (_engine);
}
public function get center():Point{
return (_center);
}
public function get gravity():Number{
return (_gravity);
}
private function missComplete():void{
idle();
}
public function set defaultX(_arg1:Number):void{
_defaultX = _arg1;
}
public function set defaultY(_arg1:Number):void{
_defaultY = _arg1;
}
public function get hasMovedDown():Boolean{
return ((y > lastPosition.y));
}
public function set engine(_arg1:MonsterMashEngine):void{
_engine = _arg1;
}
public function set boundaries(_arg1:Rectangle):void{
_boundaries = _arg1;
}
public function get soundFinish():String{
return (_soundFinish);
}
public function finish():void{
LabelUtil.play(this, "finish", finishComplete);
if (!engine.sound.isPlaying(soundFinish)){
engine.sound.play(soundFinish);
};
}
public function get lineSegment():LineSegment{
return (new LineSegment(new Point(lastPosition.x, lastPosition.y), new Point(x, y)));
}
public function set gravity(_arg1:Number):void{
_gravity = _arg1;
}
public function get soundMiss():String{
return (_soundMiss);
}
public function set center(_arg1:Point):void{
_center = _arg1;
}
public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Boolean;
_local3 = false;
lastPosition = new Point(x, y);
_local7 = ((!(engine.levelOverFlag)) && (currentLabel.match(/^fall|move|stand/)));
if (((((((((_local7) && (KeyUtil.isDown(Keyboard.RIGHT)))) && ((x > boundaries.left)))) && ((y < boundaries.bottom)))) && (!(isHittingLastTarget)))){
velocityX = (velocityX - 1);
_local3 = true;
};
if (((((((((_local7) && (KeyUtil.isDown(Keyboard.LEFT)))) && ((x < boundaries.right)))) && ((y < boundaries.bottom)))) && (!(isHittingLastTarget)))){
velocityX = (velocityX + 1);
_local3 = true;
};
if (((_local7) && ((KeyUtil.isDown(Keyboard.RIGHT) === KeyUtil.isDown(Keyboard.LEFT))))){
velocityX = (velocityX * friction);
};
if (((((_local7) && (KeyUtil.isDown(Keyboard.SPACE)))) && ((y > boundaries.top)))){
velocityY = (velocityY - gravity);
_local3 = true;
} else {
if (((!(isHittingBottom)) && (!(isHittingLastTarget)))){
velocityY = (velocityY + gravity);
};
};
velocityX = Math.min(velocityX, maxVelocityX);
velocityX = Math.max(velocityX, -(maxVelocityX));
velocityY = Math.min(velocityY, maxVelocityY);
velocityY = Math.max(velocityY, -(maxVelocityY));
if (velocityY < 0){
_local5 = ((y - boundaries.top) / boundaries.height);
_local5 = Math.max(_local5, 0);
_local5 = Math.min(_local5, 1);
velocityY = Math.max(velocityY, (-(maxVelocityY) * _local5));
};
if (Math.abs(velocityX) < 0.5){
velocityX = 0;
};
if (Math.abs(velocityY) < 0.5){
velocityY = 0;
};
if ((x + velocityX) > boundaries.right){
velocityX = (velocityX * 0.65);
x = boundaries.right;
} else {
if ((x + velocityX) < boundaries.left){
velocityX = (velocityX * 0.65);
x = boundaries.left;
} else {
x = (x + velocityX);
};
};
if ((y + velocityY) > boundaries.bottom){
velocityY = (velocityY * 0.65);
velocityX = (velocityX * 0.65);
y = boundaries.bottom;
} else {
if ((y + velocityY) < boundaries.top){
velocityY = 0;
y = boundaries.top;
} else {
y = (y + velocityY);
};
};
if (isHittingBottom){
miss(null);
} else {
if (_local3){
move();
} else {
if (currentLabel.match(/^move/)){
idle();
};
};
};
_local2 = (((velocityX / maxVelocityX) * -45) - rotation);
_local4 = MathUtil.degreesToRadians(_local2);
_local1 = (Math.cos(_local4) * -1);
_local6 = (Math.sin(_local4) * -1);
rotation = (rotation + _local2);
x = (x + (((center.x * _local1) - (center.y * _local6)) + center.x));
y = (y + (((center.x * _local6) + (center.y * _local1)) + center.y));
}
public function get metrics():Rectangle{
var _local1:Number;
var _local2:Rectangle;
_local1 = rotation;
rotation = 0;
_local2 = hitArea.getBounds(parent);
rotation = _local1;
return (_local2);
}
public function wasAboveTarget(_arg1:MonsterMashTarget):Boolean{
return (((((_arg1) && (lastPosition))) && ((lastPosition.y <= _arg1.metrics.top))));
}
private function finishComplete():void{
stop();
}
public function get friction():Number{
return (_friction);
}
public function get hasLanded():Boolean{
return (((((!(velocityX)) && (!(velocityY)))) && (((isHittingBottom) || (isHittingLastTarget)))));
}
public function get power():Number{
var _local1:Number;
var _local2:Number;
_local1 = (metrics.width * metrics.height);
_local2 = (velocityY / maxVelocityY);
return (((_local1 * _local2) * 3));
}
public function set soundFinish(_arg1:String):void{
_soundFinish = _arg1;
}
public function init():void{
if (((((((defaultScaleX) && (defaultScaleY))) && (defaultX))) && (defaultY))){
scaleX = defaultScaleX;
scaleY = defaultScaleY;
x = defaultX;
y = defaultY;
} else {
defaultScaleX = scaleX;
defaultScaleY = scaleY;
defaultX = x;
defaultY = y;
};
if (((((((engine) && (engine.cheats))) && (engine.cheats.size))) && (engine.cheats.size.enabled))){
scaleX = (defaultScaleX * 2);
scaleY = (defaultScaleY * 2);
};
if (hitArea){
hitArea.visible = false;
} else {
throw (new Error("hit area cannot be null"));
};
center = new Point(0, (hitArea.height * -0.25));
lastPosition = new Point(x, y);
lastTarget = null;
velocityX = 0;
velocityY = 0;
idle();
}
public function miss(_arg1:MonsterMashTarget):void{
if (_arg1){
lastTarget = _arg1;
velocityX = (velocityX * 0.5);
velocityY = (velocityY * 0.5);
y = _arg1.metrics.top;
};
if (((hasMovedDown) && (!(currentLabel.match(/hit|miss/))))){
LabelUtil.play(this, "miss", missComplete);
if (!engine.sound.isPlaying(soundMiss)){
engine.sound.play(soundMiss);
};
};
}
public function get velocityX():Number{
return (_velocityX);
}
public function get velocityY():Number{
return (_velocityY);
}
private function standComplete():void{
LabelUtil.repeat(this, "stand", stand);
}
public function levelUp():void{
LabelUtil.play(this, "levelup", levelUpComplete);
}
public function set soundMiss(_arg1:String):void{
_soundMiss = _arg1;
}
public function get isHittingBottom():Boolean{
return ((y >= boundaries.bottom));
}
public function fall():void{
}
public function set lastTarget(_arg1:MonsterMashTarget):void{
_lastTarget = _arg1;
}
private function levelUpComplete():void{
stop();
}
public function hit(_arg1):void{
if ((_arg1 is MonsterMashTarget)){
lastTarget = _arg1;
scaleX = Math.min((scaleX * 1.015), (defaultScaleX * 2));
scaleY = Math.min((scaleY * 1.015), (defaultScaleY * 2));
velocityY = (velocityY * (1 - (_arg1.strength / power)));
} else {
if ((_arg1 is MonsterMashPowerUp)){
velocityY = (velocityY * (1 - ((_arg1.width * _arg1.height) / power)));
};
};
LabelUtil.play(this, "hit", hitComplete);
if (!engine.sound.isPlaying(soundHit)){
engine.sound.play(soundHit);
};
}
public function get isHittingLastTarget():Boolean{
return (((lastTarget) && ((lastTarget.metrics.top === y))));
}
public function set lastPosition(_arg1:Point):void{
_lastPosition = _arg1;
}
public function move():void{
var label:String;
var x:String;
var y:String;
if (KeyUtil.isDown(Keyboard.RIGHT) === KeyUtil.isDown(Keyboard.LEFT)){
x = null;
} else {
if (KeyUtil.isDown(Keyboard.RIGHT)){
x = "left";
} else {
if (KeyUtil.isDown(Keyboard.LEFT)){
x = "right";
};
};
};
if (KeyUtil.isDown(Keyboard.SPACE)){
y = "up";
} else {
y = null;
};
label = ArrayUtil.compact(["move", y, x]).join("_");
LabelUtil.play(this, label, function (){
});
}
public function idle():void{
if (((isHittingBottom) || (isHittingLastTarget))){
LabelUtil.play(this, "stand", idle);
} else {
LabelUtil.play(this, "fall", idle);
};
}
public function get lastTarget():MonsterMashTarget{
return (_lastTarget);
}
private function fallComplete():void{
LabelUtil.repeat(this, "fall", fall);
}
public function stand():void{
}
public function set defaultScaleX(_arg1:Number):void{
_defaultScaleX = _arg1;
}
public function get lastPosition():Point{
return (_lastPosition);
}
public function set defaultScaleY(_arg1:Number):void{
_defaultScaleY = _arg1;
}
public function get defaultScaleX():Number{
return (_defaultScaleX);
}
public function get defaultScaleY():Number{
return (_defaultScaleY);
}
public function set friction(_arg1:Number):void{
_friction = _arg1;
}
}
}//package
Section 109
//MonsterMashPowerUp (MonsterMashPowerUp)
package {
import flash.display.*;
import com.zincroe.utils.*;
public class MonsterMashPowerUp extends MovieClip {
public var soundHit:String;
public var velocityX:Number;
public var velocityY:Number;
public var defaultY:Number;
public var defaultX:Number;
public var value:Number;
public var engine:MonsterMashEngine;
public function MonsterMashPowerUp(){
soundHit = "sound.PowerUpHit";
value = 0;
initHitArea();
stop();
}
private function hitComplete():void{
engine.powerUps = ArrayUtil.remove(engine.powerUps, this);
((parent) && (parent.removeChild(this)));
stop();
}
private function moveComplete():void{
LabelUtil.repeat(this, "move", move);
}
private function showComplete():void{
move();
}
private function initHitArea():void{
if (!hitArea){
throw (new Error("hit area cannot be null"));
};
hitArea.visible = false;
}
public function hit():void{
engine.addTime(value);
LabelUtil.play(this, "hit", hitComplete);
if (!engine.sound.isPlaying(soundHit)){
engine.sound.play(soundHit);
};
}
public function update():void{
if (currentLabel.match(/move|show/)){
velocityX = (velocityX - 1);
velocityX = (velocityX % 360);
x = (defaultX + ((Math.sin(MathUtil.degreesToRadians(velocityX)) * hitArea.width) * 2));
velocityY = (velocityY - 1);
velocityY = Math.max(velocityY, -5);
y = (y + velocityY);
};
}
public function move():void{
LabelUtil.play(this, "move", moveComplete);
}
public function show():void{
defaultX = x;
defaultY = y;
velocityX = 0;
velocityY = 0;
LabelUtil.play(this, "show", showComplete);
}
}
}//package
Section 110
//MonsterMashPowerUpFactory (MonsterMashPowerUpFactory)
package {
import flash.utils.*;
import com.zincroe.utils.*;
public class MonsterMashPowerUpFactory {
private var pool:Array;
private var hash:Dictionary;
private var list:Array;
public function MonsterMashPowerUpFactory(){
hash = new Dictionary();
list = new Array();
pool = new Array();
}
public function getPowerUp(_arg1:int, _arg2:int):MonsterMashPowerUp{
var value:MonsterMashPowerUp;
var currentScore = _arg1;
var newScore = _arg2;
ArrayUtil.each(list, function (_arg1:MonsterMashPowerUp){
var _local2:int;
_local2 = int(hash[_arg1]);
if (((((_local2) && ((currentScore < _local2)))) && ((newScore >= _local2)))){
value = pool.shift();
return (false);
};
});
return (value);
}
public function reset():void{
pool = list.concat();
}
public function addPowerUp(_arg1:int, _arg2:MonsterMashPowerUp):void{
hash[_arg2] = _arg1;
list = ArrayUtil.add(list, _arg2);
}
}
}//package
Section 111
//MonsterMashTarget (MonsterMashTarget)
package {
import flash.geom.*;
import flash.display.*;
import com.zincroe.utils.*;
public class MonsterMashTarget extends MovieClip {
private var _points:int;
private var _nextTarget:MonsterMashTarget;
private var _hitSounds:Array;
private var _engine:MonsterMashEngine;
private var _group:MonsterMashGroup;
private var _previousTarget:MonsterMashTarget;
public function MonsterMashTarget(){
hitSounds = ["sound.TargetHit1", "sound.TargetHit2", "sound.TargetHit3"];
stop();
}
public function set group(_arg1:MonsterMashGroup):void{
_group = _arg1;
}
public function get points():int{
return (_points);
}
public function init():void{
if (!LabelUtil.exists(this, "finish")){
throw (new Error("label missing: finish"));
};
if (!LabelUtil.exists(this, "hit")){
throw (new Error("label missing: hit"));
};
if (!LabelUtil.exists(this, "idle")){
throw (new Error("label missing: idle"));
};
if (hitArea){
hitArea.visible = false;
} else {
throw (new Error("bounding box cannot be null"));
};
visible = true;
idle();
}
private function finishComplete():void{
LabelUtil.repeat(this, "finish", finish);
}
private function idleComplete():void{
LabelUtil.repeat(this, "idle", idle);
}
private function hitComplete():void{
finish();
}
public function get strength():Number{
return (((metrics.width * metrics.height) * (group.getTargetIndex(this) * 1.5)));
}
public function get nextTarget():MonsterMashTarget{
return (_nextTarget);
}
public function set hitSounds(_arg1:Array):void{
_hitSounds = _arg1;
}
public function get engine():MonsterMashEngine{
return (_engine);
}
public function get group():MonsterMashGroup{
return (_group);
}
public function set engine(_arg1:MonsterMashEngine):void{
_engine = _arg1;
}
public function get previousTarget():MonsterMashTarget{
return (_previousTarget);
}
private function playRandomHitSound():void{
var _local1:int;
var _local2:String;
var _local3:Array;
_local3 = hitSounds.concat();
while (_local3.length > 0) {
_local1 = Math.floor((Math.random() * _local3.length));
_local2 = _local3[_local1];
if (!engine.sound.isPlaying(_local2)){
engine.sound.play(_local2);
return;
};
_local3.splice(_local1, 1);
};
engine.sound.play(hitSounds[Math.floor((Math.random() * hitSounds.length))]);
}
public function finish():void{
LabelUtil.play(this, "finish", finishComplete);
}
public function get lineSegment():LineSegment{
return (new LineSegment(new Point(metrics.left, metrics.top), new Point(metrics.right, metrics.top)));
}
public function hide():void{
visible = false;
stop();
}
public function get hitSounds():Array{
return (_hitSounds);
}
public function get metrics():Rectangle{
var _local1:Number;
var _local2:Rectangle;
_local1 = rotation;
rotation = 0;
_local2 = hitArea.getBounds(group.parent);
rotation = _local1;
return (_local2);
}
public function update():void{
}
public function hit(_arg1:Boolean=true):void{
var _local2:MonsterMashInfo;
var _local3:Rectangle;
_local2 = engine.createTargetInfo();
_local3 = hitArea.getBounds(group.parent);
_local2.points = points;
_local2.x = ((_local3.x + (_local3.width / 2)) - engine.scrollArea.x);
_local2.y = ((_local3.y + _local3.height) - engine.scrollArea.y);
engine.addPoints(_local2.points, this);
engine.addInfo(_local2);
LabelUtil.play(this, "hit", hitComplete);
if (_arg1){
playRandomHitSound();
};
}
public function set points(_arg1:int):void{
_points = _arg1;
}
public function set nextTarget(_arg1:MonsterMashTarget):void{
_nextTarget = _arg1;
}
public function set previousTarget(_arg1:MonsterMashTarget):void{
_previousTarget = _arg1;
}
public function idle():void{
LabelUtil.play(this, "idle", idleComplete);
}
}
}//package
Section 112
//MonsterMashTargetInfo1 (MonsterMashTargetInfo1)
package {
public dynamic class MonsterMashTargetInfo1 extends MonsterMashInfo {
}
}//package
Section 113
//MonsterMashTargetInfo2 (MonsterMashTargetInfo2)
package {
public dynamic class MonsterMashTargetInfo2 extends MonsterMashInfo {
}
}//package
Section 114
//MonsterMashTargetInfo3 (MonsterMashTargetInfo3)
package {
public dynamic class MonsterMashTargetInfo3 extends MonsterMashInfo {
}
}//package
Section 115
//MonsterMashTargetInfo4 (MonsterMashTargetInfo4)
package {
public dynamic class MonsterMashTargetInfo4 extends MonsterMashInfo {
}
}//package
Section 116
//MonsterMashTargetInfo5 (MonsterMashTargetInfo5)
package {
public dynamic class MonsterMashTargetInfo5 extends MonsterMashInfo {
}
}//package
Section 117
//MonsterMashTargetInfo6 (MonsterMashTargetInfo6)
package {
public dynamic class MonsterMashTargetInfo6 extends MonsterMashInfo {
}
}//package
Section 118
//MonsterMashTitleScreen (MonsterMashTitleScreen)
package {
import flash.display.*;
import com.zincroe.games.screens.*;
public class MonsterMashTitleScreen extends TitleScreen {
public function MonsterMashTitleScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
override public function start():void{
super.start();
music.play("music.ScreenLoop");
}
override public function pause():void{
super.pause();
}
}
}//package
Section 119
//MonsterMashWinScreen (MonsterMashWinScreen)
package {
import flash.display.*;
import com.teletoon.games.screens.*;
public class MonsterMashWinScreen extends TeletoonWinScreen {
public var animationContainer:MovieClip;
public function MonsterMashWinScreen(_arg1:MovieClip=null, _arg2:String=null){
super(_arg1, _arg2);
}
override public function start():void{
super.start();
if (animationContainer){
animationContainer.gotoAndPlay(1);
};
MusicUtil.playScreenLoop(music);
}
}
}//package
Section 120
//MusicUtil (MusicUtil)
package {
import com.zincroe.media.*;
public class MusicUtil {
public static const STING:String = "music.Sting";
public static const SCREEN_LOOP:String = "music.ScreenLoop";
public static const GAME_LOOP:String = "music.GameLoop";
public static function playScreenLoop(_arg1:SimpleSoundManager):void{
stopGameLoop(_arg1);
if (((_arg1) && (!(_arg1.isPlaying(SCREEN_LOOP))))){
_arg1.play(SCREEN_LOOP);
};
}
public static function stopScreenLoop(_arg1:SimpleSoundManager):void{
if (_arg1){
_arg1.fadeOutAndStop(1, SCREEN_LOOP);
};
}
public static function playGameLoop(_arg1:SimpleSoundManager):void{
stopScreenLoop(_arg1);
if (((_arg1) && (!(_arg1.isPlaying(GAME_LOOP))))){
_arg1.play(GAME_LOOP);
};
}
public static function playSting(_arg1:SimpleSoundManager):void{
stopScreenLoop(_arg1);
stopGameLoop(_arg1);
if (((_arg1) && (!(_arg1.isPlaying(STING))))){
_arg1.play(STING);
};
}
public static function stopGameLoop(_arg1:SimpleSoundManager):void{
if (_arg1){
_arg1.stop(GAME_LOOP);
};
}
}
}//package
Section 121
//Sounds (Sounds)
package {
import flash.display.*;
public dynamic class Sounds extends MovieClip {
public function Sounds(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package