Section 1
//AutoLoopingFlare25Fps (anim.AutoLoopingFlare25Fps)
package anim {
public class AutoLoopingFlare25Fps extends BaseFlare {
public function AutoLoopingFlare25Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 2
//AutoLoopingRndStart25Fps (anim.AutoLoopingRndStart25Fps)
package anim {
public class AutoLoopingRndStart25Fps extends BaseFlare {
public function AutoLoopingRndStart25Fps(){
m_isPaused = false;
m_isLoop = true;
m_frameOffset = Math.floor(((Math.random() * totalFrames) - 1));
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 3
//AutoSingleFlare25Fps (anim.AutoSingleFlare25Fps)
package anim {
import flash.display.*;
import flash.text.*;
public class AutoSingleFlare25Fps extends BaseFlare {
public var mcInstr2:MovieClip;
public var tfStatIntroInstr:TextField;
public var mcInstr1:MovieClip;
public var mcInstr3:MovieClip;
public var mcInstr4:MovieClip;
public var mcInstr5:MovieClip;
public function AutoSingleFlare25Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 4
//BaseFlare (anim.BaseFlare)
package anim {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class BaseFlare extends MovieClip {
protected var m_isLoop:Boolean;
protected var m_isPaused:Boolean;
protected var m_frameOffset:int;
private var m_restartAt:int;
private var m_firstRender:Boolean;
private var m_step:Number;
private var m_lastFrame:uint;
protected var m_frameRate:int;
protected var m_isRemoveAfterPlay:Boolean;
private var m_startTime:int;
public function BaseFlare(){
super.stop();
m_lastFrame = 0;
m_restartAt = 0;
m_frameOffset = 0;
m_isPaused = false;
m_isRemoveAfterPlay = true;
m_firstRender = true;
m_isLoop = true;
if (!m_isPaused){
start();
};
setFrameRate(30);
}
override public function stop():void{
m_firstRender = true;
removeEventListener(Event.ENTER_FRAME, enterFrame);
if (m_isRemoveAfterPlay){
parent.removeChild(this);
};
}
public function setDestroyAfterPlay(_arg1:Boolean):void{
m_isRemoveAfterPlay = _arg1;
}
public function start():void{
visible = true;
m_lastFrame = 0;
m_firstRender = true;
addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function setLoopRestartFrame(_arg1:int):void{
m_restartAt = _arg1;
}
public function setLoop(_arg1:Boolean):void{
m_isLoop = _arg1;
}
public function setFrameRate(_arg1:int):void{
m_frameRate = _arg1;
m_step = ((1 / m_frameRate) * 1000);
}
public function enterFrame(_arg1:Event):void{
var _local2:int = getTimer();
if (m_firstRender){
visible = true;
m_startTime = _local2;
m_firstRender = false;
};
var _local3:uint = (m_frameOffset + int(Math.round((((_local2 - m_startTime) / m_step) + 1))));
if (_local3 > totalFrames){
if (m_isLoop){
m_firstRender = true;
m_frameOffset = m_restartAt;
_local3 = totalFrames;
} else {
stop();
return;
};
};
if (_local3 != m_lastFrame){
gotoAndStop(_local3);
m_lastFrame = _local3;
};
}
}
}//package anim
Section 5
//EaseBackInterpolator (anim.EaseBackInterpolator)
package anim {
public class EaseBackInterpolator extends Interpolator {
public function EaseBackInterpolator(_arg1:Number, _arg2:Number, _arg3:int){
super(_arg1, _arg2, _arg3);
}
private function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
private function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
override public function nextPosition():void{
m_value = easeOut(m_dt, m_startValue, (m_targetValue - m_startValue), m_duration);
}
private function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
private function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
}
}//package anim
Section 6
//EaseOutInterpolator (anim.EaseOutInterpolator)
package anim {
public class EaseOutInterpolator extends Interpolator {
public function EaseOutInterpolator(_arg1:Number, _arg2:Number, _arg3:int){
super(_arg1, _arg2, _arg3);
}
private function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
override public function nextPosition():void{
m_value = easeOut(m_dt, m_startValue, (m_targetValue - m_startValue), m_duration);
}
}
}//package anim
Section 7
//Interpolator (anim.Interpolator)
package anim {
public class Interpolator {
protected var m_startValue:Number;
protected var m_finished:Boolean;
protected var m_duration:int;
protected var m_dt:int;
protected var m_dv:Number;
protected var m_targetValue:Number;
protected var m_value:Number;
public function Interpolator(_arg1:Number, _arg2:Number, _arg3:int){
m_startValue = _arg1;
m_targetValue = _arg2;
m_duration = _arg3;
m_dt = 0;
m_value = _arg1;
m_finished = false;
m_dv = (m_targetValue - m_startValue);
}
public function nextPosition():void{
m_value = (((m_dv * m_dt) / m_duration) + m_startValue);
}
public function getValue():Number{
return (m_value);
}
public function update():Boolean{
if (!m_finished){
m_dt++;
nextPosition();
if (m_dt == m_duration){
m_value = m_targetValue;
m_finished = true;
};
};
return (m_finished);
}
public function getTargetValue():Number{
return (m_targetValue);
}
public function getElapsedPercent():Number{
if (m_duration == 0){
return (1);
};
return ((Math.max(0, (m_duration - m_dt)) / m_duration));
}
public function isDone():Boolean{
return (m_finished);
}
}
}//package anim
Section 8
//ManagedSound (com.midasplayer.sound.ManagedSound)
package com.midasplayer.sound {
import flash.media.*;
public class ManagedSound {
public var activeSounds:Array;
private var manager:SoundManager;
private var ClassReference:Class;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
public function stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function loop(_arg1:Number=1, _arg2:Number=0, _arg3:Number=999999999):ManagedSoundChannel{
var _local4:SoundChannel = new ClassReference().play(0, _arg3, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local4));
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_arg1, _arg2);
_local3++;
};
}
public function isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].panTo(_arg1, _arg2);
_local3++;
};
}
public function setPan(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setPan(_arg1);
_local2++;
};
}
public function setVolume(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setVolume(_arg1);
_local2++;
};
}
}
}//package com.midasplayer.sound
Section 9
//ManagedSoundChannel (com.midasplayer.sound.ManagedSoundChannel)
package com.midasplayer.sound {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ManagedSoundChannel {
private var fadeStartVolume:Number;// = -1
private var channel:SoundChannel;
private var fadeEndVolume:Number;// = -1
private var targetVolume:Number;
private var targetPan:Number;
private var sound:ManagedSound;
private var stopAfterFade:Boolean;// = false
private var panEndTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var manager:SoundManager;
private var playing:Boolean;// = true
private var panStartTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var panEndVolume:Number;// = -1
private var panStartVolume:Number;// = -1
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
this.manager = _arg1;
this.sound = _arg2;
this.channel = _arg3;
_arg2.activeSounds.push(this);
if (_arg3 == null){
soundComplete(null);
return;
};
_arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete);
targetVolume = _arg3.soundTransform.volume;
targetPan = _arg3.soundTransform.pan;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
public function update():void{
var _local1:Number;
if (!playing){
return;
};
if (fadeStartTime >= 0){
_local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1));
targetVolume = (targetVolume * targetVolume);
if (_local1 == 1){
fadeStartTime = -1;
};
if ((((_local1 == 1)) && (stopAfterFade))){
stop();
};
};
if (panStartTime >= 0){
_local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1));
if (_local1 == 1){
panStartTime = -1;
};
};
var _local2:Number = (targetVolume * manager.volume);
var _local3:Number = targetPan;
if (channel == null){
return;
};
if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){
channel.soundTransform = new SoundTransform(_local2, _local3);
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeStartVolume = Math.sqrt(targetVolume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
stopAfterFade = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function isPlaying():Boolean{
return (playing);
}
}
}//package com.midasplayer.sound
Section 10
//SoundManager (com.midasplayer.sound.SoundManager)
package com.midasplayer.sound {
import flash.utils.*;
public class SoundManager {
private var fadeStartVolume:Number;// = -1
private var lastTime:Number;// = -1
private var managedSounds:Array;
private var fadeEndTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var fadeEndVolume:Number;// = -1
public var volume:Number;// = 1
private var managedSoundMap:Object;
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function update():void{
var _local3:Number;
var _local1:Number = getTimer();
if (lastTime < 0){
lastTime = _local1;
};
if (fadeStartTime >= 0){
_local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3));
volume = (volume * volume);
if (_local3 == 1){
fadeStartTime = -1;
};
};
var _local2:int;
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function getFromClass(_arg1:Class):ManagedSound{
var _local2:String = getQualifiedClassName(_arg1);
if (managedSoundMap[_local2] == null){
managedSoundMap[_local2] = new ManagedSound(this, _arg1);
managedSounds.push(managedSoundMap[_local2]);
};
return (managedSoundMap[_local2]);
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(("sound." + _arg1)) as Class);
if (_local2 == null){
throw (new Error(("Failed to find sound " + _arg1)));
};
managedSoundMap[_arg1] = new ManagedSound(this, _local2);
managedSounds.push(managedSoundMap[_arg1]);
};
return (managedSoundMap[_arg1]);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
fadeStartVolume = Math.sqrt(volume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
}
public function setVolume(_arg1:Number):void{
this.volume = _arg1;
fadeStartTime = -1;
}
}
}//package com.midasplayer.sound
Section 11
//GameData (comm.GameData)
package comm {
public class GameData {
public var port:int;
public var presets:Object;
public var lv:Array;
public var gameType:String;
public var textMappings:Object;
public var hostName:String;
public var randomSeed:int;
public var isShortMode:Boolean;
}
}//package comm
Section 12
//GameDataParser (comm.GameDataParser)
package comm {
import utils.*;
import flash.xml.*;
public class GameDataParser {
public static var textMappings:Object;
public static function parseGameData(_arg1:XML):GameData{
var _local9:Object;
var _local2:GameData = new GameData();
var _local3:XMLDocument = new XMLDocument(_arg1);
textMappings = new Object();
_local2.textMappings = textMappings;
var _local4:Array = _local3.firstChild.childNodes;
var _local5:int = parseInt(_local3.firstChild.attributes.randomseed);
_local2.randomSeed = _local5;
_local2.isShortMode = (_local3.firstChild.attributes.short == "true");
Debug.print(("short:\t\t " + _local3.firstChild.attributes.short), "ffffaa");
var _local6:Array = new Array();
var _local7:Object = new Object();
var _local8:int;
while (_local8 < _local4.length) {
if (_local4[_local8].nodeName == "level"){
_local9 = new Object();
_local9.id = parseInt(_local4[_local8].attributes.id);
_local9.numorgs = parseInt(_local4[_local8].attributes.numorgs);
_local9.rows = parseInt(_local4[_local8].attributes.rows);
_local9.cols = parseInt(_local4[_local8].attributes.cols);
_local6.push(_local9);
};
if (_local4[_local8].nodeName == "record"){
_local7.highcombo = parseInt(_local4[_local8].attributes.prev_high_combo);
_local7.longchain = parseInt(_local4[_local8].attributes.prev_long_chain);
_local7.highbonus = parseInt(_local4[_local8].attributes.prev_high_bonus);
_local7.collected = parseInt(_local4[_local8].attributes.prev_collected_ff);
_local7.totalff = parseInt(_local4[_local8].attributes.prev_tot_ff);
_local7.soundon = _local4[_local8].attributes.prev_sound_on.toString();
_local7.musicon = _local4[_local8].attributes.prev_music_on.toString();
};
if (_local4[_local8].nodeName == "text"){
if ((((_local4[_local8].firstChild == null)) || ((_local4[_local8].firstChild == undefined)))){
textMappings[_local4[_local8].attributes.id] = (("[xx" + _local4[_local8].attributes.id) + "xx]");
} else {
textMappings[_local4[_local8].attributes.id] = new String(_local4[_local8].firstChild.nodeValue);
};
TextMappings.set(_local4[_local8].attributes.id, textMappings[_local4[_local8].attributes.id]);
};
_local8++;
};
_local2.lv = _local6;
_local2.presets = _local7;
return (_local2);
}
}
}//package comm
Section 13
//TextMappings (comm.TextMappings)
package comm {
public class TextMappings {
public static var mappings:Object = new Object();
public static function set(_arg1:String, _arg2:String):void{
mappings[_arg1] = _arg2;
}
public static function get(_arg1:String):String{
if (mappings[_arg1] == null){
return ((("[" + _arg1) + "]"));
};
return (mappings[_arg1]);
}
}
}//package comm
Section 14
//btnEndGame_6 (firefly_fla.btnEndGame_6)
package firefly_fla {
import flash.display.*;
public dynamic class btnEndGame_6 extends MovieClip {
public function btnEndGame_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package firefly_fla
Section 15
//btnMusic_59 (firefly_fla.btnMusic_59)
package firefly_fla {
import flash.display.*;
public dynamic class btnMusic_59 extends MovieClip {
public function btnMusic_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package firefly_fla
Section 16
//btnSfx_58 (firefly_fla.btnSfx_58)
package firefly_fla {
import flash.display.*;
public dynamic class btnSfx_58 extends MovieClip {
public function btnSfx_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package firefly_fla
Section 17
//Elastic (gs.easing.Elastic)
package gs.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package gs.easing
Section 18
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 19
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
}
}//package gs.plugins
Section 20
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package gs.plugins
Section 21
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 22
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _target:DisplayObject;
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
public static const VERSION:Number = 1.1;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
}
}//package gs.plugins
Section 23
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var propName:String;
public var onComplete:Function;
public var round:Boolean;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 24
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 25
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package gs.plugins
Section 26
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 27
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 28
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import gs.utils.tween.*;
import gs.plugins.*;
import flash.utils.*;
public class TweenLite {
public var started:Boolean;
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var tweens:Array;
public var vars:Object;
public var ease:Function;
public var exposedVars:Object;
public var initTime:Number;
public var combinedTimeScale:Number;
public static const version:Number = 10.092;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 29
//deselect (sound.deselect)
package sound {
import flash.media.*;
public dynamic class deselect extends Sound {
}
}//package sound
Section 30
//dunder1 (sound.dunder1)
package sound {
import flash.media.*;
public dynamic class dunder1 extends Sound {
}
}//package sound
Section 31
//ffActive (sound.ffActive)
package sound {
import flash.media.*;
public dynamic class ffActive extends Sound {
}
}//package sound
Section 32
//loopGame (sound.loopGame)
package sound {
import flash.media.*;
public dynamic class loopGame extends Sound {
}
}//package sound
Section 33
//loopIntro (sound.loopIntro)
package sound {
import flash.media.*;
public dynamic class loopIntro extends Sound {
}
}//package sound
Section 34
//pop_lit (sound.pop_lit)
package sound {
import flash.media.*;
public dynamic class pop_lit extends Sound {
}
}//package sound
Section 35
//pop_unlit (sound.pop_unlit)
package sound {
import flash.media.*;
public dynamic class pop_unlit extends Sound {
}
}//package sound
Section 36
//scoreAnim (sound.scoreAnim)
package sound {
import flash.media.*;
public dynamic class scoreAnim extends Sound {
}
}//package sound
Section 37
//select (sound.select)
package sound {
import flash.media.*;
public dynamic class select extends Sound {
}
}//package sound
Section 38
//select0 (sound.select0)
package sound {
import flash.media.*;
public dynamic class select0 extends Sound {
}
}//package sound
Section 39
//select1 (sound.select1)
package sound {
import flash.media.*;
public dynamic class select1 extends Sound {
}
}//package sound
Section 40
//select2 (sound.select2)
package sound {
import flash.media.*;
public dynamic class select2 extends Sound {
}
}//package sound
Section 41
//sfx0 (sound.sfx0)
package sound {
import flash.media.*;
public dynamic class sfx0 extends Sound {
}
}//package sound
Section 42
//sfx1 (sound.sfx1)
package sound {
import flash.media.*;
public dynamic class sfx1 extends Sound {
}
}//package sound
Section 43
//sfx2 (sound.sfx2)
package sound {
import flash.media.*;
public dynamic class sfx2 extends Sound {
}
}//package sound
Section 44
//sfx3 (sound.sfx3)
package sound {
import flash.media.*;
public dynamic class sfx3 extends Sound {
}
}//package sound
Section 45
//sfx4 (sound.sfx4)
package sound {
import flash.media.*;
public dynamic class sfx4 extends Sound {
}
}//package sound
Section 46
//sfx5 (sound.sfx5)
package sound {
import flash.media.*;
public dynamic class sfx5 extends Sound {
}
}//package sound
Section 47
//sfx6 (sound.sfx6)
package sound {
import flash.media.*;
public dynamic class sfx6 extends Sound {
}
}//package sound
Section 48
//sfx7 (sound.sfx7)
package sound {
import flash.media.*;
public dynamic class sfx7 extends Sound {
}
}//package sound
Section 49
//sfx8 (sound.sfx8)
package sound {
import flash.media.*;
public dynamic class sfx8 extends Sound {
}
}//package sound
Section 50
//stageClear (sound.stageClear)
package sound {
import flash.media.*;
public dynamic class stageClear extends Sound {
}
}//package sound
Section 51
//timeOut (sound.timeOut)
package sound {
import flash.media.*;
public dynamic class timeOut extends Sound {
}
}//package sound
Section 52
//timeWarning (sound.timeWarning)
package sound {
import flash.media.*;
public dynamic class timeWarning extends Sound {
}
}//package sound
Section 53
//DataLoader (utils.DataLoader)
package utils {
import flash.events.*;
import flash.net.*;
public class DataLoader {
private var _path:String;
private var _sendToFunc:Function;
private var _isXML:Boolean;
private static var _serverName:String;
public function DataLoader(_arg1:String, _arg2:Function, _arg3:Object, _arg4:String, _arg5:String, _arg6:Boolean){
var debugSend:String;
var urlVars:URLVariables;
var a:*;
var path = _arg1;
var sendTo = _arg2;
var args = _arg3;
var method = _arg4;
var protocol = _arg5;
var isXML = _arg6;
super();
trace(("DataLoader() load started : " + path));
_sendToFunc = sendTo;
_isXML = isXML;
if (protocol == "HTTPS"){
_path = (Config.SECURE_ROOT_LOAD_PATH + path);
} else {
_path = (Config.ROOT_LOAD_PATH + path);
};
Debug.print(("DataLoader() starting load of : " + _path));
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
var request:URLRequest = new URLRequest(_path);
if (args != null){
debugSend = "";
urlVars = new URLVariables();
for (a in args) {
urlVars[a] = args[a];
debugSend = (debugSend + (((a + "=") + args[a]) + "|"));
};
request.data = urlVars;
if (method == "GET"){
request.method = URLRequestMethod.GET;
} else {
if (method == "POST"){
request.method = URLRequestMethod.POST;
};
};
Debug.print((((("DataLoader() - " + "data sent to: ") + _path) + " | data: ") + debugSend), "FFFF33");
};
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load requested document.");
Debug.print((("DataLoader() - " + "Unable to load requested document. ") + _path), "FF3333");
};
}
private function securityErrorHandler(_arg1:SecurityErrorEvent):void{
removeListeners(_arg1);
trace(("securityErrorHandler: " + _arg1.text));
Debug.print(((("DataLoader.securityErrorHandler() path: " + _path) + " : ") + _arg1.text), "FF3333");
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
removeListeners(_arg1);
trace(("ioErrorHandler: " + _arg1));
Debug.print(((("DataLoader.ioErrorHandler() path: " + _path) + " : ") + _arg1.text), "FF3333");
}
private function httpStatusHandler(_arg1:HTTPStatusEvent):void{
trace(("httpStatusHandler: " + _arg1));
}
private function completeHandler(_arg1:Event):void{
var xml:XML;
var event = _arg1;
Debug.print((("DataLoader - " + _path) + " file loaded ok "), "33FF33");
if (_isXML){
try {
xml = XML(event.target.data);
} catch(error:Error) {
trace("Unable to parse xml");
Debug.print(("DataLoader() - " + "Unable to parse xml! "), "FF2222");
_sendToFunc(null);
return;
};
_sendToFunc(xml);
} else {
_sendToFunc(String(event.target.data));
};
removeListeners(event);
}
private function removeListeners(_arg1:Event):void{
_arg1.currentTarget.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_arg1.currentTarget.removeEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
_arg1.currentTarget.removeEventListener(Event.COMPLETE, completeHandler);
_arg1.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_arg1.currentTarget.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
}
private function progressHandler(_arg1:ProgressEvent):void{
trace(((("progressHandler loaded:" + _arg1.bytesLoaded) + " total: ") + _arg1.bytesTotal));
}
public static function loadData(_arg1:String, _arg2:Function, _arg3:Object=null, _arg4:String="GET", _arg5:String="HTTP", _arg6:Boolean=true):void{
var _local7:DataLoader = new DataLoader(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
trace(_local7);
}
}
}//package utils
Section 54
//Debug (utils.Debug)
package utils {
import flash.system.*;
import flash.external.*;
public class Debug {
public static var enabled:Boolean = false;
public static var debugWindow:DebugWindow;
public static var useExternal:Boolean = false;
public static function printMem():void{
print((("MEM: " + (System.totalMemory / 1000000).toFixed(2)) + "mb"));
}
public static function printCapabilities():void{
print(("Capabilities.serverString: " + Capabilities.serverString), "AAAAFF");
}
public static function print(_arg1:String, _arg2:String=null):void{
if (!enabled){
return;
};
if (useExternal){
if (_arg2 == null){
ExternalInterface.call("jsPrintDebug", _arg1);
} else {
ExternalInterface.call("jsPrintDebug", _arg1, _arg2);
};
};
if (debugWindow != null){
debugWindow.print(_arg1, _arg2);
};
}
}
}//package utils
Section 55
//DebugWindow (utils.DebugWindow)
package utils {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.system.*;
public class DebugWindow extends Sprite {
private var _tf:TextField;
private var _text:Array;
public function DebugWindow(){
_text = [];
super();
var _local1:TextFormat = new TextFormat();
_local1.size = 9;
_local1.font = "Verdana";
_tf = new TextField();
_tf.wordWrap = true;
_tf.multiline = true;
_tf.x = 5;
_tf.y = 15;
_tf.width = (325 + 150);
_tf.height = 460;
_tf.defaultTextFormat = _local1;
_tf.textColor = 0xAAAAAA;
addChild(_tf);
graphics.lineStyle(1, 0, 1);
graphics.beginFill(0, 0.6);
graphics.drawRect(0, 0, 330, 460);
var _local2:Sprite = new Sprite();
_local2.graphics.lineStyle(1, 0, 1);
_local2.graphics.beginFill(0xCCCCCC, 0.75);
_local2.graphics.drawRect(0, 0, 330, 10);
_local2.buttonMode = true;
addChild(_local2);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, onClicked, false, 0, true);
_local2.addEventListener(MouseEvent.MOUSE_UP, onReleased, false, 0, true);
var _local3:Sprite = new Sprite();
_local3.x = 310;
_local3.y = 0;
_local3.graphics.lineStyle(1, 0, 1);
_local3.graphics.beginFill(0xFFFFFF);
_local3.graphics.drawRect(0, 0, 20, 10);
_local3.buttonMode = true;
_local3.addEventListener(MouseEvent.MOUSE_DOWN, copyText, false, 0, true);
addChild(_local3);
}
private function copyText(_arg1:MouseEvent):void{
var _local2 = "";
var _local3:int;
while (_local3 < _text.length) {
_local2 = (_local2 + (_text[_local3] + "\n"));
_local3++;
};
System.setClipboard(_local2);
print("DebugWindow.copyText() content copied to clipboard", null);
}
private function onReleased(_arg1:MouseEvent):void{
stopDrag();
}
public function print(_arg1:String, _arg2:String):void{
var _local5:String;
if (_arg2 != null){
if (_arg2.toLowerCase() == "ff3333"){
_arg1.split("<").join("{");
};
};
_arg1.split(">").join("}");
var _local3:Date = new Date();
var _local4:String = ((((_local3.getHours() + ":") + Formatter.addZero(_local3.getMinutes())) + ":") + Formatter.addZero(_local3.getSeconds()));
if (_arg2 != null){
_local5 = (((((("<b>" + _local4) + " - </b><font color=\"#") + _arg2) + "\">") + _arg1) + "</font>");
} else {
_local5 = ((("<b>" + _local4) + " - </b>") + _arg1);
};
_text.push(_local5);
if (_tf.numLines > 32){
_text.shift();
};
var _local6 = "";
var _local7:int;
while (_local7 < _text.length) {
_local6 = (_local6 + (_text[_local7] + "\n"));
_local7++;
};
_tf.htmlText = _local6;
}
private function onClicked(_arg1:MouseEvent):void{
startDrag();
}
}
}//package utils
Section 56
//Formatter (utils.Formatter)
package utils {
import flash.text.*;
public class Formatter {
public static var HOURS_PER_DAY:int = 8;
public static function formatDateNoTime(_arg1:Date):String{
return (((((_arg1.getFullYear() + "-") + addZero((_arg1.getMonth() + 1))) + "-") + addZero(_arg1.getDate())));
}
public static function formatTime(_arg1:Number):String{
return ("");
}
public static function shortenTextByLetters(_arg1:String, _arg2:int):String{
return ("");
}
public static function formatDate(_arg1:Date):String{
return (((((((((_arg1.getFullYear() + "-") + addZero((_arg1.getMonth() + 1))) + "-") + addZero(_arg1.getDate())) + " ") + addZero(_arg1.getHours())) + ":") + addZero(_arg1.getMinutes())));
}
public static function shortenTextByPixels(_arg1:TextField, _arg2:int):String{
return ("");
}
public static function addZero(_arg1:Number):String{
return (((_arg1 < 10)) ? ("0" + _arg1) : ("" + _arg1));
}
public static function formatDuration(_arg1:int):String{
var _local2:int = (_arg1 / HOURS_PER_DAY);
var _local3:int = (_arg1 - (_local2 * HOURS_PER_DAY));
return ((((_local2 + "d ") + _local3) + "h"));
}
}
}//package utils
Section 57
//Integer64 (utils.Integer64)
package utils {
import utils.*;
class Integer64 {
private var p:Array;
private var r:Array;
private var s:Array;
function Integer64(_arg1){
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (_arg1){
merge(_arg1);
};
}
public function binaryShiftRight(_arg1:Number):void{
var _local5:*;
var _local6:*;
var _local2:* = ((_arg1 / 15) >> 0);
var _local3:* = (_arg1 - (_local2 * 15));
var _local4:* = (p.length - 1);
while (_local4 > 0) {
_local5 = 0;
while (_local5 < _local2) {
p[_local5] = p[(_local5 + 1)];
_local5++;
};
var _temp1 = _local4;
_local4 = (_local4 - 1);
var _local7 = _temp1;
p[_local7] = 0;
};
if (_local3 > 0){
_local6 = 0;
while (_local6 < _local3) {
shr();
_local6++;
};
};
}
public function mul32(_arg1:Number):void{
mul64(new Integer64(_arg1));
}
public function add32(_arg1:Number):void{
var _local2:* = 0;
var _local3:* = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
var _local4:* = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
var _local5:* = (_arg1 & 3);
_local2 = (_local2 + (p[0] + _local3));
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[1] + _local4));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[2] + _local5));
p[2] = (_local2 & 32767);
}
public function binaryShiftLeft(_arg1:Number):void{
var _local2:* = 0;
while (_local2 < _arg1) {
shl();
_local2++;
};
}
public function mul64(_arg1:Integer64):void{
var _local4:*;
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < 5) {
_local4 = _arg1.p[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[3]));
r[_local3][3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[4]));
r[_local3][4] = (_local2 & 32767);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]));
p[3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]));
p[4] = (_local2 & 7);
}
private function shr():void{
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = (p.length - 1);
while (_local3 >= 0) {
_local1 = ((p[_local3] & 1) << 14);
p[_local3] = (p[_local3] >> 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3--;
_local2 = _local1;
};
}
public function init32(_arg1:Number):void{
p[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[2] = (_arg1 & 3);
p[3] = 0;
p[4] = 0;
}
public function init(_arg1:Integer64):void{
var _local2:* = 0;
while (_local2 < p.length) {
p[_local2] = _arg1.p[_local2];
_local2++;
};
}
private function merge(_arg1:Number):Number{
var _local2:* = 0;
while (_local2 < 3) {
p[_local2] = (p[_local2] + (_arg1 & 32767));
_arg1 = (_arg1 >>> 15);
_local2++;
};
return (_arg1);
}
public function binaryNot(_arg1:Integer64):void{
p[0] = (p[0] ^ _arg1.p[0]);
p[1] = (p[1] ^ _arg1.p[1]);
p[2] = (p[2] ^ _arg1.p[2]);
p[3] = (p[3] ^ _arg1.p[3]);
p[4] = (p[4] ^ _arg1.p[4]);
}
public function get lsb():Number{
return (((p[0] | (p[1] << 15)) | ((p[2] & 3) << 30)));
}
public function get msb():Number{
return (((((p[2] >> 2) | ((p[3] << 15) >> 2)) | ((p[4] << (15 * 2)) >> 2)) & 2147483647));
}
public function mulu32(_arg1:Number):void{
var _local4:*;
var _local2:* = 0;
s[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[2] = (_arg1 & 3);
var _local3:* = 0;
while (_local3 < 3) {
_local4 = s[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 3);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 3);
p[3] = 0;
p[4] = 0;
}
private function shl():void{
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = p.length;
while (_local3 < _local4) {
_local1 = ((p[_local3] & 0x4000) >> 14);
p[_local3] = (p[_local3] << 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3++;
_local2 = _local1;
};
}
public function add64(_arg1:Integer64):void{
var _local2:* = 0;
var _local3:* = 1;
var _local4:* = 0;
while ((((_local3 < p.length)) && (!((_arg1.p[_local4] == 0))))) {
_local3++;
};
_local4 = 0;
while (_local4 < _local3) {
_local2 = (_local2 + (p[_local4] + _arg1.p[_local4]));
p[_local4] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local4++;
};
}
}
}//package utils
Section 58
//MouseInput (utils.MouseInput)
package utils {
public class MouseInput {
public var yMouse:int;
public var xMouse:int;
public var mouseIsPressed:Boolean;
public function MouseInput(){
trace("Welcome Input()");
}
public function mouseReleased(){
mouseIsPressed = false;
}
public function printInput(){
}
public function reset(){
mouseIsPressed = false;
}
public function init(){
reset();
}
public function setMousePos(_arg1:Number, _arg2:Number){
xMouse = _arg1;
yMouse = _arg2;
}
public function mousePressed(){
mouseIsPressed = true;
}
}
}//package utils
Section 59
//Random (utils.Random)
package utils {
import flash.utils.*;
public class Random {
private var mta:Array;
private var mti:Number;
private var lastSeed:Number;
private static var MATRIX_A:Number = 2567483615;
public static var nr:int = 0;
private static var UPPER_MASK:Number = 2147483648;
private static var LOWER_MASK:Number = 2147483647;
private static var M:Number = 397;
private static var N:Number = 624;
private static var mag01:Array = [0, 2567483615];
public function Random(_arg1:Number){
mta = new Array(N);
mti = (N + 1);
if (_arg1){
init_genrand(_arg1);
};
}
private function init_genrand(_arg1:Number):void{
_arg1 = int(_arg1);
var _local2:* = getTimer();
lastSeed = _arg1;
mta[0] = _arg1;
var _local3:* = _arg1;
var _local4:* = new Integer64(null);
var _local5:Number = N;
mti = 1;
while (mti < _local5) {
_local4.init32(((_local3 >>> 30) ^ _local3));
_local4.mulu32(1812433253);
_local3 = (mta[mti] = int((_local4.lsb + mti)));
mti++;
};
var _local6:* = getTimer();
}
public function nextFloat(){
return ((next(24) / (1 << 24)));
}
public function nextDouble(){
return ((next(24) / (1 << 24)));
}
public function get seed():Number{
return (lastSeed);
}
public function next(_arg1:Number){
if (_arg1 < 32){
return ((genrand_int32() & ((1 << _arg1) - 1)));
};
return (genrand_int32());
}
public function set seed(_arg1:Number){
init_genrand(_arg1);
}
public function nextInt(_arg1:Number){
nr++;
return (((genrand_int32() & 2147483647) % _arg1));
}
private function genrand_int32(){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:Number = N;
var _local2:Number = 0;
if (mti >= _local1){
if (mti == (_local1 + 1)){
init_genrand(5489);
};
_local3 = M;
_local4 = UPPER_MASK;
_local5 = LOWER_MASK;
_local6 = mag01;
_local7 = getTimer();
_local8 = 0;
_local9 = (_local1 - _local3);
_local10 = (_local3 - _local1);
_local8 = 0;
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local3)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local9 = (_local1 - 1);
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local10)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local2 = ((mta[(_local1 - 1)] & _local4) | (mta[0] & _local5));
mta[(_local1 - 1)] = ((mta[(_local3 - 1)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
mti = 0;
_local11 = getTimer();
};
_local2 = mta[mti++];
_local2 = (_local2 ^ (_local2 >>> 11));
_local2 = (_local2 ^ ((_local2 << 7) & 2636928640));
_local2 = (_local2 ^ ((_local2 << 15) & 4022730752));
_local2 = (_local2 ^ (_local2 >>> 18));
return (_local2);
}
}
}//package utils
Section 60
//Timer (utils.Timer)
package utils {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = -1
public var passedTime:Number;// = 0
private var msPerTick:Number;
private var ticksPerSecond:Number;
public var timeScale:Number;// = 1
public var alpha:Number;// = 0
public static var currentTime:Number = 0;
public function Timer(_arg1){
this.ticksPerSecond = _arg1;
msPerTick = (1000 / _arg1);
}
public function advanceTime(){
if (lastTime == -1){
lastTime = getTimer();
};
var _local1:* = getTimer();
passedTime = (_local1 - lastTime);
passedTime = (passedTime * timeScale);
currentTime = (currentTime + passedTime);
lastTime = _local1;
unprocessedTime = (unprocessedTime + passedTime);
var _local2:int = int((unprocessedTime / msPerTick));
unprocessedTime = (unprocessedTime - (_local2 * msPerTick));
alpha = (unprocessedTime / msPerTick);
return (_local2);
}
}
}//package utils
Section 61
//Config (Config)
package {
import utils.*;
import flash.system.*;
public class Config {
public static const ROOT_LOAD_PATH:String = "";
public static const SECURE_ROOT_LOAD_PATH:String = "";
public static function checkEnviroment():void{
Debug.print(("Config.checkEnviroment() : " + Capabilities.playerType), "33FF55");
}
}
}//package
Section 62
//FireflyBase (FireflyBase)
package {
import flash.display.*;
import utils.*;
import flash.events.*;
import comm.*;
import flash.system.*;
import flash.external.*;
public class FireflyBase extends MovieClip {
private var m_game:FireflyGame;
private var m_parsedGameData:GameData;
public var mcBottomL:MovieClip;
public var mcBottomR:MovieClip;
public var btnSound:MovieClip;
public var bgDay:MovieClip;
public var btnMusic:MovieClip;
public var mcLampNight:MovieClip;
public var mcFrameB:MovieClip;
public var mcLampDay:MovieClip;
public var mcScoreBoard:MovieClip;
public var mcMoon:MovieClip;
public var mcFrameR:MovieClip;
public var mcFrameL:MovieClip;
public var mcCloud:MovieClip;
public var mcTopL:MovieClip;
private var m_mainTmr:Timer;
private var m_debugWindow:DebugWindow;
public var bgNight:MovieClip;
public var mcTopR:MovieClip;
public var mcPierShadow:MovieClip;
public var mcSun:MovieClip;
public var mcOverlay:MovieClip;
public var mcCloud2:MovieClip;
public var mcOrgDirR:MovieClip;
public var mcIntro:MovieClip;
private var m_input:MouseInput;
private var m_levelData:Array;
public static var TICKS_PER_SECOND:Number = 25;
public function FireflyBase(){
var _local1:Object;
var _local2:XML;
super();
trace("Welcome FireflyBase()");
m_input = new MouseInput();
m_input.init();
Debug.enabled = false;
if (Debug.enabled){
m_debugWindow = new DebugWindow();
Debug.debugWindow = m_debugWindow;
m_debugWindow.x = (755 - 25);
m_debugWindow.y = 25;
addChild(m_debugWindow);
};
Debug.print("Main.init() entry point ", "33FF55");
Debug.print(("Capabilities.playerType " + Capabilities.playerType), "33FF55");
if (((!((Capabilities.playerType == "External"))) && (!((Capabilities.playerType == "StandAlone"))))){
_local1 = ExternalInterface.call("getGameData");
if ((((_local1 == null)) || (!(_local1.success)))){
Debug.print("getGameData returned null", "ff3333");
} else {
_local2 = new XML(_local1.message);
onGameData(_local2);
Debug.print(("[GameData] : seed " + _local2.@randomseed), "FFFFFF");
Debug.print(("[GameData] : host " + _local2.@hostname), "FFFFFF");
Debug.print(("[GameData] : host " + _local2.@short), "FFFFFF");
};
} else {
Debug.print("getGameData parsed from local xml", "ff3333");
DataLoader.loadData("gamedata.xml", onGameData);
};
}
public function mouseReleased(_arg1:MouseEvent){
m_input.mouseReleased();
}
private function tick():void{
m_game.tick();
}
private function render(_arg1:Number):void{
m_game.render(_arg1);
}
private function onGameData(_arg1:XML):void{
m_parsedGameData = GameDataParser.parseGameData(_arg1);
Debug.print(("m_parsedGameData() shortMode" + m_parsedGameData.isShortMode), "33FF55");
Debug.print(("m_parsedGameData() lv len" + m_parsedGameData.lv.length), "33FF55");
Debug.print(("m_parsedGameData() rnSeed" + m_parsedGameData.randomSeed), "33FF55");
Debug.print(("m_parsedGameData() highcombo" + m_parsedGameData.presets.highcombo), "33FF55");
Debug.print(("m_parsedGameData() longchain" + m_parsedGameData.presets.longchain), "33FF55");
Debug.print(("m_parsedGameData() highbonus" + m_parsedGameData.presets.highbonus), "33FF55");
Debug.print(("m_parsedGameData() collected" + m_parsedGameData.presets.collected), "33FF55");
Debug.print(("m_parsedGameData() totalff" + m_parsedGameData.presets.totalff), "33FF55");
Debug.print(("m_parsedGameData() soundon" + m_parsedGameData.presets.soundon), "33FF55");
Debug.print(("m_parsedGameData() musicon" + m_parsedGameData.presets.musicon), "33FF55");
m_game = new FireflyGame(this, m_input);
m_game.setLvData(m_parsedGameData.lv);
m_game.setSeed(m_parsedGameData.randomSeed);
m_game.setPresets(m_parsedGameData.presets);
m_game.setShortMode(m_parsedGameData.isShortMode);
m_mainTmr = new Timer(TICKS_PER_SECOND);
addEventListener("enterFrame", advanceTime);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
}
public function mousePressed(_arg1:MouseEvent){
m_input.mousePressed();
}
private function setlevelData():void{
}
private function advanceTime(_arg1:Event):void{
var _local2:* = m_mainTmr.advanceTime();
var _local3:uint;
while (_local3 < _local2) {
tick();
_local3++;
};
render(m_mainTmr.alpha);
}
}
}//package
Section 63
//FireflyGame (FireflyGame)
package {
import flash.display.*;
import utils.*;
import flash.events.*;
import com.midasplayer.sound.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
public class FireflyGame {
private var m_modeDestroy:Boolean;// = false
private var m_symbols:Array;
private var m_modeFire:Boolean;// = false
private var m_bgClips:Array;
private var m_shortMode:Boolean;// = false
private var m_ffMoves:Array;
private var m_musicOn:int;
private var m_symCount:int;// = 0
private var m_prevC:int;
private var m_countTime:Boolean;// = false
private var m_prevR:int;
private var m_tick:int;// = 0
private var m_feed:Array;
private var m_endBtnPressed:Boolean;// = false
private var m_high:Array;
private var m_lessThanFive:Boolean;// = false
private var m_state:int;// = 1
private var m_score:Score;
private var m_gameH:int;// = 600
private var m_randSfx:Boolean;// = false
private var m_gameW:int;// = 755
private var m_doAddSpecial:Boolean;// = false
private var m_symOrder:Array;
private var m_mouse:Array;
private var m_modeFewIsLeft:Boolean;// = false
private var m_hasDetonated:Boolean;// = false
private var m_modeEnd:Boolean;// = false
private var Y_OFF;
private var m_rows:int;
private var m_lvData:Object;
private var m_currLv:int;// = 1
private var m_gui:Gui;
private var m_numFeed:int;// = 0
private var m_modeFeed:Boolean;// = false
private var m_root:MovieClip;
private var m_ffActive:Boolean;// = false
private var m_specObj:Org;
private var m_bombIdxC:int;// = 999
private var m_input:MouseInput;
private var m_currTick:int;// = 0
private var m_bombToBombs:Array;
private var m_cols:int;
private var m_bombIdxR:int;// = 999
private var m_fireFly:Fly;
private var m_numOrg:int;
private var m_modeComplete:Boolean;// = false
private var m_shortModeInit:Boolean;// = false
private var m_presets:Object;
private var m_dropOrg:Array;
private var m_init:Boolean;// = true
private var m_numFfMoves:int;// = 0
private var m_currTime:int;// = 0
private var m_modeSubLv:Boolean;// = false
private var m_numDestroy:int;// = 0
private var m_bombs:Array;
private var m_explosion:Array;
private var m_modeDrop:Boolean;// = false
private var m_destroyed:Array;
private var m_curr:Org;
private var m_random:Random;
private var m_bombsCopy:Array;
private var m_typesUse:Array;
private var m_destroyTick:int;// = 0
private var m_calc:GridCalc;
private var X_OFF;
private var m_specialScore:Boolean;// = false
private var m_randTme:int;// = 0
private var m_litBg:Array;
private var m_sfxOn:int;
private var m_tickD:int;// = 1
private var m_numTypeOrg:int;
private var m_modeExplode:Boolean;// = false
private var m_levelData:Array;
private var m_tickE:int;// = 0
public static var m_typesAll:Array = ["CC", "DD", "JJ", "LL", "MM", "OO"];
public static var STATE_PLAY:int = 2;
public static var SUBLEVEL:int = 201;
public static var STATE_LEVEL_COMPLETE:int = 4;
public static var SPECIAL_OBJECT_LEVEL = 1;
public static var FF_COLLECT:int = 901;
public static var m_sound:SoundManager = new SoundManager();
public static var m_music:SoundManager = new SoundManager();
public static var SFX_STATE:int = 701;
public static var SPECIAL_OBJECT_SCORE = 1000;
public static var DESTROY:int = 101;
public static var END_BTN_PRESS:int = 999;
public static var STATE_GAME_COMPLETE:int = 3;
public static var STATE_SHOW:int = 5;
public static var LEVEL:int = 301;
public static var NEW_LEVEL:int = 66;
public static var TIME_LIMIT:int = 6000;
public static var GAMECOMPLETE:int = 401;
public static var STATE_IDLE:int = 0;
public static var SCORE_BONUS:int = 601;
public static var DAY_NIGHT:int = 2250;
public static var MUSIC_STATE:int = 801;
public static var SCORE:int = 501;
public static var STATE_INTRO:int = 1;
public function FireflyGame(_arg1:MovieClip, _arg2:MouseInput){
m_levelData = new Array();
m_mouse = new Array();
m_litBg = new Array();
m_feed = new Array();
m_dropOrg = new Array();
m_destroyed = new Array();
m_explosion = new Array();
m_ffMoves = new Array();
m_typesUse = new Array();
m_high = new Array();
m_lvData = new Object();
m_bombs = new Array();
m_bombToBombs = new Array();
m_bombsCopy = new Array();
super();
trace("Welcome FireflyGame()");
m_root = _arg1;
m_input = _arg2;
m_calc = new GridCalc(_arg1);
m_score = new Score(_arg1);
m_score.init();
m_fireFly = new Fly();
m_root.addChild(m_fireFly);
m_root.setChildIndex(m_fireFly, m_root.getChildIndex(m_root.mcScoreBoard));
m_gui = new Gui(_arg1, m_gameW, m_gameH);
addBtnListeners();
}
private function isDuplicate(_arg1:int, _arg2:int):Boolean{
var _local3:String = ((_arg1 + "_") + _arg2);
var _local4:int;
while (_local4 < m_destroyed.length) {
if (m_destroyed[_local4].id == _local3){
return (true);
};
_local4++;
};
return (false);
}
public function generateRandomBlock():Org{
var _local2:int;
if (((m_specialScore) && ((m_score.getLevel() >= SPECIAL_OBJECT_LEVEL)))){
m_specialScore = false;
_local2 = m_random.nextInt(10000);
if (_local2 >= 5000){
return (generateOrg("LINK"));
};
return (generateOrg("BOMB"));
};
var _local1:String = m_typesUse[m_random.nextInt(m_typesUse.length)];
return (generateOrg(_local1));
}
private function clearPrevPos():void{
var _local1:int = m_fireFly.getRow();
var _local2:int = m_fireFly.getCol();
if ((((_local1 >= m_rows)) || ((_local1 < 0)))){
return;
};
if ((((_local2 >= m_cols)) || ((_local2 < 0)))){
return;
};
m_symbols[_local1][_local2] = new Org("EMPTY");
}
public function setShortMode(_arg1:Boolean){
m_shortMode = _arg1;
}
private function btnUp(_arg1:MouseEvent):void{
var _local2:Boolean;
if (_arg1.target.currentFrame == 2){
_arg1.target.gotoAndStop(3);
} else {
if (_arg1.target.currentFrame == 4){
_arg1.target.gotoAndStop(1);
_local2 = false;
};
};
if (_arg1.target.name == "btnMusic"){
if (_local2){
m_music.setVolume(0);
m_musicOn = 1;
} else {
m_music.setVolume(1);
m_musicOn = 0;
};
};
if (_arg1.target.name == "btnSound"){
if (_local2){
m_sound.setVolume(0);
m_sfxOn = 1;
} else {
m_sound.setVolume(1);
m_sfxOn = 0;
};
};
if (_arg1.target.name == "btnExit"){
if (!m_endBtnPressed){
m_endBtnPressed = true;
};
if (m_shortMode){
m_shortModeInit = true;
};
};
}
private function isUnlitCheck(_arg1:int, _arg2:int):Boolean{
var _local3:uint;
while (_local3 < m_litBg.length) {
if ((((_arg1 == m_litBg[_local3].r)) && ((_arg2 == m_litBg[_local3].c)))){
return (true);
};
_local3++;
};
return (false);
}
private function feeder():void{
var _local2:int;
var _local3:Org;
var _local4:Object;
var _local1:int = (m_rows - 1);
while (_local1 >= 0) {
_local2 = 0;
while (_local2 < m_cols) {
if (m_symbols[_local1][_local2].getType() == "EMPTY"){
_local3 = generateRandomBlock();
_local3.setOff(X_OFF, Y_OFF);
_local3.setCallback(onOrgInPosition);
(_local3 as DisplayObject);
setOrg(_local1, _local2, _local3);
_local4 = new Object();
_local4.r = _local1;
_local4.c = _local2;
_local4.org = _local3;
_local4.dropinfo = m_calc.calcDropPoint(_local1, _local2);
m_feed.push(_local4);
};
_local2++;
};
_local1--;
};
}
public function setOrg(_arg1:int, _arg2:int, _arg3:Org):void{
m_symbols[_arg1][_arg2] = _arg3;
_arg3.setGrid(_arg1, _arg2);
}
private function initBtnState(_arg1:int, _arg2:int){
if (_arg1 == 0){
m_root.btnSound.gotoAndStop(1);
m_sound.setVolume(1);
m_sfxOn = 0;
} else {
m_root.btnSound.gotoAndStop(3);
m_sound.setVolume(0);
m_sfxOn = 1;
};
if (_arg2 == 0){
m_root.btnMusic.gotoAndStop(1);
m_music.setVolume(1);
m_musicOn = 0;
} else {
m_root.btnMusic.gotoAndStop(3);
m_music.setVolume(0);
m_musicOn = 1;
};
}
private function getNewOrg():Object{
if (m_feed.length > 0){
return (m_feed.shift());
};
return (null);
}
public function highlightGroup():void{
var _local1:Object;
var _local2:Object;
var _local3:int;
var _local4:Object;
var _local5:int;
var _local6:Object;
var _local7:Object;
if (!m_input.mouseIsPressed){
if (m_high.length > 2){
if (m_tick < (((m_destroyTick + m_numDestroy) + m_numFeed) + m_numFfMoves)){
resetGroup();
m_calc.remArrow(true);
return;
};
trace("*** DESTROY GROUP");
destroyGroup();
if (m_ffActive){
adjustFirefly();
resetChecked();
};
adjustOrgs();
resetChecked();
trace("*** DROP PIECES");
if (m_ffActive){
adjustFirefly();
resetChecked();
};
if (m_ffActive){
if (m_fireFly.isFree()){
m_modeEnd = true;
m_currTick = 0;
m_score.sum();
sendData((((((((((LEVEL + ",") + m_tick) + ",") + m_score.getLvScore()) + ",") + m_score.getScore()) + ",") + m_score.getBonus()) + ",0=0"));
};
};
feeder();
trace("*** FEEDER");
m_destroyTick = m_tick;
m_numFeed = m_feed.length;
m_numDestroy = m_destroyed.length;
if (m_doAddSpecial){
m_specialScore = true;
m_specObj = generateRandomBlock();
trace(("Generate special object [] " + m_specObj.getType()));
m_numFeed = (m_numFeed + 5);
};
m_numFfMoves = m_ffMoves.length;
if (((((m_numOrg - m_calc.getLit()) <= 5)) && (!(m_lessThanFive)))){
m_lessThanFive = true;
m_modeFewIsLeft = true;
};
if ((((m_calc.getLit() == m_numOrg)) && (!(m_ffActive)))){
m_ffActive = true;
activateFly(m_random.nextInt(m_cols));
m_score.setBonus();
m_gui.resetLit(true, m_bgClips);
m_calc.resetLit();
m_bgClips = new Array();
m_modeSubLv = true;
sendData((((((((SUBLEVEL + ",") + m_tick) + ",") + m_score.getScore()) + ",") + (m_currLv - 1)) + ",0=0"));
if (m_root.hasEventListener(MouseEvent.MOUSE_MOVE)){
m_root.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
};
};
} else {
if ((((m_high.length > 0)) && (!(m_modeDestroy)))){
resetGroup();
m_calc.remArrow();
};
};
};
if (m_modeExplode){
m_tickE++;
if (m_tickE == 1){
_local1 = getExplotion();
if (_local1 != null){
m_calc.doExplode(getStaticPos(_local1.r, _local1.c), m_calc.isVltra(_local1.r, _local1.c));
if (((m_calc.isVltra(_local1.r, _local1.c)) && (!(m_hasDetonated)))){
m_hasDetonated = true;
m_sound.get("dunder1").play();
} else {
if (isUnlitCheck(_local1.r, _local1.c)){
m_sound.get("pop_lit").play();
} else {
m_sound.get("pop_unlit").play();
};
};
} else {
m_hasDetonated = false;
m_modeExplode = false;
m_calc.markAsVltra(false);
};
m_tickE = 0;
};
};
if (m_modeDestroy){
m_tickD++;
if (m_tickD == 2){
_local2 = getDestroy();
if (_local2 != null){
m_calc.doDestroy(_local2.ref);
if (m_destroyed.length == 0){
m_modeDestroy = false;
m_modeDrop = true;
};
};
m_tickD = 1;
};
};
if (m_modeDrop){
_local3 = 0;
while (_local3 < m_dropOrg.length) {
_local4 = m_dropOrg[_local3];
m_symbols[_local4.r][_local4.c].setPos(_local4.r, _local4.c, _local4.s);
_local3++;
};
if (m_ffActive){
m_modeFire = true;
};
m_modeFeed = true;
m_modeDrop = false;
m_dropOrg = new Array();
};
if (m_modeFire){
_local5 = 0;
while (_local5 < m_ffMoves.length) {
_local6 = m_ffMoves[_local5];
m_fireFly.setMove(_local6.r, _local6.c, _local6.s);
_local5++;
};
m_ffMoves = new Array();
if (m_fireFly.isFree()){
if (!m_fireFly.inMotion()){
m_sound.get("stageClear").play();
m_sound.get("ffActive").fadeToAndStop(0, 100);
m_fireFly.moveToFreedom();
m_fireFly.setFree(false);
m_modeFire = false;
};
} else {
m_modeFire = false;
};
};
if (m_modeFeed){
_local7 = getNewOrg();
if (_local7 != null){
m_root.addChild(_local7.org);
_local7.org.newOrgAnim(_local7.r, _local7.c, _local7.dropinfo);
} else {
if (m_doAddSpecial){
m_doAddSpecial = false;
trace(((("SETTING OBJ ROW|COL :" + m_bombIdxR) + "_") + m_bombIdxC));
m_symbols[m_bombIdxR][m_bombIdxC].doRender(false);
m_gui.fadeOutInBetween(m_symbols[m_bombIdxR][m_bombIdxC].getRef());
m_specObj.setOff(X_OFF, Y_OFF);
m_specObj.init(m_bombIdxR, m_bombIdxC);
m_specObj.setCallback(onOrgInPosition);
m_root.addChild(m_specObj);
setOrg(m_bombIdxR, m_bombIdxC, m_specObj);
m_specObj.fadeIn(10);
m_bombIdxR = 999;
m_bombIdxC = 999;
m_modeFeed = false;
} else {
m_modeFeed = false;
};
};
};
if (m_modeSubLv){
if (((((m_gui.resetLitDone()) && (!(m_fireFly.inMotion())))) && (!(m_modeFeed)))){
m_fireFly.show();
m_score.activateBonus(true);
m_modeSubLv = false;
if (!m_root.hasEventListener(MouseEvent.MOUSE_MOVE)){
m_root.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
};
};
};
if (m_modeFewIsLeft){
if (!m_calc.inMotion()){
m_calc.fewIsLeft();
m_modeFewIsLeft = false;
};
};
if (m_modeEnd){
if ((((m_feed.length == 0)) && (!(m_modeFire)))){
m_state = STATE_LEVEL_COMPLETE;
m_modeEnd = false;
clearPrevPos();
cleanUp(false);
};
};
if (m_modeComplete){
if (((!(m_modeDestroy)) && (!(m_calc.inMotion())))){
m_state = STATE_GAME_COMPLETE;
m_sound.get("ffActive").fadeToAndStop(0, 100);
m_sound.get("timeWarning").stop();
m_sound.get("timeOut").play();
m_gui.timeIsUp();
};
};
}
public function setSeed(_arg1:Number):void{
m_random = new Random(_arg1);
m_gui.passOnRnd(m_random);
}
private function getStroke():String{
var _local1:String;
var _local2:int;
while (_local2 < m_high.length) {
if (((!((m_high[_local2].type == "LINK"))) && (!((m_high[_local2].type == "BOMB"))))){
_local1 = m_high[_local2].type;
};
_local2++;
};
return (_local1);
}
public function generateOrg(_arg1:String):Org{
var _local2:Org = new Org(_arg1);
return (_local2);
}
private function getDestroy():Object{
if (m_destroyed.length > 0){
return (m_destroyed.shift());
};
return (null);
}
private function isDuplicateBomb(_arg1:int, _arg2:int):Boolean{
var _local3:String = ((_arg1 + "_") + _arg2);
var _local4:int;
while (_local4 < m_bombs.length) {
if (m_bombs[_local4].id == _local3){
return (true);
};
_local4++;
};
var _local5:int;
while (_local5 < m_bombToBombs.length) {
if (m_bombToBombs[_local5].id == _local3){
return (true);
};
_local5++;
};
var _local6:int;
while (_local6 < m_bombsCopy.length) {
if (m_bombsCopy[_local6].id == _local3){
return (true);
};
_local6++;
};
return (false);
}
private function adjustOrgs():void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local1:Object = m_calc.getDestroyed();
if (_local1 == null){
return;
};
var _local2:int = _local1.r;
var _local3:int = _local1.c;
var _local4 = 1;
var _local5:int = (_local2 - 1);
while (_local5 >= 0) {
if ((((((m_symbols[_local5][_local3].getType() == "DESTROY")) || ((m_symbols[_local5][_local3].getType() == "CHECKED")))) || ((m_symbols[_local5][_local3].getType() == "EMPTY")))){
_local4++;
} else {
if (m_symbols[_local5][_local3].getType() == "FF"){
break;
};
_local6 = (_local5 + _local4);
_local7 = _local3;
setOrg(_local6, _local7, m_symbols[_local5][_local3]);
m_symbols[_local5][_local3] = new Org("EMPTY");
_local8 = new Object();
_local8.r = _local6;
_local8.c = _local7;
_local8.s = m_calc.getMotion(_local4);
m_dropOrg.push(_local8);
};
_local5--;
};
adjustOrgs();
}
private function generateLevel():void{
var _local4:uint;
var _local5:Sprite;
var _local6:Object;
var _local7:uint;
var _local8:Org;
sendData((((((NEW_LEVEL + ",") + m_tick) + ",") + m_currLv) + ",0=0"));
m_score.setLevel(String(m_currLv));
m_lvData = getLvData(m_currLv);
m_currLv++;
m_numOrg = (m_lvData.rows * m_lvData.cols);
setLevelSize(m_lvData.rows, m_lvData.cols);
m_numTypeOrg = m_lvData.numorgs;
setOrgTypes(m_numTypeOrg);
m_bgClips = new Array();
var _local1:uint;
while (_local1 < m_rows) {
_local4 = 0;
while (_local4 < m_cols) {
_local5 = m_calc.getBgClip();
_local5.cacheAsBitmap = true;
_local6 = new Object();
_local6.r = _local1;
_local6.c = _local4;
_local6.isLit = false;
_local6.clip = _local5;
m_bgClips.push(_local6);
m_root.addChild(_local5);
_local4++;
};
_local1++;
};
var _local2:int;
m_symbols = new Array();
m_symOrder = new Array();
var _local3:uint;
while (_local3 < m_rows) {
m_symbols[_local3] = new Array();
_local7 = 0;
while (_local7 < m_cols) {
_local8 = generateRandomBlock();
_local8.setOff(X_OFF, Y_OFF);
_local8.init(_local3, _local7);
_local8.setCallback(onOrgInPosition);
_local8.alpha = 0;
m_root.addChild(_local8);
setOrg(_local3, _local7, _local8);
m_bgClips[_local2].clip.x = _local8.getX();
m_bgClips[_local2].clip.y = _local8.getY();
_local2++;
m_symOrder.push(_local8);
_local7++;
};
_local3++;
};
m_calc.init(m_symbols, m_rows, m_cols, m_bgClips);
m_symOrder = m_calc.randArr(m_symOrder);
m_currTick = 0;
}
public function getLvData(_arg1:int):Object{
var _local2:uint;
while (_local2 < m_levelData.length) {
if (m_levelData[_local2].id == _arg1){
return (m_levelData[_local2]);
};
_local2++;
};
return (null);
}
private function getStaticPos(_arg1:int, _arg2:int):Object{
var _local3:Object = new Object();
var _local4:Number = (_arg2 % 2);
if (_local4){
_local3.y = ((Y_OFF + (Org.ORG_HEIGHT / 2)) + (_arg1 * Org.ORG_HEIGHT));
} else {
_local3.y = (Y_OFF + (_arg1 * Org.ORG_HEIGHT));
};
_local3.x = (X_OFF + (_arg2 * Org.ORG_WIDTH));
return (_local3);
}
private function remBtnListeners():void{
m_root.btnMusic.removeEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.btnSound.removeEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.mcScoreBoard.btnExit.removeEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.btnMusic.removeEventListener(MouseEvent.MOUSE_UP, btnUp);
m_root.btnSound.removeEventListener(MouseEvent.MOUSE_UP, btnUp);
m_root.mcScoreBoard.btnExit.removeEventListener(MouseEvent.MOUSE_UP, btnUp);
}
public function sendData(_arg1:String):void{
ExternalInterface.call("playData", _arg1);
}
public function setLvData(_arg1:Array):void{
m_levelData = _arg1;
}
private function getDropOrg():Object{
if (m_dropOrg.length > 0){
return (m_dropOrg.shift());
};
return (null);
}
private function resetChecked():void{
var _local2:uint;
var _local1:uint;
while (_local1 < m_rows) {
_local2 = 0;
while (_local2 < m_cols) {
if (m_symbols[_local1][_local2].getType() == "CHECKED"){
m_symbols[_local1][_local2].setType("EMPTY");
};
_local2++;
};
_local1++;
};
}
private function createRefByOrg(_arg1:Org):Object{
var _local2:Object = new Object();
_local2.r = _arg1.getRow();
_local2.c = _arg1.getCol();
_local2.type = _arg1.getType();
_local2.ref = _arg1.getRef();
_local2.id = _arg1.getStrId();
_local2.isLit = false;
return (_local2);
}
private function setLevelSize(_arg1:int, _arg2:int):void{
m_rows = _arg1;
m_cols = _arg2;
X_OFF = Math.round((((m_gameW / 2) - ((Org.ORG_WIDTH * m_cols) / 2)) - 13));
Y_OFF = Math.round((((m_gameH / 2) - ((Org.ORG_HEIGHT * m_rows) / 2)) - 5));
m_score.setOff(X_OFF, Y_OFF);
}
private function btnDown(_arg1:MouseEvent):void{
if (_arg1.target.currentFrame == 1){
_arg1.target.gotoAndStop(2);
} else {
if (_arg1.target.currentFrame == 3){
_arg1.target.gotoAndStop(4);
};
};
}
private function isUnlit(_arg1:int, _arg2:int):Object{
var _local3:Object;
var _local4:uint;
while (_local4 < m_litBg.length) {
if ((((_arg1 == m_litBg[_local4].r)) && ((_arg2 == m_litBg[_local4].c)))){
_local3 = m_litBg[_local4];
break;
};
_local4++;
};
m_litBg.splice(_local4, 1);
return (_local3);
}
public function setOrgTypes(_arg1:int):void{
var _local4:int;
m_typesUse = new Array();
var _local2:Array = getCopy();
var _local3:uint;
while (_local3 < _arg1) {
_local4 = m_random.nextInt(_local2.length);
m_typesUse.push(_local2[_local4]);
_local2.splice(_local4, 1);
_local3++;
};
}
private function addBtnListeners():void{
m_root.btnMusic.addEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.btnSound.addEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.mcScoreBoard.btnExit.addEventListener(MouseEvent.MOUSE_DOWN, btnDown);
m_root.btnMusic.addEventListener(MouseEvent.MOUSE_UP, btnUp);
m_root.btnSound.addEventListener(MouseEvent.MOUSE_UP, btnUp);
m_root.mcScoreBoard.btnExit.addEventListener(MouseEvent.MOUSE_UP, btnUp);
}
private function activateFly(_arg1:int):void{
m_sound.get("stageClear").play();
m_sound.get("ffActive").loop();
if (_arg1 < 0){
_arg1 = 0;
};
m_fireFly.setOff(X_OFF, Y_OFF);
m_fireFly.fireInit(-1, _arg1);
}
private function resetGroup():void{
var _local1:int;
while (_local1 < m_high.length) {
m_symbols[m_high[_local1].r][m_high[_local1].c].highlight(false, m_high.length);
_local1++;
};
m_high = new Array();
}
public function render(_arg1:Number):void{
var _local3:uint;
var _local2:uint;
while (_local2 < m_rows) {
_local3 = 0;
while (_local3 < m_cols) {
if (m_symbols[_local2][_local3].getType() != null){
if (m_symbols[_local2][_local3].getType() != "FF"){
m_symbols[_local2][_local3].render();
};
};
_local3++;
};
_local2++;
};
if (((m_ffActive) || (m_fireFly.inMotion()))){
m_fireFly.render();
};
m_score.render();
m_gui.render();
}
private function getLitBg():Object{
if (m_litBg.length > 0){
return (m_litBg.shift());
};
return (null);
}
public function tick():void{
var _local1:int;
var _local2:int;
var _local3:uint;
var _local4:uint;
m_music.update();
m_sound.update();
m_tick++;
switch (m_state){
case STATE_IDLE:
break;
case STATE_SHOW:
if (m_currTick == 0){
_local1 = 0;
while (_local1 < m_symOrder.length) {
setTimeout(showOrg, (_local1 * 10), m_symOrder[_local1]);
_local1++;
};
};
m_currTick++;
if (((m_shortModeInit) && ((m_currTick >= 20)))){
m_state = STATE_GAME_COMPLETE;
m_currTick = 0;
};
break;
case STATE_INTRO:
m_currTick++;
if (((((m_input.mouseIsPressed) && (m_root.mcIntro.mcPlay.hitTestPoint(m_root.mouseX, m_root.mouseY)))) && ((m_currTick < 520)))){
m_input.mouseReleased();
m_root.mcIntro.mcPlay.scaleX = 0.95;
m_root.mcIntro.mcPlay.scaleY = 0.95;
m_root.mcIntro.mcPlay.y = (m_root.mcIntro.mcPlay.y + 2);
m_currTick = 520;
m_init = false;
};
if (m_init){
if (m_currTick == 5){
m_music.get("loopIntro").play();
};
if (m_currTick == 40){
m_currTick = 0;
m_init = false;
} else {
return;
};
};
m_gui.gameWillStartIn((520 - m_currTick));
if (m_currTick == 0){
m_gui.fadeOutLogo();
};
if (((m_input.mouseIsPressed) && ((m_currTick < 520)))){
m_input.mouseReleased();
m_currTick = 520;
};
if (m_currTick == 520){
m_gui.showOverlay();
m_music.get("loopIntro").fadeToAndStop(0, 500);
};
if (m_currTick == 540){
m_music.get("loopGame").loop();
remIntro(null);
};
if (m_currTick == 560){
fscommand("gameStart", "");
generateLevel();
m_state = STATE_SHOW;
};
break;
case STATE_PLAY:
m_score.tick();
highlight();
if (m_countTime){
if ((TIME_LIMIT - m_currTime) <= 0){
trace(("TIME IS UP : m_modeEnd " + m_modeEnd), m_high.length);
if (m_high.length > 0){
m_input.mouseIsPressed = false;
highlightGroup();
};
if (m_modeEnd){
m_score.incrFf();
m_score.animScore(true);
};
m_countTime = false;
m_currTick = 0;
m_modeComplete = true;
};
m_score.setTime((TIME_LIMIT - m_currTime));
m_currTime++;
if (m_currTime == DAY_NIGHT){
trace("nightDayTransition");
m_gui.nightDayTransition();
};
if (!m_randSfx){
m_randTme++;
if (m_randTme == 150){
m_randSfx = true;
m_randTme = m_calc.getRand(((0.1 * 60) * 25));
};
} else {
m_randTme--;
if (m_randTme == 0){
m_music.get(("sfx" + m_calc.getRand(9))).play();
m_randSfx = false;
};
};
if (((m_score.isTimeWarning()) && (!(m_sound.get("timeWarning").isPlaying())))){
m_sound.get("timeWarning").play();
};
};
if (m_endBtnPressed){
m_state = STATE_GAME_COMPLETE;
sendData((((END_BTN_PRESS + ",") + m_tick) + ",0=0"));
};
break;
case STATE_GAME_COMPLETE:
m_currTick++;
if (m_currTick == 50){
m_root.btnSound.visible = false;
m_root.btnMusic.visible = false;
m_music.get("loopGame").fadeToAndStop(0, 500);
m_gui.showOverlay();
m_gui.destroyFrame();
m_gui.showEndScreen(m_score.getLevel(), m_score.getScore(), m_score.getHighest(), m_score.getLongest(), m_score.getHighestFf(), m_score.getNumFf(), m_presets);
m_gui.remTween();
_local2 = (m_presets.totalff + m_score.getNumFf());
if (_local2 > 100){
_local2 = 100;
};
m_gui.addJarFlies(_local2);
};
if (m_currTick == 70){
cleanUp(false);
m_music.get("loopIntro").play();
sendData((((((MUSIC_STATE + ",") + m_tick) + ",") + m_musicOn) + ",0=0"));
sendData((((((SFX_STATE + ",") + m_tick) + ",") + m_sfxOn) + ",0=0"));
sendData((((((FF_COLLECT + ",") + m_tick) + ",") + m_score.getNumFf()) + ",0=0"));
sendData((((((GAMECOMPLETE + ",") + m_tick) + ",") + m_score.getScore()) + ",0=0"));
fscommand("gameEnd", ("" + m_score.getScore()));
m_score.endGame();
};
if (((m_shortModeInit) && ((m_currTick == 100)))){
m_gui.launchShortModeWin();
m_shortModeInit = false;
};
if (((m_input.mouseIsPressed) && ((m_currTick > 70)))){
trace("leave game [force]");
m_currTick = 600;
m_music.get("loopIntro").fadeToAndStop(0, 500);
};
if ((((m_currTick > 50)) && (m_gui.gameWillEndIn((((0.43 * 60) * 25) - m_currTick))))){
m_music.stopAll();
m_sound.stopAll();
m_gui.destroyFlies();
m_state = STATE_IDLE;
remBtnListeners();
if (m_shortMode){
m_gui.remShortModeWin();
};
fscommand("gameQuit", "");
};
break;
case STATE_LEVEL_COMPLETE:
m_currTick++;
if (m_currTick == 1){
m_gui.setBonus(String(((" " + m_score.getBonus()) + " ")));
m_gui.showMegaBlast((" " + String((m_score.getLvScore() + " "))));
m_gui.showFrame(false, false);
};
if (((m_input.mouseIsPressed) && ((m_currTick < 110)))){
m_gui.remScreenInBetween();
m_currTick = 110;
};
if (m_currTick == 30){
m_score.animScore(true);
};
if (m_currTick == 40){
m_gui.animScore(true, m_score.getScoreDecr());
if (m_score.getBonus() > 0){
m_sound.get("scoreAnim").loop();
};
};
if (((((!(m_gui.isScoreAnim())) && (m_sound.get("scoreAnim").isPlaying()))) && ((m_currTick > 39)))){
m_sound.get("scoreAnim").fadeToAndStop(0, 100);
};
if (m_currTick == 110){
generateLevel();
m_score.setScoreBoard();
m_score.endLevel();
m_score.incrFf();
m_score.activateBonus(false);
m_state = STATE_SHOW;
if (m_sound.get("scoreAnim").isPlaying()){
m_sound.get("scoreAnim").fadeToAndStop(0, 100);
};
};
break;
};
if ((((m_state == STATE_SHOW)) || ((m_state == STATE_PLAY)))){
_local3 = 0;
while (_local3 < m_rows) {
_local4 = 0;
while (_local4 < m_cols) {
if (m_symbols[_local3][_local4].getType() != "FF"){
m_symbols[_local3][_local4].tick();
};
_local4++;
};
_local3++;
};
};
if (((m_ffActive) || (m_fireFly.inMotion()))){
m_fireFly.tick();
};
}
private function destroyGroup():void{
var _local6:Array;
var _local7:int;
var _local8:Sprite;
var _local9:Object;
var _local10:int;
m_calc.clearExplo();
m_calc.remArrow(true);
m_modeExplode = true;
m_modeDestroy = true;
m_bombs = new Array();
var _local1:uint;
while (_local1 < m_high.length) {
if (m_high[_local1].type != "BOMB"){
m_calc.remIfOneOfFew(m_high[_local1].r, m_high[_local1].c);
m_destroyed.push(m_high[_local1]);
m_explosion.push(m_high[_local1]);
m_symbols[m_high[_local1].r][m_high[_local1].c].setType("DESTROY");
} else {
m_bombs.push(m_high[_local1]);
};
_local1++;
};
m_bombIdxR = m_high[(m_high.length - 1)].r;
m_bombIdxC = m_high[(m_high.length - 1)].c;
trace(((("SAMPLE ROW|COL :" + m_bombIdxR) + "_") + m_bombIdxC));
m_bombToBombs = new Array();
m_bombsCopy = new Array();
var _local2:int;
while (_local2 < m_bombs.length) {
isBombToBomb(m_bombs[_local2].r, m_bombs[_local2].c);
_local2++;
};
var _local3:uint;
while (_local3 < m_bombsCopy.length) {
m_bombs.push(m_bombsCopy[_local3]);
_local3++;
};
var _local4:uint;
while (_local4 < m_bombs.length) {
_local6 = m_calc.getBombRadius(m_bombs[_local4].r, m_bombs[_local4].c);
_local7 = 0;
while (_local7 < _local6.length) {
if (((!(isDuplicate(_local6[_local7].r, _local6[_local7].c))) && (!((m_symbols[_local6[_local7].r][_local6[_local7].c].getType() == "FF"))))){
m_calc.markAsVltra(true, _local6[_local7]);
m_calc.remIfOneOfFew(_local6[_local7].r, _local6[_local7].c);
m_destroyed.push(createRefByOrg(m_symbols[_local6[_local7].r][_local6[_local7].c]));
m_explosion.push(createRefByOrg(m_symbols[_local6[_local7].r][_local6[_local7].c]));
m_symbols[_local6[_local7].r][_local6[_local7].c].setType("DESTROY");
};
_local7++;
};
_local4++;
};
sendData((((((DESTROY + ",") + m_tick) + ",") + m_calc.getStrDir(m_high)) + ",0=0"));
m_high = new Array();
var _local5:uint;
while (_local5 < m_destroyed.length) {
if (m_calc.isBgLit(m_destroyed[_local5].r, m_destroyed[_local5].c)){
m_destroyed[_local5].isLit = true;
} else {
m_destroyed[_local5].isLit = false;
};
_local8 = m_calc.litBg(m_destroyed[_local5].r, m_destroyed[_local5].c);
if (_local8 != null){
_local9 = new Object();
_local9.r = m_destroyed[_local5].r;
_local9.c = m_destroyed[_local5].c;
_local9.clip = _local8;
m_litBg.push(_local9);
};
_local5++;
};
if (m_ffActive){
m_score.calcScoreFly();
sendData((((((SCORE_BONUS + ",") + m_tick) + ",") + m_score.getBonus()) + ",0=0"));
} else {
_local10 = m_score.calcScore(m_destroyed);
if (_local10 >= SPECIAL_OBJECT_SCORE){
m_doAddSpecial = true;
};
sendData((((((((((SCORE + ",") + m_tick) + ",") + _local10) + ",") + m_score.getScore()) + ",") + m_destroyed.length) + ",0=0"));
};
}
private function showOrg(_arg1:Org):void{
_arg1.fadeIn();
m_symCount++;
if (m_symCount == m_numOrg){
m_gui.resizeBorder(m_calc.getPosObj("TL"), m_calc.getPosObj("TR"), m_calc.getPosObj("BL"));
if (((m_shortMode) && ((m_currLv == 3)))){
m_shortModeInit = true;
trace("SHORT MODE INITIATED");
} else {
m_countTime = true;
m_state = STATE_PLAY;
m_symCount = 0;
if (!m_root.hasEventListener(MouseEvent.MOUSE_MOVE)){
m_root.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
};
};
};
}
private function cleanUp(_arg1:Boolean=true):void{
var _local4:uint;
trace("cleanUp() ");
var _local2:uint;
while (_local2 < m_rows) {
_local4 = 0;
while (_local4 < m_cols) {
if (((!((m_symbols[_local2][_local4].getType() == "FF"))) && (!((m_symbols[_local2][_local4].getType() == "EMPTY"))))){
m_root.removeChild(m_symbols[_local2][_local4]);
m_symbols[_local2][_local4] = new Org("EMPTY");
};
_local4++;
};
_local2++;
};
if (m_root.hasEventListener(MouseEvent.MOUSE_MOVE)){
m_root.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
};
m_gui.remTimeup();
m_gui.resetLit(false, m_bgClips);
m_bgClips = new Array();
m_calc.remArrow(true);
m_calc.clearOneOfFew();
m_calc.clearExplo();
m_ffActive = false;
m_score.remScorePops();
m_lessThanFive = false;
var _local3:int;
while (_local3 < m_root.numChildren) {
_local3++;
};
}
private function highlight():void{
var _local2:int;
var _local3:int;
var _local4:Object;
var _local5:int;
var _local6:Object;
var _local7:int;
var _local1:int;
while (_local1 < m_mouse.length) {
_local2 = m_mouse[_local1].r;
_local3 = m_mouse[_local1].c;
if (((((m_doAddSpecial) && ((_local2 == m_bombIdxR)))) && ((_local3 == m_bombIdxC)))){
trace("//");
trace("WARNING : MARKING FUTURE BOMB");
trace("//");
break;
};
m_curr = m_calc.getValidOrg(_local2, _local3);
if (m_curr != null){
_local4 = createRefByOrg(m_curr);
if ((((m_high.length == 0)) && (!(m_curr.isHigh())))){
m_high.push(_local4);
m_calc.setValidHigh(_local2, _local3, _local4.type, null);
m_curr.highlight(true);
m_sound.get(("select" + m_calc.getRand(3))).play();
return;
};
if (m_calc.isValidOrg(_local2, _local3)){
m_high.push(_local4);
m_calc.setValidHigh(_local2, _local3, _local4.type, getStroke());
m_calc.addArrow(m_curr, m_high[(m_high.length - 2)]);
if (m_high.length == 3){
_local5 = 0;
while (_local5 < m_high.length) {
m_symbols[m_high[_local5].r][m_high[_local5].c].highlight(true, m_high.length);
_local5++;
};
m_sound.get(("select" + m_calc.getRand(3))).play();
} else {
m_curr.highlight(true, m_high.length);
m_sound.get(("select" + m_calc.getRand(3))).play();
};
};
if (m_high.length > 1){
_local6 = m_high[(m_high.length - 2)];
if (((m_curr.isHigh()) && (m_calc.isPrevHigh(m_curr, _local6)))){
m_symbols[m_high[(m_high.length - 1)].r][m_high[(m_high.length - 1)].c].highlight(false, m_high.length);
m_high.splice((m_high.length - 1), 1);
m_calc.setValidHigh(_local2, _local3, _local4.type, getStroke());
m_calc.remArrow();
m_sound.get("deselect").play();
if (m_high.length == 2){
_local7 = 0;
while (_local7 < m_high.length) {
m_symbols[m_high[_local7].r][m_high[_local7].c].highlight(true, m_high.length);
_local7++;
};
};
};
};
};
_local1++;
};
m_curr = null;
m_mouse = new Array();
highlightGroup();
}
public function setPresets(_arg1:Object):void{
m_presets = _arg1;
initBtnState(m_presets.soundon, m_presets.musicon);
}
private function getExplotion():Object{
if (m_explosion.length > 0){
return (m_explosion.shift());
};
return (null);
}
private function setFly(_arg1:int, _arg2:int):void{
trace(((("setting fly to :" + _arg1) + "_") + _arg2));
clearPrevPos();
m_symbols[_arg1][_arg2] = new Org("FF");
m_fireFly.setGrid(_arg1, _arg2);
}
private function isBombToBomb(_arg1:int, _arg2:int):void{
var _local6:Object;
var _local3:Array = m_calc.getBombRadius(_arg1, _arg2);
var _local4:Boolean;
var _local5:int;
while (_local5 < _local3.length) {
if (m_symbols[_local3[_local5].r][_local3[_local5].c].getType() == "BOMB"){
if (!isDuplicateBomb(_local3[_local5].r, _local3[_local5].c)){
m_bombToBombs.push(createRefByOrg(m_symbols[_local3[_local5].r][_local3[_local5].c]));
_local4 = true;
break;
};
};
_local5++;
};
if (_local4){
isBombToBomb(_arg1, _arg2);
} else {
if (m_bombToBombs.length > 0){
_local6 = m_bombToBombs.shift();
m_bombsCopy.push(_local6);
isBombToBomb(_local6.r, _local6.c);
};
};
}
private function onOrgInPosition(_arg1:int, _arg2:int):void{
var _local3:Object = isUnlit(_arg1, _arg2);
if (_local3 != null){
_local3.clip.visible = true;
_local3.clip.play();
};
}
private function adjustFirefly():void{
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Object;
if (m_fireFly.isFree()){
return;
};
var _local1:Number = m_fireFly.getRow();
var _local2:Number = m_fireFly.getCol();
var _local3:Object = m_calc.getFirstEmptyFrom();
if (_local3 != null){
_local4 = false;
_local5 = false;
_local6 = false;
if (_local3.r > m_fireFly.getRow()){
_local4 = true;
};
if (_local4){
_local5 = m_calc.isValidPath(_local3.c, _local2);
};
if (_local5){
_local6 = m_calc.willFitStep(_local3.r, _local1, _local2);
};
if (_local6){
_local7 = new Object();
_local7.r = _local3.r;
_local7.c = _local3.c;
_local7.s = m_calc.getMotion((_local3.r - m_fireFly.getRow()));
m_ffMoves.push(_local7);
setFly(_local3.r, _local3.c);
if (m_fireFly.getRow() == (m_rows - 1)){
m_fireFly.setFree(true);
if (m_root.hasEventListener(MouseEvent.MOUSE_MOVE)){
m_root.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
};
};
return;
};
adjustFirefly();
};
}
private function remIntro(_arg1:MouseEvent):void{
m_root.removeChild(m_root.mcIntro);
}
private function getCopy():Array{
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < m_typesAll.length) {
_local1.push(m_typesAll[_local2]);
_local2++;
};
return (_local1);
}
private function onMouseMove(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Object;
if (m_input.mouseIsPressed){
_local2 = Math.floor(((m_root.mouseX - X_OFF) / Org.ORG_WIDTH));
_local3 = Math.floor(((m_root.mouseY - Y_OFF) / Org.ORG_HEIGHT));
_local4 = (_local2 % 2);
if (_local4){
_local3 = Math.floor(((m_root.mouseY - (Y_OFF + (Org.ORG_HEIGHT / 2))) / Org.ORG_HEIGHT));
};
if (((!((m_prevR == _local3))) || (!((m_prevC == _local2))))){
_local5 = new Object();
_local5.r = _local3;
_local5.c = _local2;
m_mouse.push(_local5);
};
m_prevR = _local3;
m_prevC = _local2;
} else {
m_prevR = -1;
m_prevC = -1;
};
}
}
}//package
Section 64
//Fly (Fly)
package {
import flash.display.*;
import anim.*;
public class Fly extends MovieClip {
private var m_row:Number;
private var m_currX:Number;
private var m_currY:Number;
private var m_destY:Interpolator;
private var m_destX:Interpolator;
private var m_col:Number;
private var m_markAsDestroyed:Boolean;// = false
private var m_currScaleX:Number;// = 1
private var m_currScaleY:Number;// = 1
public var m_state:int;
private var m_type:String;// = "FF"
private var m_inMotion:Boolean;// = false
private var m_checked:Boolean;// = false
private var m_scaleX:Interpolator;
private var m_scaleY:Interpolator;
private var X_OFF:Number;// = 0
private var Y_OFF:Number;// = 0
private var m_allocated:Array;
private var m_currAlpha:Number;
private var m_empty:Boolean;// = false
private var m_free:Boolean;// = false
private static var STATE_FADE:int = 1;
private static var STATE_NORMAL:int = 0;
private static var STATE_FREE:int = 4;
private static var STATE_MOVE:int = 2;
public function Fly(){
m_allocated = new Array();
super();
create();
cacheAsBitmap = true;
}
private function create():void{
var _local1:MovieClip = new org_FF();
addChild(_local1);
hide();
}
public function moveToFreedom():void{
m_inMotion = true;
var _local1 = 50;
m_destX = new EaseBackInterpolator(x, x, _local1);
m_destY = new EaseBackInterpolator(y, 650, _local1);
m_scaleX = new EaseOutInterpolator(1, 3, (_local1 / 3));
m_scaleY = new EaseOutInterpolator(1, 3, (_local1 / 3));
m_state = STATE_FREE;
}
public function render():void{
x = m_currX;
y = m_currY;
scaleY = m_currScaleY;
scaleX = m_currScaleX;
}
public function tick():void{
switch (m_state){
case STATE_NORMAL:
break;
case STATE_MOVE:
m_destY.update();
m_currY = m_destY.getValue();
if (m_destY.isDone()){
m_state = STATE_NORMAL;
m_inMotion = false;
};
break;
case STATE_FREE:
m_destX.update();
m_destY.update();
m_scaleX.update();
m_scaleY.update();
m_currScaleX = m_scaleX.getValue();
m_currScaleY = m_scaleY.getValue();
m_currX = m_destX.getValue();
m_currY = m_destY.getValue();
if (((m_destY.isDone()) && (m_destX.isDone()))){
m_state = STATE_NORMAL;
m_inMotion = false;
hide();
};
break;
};
}
public function getRow():Number{
return (m_row);
}
public function setOff(_arg1:Number, _arg2:Number):void{
X_OFF = _arg1;
Y_OFF = _arg2;
}
public function getType():String{
return (m_type);
}
public function isFree():Boolean{
return (m_free);
}
public function inMotion():Boolean{
return (m_inMotion);
}
private function getStaticFirePos(_arg1:Number, _arg2:Number):Object{
var _local3:Object = new Object();
var _local4:Number = (_arg2 % 2);
if (_local4){
_local3.y = ((Y_OFF + (Org.ORG_HEIGHT / 2)) + (_arg1 * Org.ORG_HEIGHT));
} else {
_local3.y = (Y_OFF + (_arg1 * Org.ORG_HEIGHT));
};
_local3.x = (X_OFF + (_arg2 * Org.ORG_WIDTH));
return (_local3);
}
public function hide():void{
this.visible = false;
}
public function setGrid(_arg1:Number, _arg2:Number):void{
m_row = _arg1;
m_col = _arg2;
}
public function getCol():Number{
return (m_col);
}
public function setMove(_arg1:Number, _arg2:Number, _arg3:int):void{
var _local4:Object = getStaticFirePos(_arg1, _arg2);
m_destY = new EaseBackInterpolator(y, _local4.y, _arg3);
trace(("setMove() [GUI] " + _arg1), ((((((_arg2 + " [pace] :") + _arg3) + " [ydest] :") + _local4.y) + " [ycurr] :") + y));
m_state = STATE_MOVE;
m_inMotion = true;
}
public function fireInit(_arg1:Number, _arg2:Number):void{
x = getStaticFirePos(_arg1, _arg2).x;
y = getStaticFirePos(_arg1, _arg2).y;
m_currX = x;
m_currY = y;
m_currScaleX = 1;
m_currScaleY = 1;
m_state = STATE_NORMAL;
setGrid(_arg1, _arg2);
trace(("fireInit() " + _arg1), _arg2);
}
public function setFree(_arg1:Boolean):void{
trace(("setFree() " + _arg1));
m_free = _arg1;
}
public function show():void{
m_destX = new EaseBackInterpolator(x, x, 8);
m_destY = new EaseBackInterpolator(0, y, 8);
this.visible = true;
m_state = STATE_MOVE;
}
}
}//package
Section 65
//flyAnim1 (flyAnim1)
package {
import anim.*;
public dynamic class flyAnim1 extends AutoLoopingRndStart25Fps {
}
}//package
Section 66
//flyAnim2 (flyAnim2)
package {
import anim.*;
public dynamic class flyAnim2 extends AutoLoopingRndStart25Fps {
}
}//package
Section 67
//flyAnim3 (flyAnim3)
package {
import anim.*;
public dynamic class flyAnim3 extends AutoLoopingRndStart25Fps {
}
}//package
Section 68
//GridCalc (GridCalc)
package {
import flash.display.*;
import flash.utils.*;
public class GridCalc {
private var m_cols:int;
private var m_symbols:Array;
private var m_bgClips:Array;
private var m_vltraRow:Array;
private var m_explosions:Array;
private var m_arrows:Array;
private var m_numLit:int;// = 0
private var m_entangled:Array;
private var m_rows:int;
private var m_validHigh:Array;
private var m_fewLeft:Array;
private var m_root:MovieClip;
public function GridCalc(_arg1:MovieClip){
m_entangled = new Array();
m_arrows = new Array();
m_validHigh = new Array();
m_fewLeft = new Array();
m_explosions = new Array();
m_vltraRow = new Array();
super();
m_root = _arg1;
}
public function randArr(_arg1:Array):Array{
var _local3:int;
var _local2:Array = new Array();
while (_arg1.length > 0) {
_local3 = Math.floor((Math.random() * _arg1.length));
_local2.push(_arg1[_local3]);
_arg1.splice(_local3, 1);
};
return (_local2);
}
public function isBgLit(_arg1:int, _arg2:int):Boolean{
var _local3:int;
while (_local3 < m_bgClips.length) {
if (((((m_bgClips[_local3].isLit) && ((_arg1 == m_bgClips[_local3].r)))) && ((_arg2 == m_bgClips[_local3].c)))){
return (true);
};
_local3++;
};
return (false);
}
public function remArrow(_arg1:Boolean=false):void{
var _local2:int;
if (_arg1){
_local2 = 0;
while (_local2 < m_arrows.length) {
m_root.removeChild(m_arrows[_local2]);
_local2++;
};
m_arrows = new Array();
} else {
if (m_arrows.length > 0){
m_root.removeChild(m_arrows[(m_arrows.length - 1)]);
m_arrows.pop();
};
};
}
public function calcDropPoint(_arg1:int, _arg2:int):Object{
var _local3:int;
var _local4:Object = new Object();
var _local5:int = _arg1;
while (_local5 >= 0) {
_arg1--;
_local3++;
_local5--;
};
_local4.r = _arg1;
_local4.c = _arg2;
_local4.s = getMotion(_local3);
return (_local4);
}
public function markAsVltra(_arg1:Boolean, _arg2:Object=null):void{
if (_arg1){
m_vltraRow.push(_arg2);
} else {
m_vltraRow = new Array();
};
}
public function init(_arg1:Array, _arg2:int, _arg3:int, _arg4:Array){
m_symbols = _arg1;
m_rows = _arg2;
m_cols = _arg3;
m_bgClips = _arg4;
}
public function isValidOrg(_arg1:int, _arg2:int):Boolean{
var _local3:int;
while (_local3 < m_validHigh.length) {
if ((((_arg1 == m_validHigh[_local3].getRow())) && ((_arg2 == m_validHigh[_local3].getCol())))){
return (true);
};
_local3++;
};
return (false);
}
public function clearExplo():void{
var _local1:int;
while (_local1 < m_explosions.length) {
m_root.removeChild(m_explosions[_local1]);
m_explosions[_local1] = null;
_local1++;
};
m_explosions = new Array();
}
public function getRand(_arg1:int):int{
return (Math.floor((Math.random() * _arg1)));
}
public function getStrDir(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
_local2 = (_local2 + (((_arg1[_local3].r + "_") + _arg1[_local3].c) + ":"));
_local3++;
};
return (_local2);
}
public function isVltra(_arg1:int, _arg2:int):Boolean{
if (m_vltraRow.length == 0){
return (false);
};
var _local3:int;
while (_local3 < m_vltraRow.length) {
if ((((_arg1 == m_vltraRow[_local3].r)) && ((_arg2 == m_vltraRow[_local3].c)))){
return (true);
};
_local3++;
};
return (false);
}
public function fewIsLeft():void{
var _local2:MovieClip;
var _local3:Object;
var _local1:int;
while (_local1 < m_bgClips.length) {
if (!m_bgClips[_local1].isLit){
_local2 = new mc5percent();
_local2.x = m_bgClips[_local1].clip.x;
_local2.y = m_bgClips[_local1].clip.y;
m_root.addChild(_local2);
m_root.setChildIndex(_local2, (m_root.getChildIndex(m_bgClips[_local1].clip) + 1));
_local3 = new Object();
_local3.clip = _local2;
_local3.r = m_bgClips[_local1].r;
_local3.c = m_bgClips[_local1].c;
m_fewLeft.push(_local3);
};
_local1++;
};
}
public function getMotion(_arg1:int):int{
_arg1++;
return ((_arg1 * 4));
}
private function checkStraightDrop(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Boolean;
var _local5:Number = _arg2;
while (_local5 < _arg1) {
_arg2++;
if (!isEmpty(_arg2, _arg3)){
_local4 = false;
break;
};
_local5++;
};
return (_local4);
}
public function getBgClip():Sprite{
var _local1:Class = (getDefinitionByName("LIT") as Class);
var _local2:Sprite = (new (_local1) as Sprite);
_local2.visible = false;
return (_local2);
}
private function calcArrow(_arg1:Org, _arg2:Object):Object{
var _local4:int;
var _local3:Object = new Object();
if (_arg2.c == _arg1.getCol()){
if (_arg2.r > _arg1.getRow()){
_local3.r = -90;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 22);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 48);
} else {
_local3.r = 90;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 27);
_local3.y = _arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y;
};
} else {
_local4 = (_arg1.getCol() % 2);
if (_local4){
if (_arg2.c > _arg1.getCol()){
if (_arg2.r == _arg1.getRow()){
_local3.r = 140;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 47);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 13);
} else {
_local3.r = 210;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 43);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 40);
};
} else {
if (_arg2.r > _arg1.getRow()){
_local3.r = 330;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 3);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 34);
} else {
_local3.r = 30;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 6);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 10);
};
};
} else {
if (_arg2.c > _arg1.getCol()){
if (_arg2.r < _arg1.getRow()){
_local3.r = 140;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 47);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 13);
} else {
_local3.r = 210;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 43);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 40);
};
} else {
if (_arg2.r == _arg1.getRow()){
_local3.r = 330;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 3);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 34);
} else {
_local3.r = 30;
_local3.x = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).x + 6);
_local3.y = (_arg1.getStaticPos(_arg1.getRow(), _arg1.getCol()).y + 10);
};
};
};
};
return (_local3);
}
public function isValidPath(_arg1:Number, _arg2:Number):Boolean{
if (_arg1 != _arg2){
return (false);
};
return (true);
}
public function inMotion():Boolean{
var _local2:uint;
var _local1:uint;
while (_local1 < m_rows) {
_local2 = 0;
while (_local2 < m_cols) {
if (!isOob(_local1, _local2)){
if (m_symbols[_local1][_local2].inMotion()){
return (true);
};
};
_local2++;
};
_local1++;
};
return (false);
}
public function litBg(_arg1:int, _arg2:int):Sprite{
var _local3:int;
while (_local3 < m_bgClips.length) {
if (((((!(m_bgClips[_local3].isLit)) && ((_arg1 == m_bgClips[_local3].r)))) && ((_arg2 == m_bgClips[_local3].c)))){
m_bgClips[_local3].isLit = true;
m_numLit++;
return (m_bgClips[_local3].clip);
};
_local3++;
};
return (null);
}
public function getFirstEmptyFrom():Object{
var _local3:int;
var _local1:Object;
var _local2:int = (m_rows - 1);
while (_local2 >= 0) {
_local3 = (m_cols - 1);
while (_local3 >= 0) {
if ((((m_symbols[_local2][_local3].getType() == "DESTROY")) || ((m_symbols[_local2][_local3].getType() == "EMPTY")))){
m_symbols[_local2][_local3].setType("CHECKED");
_local1 = new Object();
_local1.r = _local2;
_local1.c = _local3;
return (_local1);
};
_local3--;
};
_local2--;
};
return (_local1);
}
public function getValidOrg(_arg1:int, _arg2:int):Org{
var _local3:Org;
if (!isOob(_arg1, _arg2)){
_local3 = m_symbols[_arg1][_arg2];
};
return (_local3);
}
public function isPrevHigh(_arg1:Org, _arg2:Object):Boolean{
if ((((_arg1.getRow() == _arg2.r)) && ((_arg1.getCol() == _arg2.c)))){
return (true);
};
return (false);
}
public function resetLit():void{
m_numLit = 0;
}
public function willFitStep(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
return (checkStraightDrop(_arg1, _arg2, _arg3));
}
public function getBombRadius(_arg1:int, _arg2:int):Array{
var _local11:Object;
var _local12:Object;
var _local13:Object;
var _local14:Object;
var _local3:Array = new Array();
var _local4:Object = new Object();
_local4.r = _arg1;
_local4.c = _arg2;
_local3.push(_local4);
var _local5:Number = _arg2;
var _local6:Number = _arg1;
var _local7:Number = _arg2;
var _local8:Number = _arg1;
var _local9:int = ((m_cols + m_rows) - 2);
var _local10:int;
while (_local10 < _local9) {
--_local5;
if (_local5 >= 0){
_local11 = new Object();
_local11.r = _arg1;
_local11.c = _local5;
_local3.push(_local11);
};
--_local6;
if (_local6 >= 0){
_local12 = new Object();
_local12.r = _local6;
_local12.c = _arg2;
_local3.push(_local12);
};
++_local7;
if (_local7 < m_cols){
_local13 = new Object();
_local13.r = _arg1;
_local13.c = _local7;
_local3.push(_local13);
};
++_local8;
if (_local8 < m_rows){
_local14 = new Object();
_local14.r = _local8;
_local14.c = _arg2;
_local3.push(_local14);
};
_local10++;
};
return (_local3);
}
private function isEmpty(_arg1:Number, _arg2:Number):Boolean{
if ((((_arg1 >= m_rows)) || ((_arg1 < 0)))){
return (false);
};
if ((((_arg2 >= m_cols)) || ((_arg2 < 0)))){
return (false);
};
if ((((((m_symbols[_arg1][_arg2].getType() == "CHECKED")) || ((m_symbols[_arg1][_arg2].getType() == "DESTROY")))) || ((m_symbols[_arg1][_arg2].getType() == "EMPTY")))){
return (true);
};
return (false);
}
public function doExplode(_arg1:Object, _arg2:Boolean):void{
var _local3:Sprite;
if (_arg2){
_local3 = new mcExploVltra();
_local3.x = (_arg1.x - 15);
_local3.y = (_arg1.y - 15);
} else {
_local3 = new mcExplo();
_local3.x = (_arg1.x - 10);
_local3.y = (_arg1.y - 10);
};
m_root.addChild(_local3);
m_explosions.push(_local3);
}
public function getLit():int{
return (m_numLit);
}
public function getDestroyed():Object{
var _local3:int;
var _local1:Object;
var _local2:int = (m_rows - 1);
while (_local2 >= 0) {
_local3 = (m_cols - 1);
while (_local3 >= 0) {
if ((((m_symbols[_local2][_local3].getType() == "DESTROY")) || ((m_symbols[_local2][_local3].getType() == "EMPTY")))){
m_symbols[_local2][_local3].setType("CHECKED");
_local1 = new Object();
_local1.r = _local2;
_local1.c = _local3;
return (_local1);
};
_local3--;
};
_local2--;
};
return (_local1);
}
public function calcDrop(_arg1:int, _arg2:int, _arg3:int, _arg4:String):int{
var _local6:int;
var _local7:int;
var _local5:Number = (_arg1 + _arg3);
if (_arg4 == "R"){
_local6 = _arg1;
while (_local6 < _local5) {
if (!(_local6 % 2)){
_arg2--;
};
_local6++;
};
} else {
_local7 = _arg1;
while (_local7 < _local5) {
if ((_local7 % 2)){
_arg2++;
};
_local7++;
};
};
return (_arg2);
}
private function doSetValid(_arg1:int, _arg2:int, _arg3:String, _arg4:String):void{
var _local5:Boolean;
if ((((m_symbols[_arg1][_arg2].getType() == "LINK")) && (!(m_symbols[_arg1][_arg2].isHigh())))){
_local5 = true;
};
if ((((_arg3 == "LINK")) && (!(m_symbols[_arg1][_arg2].isHigh())))){
_local5 = true;
};
if ((((m_symbols[_arg1][_arg2].getType() == "BOMB")) && (!(m_symbols[_arg1][_arg2].isHigh())))){
_local5 = true;
};
if ((((_arg3 == "BOMB")) && (!(m_symbols[_arg1][_arg2].isHigh())))){
if ((((m_symbols[_arg1][_arg2].getType() == _arg4)) || ((_arg4 == null)))){
_local5 = true;
};
};
if (_local5){
m_validHigh.push(m_symbols[_arg1][_arg2]);
} else {
if ((((m_symbols[_arg1][_arg2].getType() == _arg3)) && (!(m_symbols[_arg1][_arg2].isHigh())))){
m_validHigh.push(m_symbols[_arg1][_arg2]);
};
};
}
public function clearOneOfFew():void{
var _local1:int;
while (_local1 < m_fewLeft.length) {
m_root.removeChild(m_fewLeft[_local1].clip);
_local1++;
};
}
public function remIfOneOfFew(_arg1:int, _arg2:int):void{
var _local3:int;
while (_local3 < m_fewLeft.length) {
if ((((_arg1 == m_fewLeft[_local3].r)) && ((_arg2 == m_fewLeft[_local3].c)))){
m_root.removeChild(m_fewLeft[_local3].clip);
m_fewLeft[_local3].clip = null;
};
_local3++;
};
var _local4:int;
while (_local4 < m_fewLeft.length) {
if (m_fewLeft[_local4].clip == null){
m_fewLeft.splice(_local4, 1);
break;
};
_local4++;
};
}
public function getNearby(_arg1:int, _arg2:int):Array{
var _local3:int;
var _local4:int;
var _local5:Array = new Array();
var _local6:Object = new Object();
var _local7:Object = new Object();
var _local8:Object = new Object();
var _local9:Object = new Object();
var _local10:Object = new Object();
var _local11:Object = new Object();
var _local12:int = (_arg2 % 2);
if (_local12){
_local6.r = (_arg1 + 1);
_local6.c = _arg2;
_local5.push(_local6);
_local7.r = (_arg1 - 1);
_local7.c = _arg2;
_local5.push(_local7);
_local8.r = _arg1;
_local8.c = (_arg2 - 1);
_local5.push(_local8);
_local9.r = (_arg1 + 1);
_local9.c = (_arg2 - 1);
_local5.push(_local9);
_local10.r = (_arg1 + 1);
_local10.c = (_arg2 + 1);
_local5.push(_local10);
_local11.r = _arg1;
_local11.c = (_arg2 + 1);
_local5.push(_local11);
} else {
_local6.r = (_arg1 + 1);
_local6.c = _arg2;
_local5.push(_local6);
_local7.r = (_arg1 - 1);
_local7.c = _arg2;
_local5.push(_local7);
_local8.r = (_arg1 - 1);
_local8.c = (_arg2 - 1);
_local5.push(_local8);
_local9.r = _arg1;
_local9.c = (_arg2 - 1);
_local5.push(_local9);
_local10.r = (_arg1 - 1);
_local10.c = (_arg2 + 1);
_local5.push(_local10);
_local11.r = _arg1;
_local11.c = (_arg2 + 1);
_local5.push(_local11);
};
return (_local5);
}
public function doDestroy(_arg1:Sprite):void{
m_root.removeChild(_arg1);
_arg1 = null;
}
public function addArrow(_arg1:Org, _arg2:Object):void{
var _local3:Sprite = new mcArrow();
var _local4:Object = calcArrow(_arg1, _arg2);
_local3.x = _local4.x;
_local3.y = _local4.y;
_local3.rotation = _local4.r;
m_root.addChild(_local3);
m_arrows.push(_local3);
}
public function isOob(_arg1:int, _arg2:int):Boolean{
if ((((_arg1 >= m_rows)) || ((_arg1 < 0)))){
return (true);
};
if ((((_arg2 >= m_cols)) || ((_arg2 < 0)))){
return (true);
};
if ((((m_symbols[_arg1][_arg2].getType() == "EMPTY")) || ((m_symbols[_arg1][_arg2].getType() == "FF")))){
return (true);
};
return (false);
}
public function getPosObj(_arg1:String):Object{
var _local2:Object = new Object();
if (_arg1 == "TL"){
_local2.x = m_symbols[0][0].getX();
_local2.y = m_symbols[0][0].getY();
};
if (_arg1 == "TR"){
_local2.x = (m_symbols[1][(m_cols - 1)].getX() + 42);
_local2.y = m_symbols[1][(m_cols - 1)].getY();
};
if (_arg1 == "BL"){
_local2.x = m_symbols[(m_rows - 1)][1].getX();
_local2.y = (m_symbols[(m_rows - 1)][1].getY() + 46);
};
return (_local2);
}
public function setValidHigh(_arg1:int, _arg2:int, _arg3:String, _arg4:String):void{
m_validHigh = new Array();
var _local5:Array = new Array();
_local5 = getNearby(_arg1, _arg2);
var _local6:int;
while (_local6 < _local5.length) {
if (!isOob(_local5[_local6].r, _local5[_local6].c)){
doSetValid(_local5[_local6].r, _local5[_local6].c, _arg3, _arg4);
};
_local6++;
};
}
public function calcFallDir(_arg1:Object, _arg2:Object):String{
var _local3 = "";
var _local4:Number = m_symbols[_arg1.r][_arg1.c].x;
var _local5:Number = m_symbols[_arg2.r][_arg2.c].x;
var _local6:Number = _arg1.r;
var _local7:Number = _arg2.r;
if (_local6 == _local7){
if (_local4 < _local5){
_local3 = "L";
} else {
_local3 = "R";
};
} else {
if ((((((_local6 < _local7)) && ((_local4 > _local5)))) || ((((_local6 > _local7)) && ((_local4 > _local5)))))){
_local3 = "R";
} else {
_local3 = "L";
};
};
return (_local3);
}
private function calcDir(_arg1:int, _arg2:int, _arg3:int, _arg4:int):String{
var _local5:int;
if (_arg1 == _arg3){
if (_arg2 > _arg4){
return ("1");
};
return ("4");
//unresolved jump
};
_local5 = (_arg3 % 2);
if (_local5){
if (_arg1 < _arg3){
if (_arg2 > _arg4){
return ("6");
};
return ("5");
} else {
if (_arg2 > _arg4){
return ("2");
};
return ("3");
};
} else {
if (_arg1 < _arg3){
if (_arg2 == _arg4){
return ("6");
};
return ("5");
//unresolved jump
};
if (_arg2 == _arg4){
return ("2");
};
};
return ("3");
}
}
}//package
Section 69
//Gui (Gui)
package {
import flash.display.*;
import utils.*;
import comm.*;
import flash.text.*;
import gs.*;
import anim.*;
import gs.easing.*;
public class Gui {
private var m_levelScore:MovieClip;
private var m_shortModeWin:MovieClip;
private var m_jarOfFlies:Array;
private var m_animScore:Boolean;// = false
private var m_rand:Random;
private var m_framePieces:Array;
private var m_bonusIncr:int;// = 0
private var m_bgRem:int;// = 0
private var m_gameH:int;// = 0
private var m_bonus:int;
private var m_gameW:int;// = 0
private var m_megaBlast:MovieClip;// = null
private var m_endScreen:MovieClip;// = null
private var m_timeIsUp:MovieClip;// = null
private var m_incr:int;
private var m_textF:TextFormat;
private var m_root:MovieClip;
private var m_hints:Array;
public function Gui(_arg1:MovieClip, _arg2:int, _arg3:int){
m_jarOfFlies = new Array();
m_framePieces = new Array();
m_hints = new Array();
super();
m_root = _arg1;
m_gameW = _arg2;
m_gameH = _arg3;
m_root.mcLampNight.alpha = 0;
m_root.mcPierShadow.alpha = 0;
m_root.mcOverlay.visible = false;
m_root.mcOverlay.alpha = 0;
m_root.mcOverlay.mouseEnabled = false;
m_root.mcOrgDirR.visible = false;
m_root.mcOrgDirR.alpha = 0;
m_framePieces.push(m_root.mcTopL);
m_framePieces.push(m_root.mcTopR);
m_framePieces.push(m_root.mcBottomR);
m_framePieces.push(m_root.mcBottomL);
m_framePieces.push(m_root.mcFrameL);
m_framePieces.push(m_root.mcFrameR);
m_framePieces.push(m_root.mcFrameB);
showFrame(false, true);
m_root.mcIntro.mcTutorial.alpha = 0;
m_root.mcIntro.mcTutorial.stop();
keepletterSpacing(m_root.mcIntro.mcTutorial.tfStatIntroInstr, TextMappings.get("tfStatIntroInstr"));
keepletterSpacing(m_root.mcIntro.mcTutorial.mcInstr1.tfStatIntro1, TextMappings.get("tfStatIntro1"));
keepletterSpacing(m_root.mcIntro.mcTutorial.mcInstr2.tfStatIntro2, TextMappings.get("tfStatIntro2"));
keepletterSpacing(m_root.mcIntro.mcTutorial.mcInstr3.tfStatIntro3, TextMappings.get("tfStatIntro3"));
keepletterSpacing(m_root.mcIntro.mcTutorial.mcInstr4.tfStatIntro4, TextMappings.get("tfStatIntro4"));
keepletterSpacing(m_root.mcIntro.mcTutorial.mcInstr5.tfStatIntro5, TextMappings.get("tfStatIntro5"));
keepletterSpacing(m_root.mcIntro.mcPlay.tfStatStartGame, TextMappings.get("tfStatStartGame"));
}
public function animScore(_arg1:Boolean, _arg2:int=0):void{
if (_arg1){
m_incr = _arg2;
m_animScore = true;
} else {
m_animScore = false;
};
}
public function fadeOutInBetween(_arg1:MovieClip):void{
TweenLite.to(_arg1, 0.1, {alpha:0});
}
private function onSoundDone():void{
m_root.setChildIndex(m_root.btnSound, (m_root.getChildIndex(m_root.mcOverlay) - 1));
m_root.btnSound.alpha = 1;
}
public function destroyFrame():void{
var _local1:int;
while (_local1 < m_framePieces.length) {
m_root.removeChild(m_framePieces[_local1]);
m_framePieces[_local1] = null;
_local1++;
};
}
public function render():void{
if (m_animScore){
m_bonusIncr = (m_bonusIncr + m_incr);
keepletterSpacing(m_levelScore.tfCurrLvBonus, ((((TextMappings.get("tfCurrLvBonus") + " ") + m_bonusIncr) + " ") + TextMappings.get("tfStatPoints")));
if (m_bonusIncr >= m_bonus){
keepletterSpacing(m_levelScore.tfCurrLvBonus, ((((TextMappings.get("tfCurrLvBonus") + " ") + m_bonus) + " ") + TextMappings.get("tfStatPoints")));
m_animScore = false;
m_bonusIncr = 0;
};
};
}
private function doRemLit(_arg1:MovieClip):void{
m_root.removeChild(_arg1);
_arg1 = null;
m_bgRem--;
}
private function remScore():void{
m_root.removeChild(m_levelScore);
m_levelScore = null;
}
public function destroyFlies():void{
var _local1:int;
while (_local1 < m_jarOfFlies.length) {
m_endScreen.mcJar.removeChild(m_jarOfFlies[_local1]);
m_jarOfFlies[_local1] = null;
_local1++;
};
}
public function remScreenInBetween():void{
TweenLite.killTweensOf(m_megaBlast);
TweenLite.killTweensOf(m_levelScore);
remBlast();
remScore();
m_animScore = false;
}
public function resizeBorder(_arg1:Object, _arg2:Object, _arg3:Object):void{
var _local4 = 20;
m_root.mcTopL.x = (m_root.mcBottomL.x = ((_arg1.x + 1) - _local4));
m_root.mcTopR.x = (m_root.mcBottomR.x = ((_arg2.x + 1) + _local4));
m_root.mcTopL.y = (m_root.mcTopR.y = (_arg1.y - _local4));
m_root.mcFrameL.x = ((_arg1.x + 3) - _local4);
m_root.mcFrameR.x = ((_arg2.x + 3) + _local4);
m_root.mcFrameL.y = (m_root.mcFrameR.y = (_arg1.y - _local4));
m_root.mcFrameB.y = (_arg3.y + _local4);
m_root.mcFrameB.x = ((_arg1.x + 2) - _local4);
m_root.mcBottomL.y = (m_root.mcBottomR.y = ((_arg3.y - 2) + _local4));
m_root.mcFrameL.height = (m_root.mcFrameR.height = (m_root.mcBottomL.y - m_root.mcTopL.y));
m_root.mcFrameB.width = (m_root.mcBottomR.x - m_root.mcBottomL.x);
showFrame(true, false);
}
public function gameWillStartIn(_arg1:int):void{
var _local2:int = (_arg1 / 25);
var _local3:int = (_local2 / 60);
_local2 = (_local2 - (_local3 * 60));
var _local4:int = int((_local2 / 10));
var _local5:* = _local3;
var _local6:* = _local4;
var _local7:* = int((_local2 - (_local4 * 10)));
var _local8:String = ((_local6 + "") + _local7);
if ((((((_local5 < 0)) && ((_local6 < 0)))) && ((_local7 < 0)))){
_local8 = "00";
};
keepletterSpacing(m_root.mcIntro.mcPlay.tfStatStartGame, (((TextMappings.get("tfStatStartGame") + " (") + _local8) + ")"));
}
public function showHint():void{
m_root.mcIntro.mcTutorial.start();
}
public function showOrg(_arg1:Org):void{
TweenLite.to(_arg1, 10, {alpha:1, overwrite:0});
}
public function showMegaBlast(_arg1:String):void{
if (m_megaBlast == null){
m_megaBlast = new mcMegaBlast();
m_megaBlast.x = ((m_gameW / 2) + 10);
m_megaBlast.y = (m_gameH / 2);
m_root.addChild(m_megaBlast);
m_levelScore = new mcLvCompleteSign();
m_levelScore.x = ((m_gameW / 2) - (m_levelScore.width / 2));
m_levelScore.y = (((m_gameH / 2) - (m_levelScore.height / 2)) - 40);
_arg1 = ((TextMappings.get("tfCurrLvScore") + _arg1) + TextMappings.get("tfStatPoints"));
keepletterSpacing(m_levelScore.tfStatLvComplete, TextMappings.get("tfStatLvComplete"));
keepletterSpacing(m_levelScore.tfCurrLvScore, _arg1);
keepletterSpacing(m_levelScore.tfCurrLvBonus, ((TextMappings.get("tfCurrLvBonus") + " 0 ") + TextMappings.get("tfStatPoints")));
m_root.addChild(m_levelScore);
TweenLite.from(m_megaBlast, 0.5, {alpha:0});
TweenLite.from(m_levelScore, 0.5, {alpha:0, delay:0.5});
TweenLite.to(m_megaBlast, 0.5, {alpha:0, delay:4, overwrite:0, onComplete:remBlast});
TweenLite.to(m_levelScore, 0.5, {alpha:0, delay:4, overwrite:0, onComplete:remScore});
};
}
public function showOverlay():void{
TweenLite.to(m_root.btnSound, 0.5, {alpha:0, onComplete:onSoundDone});
TweenLite.to(m_root.btnMusic, 0.5, {alpha:0, onComplete:onMusicDone});
m_root.mcOverlay.visible = true;
TweenLite.to(m_root.mcOverlay, 1, {alpha:1, onComplete:onOverlay});
}
public function remEndScreen():void{
if (m_endScreen != null){
m_root.removeChild(m_endScreen);
m_endScreen = null;
};
}
public function passOnRnd(_arg1:Random):void{
m_rand = _arg1;
}
public function isScoreAnim():Boolean{
return (m_animScore);
}
public function addJarFlies(_arg1:int):void{
var _local3:int;
var _local4:BaseFlare;
var _local2:int;
while (_local2 < _arg1) {
_local3 = m_rand.nextInt(30000);
if (_local3 < 10000){
_local4 = new flyAnim1();
} else {
if ((((_local3 >= 10000)) && ((_local3 < 20000)))){
_local4 = new flyAnim2();
} else {
_local4 = new flyAnim3();
};
};
_local4.x = m_rand.nextInt(150);
_local4.y = m_rand.nextInt(150);
m_endScreen.mcJar.addChild(_local4);
m_jarOfFlies.push(_local4);
_local2++;
};
}
public function showEndScreen(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Object):MovieClip{
m_endScreen = new mcEndScreen();
m_endScreen.visible = false;
m_endScreen.x = (m_endScreen.y = 0);
m_root.addChild(m_endScreen);
m_root.swapChildren(m_endScreen, m_root.mcOverlay);
trace(("showEndScreen()" + _arg3), _arg4, _arg5, _arg6);
keepletterSpacing(m_endScreen.cont.tfStatEndTotScore, TextMappings.get("tfStatEndTotScore"));
keepletterSpacing(m_endScreen.cont.tfCurrEndTotScore, ((_arg2 + " ") + TextMappings.get("tfStatPoints")));
keepletterSpacing(m_endScreen.cont.tfStatEndLv, TextMappings.get("tfStatEndLv"));
keepletterSpacing(m_endScreen.cont.tfCurrEndLv, ((TextMappings.get("tfCurrEndLv") + " ") + _arg1));
keepletterSpacing(m_endScreen.cont.tfStatEndRound, TextMappings.get("tfStatEndRound"));
keepletterSpacing(m_endScreen.cont.tfStatEndBest, TextMappings.get("tfStatEndBest"));
keepletterSpacing(m_endScreen.cont.tfStatEndCombo, TextMappings.get("tfStatEndCombo"));
keepletterSpacing(m_endScreen.cont.tfStatEndChain, TextMappings.get("tfStatEndChain"));
keepletterSpacing(m_endScreen.cont.tfStatEndFf, TextMappings.get("tfStatEndFf"));
keepletterSpacing(m_endScreen.cont.tfStatEndColl, TextMappings.get("tfStatEndColl"));
keepletterSpacing(m_endScreen.cont.tfStatEndTot, TextMappings.get("tfStatEndTot"));
keepletterSpacing(m_endScreen.cont.tfStatEndFireflies, TextMappings.get("tfStatEndFireflies"));
keepletterSpacing(m_endScreen.cont.tfCurrEndGame, ((TextMappings.get("tfCurrEndGame") + " 0:00 ") + TextMappings.get("tfCurrEndSec")));
m_endScreen.cont.tfCurrEndCombo.txtGlow.visible = false;
m_endScreen.cont.tfCurrEndChain.txtGlow.visible = false;
m_endScreen.cont.tfCurrEndFf.txtGlow.visible = false;
m_endScreen.cont.tfCurrEndColl.txtGlow.visible = false;
m_endScreen.cont.tfBestEndCombo.txtGlow.visible = false;
m_endScreen.cont.tfBestEndChain.txtGlow.visible = false;
m_endScreen.cont.tfBestEndFf.txtGlow.visible = false;
m_endScreen.cont.tfBestEndColl.txtGlow.visible = false;
if (_arg3 > _arg7.highcombo){
m_endScreen.cont.tfCurrEndCombo.txtGlow.visible = true;
keepletterSpacing(m_endScreen.cont.tfCurrEndCombo.txtGlow, String(_arg3));
keepletterSpacing(m_endScreen.cont.tfBestEndCombo.txtNormal, String(_arg7.highcombo));
} else {
keepletterSpacing(m_endScreen.cont.tfCurrEndCombo.txtNormal, String(_arg3));
keepletterSpacing(m_endScreen.cont.tfBestEndCombo.txtNormal, String(_arg7.highcombo));
};
if (_arg4 > _arg7.longchain){
m_endScreen.cont.tfCurrEndChain.txtGlow.visible = true;
keepletterSpacing(m_endScreen.cont.tfCurrEndChain.txtGlow, String(_arg4));
keepletterSpacing(m_endScreen.cont.tfBestEndChain.txtNormal, String(_arg7.longchain));
} else {
keepletterSpacing(m_endScreen.cont.tfCurrEndChain.txtNormal, String(_arg4));
keepletterSpacing(m_endScreen.cont.tfBestEndChain.txtNormal, String(_arg7.longchain));
};
if (_arg5 > _arg7.highbonus){
m_endScreen.cont.tfCurrEndFf.txtGlow.visible = true;
keepletterSpacing(m_endScreen.cont.tfCurrEndFf.txtGlow, String(_arg5));
keepletterSpacing(m_endScreen.cont.tfBestEndFf.txtNormal, String(_arg7.highbonus));
} else {
keepletterSpacing(m_endScreen.cont.tfCurrEndFf.txtNormal, String(_arg5));
keepletterSpacing(m_endScreen.cont.tfBestEndFf.txtNormal, String(_arg7.highbonus));
};
if (_arg6 > _arg7.collected){
m_endScreen.cont.tfCurrEndColl.txtGlow.visible = true;
keepletterSpacing(m_endScreen.cont.tfCurrEndColl.txtGlow, String(_arg6));
keepletterSpacing(m_endScreen.cont.tfBestEndColl.txtNormal, String(_arg7.collected));
} else {
keepletterSpacing(m_endScreen.cont.tfCurrEndColl.txtNormal, String(_arg6));
keepletterSpacing(m_endScreen.cont.tfBestEndColl.txtNormal, String(_arg7.collected));
};
_arg2 = (_arg7.totalff + _arg6);
keepletterSpacing(m_endScreen.cont.tfTotEndFireflies, String(_arg2));
return (m_endScreen);
}
private function onMusicDone():void{
m_root.setChildIndex(m_root.btnMusic, (m_root.getChildIndex(m_root.mcOverlay) - 1));
m_root.btnMusic.alpha = 1;
}
public function resetLit(_arg1:Boolean, _arg2:Array):void{
var _local3:Number;
if (_arg1){
_local3 = 0.01;
} else {
_local3 = 0;
};
m_bgRem = _arg2.length;
var _local4:int;
while (_local4 < _arg2.length) {
TweenLite.to(_arg2[_local4].clip, 0.5, {alpha:0, overwrite:0, delay:(_local3 * _local4), onComplete:doRemLit, onCompleteParams:[_arg2[_local4].clip]});
_local4++;
};
}
public function timeIsUp():void{
m_timeIsUp = new mcTimeIsUp();
m_timeIsUp.x = (m_gameW / 2);
m_timeIsUp.y = (m_gameH / 2);
keepletterSpacing(m_timeIsUp.tfStatTimeUp, TextMappings.get("tfStatTimeUp"));
m_root.addChild(m_timeIsUp);
TweenLite.from(m_timeIsUp, 1.5, {scaleX:0, scaleY:0, ease:Elastic.easeOut});
}
public function remShortModeWin():void{
if (m_shortModeWin != null){
m_root.removeChild(m_shortModeWin);
};
}
public function keepletterSpacing(_arg1:TextField, _arg2:String):void{
m_textF = _arg1.getTextFormat();
_arg1.text = _arg2;
_arg1.setTextFormat(m_textF);
}
public function nightDayTransition():void{
m_root.mcOrgDirR.visible = true;
TweenLite.to(m_root.mcPierShadow, 60, {alpha:0.7});
TweenLite.to(m_root.mcLampNight, 60, {alpha:1});
TweenLite.to(m_root.bgDay, 60, {alpha:0});
TweenLite.to(m_root.mcSun, 60, {alpha:0});
TweenLite.to(m_root.mcOrgDirR, 60, {alpha:1});
TweenLite.to(m_root.mcCloud, 20, {alpha:0});
TweenLite.to(m_root.mcCloud2, 20, {alpha:0});
}
public function gameWillEndIn(_arg1:int):Boolean{
var _local2:int = (_arg1 / 25);
var _local3:int = (_local2 / 60);
_local2 = (_local2 - (_local3 * 60));
var _local4:int = int((_local2 / 10));
var _local5:* = _local3;
var _local6:* = _local4;
var _local7:* = int((_local2 - (_local4 * 10)));
var _local8:String = ((_local6 + "") + _local7);
keepletterSpacing(m_endScreen.cont.tfCurrEndGame, ((((TextMappings.get("tfCurrEndGame") + " ") + _local8) + " ") + TextMappings.get("tfCurrEndSec")));
if ((((((_local5 == 0)) && ((_local6 == 0)))) && ((_local7 == 0)))){
return (true);
};
return (false);
}
public function setBonus(_arg1:String):void{
m_bonus = int(_arg1);
}
public function remTimeup():void{
if (m_timeIsUp != null){
m_root.removeChild(m_timeIsUp);
m_timeIsUp = null;
};
}
public function resetLitDone():Boolean{
if (m_bgRem <= 10){
return (true);
};
return (false);
}
public function showFrame(_arg1:Boolean, _arg2:Boolean):void{
var _local3:int;
while (_local3 < m_framePieces.length) {
if (!_arg2){
if (_arg1){
m_framePieces[_local3].visible = true;
TweenLite.to(m_framePieces[_local3], 0.5, {alpha:1});
} else {
TweenLite.to(m_framePieces[_local3], 0.5, {alpha:0});
};
} else {
m_framePieces[_local3].visible = _arg1;
m_framePieces[_local3].alpha = 0;
};
_local3++;
};
}
public function remTween():void{
TweenLite.killTweensOf(m_root.mcLampNight);
TweenLite.killTweensOf(m_root.mcSun);
TweenLite.killTweensOf(m_root.mcCloud);
TweenLite.killTweensOf(m_root.mcCloud2);
TweenLite.killTweensOf(m_root.mcPierShadow);
TweenLite.killTweensOf(m_root.mcOrgDirR);
}
public function launchShortModeWin():void{
m_shortModeWin = new mcAlertShortMode();
m_shortModeWin.alpha = 0;
m_shortModeWin.x = 377;
m_shortModeWin.y = 538;
keepletterSpacing(m_shortModeWin.tfStatShortModeReg, TextMappings.get("tfStatShortModeReg"));
m_root.addChild(m_shortModeWin);
TweenLite.to(m_shortModeWin, 1, {alpha:1});
}
private function onOverlay():void{
if (m_endScreen != null){
m_endScreen.visible = true;
};
TweenLite.to(m_root.mcOverlay, 1, {alpha:0});
}
public function fadeOutLogo():void{
TweenLite.to(m_root.mcIntro.mcBgLogo, 0.5, {alpha:0});
TweenLite.to(m_root.mcIntro.mcTutorial, 0.5, {alpha:1, delay:0.5, overwrite:0, onComplete:showHint});
}
private function remBlast():void{
m_root.removeChild(m_megaBlast);
m_megaBlast = null;
}
}
}//package
Section 70
//LIT (LIT)
package {
import flash.display.*;
public dynamic class LIT extends MovieClip {
public function LIT(){
addFrameScript(0, frame1, 19, frame20);
}
function frame20(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 71
//LOCK (LOCK)
package {
import flash.display.*;
public dynamic class LOCK extends MovieClip {
}
}//package
Section 72
//mc5percent (mc5percent)
package {
import anim.*;
public dynamic class mc5percent extends AutoLoopingFlare25Fps {
}
}//package
Section 73
//mcAlertShortMode (mcAlertShortMode)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcAlertShortMode extends MovieClip {
public var tfStatShortModeReg:TextField;
}
}//package
Section 74
//mcArrow (mcArrow)
package {
import flash.display.*;
public dynamic class mcArrow extends MovieClip {
}
}//package
Section 75
//mcBombInner (mcBombInner)
package {
import anim.*;
public dynamic class mcBombInner extends AutoLoopingFlare25Fps {
}
}//package
Section 76
//mcCloud (mcCloud)
package {
import anim.*;
public dynamic class mcCloud extends AutoLoopingFlare25Fps {
}
}//package
Section 77
//mcCloud2 (mcCloud2)
package {
import anim.*;
public dynamic class mcCloud2 extends AutoLoopingFlare25Fps {
}
}//package
Section 78
//mcDirection (mcDirection)
package {
import anim.*;
public dynamic class mcDirection extends AutoLoopingFlare25Fps {
}
}//package
Section 79
//mcEndScreen (mcEndScreen)
package {
import flash.display.*;
public dynamic class mcEndScreen extends MovieClip {
public var cont:MovieClip;
public var mcJar:MovieClip;
}
}//package
Section 80
//mcExplo (mcExplo)
package {
import flash.display.*;
public dynamic class mcExplo extends MovieClip {
}
}//package
Section 81
//mcExploInner (mcExploInner)
package {
import anim.*;
public dynamic class mcExploInner extends AutoSingleFlare25Fps {
}
}//package
Section 82
//mcExploVltra (mcExploVltra)
package {
import flash.display.*;
public dynamic class mcExploVltra extends MovieClip {
}
}//package
Section 83
//mcHigh (mcHigh)
package {
import flash.display.*;
public dynamic class mcHigh extends MovieClip {
}
}//package
Section 84
//mcHighInner (mcHighInner)
package {
import anim.*;
public dynamic class mcHighInner extends AutoLoopingFlare25Fps {
}
}//package
Section 85
//mcHighLess2 (mcHighLess2)
package {
import flash.display.*;
public dynamic class mcHighLess2 extends MovieClip {
}
}//package
Section 86
//mcJarStars (mcJarStars)
package {
import anim.*;
public dynamic class mcJarStars extends AutoLoopingFlare25Fps {
}
}//package
Section 87
//mcLvCompleteSign (mcLvCompleteSign)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcLvCompleteSign extends MovieClip {
public var tfCurrLvBonus:TextField;
public var tfCurrLvScore:TextField;
public var tfStatLvComplete:TextField;
}
}//package
Section 88
//mcMegaBlast (mcMegaBlast)
package {
import flash.display.*;
public dynamic class mcMegaBlast extends MovieClip {
}
}//package
Section 89
//mcScorePop (mcScorePop)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcScorePop extends MovieClip {
public var tfScore:TextField;
}
}//package
Section 90
//mcTimeIsUp (mcTimeIsUp)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcTimeIsUp extends MovieClip {
public var tfStatTimeUp:TextField;
}
}//package
Section 91
//mcTutorial1 (mcTutorial1)
package {
import anim.*;
public dynamic class mcTutorial1 extends AutoSingleFlare25Fps {
public function mcTutorial1(){
addFrameScript(430, frame431);
}
function frame431(){
stop();
}
}
}//package
Section 92
//mcUltraExplosion (mcUltraExplosion)
package {
import anim.*;
public dynamic class mcUltraExplosion extends AutoSingleFlare25Fps {
}
}//package
Section 93
//Org (Org)
package {
import flash.display.*;
import anim.*;
import flash.utils.*;
public class Org extends MovieClip {
private var m_inPosition:Function;
private var m_highlighted:Boolean;// = false
private var m_row:int;
private var m_alpha:Interpolator;
private var m_doRender:Boolean;// = true
private var m_currY:Number;
private var m_overLess:Sprite;
private var m_destY:Interpolator;
private var m_col:int;
private var m_lock:Sprite;
public var m_state:int;
private var m_isEntangled:Boolean;// = false
private var m_ref:Sprite;
private var m_inMotion:Boolean;// = false
private var m_infective:Boolean;// = false
private var m_type:String;// = ""
private var m_over:Sprite;
private var X_OFF;// = 0
private var Y_OFF;// = 0
private var m_bgIsLit:Boolean;// = false
private var m_currAlpha:Number;
public static var ORG_WIDTH = 40;
public static var ORG_HEIGHT = 46;
private static var STATE_FALL:int = 2;
private static var STATE_NEW:int = 1;
private static var STATE_NORMAL:int = 0;
private static var STATE_FADE_IN:int = 3;
public function Org(_arg1:String){
setType(_arg1);
if (((!((_arg1 == "EMPTY"))) && (!((_arg1 == "FF"))))){
create();
cacheAsBitmap = true;
};
}
public function isLit():Boolean{
return (m_bgIsLit);
}
public function render():void{
if (m_doRender){
y = m_currY;
alpha = m_currAlpha;
};
}
public function init(_arg1:int, _arg2:int):void{
var _local3:Object;
_local3 = getStaticPos(_arg1, _arg2);
x = _local3.x;
y = _local3.y;
m_currY = y;
m_currAlpha = 0;
setGrid(_arg1, _arg2);
m_state = STATE_NORMAL;
}
public function doRender(_arg1:Boolean):void{
m_doRender = _arg1;
}
public function setLitBg(_arg1:Boolean):void{
m_bgIsLit = _arg1;
}
public function tick():void{
switch (m_state){
case STATE_NORMAL:
break;
case STATE_NEW:
m_destY.update();
m_currY = m_destY.getValue();
if (m_destY.isDone()){
m_state = STATE_NORMAL;
m_inPosition(getRow(), getCol());
m_inMotion = false;
};
break;
case STATE_FALL:
m_destY.update();
m_currY = m_destY.getValue();
if (m_destY.isDone()){
m_state = STATE_NORMAL;
m_inPosition(getRow(), getCol());
m_inMotion = false;
};
break;
case STATE_FADE_IN:
m_alpha.update();
m_currAlpha = m_alpha.getValue();
if (m_alpha.isDone()){
m_state = STATE_NORMAL;
};
break;
};
}
public function setPos(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Object = getStaticPos(_arg1, _arg2);
m_destY = new EaseBackInterpolator(y, _local4.y, _arg3);
m_state = STATE_FALL;
m_inMotion = true;
m_currAlpha = 1;
}
public function getRow():int{
return (m_row);
}
public function setOff(_arg1:Number, _arg2:Number):void{
X_OFF = _arg1;
Y_OFF = _arg2;
}
public function getType():String{
return (m_type);
}
public function highlight(_arg1:Boolean, _arg2:int=0){
if (_arg1){
if (_arg2 > 2){
m_overLess.visible = false;
m_over.visible = true;
} else {
m_over.visible = false;
m_overLess.visible = true;
};
} else {
if (_arg2 > 2){
m_over.visible = false;
} else {
m_overLess.visible = false;
};
};
m_highlighted = _arg1;
}
public function inMotion():Boolean{
return (m_inMotion);
}
public function setType(_arg1:String):void{
m_type = _arg1;
}
public function getX():Number{
return (x);
}
public function getY():Number{
return (y);
}
public function setCallback(_arg1:Function):void{
m_inPosition = _arg1;
}
public function setGrid(_arg1:int, _arg2:int):void{
m_row = _arg1;
m_col = _arg2;
}
public function newOrgAnim(_arg1:int, _arg2:int, _arg3:Object):void{
var _local4:Object = getStaticPos(_arg3.r, _arg3.c);
x = _local4.x;
y = _local4.y;
m_currY = y;
var _local5:Object = getStaticPos(_arg1, _arg2);
m_destY = new EaseBackInterpolator(m_currY, _local5.y, _arg3.s);
m_currAlpha = 1;
m_state = STATE_NEW;
m_inMotion = true;
}
public function getStaticPos(_arg1:int, _arg2:int):Object{
var _local3:Object = new Object();
var _local4:Number = (_arg2 % 2);
if (_local4){
_local3.y = ((Y_OFF + (ORG_HEIGHT / 2)) + (_arg1 * ORG_HEIGHT));
} else {
_local3.y = (Y_OFF + (_arg1 * ORG_HEIGHT));
};
_local3.x = (X_OFF + (_arg2 * ORG_WIDTH));
return (_local3);
}
public function fadeIn(_arg1:int=2):void{
m_state = STATE_FADE_IN;
m_alpha = new EaseOutInterpolator(0, 1, _arg1);
m_inPosition(getRow(), getCol());
}
public function getRef():Org{
return (this);
}
public function getCol():int{
return (m_col);
}
public function isHigh(){
return (m_highlighted);
}
private function create():void{
var _local2:Sprite;
var _local1:Class = (getDefinitionByName(("org_" + m_type)) as Class);
_local2 = (new (_local1) as Sprite);
addChild(_local2);
m_over = new mcHigh();
_local2.addChild(m_over);
m_over.x = (m_over.x - 5);
m_over.y = (m_over.y - 5);
m_over.visible = false;
m_overLess = new mcHighLess2();
_local2.addChild(m_overLess);
m_overLess.visible = false;
}
public function getStrId():String{
return (((m_row + "_") + m_col));
}
}
}//package
Section 94
//org_BOMB (org_BOMB)
package {
import flash.display.*;
public dynamic class org_BOMB extends MovieClip {
}
}//package
Section 95
//org_CC (org_CC)
package {
import flash.display.*;
public dynamic class org_CC extends MovieClip {
}
}//package
Section 96
//org_DD (org_DD)
package {
import flash.display.*;
public dynamic class org_DD extends MovieClip {
}
}//package
Section 97
//org_FF (org_FF)
package {
import anim.*;
public dynamic class org_FF extends AutoLoopingFlare25Fps {
}
}//package
Section 98
//org_JJ (org_JJ)
package {
import flash.display.*;
public dynamic class org_JJ extends MovieClip {
}
}//package
Section 99
//org_LINK (org_LINK)
package {
import anim.*;
public dynamic class org_LINK extends AutoLoopingFlare25Fps {
}
}//package
Section 100
//org_LL (org_LL)
package {
import flash.display.*;
public dynamic class org_LL extends MovieClip {
}
}//package
Section 101
//org_MM (org_MM)
package {
import flash.display.*;
public dynamic class org_MM extends MovieClip {
}
}//package
Section 102
//org_OO (org_OO)
package {
import flash.display.*;
public dynamic class org_OO extends MovieClip {
}
}//package
Section 103
//particleStar (particleStar)
package {
import flash.display.*;
public dynamic class particleStar extends MovieClip {
}
}//package
Section 104
//Score (Score)
package {
import flash.display.*;
import comm.*;
import flash.text.*;
import gs.*;
import gs.easing.*;
public class Score {
private var m_highestFF:int;// = 0
private var m_lv:int;// = 0
private var m_scorePops:Array;
private var m_animScore:Boolean;// = false
private var m_time1:int;
private var m_time3:int;
private var m_time2:int;
private var m_firstIsFree:Boolean;
private var m_longest:int;// = 0
private var m_decr:int;
private var m_scoreBonus:int;// = 0
private var m_highest:int;// = 0
private var m_lvScore:Boolean;
private var m_scoreBonusDiff:int;// = 0
private var m_textF:TextFormat;
private var Y_OFF:Number;// = 0
private var m_scoreLv:int;// = 0
private var m_root:MovieClip;
private var X_OFF:Number;// = 0
private var m_scoreTot:int;// = 0
private var m_numFF:int;// = 0
public static var UNLIT_SCORE:int = 100;
public static var BONUS_DIFF:int = 10;
public static var LIT_SCORE:int = 10;
public function Score(_arg1:MovieClip){
m_scorePops = new Array();
super();
m_root = _arg1;
keepletterSpacing(m_root.mcScoreBoard.tfStatLv, TextMappings.get("tfStatLv"));
keepletterSpacing(m_root.mcScoreBoard.tfStatTime, TextMappings.get("tfStatTime"));
keepletterSpacing(m_root.mcScoreBoard.tfStatScore, TextMappings.get("tfStatScore"));
keepletterSpacing(m_root.mcScoreBoard.mcBonusMeter.tfStatBonus, TextMappings.get("tfStatBonus"));
keepletterSpacing(m_root.mcScoreBoard.mcBonusMeter.tfStatBonus2, TextMappings.get("tfStatBonus"));
activateBonus(false);
}
public function getBonus():int{
return (m_scoreBonus);
}
public function isTimeWarning():Boolean{
if ((((((m_time1 == 0)) && ((m_time2 == 2)))) && ((m_time3 == 0)))){
return (true);
};
if ((((((m_time1 == 0)) && ((m_time2 == 0)))) && ((m_time3 == 5)))){
return (true);
};
if ((((((m_time1 == 0)) && ((m_time2 == 0)))) && ((m_time3 == 2)))){
return (true);
};
return (false);
}
public function getLevel():int{
return (m_lv);
}
public function animScore(_arg1:Boolean):void{
if (_arg1){
m_animScore = true;
m_decr = (int(m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text) / 50);
} else {
m_animScore = false;
};
}
public function init():void{
keepletterSpacing(m_root.mcScoreBoard.tfCurrLv, "1");
keepletterSpacing(m_root.mcScoreBoard.tfCurrScore, "0");
keepletterSpacing(m_root.mcScoreBoard.tfCurrTime, "0:00");
keepletterSpacing(m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus, "0");
m_root.mcScoreBoard.tfCurrTime2.visible = false;
m_root.mcScoreBoard.tfCurrTime.visible = true;
}
public function getLvScore():int{
return (m_scoreLv);
}
public function render():void{
var _local1:int;
var _local2:int;
if (m_scorePops.length > 0){
_local1 = 0;
while (_local1 < m_scorePops.length) {
m_scorePops[_local1].clip.alpha = m_scorePops[_local1].alpha;
_local1++;
};
};
if (m_animScore){
_local2 = (int(m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text) - m_decr);
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text = _local2;
if (_local2 <= 0){
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text = 0;
m_animScore = false;
activateBonus(false);
setScoreBoard();
};
};
}
public function tick():void{
var _local1:int;
if (m_scorePops.length > 0){
_local1 = 0;
while (_local1 < m_scorePops.length) {
m_scorePops[_local1].tick--;
m_root.setChildIndex(m_scorePops[_local1].clip, (m_root.numChildren - 1));
if (m_scorePops[_local1].tick < 20){
m_scorePops[_local1].alpha = (m_scorePops[_local1].alpha + -0.2);
};
if (m_scorePops[_local1].tick == 0){
m_root.removeChild(m_scorePops[_local1].clip);
m_scorePops.splice(_local1, 1);
};
_local1++;
};
};
}
public function setOff(_arg1:Number, _arg2:Number):void{
X_OFF = _arg1;
Y_OFF = _arg2;
}
public function getNumFf():int{
return (m_numFF);
}
public function calcScore(_arg1:Array):int{
var _local2:Number = getMultiplyer(_arg1.length);
var _local3:Number = 0;
var _local4:int;
var _local5:int;
var _local6:int;
while (_local6 < _arg1.length) {
if (_arg1[_local6].isLit){
_local5++;
} else {
_local4++;
};
_local6++;
};
if (_local4 == 0){
return (0);
};
_local3 = ((_local4 * UNLIT_SCORE) * _local2);
_local3 = (_local3 + (_local5 * LIT_SCORE));
showScorePop(_arg1[(_arg1.length - 1)].r, _arg1[(_arg1.length - 1)].c, _local3);
setScore(int(_local3));
setScoreBoard();
m_scoreLv = (m_scoreLv + int(_local3));
if (_arg1.length > m_longest){
m_longest = _arg1.length;
};
if (_local3 > m_highest){
m_highest = int(_local3);
};
return (int(_local3));
}
public function incrFf():void{
m_numFF++;
}
private function getMultiplyer(_arg1:int):Number{
var _local2:Number = 1;
if ((((_arg1 > 4)) && ((_arg1 < 10)))){
_local2 = 1.25;
} else {
if ((((_arg1 > 9)) && ((_arg1 < 15)))){
_local2 = 1.5;
} else {
if ((((_arg1 > 14)) && ((_arg1 < 20)))){
_local2 = 2;
} else {
if (_arg1 >= 20){
_local2 = 2.5;
} else {
_local2 = 1;
};
};
};
};
return (_local2);
}
public function setLevel(_arg1:String):void{
keepletterSpacing(m_root.mcScoreBoard.tfCurrLv, _arg1);
m_lv = int(_arg1);
}
public function sum():void{
trace(" ******* SUM SCORES ******");
trace(("Adding bonus to total : " + m_scoreBonus));
setScore(m_scoreBonus);
if (m_scoreBonus > m_highestFF){
m_highestFF = m_scoreBonus;
};
}
public function setTime(_arg1:int):void{
var _local2:int = (_arg1 / 25);
var _local3:int = (_local2 / 60);
_local2 = (_local2 - (_local3 * 60));
var _local4:int = int((_local2 / 10));
m_time1 = _local3;
m_time2 = _local4;
m_time3 = int((_local2 - (_local4 * 10)));
var _local5:String = ((((m_time1 + ":") + m_time2) + "") + m_time3);
if ((((m_time1 == 0)) && ((m_time2 < 2)))){
keepletterSpacing(m_root.mcScoreBoard.tfCurrTime2, _local5);
m_root.mcScoreBoard.tfCurrTime2.visible = true;
m_root.mcScoreBoard.tfCurrTime.visible = false;
} else {
keepletterSpacing(m_root.mcScoreBoard.tfCurrTime, _local5);
m_root.mcScoreBoard.tfCurrTime2.visible = false;
m_root.mcScoreBoard.tfCurrTime.visible = true;
};
}
public function getHighestFf():int{
return (m_highestFF);
}
private function setScore(_arg1:int):void{
m_scoreTot = (m_scoreTot + _arg1);
}
public function keepletterSpacing(_arg1:TextField, _arg2:String):void{
m_textF = _arg1.getTextFormat();
_arg1.text = _arg2;
_arg1.setTextFormat(m_textF);
}
public function getLongest():int{
return (m_longest);
}
public function getScore():int{
return (m_scoreTot);
}
public function setBonus():void{
m_scoreBonus = getLvScore();
m_scoreBonusDiff = (m_scoreBonus / BONUS_DIFF);
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text = m_scoreBonus;
m_firstIsFree = true;
}
public function getStaticPos(_arg1:int, _arg2:int):Object{
var _local3:Object = new Object();
var _local4:Number = (_arg1 % 2);
if (_local4){
_local3.x = ((X_OFF + (Org.ORG_WIDTH / 2)) + (_arg2 * Org.ORG_WIDTH));
} else {
_local3.x = (X_OFF + (_arg2 * Org.ORG_WIDTH));
};
_local3.y = (Y_OFF + (_arg1 * Org.ORG_HEIGHT));
return (_local3);
}
public function getScoreDecr():int{
return (m_decr);
}
public function activateBonus(_arg1:Boolean):void{
if (_arg1){
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.visible = true;
TweenLite.to(m_root.mcScoreBoard.mcBonusMeter.tfStatBonus, 1, {alpha:1});
TweenLite.to(m_root.mcScoreBoard.mcBonusMeter.bonusOn, 1, {alpha:1});
} else {
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text = 0;
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.visible = false;
TweenLite.to(m_root.mcScoreBoard.mcBonusMeter.tfStatBonus, 1, {alpha:0});
TweenLite.to(m_root.mcScoreBoard.mcBonusMeter.bonusOn, 1, {alpha:0});
};
}
public function endGame():void{
m_numFF = 0;
m_longest = 0;
m_highest = 0;
m_highestFF = 0;
}
public function getHighest():int{
return (m_highest);
}
public function calcScoreFly():void{
if (m_firstIsFree){
m_firstIsFree = false;
} else {
m_scoreBonus = (m_scoreBonus - m_scoreBonusDiff);
if (m_scoreBonus < 0){
m_scoreBonus = 0;
};
};
m_root.mcScoreBoard.mcBonusMeter.tfCurrBonus.text = m_scoreBonus;
}
public function endLevel():void{
m_scoreLv = 0;
m_scoreBonus = 0;
}
public function remScorePops():void{
var _local1:int;
while (_local1 < m_scorePops.length) {
m_root.removeChild(m_scorePops[_local1].clip);
_local1++;
};
m_scorePops = new Array();
}
public function showScorePop(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Object = new Object();
var _local5:MovieClip = new mcScorePop();
_local5.tfScore.text = _arg3;
_local5.x = (getStaticPos(_arg1, _arg2).x + 30);
_local5.y = (getStaticPos(_arg1, _arg2).y - 10);
m_root.addChild(_local5);
_local4.alpha = 1;
_local4.tick = 60;
_local4.clip = _local5;
m_scorePops.push(_local4);
}
public function setScoreBoard():void{
keepletterSpacing(m_root.mcScoreBoard.tfCurrScore, String(m_scoreTot));
}
}
}//package