Section 1
//AutoLoopingFlare12Fps (anim.AutoLoopingFlare12Fps)
package anim {
public class AutoLoopingFlare12Fps extends BaseFlare {
public function AutoLoopingFlare12Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(12);
start();
}
}
}//package anim
Section 2
//AutoLoopingFlare25Fps (anim.AutoLoopingFlare25Fps)
package anim {
import flash.display.*;
public class AutoLoopingFlare25Fps extends BaseFlare {
public var pluppHilite:MovieClip;
public function AutoLoopingFlare25Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 3
//AutoLoopingFlare50Fps (anim.AutoLoopingFlare50Fps)
package anim {
public class AutoLoopingFlare50Fps extends BaseFlare {
public function AutoLoopingFlare50Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(50);
start();
}
}
}//package anim
Section 4
//AutoLoopingFlare6Fps (anim.AutoLoopingFlare6Fps)
package anim {
public class AutoLoopingFlare6Fps extends BaseFlare {
public function AutoLoopingFlare6Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(6);
start();
}
}
}//package anim
Section 5
//AutoSingleFlare25Fps (anim.AutoSingleFlare25Fps)
package anim {
import flash.display.*;
import flash.text.*;
public class AutoSingleFlare25Fps extends BaseFlare {
public var pylonRed:MovieClip;
public var mcTimeNum2:MovieClip;
public var topTriangle:MovieClip;
public var pylonBlue:MovieClip;
public var mcTimeNum5:MovieClip;
public var txtPrevTotalScore:TextField;
public var mcTimeNum4:MovieClip;
public var txtPowerNumUnitsB:TextField;
public var bKey:MovieClip;
public var pedal:MovieClip;
public var txtNumTotal:TextField;
public var pylonYellow:MovieClip;
public var mcSecNum2:MovieClip;
public var txtTotalScore:TextField;
public var txtStartIn:TextField;
public var mcSecNum1:MovieClip;
public var txtPowerB:TextField;
public var txtPowerR:TextField;
public var txtPowerUnits:TextField;
public var introBgr:MovieClip;
public var txtClickToStart:TextField;
public var txtGameStatus:TextField;
public var txtNumPrevTotal:TextField;
public var pluppHilite:MovieClip;
public var mcTimeNum1:MovieClip;
public var txtPowerNumUnitsY:TextField;
public var mcLogo:MovieClip;
public var mcTimeNum3:MovieClip;
public var txtPowerY:TextField;
public var bubble:MovieClip;
public function AutoSingleFlare25Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 6
//AutoSingleFlare40Fps (anim.AutoSingleFlare40Fps)
package anim {
import flash.text.*;
public class AutoSingleFlare40Fps extends BaseFlare {
public var txt5:TextField;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var txt4:TextField;
public function AutoSingleFlare40Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(40);
start();
}
}
}//package anim
Section 7
//AutoSingleFlare50Fps (anim.AutoSingleFlare50Fps)
package anim {
import flash.display.*;
public class AutoSingleFlare50Fps extends BaseFlare {
public var mcBgSpin:bgrAnim_yellow;
public var sign:MovieClip;
public var mcLogo:MovieClip;
public function AutoSingleFlare50Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(50);
start();
}
}
}//package anim
Section 8
//BaseFlare (anim.BaseFlare)
package anim {
import flash.display.*;
import flash.utils.*;
import flash.events.*;
public class BaseFlare extends MovieClip {
protected var m_isLoop:Boolean;
protected var m_frameRate:int;
protected var m_isPaused:Boolean;
protected var m_isRemoveAfterPlay:Boolean;
protected var m_frameOffset:int;
private var m_startTime:int;
private var m_restartAt:int;
private var m_firstRender:Boolean;
private var m_step:Number;
private var m_lastFrame:uint;
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);
}
public function setLoopRestartFrame(_arg1:int):void{
m_restartAt = _arg1;
}
public function setFrameOffSet(_arg1:int):void{
m_frameOffset = _arg1;
}
public function start():void{
visible = true;
m_lastFrame = 0;
m_firstRender = true;
addEventListener(Event.ENTER_FRAME, enterFrame);
}
override public function stop():void{
m_firstRender = true;
removeEventListener(Event.ENTER_FRAME, enterFrame);
if (m_isRemoveAfterPlay){
parent.removeChild(this);
};
}
public function setFrameRate(_arg1:int):void{
m_frameRate = _arg1;
m_step = ((1 / m_frameRate) * 1000);
}
public function setLoop(_arg1:Boolean):void{
m_isLoop = _arg1;
}
public function setDestroyAfterPlay(_arg1:Boolean):void{
m_isRemoveAfterPlay = _arg1;
}
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 9
//EaseInQuadInterpolator (anim.EaseInQuadInterpolator)
package anim {
public class EaseInQuadInterpolator extends Interpolator {
public function EaseInQuadInterpolator(_arg1:Number, _arg2:Number, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override public function nextPosition():void{
var _local1:Number = (m_dt * m_dt);
var _local2:Number = (m_duration * m_duration);
m_value = (((m_dv * _local1) / _local2) + m_startValue);
}
}
}//package anim
Section 10
//EaseOutInterpolator (anim.EaseOutInterpolator)
package anim {
public class EaseOutInterpolator extends Interpolator {
public function EaseOutInterpolator(_arg1:Number, _arg2:Number, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override public function nextPosition():void{
m_value = easeOut(m_dt, m_startValue, (m_targetValue - m_startValue), m_duration);
}
private function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package anim
Section 11
//Interpolator (anim.Interpolator)
package anim {
public class Interpolator {
protected var m_finished:Boolean;
protected var m_duration:int;
protected var m_value:Number;
protected var m_dv:Number;
protected var m_targetValue:Number;
protected var m_startValue:Number;
protected var m_dt:int;
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 isDone():Boolean{
return (m_finished);
}
public function getValue():Number{
return (m_value);
}
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 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 nextPosition():void{
m_value = (((m_dv * m_dt) / m_duration) + m_startValue);
}
}
}//package anim
Section 12
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var target:Object;
public var property:String;
public var start:Number;
public var change:Number;
public var name:String;
public var priority:int;
public var isPlugin:Boolean;
public var nextNode:PropTween;
public var prevNode:PropTween;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 13
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
protected var _firstChild:TweenCore;
protected var _lastChild:TweenCore;
public var autoRemoveChildren:Boolean;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
public function addChild(_arg1:TweenCore):void{
if (_arg1.timeline){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
_arg1.nextNode = _firstChild;
} else {
_arg1.nextNode = null;
};
_firstChild = _arg1;
_arg1.prevNode = null;
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (((!(_arg1.gc)) && (!(_arg2)))){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
_arg1.nextNode = (_arg1.prevNode = null);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))))){
if (!_local4.cachedReversed){
_local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration;
_local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false);
};
};
_local4 = _local6;
};
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package com.greensock.core
Section 14
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
protected var _delay:Number;
protected var _hasUpdate:Boolean;
protected var _rawPrevTime:Number;// = -1
protected var _pauseTime:Number;
public var vars:Object;
public var active:Boolean;
public var gc:Boolean;
public var initted:Boolean;
public var timeline:SimpleTimeline;
public var cachedStartTime:Number;
public var cachedTime:Number;
public var cachedTotalTime:Number;
public var cachedDuration:Number;
public var cachedTotalDuration:Number;
public var cachedTimeScale:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
public var prevNode:TweenCore;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var data;
public static const version:Number = 1;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2) || ({}));
this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0)));
_delay = ((this.vars.delay) || (0));
this.cachedTimeScale = ((this.vars.timeScale) || (1));
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function pause():void{
this.paused = true;
}
public function resume():void{
this.paused = false;
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.cachedTotalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTime == this.cachedDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function invalidate():void{
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
if (_arg1 == this.gc){
this.gc = !(_arg1);
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (!_arg2){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (!_arg2){
this.timeline.remove(this);
};
};
};
return (false);
}
public function kill():void{
setEnabled(false, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function get delay():Number{
return (_delay);
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get currentTime():Number{
return (this.cachedTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setEnabled(true, false);
};
}
}
}//package com.greensock.core
Section 15
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class BezierPlugin extends TweenPlugin {
protected var _target:Object;
protected var _orientData:Array;
protected var _orient:Boolean;
protected var _future:Object;
protected var _beziers:Object;
public static const API:Number = 1;
protected static const _RAD2DEG:Number = 57.2957795130823;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
var _local4:Object = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars;
if (_local4.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0, 0.01]];
_orient = true;
} else {
if ((_local4.orientToBezier is Array)){
_orientData = _local4.orientToBezier;
_orient = true;
};
};
var _local5:Object = {};
_local6 = 0;
while (_local6 < _arg2.length) {
for (_local7 in _arg2[_local6]) {
if (_local5[_local7] == undefined){
_local5[_local7] = [_arg1.target[_local7]];
};
if (typeof(_arg2[_local6][_local7]) == "number"){
_local5[_local7].push(_arg2[_local6][_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7])));
};
};
_local6++;
};
for (_local7 in _local5) {
this.overwriteProps[this.overwriteProps.length] = _local7;
if (_local4[_local7] != undefined){
if (typeof(_local4[_local7]) == "number"){
_local5[_local7].push(_local4[_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7])));
};
_local8 = {};
_local8[_local7] = true;
_arg1.killVars(_local8, false);
delete _local4[_local7];
};
};
_beziers = parseBeziers(_local5, _arg3);
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:Object;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Object;
var _local14:Boolean;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5));
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local2 = _orientData.length;
_local8 = {};
while (_local2--) {
_local11 = _orientData[_local2];
_local8[_local11[0]] = _target[_local11[0]];
_local8[_local11[1]] = _target[_local11[1]];
};
_local13 = _target;
_local14 = this.round;
_target = _future;
this.round = false;
_orient = false;
_local2 = _orientData.length;
while (_local2--) {
_local11 = _orientData[_local2];
this.changeFactor = (_arg1 + ((_local11[4]) || (0.01)));
_local12 = ((_local11[3]) || (0));
_local9 = (_future[_local11[0]] - _local8[_local11[0]]);
_local10 = (_future[_local11[1]] - _local8[_local11[1]]);
_local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12);
};
_target = _local13;
this.round = _local14;
_orient = true;
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package com.greensock.plugins
Section 16
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class TweenPlugin {
public var propName:String;
public var overwriteProps:Array;
public var round:Boolean;
public var priority:int;// = 0
public var activeDisable:Boolean;
public var onComplete:Function;
public var onEnable:Function;
public var onDisable:Function;
protected var _tweens:Array;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (Number(_arg4) - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
protected function updateTweens(_arg1:Number):void{
var _local3:PropTween;
var _local4:Number;
var _local2:int = _tweens.length;
if (this.round){
while (_local2--) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function killProps(_arg1:Object):void{
var _local2:int = this.overwriteProps.length;
while (_local2--) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (_local2--) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local3:PropTween = _arg2.cachedPT1;
if (_arg1 == "onInit"){
_local5 = [];
while (_local3) {
_local5[_local5.length] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
_local6 = _local5.length;
while (_local6--) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_arg2.cachedPT1 = _local5[0];
} else {
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
var _local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
};
return (_local4);
}
public static function activate(_arg1:Array):Boolean{
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
var _local2:int = _arg1.length;
while (_local2--) {
if (_arg1[_local2].hasOwnProperty("API")){
_local3 = new ((_arg1[_local2] as Class));
TweenLite.plugins[_local3.propName] = _arg1[_local2];
};
};
return (true);
}
}
}//package com.greensock.plugins
Section 17
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
import flash.events.*;
public class TweenLite extends TweenCore {
public var target:Object;
public var propTweenLookup:Object;
public var ratio:Number;// = 0
public var cachedPT1:PropTween;
protected var _ease:Function;
protected var _overwrite:uint;
protected var _overwrittenProps:Object;
protected var _hasPlugins:Boolean;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.101;
public static var plugins:Object = {};
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var defaultEase:Function = TweenLite.easeOut;
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var rootTimeline:SimpleTimeline;
public static var rootFramesTimeline:SimpleTimeline;
public static var masterList:Dictionary = new Dictionary(false);
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
this.target = _arg1;
if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!(("overwrite" in _arg3))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (_local2--) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInit", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
this.active = true;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local4 = true;
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local4){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (_arg2){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1 == this.gc){
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
};
return (false);
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame++;
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (_local5--) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
if ((_arg1 in masterList)){
_local3 = masterList[_arg1];
_local4 = _local3.length;
while (_local4--) {
if (!TweenLite(_local3[_local4]).gc){
if (_arg2){
TweenLite(_local3[_local4]).complete(false, false);
} else {
TweenLite(_local3[_local4]).setEnabled(false, false);
};
};
};
delete masterList[_arg1];
};
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
}
}//package com.greensock
Section 18
//ManagedSound (com.midasplayer.sound.ManagedSound)
package com.midasplayer.sound {
import flash.media.*;
public class ManagedSound {
private var ClassReference:Class;
public var activeSounds:Array;
private var manager:SoundManager;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
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 stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
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++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_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 isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
}
}//package com.midasplayer.sound
Section 19
//ManagedSoundChannel (com.midasplayer.sound.ManagedSoundChannel)
package com.midasplayer.sound {
import flash.utils.*;
import flash.events.*;
import flash.media.*;
public class ManagedSoundChannel {
private var sound:ManagedSound;
private var channel:SoundChannel;
private var manager:SoundManager;
private var targetVolume:Number;
private var targetPan:Number;
private var fadeStartTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var fadeStartVolume:Number;// = -1
private var fadeEndVolume:Number;// = -1
private var panStartTime:Number;// = -1
private var panEndTime:Number;// = -1
private var panStartVolume:Number;// = -1
private var panEndVolume:Number;// = -1
private var stopAfterFade:Boolean;// = false
private var playing:Boolean;// = true
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 soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
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 fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
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 isPlaying():Boolean{
return (playing);
}
}
}//package com.midasplayer.sound
Section 20
//SoundManager (com.midasplayer.sound.SoundManager)
package com.midasplayer.sound {
import flash.utils.*;
public class SoundManager {
private var managedSoundMap:Object;
private var managedSounds:Array;
private var lastTime:Number;// = -1
public var volume:Number;// = 1
private var fadeStartTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var fadeStartVolume:Number;// = -1
private var fadeEndVolume:Number;// = -1
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(_arg1) as Class);
if (_local2 == null){
_local2 = (getDefinitionByName(("sound." + _arg1)) as Class);
};
if (_local2 == null){
_local2 = (getDefinitionByName(("snd." + _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 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 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;
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
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++;
};
}
}
}//package com.midasplayer.sound
Section 21
//bgrAnim_intro_22 (klickerklacker2_fla.bgrAnim_intro_22)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class bgrAnim_intro_22 extends MovieClip {
public var medium:pumpjackAnim;
public var small:pumpjackAnim;
public function bgrAnim_intro_22(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package klickerklacker2_fla
Section 22
//bgrAnim_red_132 (klickerklacker2_fla.bgrAnim_red_132)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class bgrAnim_red_132 extends MovieClip {
public var medium:pumpjackAnim;
public var mini:pumpjackAnim;
public var small:pumpjackAnim;
public function bgrAnim_red_132(){
addFrameScript(0, frame1);
}
function frame1(){
medium.gotoAndPlay(50);
small.gotoAndPlay(100);
mini.gotoAndPlay(150);
stop();
}
}
}//package klickerklacker2_fla
Section 23
//bgrAnim_red_153 (klickerklacker2_fla.bgrAnim_red_153)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class bgrAnim_red_153 extends MovieClip {
public var medium:pumpjackAnim;
public var large:pumpjackAnim;
public var mini:pumpjackAnim;
public var small:pumpjackAnim;
public function bgrAnim_red_153(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package klickerklacker2_fla
Section 24
//blastometer_14 (klickerklacker2_fla.blastometer_14)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class blastometer_14 extends MovieClip {
public var hit:MovieClip;
public function blastometer_14(){
addFrameScript(0, frame1, 8, frame9, 74, frame75);
}
function frame1(){
stop();
}
function frame9(){
play();
}
function frame75(){
gotoAndPlay(9);
}
}
}//package klickerklacker2_fla
Section 25
//intro_21 (klickerklacker2_fla.intro_21)
package klickerklacker2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class intro_21 extends MovieClip {
public var instr:introBlockAnim;
public var mcSec:MovieClip;
public var RED:MovieClip;
public var txtStartIn:TextField;
public var YELLOW:MovieClip;
public var mcMin:MovieClip;
public var introBgr:MovieClip;
public var txtClickToStart:TextField;
public var BLUE:MovieClip;
public var txtGameInstructions:TextField;
public function intro_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 26
//meterScale_128 (klickerklacker2_fla.meterScale_128)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class meterScale_128 extends MovieClip {
public function meterScale_128(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 27
//music_62 (klickerklacker2_fla.music_62)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class music_62 extends MovieClip {
public function music_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 28
//numbers_5 (klickerklacker2_fla.numbers_5)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class numbers_5 extends MovieClip {
public function numbers_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 29
//playfield_1 (klickerklacker2_fla.playfield_1)
package klickerklacker2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class playfield_1 extends MovieClip {
public var perc100:MovieClip;
public var mcTimeNum2:MovieClip;
public var mcLevelNum:MovieClip;
public var mcScoreNum5:MovieClip;
public var mcScoreNum4:MovieClip;
public var lampR:timeAlert;
public var mcScoreNum7:MovieClip;
public var txtCurrLevel:TextField;
public var mcScoreNum6:MovieClip;
public var mcScoreNum1:MovieClip;
public var mcScoreNum3:MovieClip;
public var mcScoreNum2:MovieClip;
public var txtYourScore:TextField;
public var mcTimeNum1:MovieClip;
public var mcScoreNum8:MovieClip;
public var lampL:timeAlert;
public var mcTimeNum3:MovieClip;
public var txtTimeLeft:TextField;
public function playfield_1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package klickerklacker2_fla
Section 30
//powerPylon_32 (klickerklacker2_fla.powerPylon_32)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class powerPylon_32 extends MovieClip {
public var powerLeg:MovieClip;
public var flash1:powerFlash;
public var flash2:powerFlash;
public var flash3:powerFlash;
public var powerArm:MovieClip;
public function powerPylon_32(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
}
function frame2(){
flash1.gotoAndPlay(2);
flash3.gotoAndPlay(8);
}
function frame30(){
stop();
}
}
}//package klickerklacker2_fla
Section 31
//radioCont_147 (klickerklacker2_fla.radioCont_147)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class radioCont_147 extends MovieClip {
public function radioCont_147(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 32
//sound_63 (klickerklacker2_fla.sound_63)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class sound_63 extends MovieClip {
public function sound_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package klickerklacker2_fla
Section 33
//triangleSign_115 (klickerklacker2_fla.triangleSign_115)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class triangleSign_115 extends MovieClip {
public function triangleSign_115(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package klickerklacker2_fla
Section 34
//triangleSign_60 (klickerklacker2_fla.triangleSign_60)
package klickerklacker2_fla {
import flash.display.*;
public dynamic class triangleSign_60 extends MovieClip {
public function triangleSign_60(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package klickerklacker2_fla
Section 35
//I18n (utils.I18n)
package utils {
public class I18n {
private static var m_strings:Object;
public function I18n(){
m_strings = new Object();
}
public static function init(_arg1:Object):void{
var _local2:String;
m_strings = new Object();
for (_local2 in _arg1) {
m_strings[_local2] = _arg1[_local2];
};
}
public static function getString(_arg1:String, ... _args):String{
var _local3:String;
var _local4:*;
var _local5:RegExp;
if (m_strings[_arg1] != undefined){
_local3 = m_strings[_arg1];
if (_args.length > 0){
_local4 = 0;
while (_local4 < _args.length) {
_local5 = new RegExp((("\\{" + _local4) + "\\}"), "gi");
_local3 = _local3.replace(_local5, _args[_local4]);
_local4++;
};
};
return (_local3);
} else {
};
return ((!NULL! + !NULL!));
}
}
}//package utils
Section 36
//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 init(_arg1:Integer64):void{
var _local2:* = 0;
while (_local2 < p.length) {
p[_local2] = _arg1.p[_local2];
_local2++;
};
}
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 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 binaryShiftLeft(_arg1:Number):void{
var _local2:* = 0;
while (_local2 < _arg1) {
shl();
_local2++;
};
}
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 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 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++;
};
}
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 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;
}
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);
}
public function mul32(_arg1:Number):void{
mul64(new Integer64(_arg1));
}
private function merge(_arg1:Number):Number{
var _local2:* = 0;
while (_local2 < 3) {
p[_local2] = (p[_local2] + (_arg1 & 32767));
_arg1 = (_arg1 >>> 15);
_local2++;
};
return (_arg1);
}
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;
};
}
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;
};
}
}
}//package utils
Section 37
//MouseInput (utils.MouseInput)
package utils {
public class MouseInput {
public var xMouse:int;
public var yMouse:int;
public var mouseIsPressed:Boolean;
public function MouseInput(){
trace("Welcome Input()");
}
public function init(){
reset();
}
public function reset(){
mouseIsPressed = false;
}
public function setMousePos(_arg1:Number, _arg2:Number){
xMouse = _arg1;
yMouse = _arg2;
}
public function mousePressed(){
mouseIsPressed = true;
}
public function mouseReleased(){
mouseIsPressed = false;
}
public function printInput(){
}
}
}//package utils
Section 38
//Random (utils.Random)
package utils {
import flash.utils.*;
public class Random {
private var mta:Array;
private var lastSeed:Number;
private var mti:Number;
public static var nr:int = 0;
private static var N:Number = 624;
private static var M:Number = 397;
private static var MATRIX_A:Number = 2567483615;
private static var UPPER_MASK:Number = 2147483648;
private static var LOWER_MASK:Number = 2147483647;
private static var mag01:Array = [0, 2567483615];
public function Random(_arg1:Number){
mta = new Array(N);
mti = (N + 1);
if (_arg1){
init_genrand(_arg1);
};
}
public function set seed(_arg1:Number){
init_genrand(_arg1);
}
public function get seed():Number{
return (lastSeed);
}
public function nextInt(_arg1:Number){
nr++;
return (((genrand_int32() & 2147483647) % _arg1));
}
public function nextFloat(){
return ((next(24) / (1 << 24)));
}
public function nextDouble(){
return ((next(24) / (1 << 24)));
}
public function next(_arg1:Number){
if (_arg1 < 32){
return ((genrand_int32() & ((1 << _arg1) - 1)));
};
return (genrand_int32());
}
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();
}
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 39
//Timer (utils.Timer)
package utils {
import flash.utils.*;
public class Timer {
private var lastTime:Number;// = -1
private var ticksPerSecond:Number;
private var msPerTick:Number;
private var unprocessedTime:Number;// = 0
public var alpha:Number;// = 0
public var timeScale:Number;// = 1
public var passedTime: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 40
//bgrAnim_yellow (bgrAnim_yellow)
package {
import anim.*;
public dynamic class bgrAnim_yellow extends AutoLoopingFlare12Fps {
}
}//package
Section 41
//blastcolumn (blastcolumn)
package {
import anim.*;
public dynamic class blastcolumn extends AutoLoopingFlare6Fps {
}
}//package
Section 42
//Block (Block)
package {
import anim.*;
import flash.display.*;
import flash.utils.*;
public class Block extends MovieClip {
private var X_OFF:int;// = 76
private var Y_OFF:int;// = 76
private var m_type:String;
private var m_over:Sprite;
private var m_isHigh:Boolean;// = false
private var m_row:int;
private var m_col:int;
private var m_status:String;// = "IDLE"
private var m_fallHeight:int;// = 0
private var m_radioActive:String;// = ""
private var m_bombActive:String;// = "I"
public var m_state:int;// = 0
private var m_currX:Number;
private var m_currY:Number;
private var m_scale:Interpolator;
private var m_scaleX:Number;// = 1
private var m_scaleY:Number;// = 1
private var m_destY:Interpolator;
private var m_destX:Interpolator;
public static var B_HEIGHT = 30;
public static var B_WIDTH = 30;
private static var STATE_IDLE:int = 0;
private static var STATE_FALL:int = 1;
private static var STATE_TWEAK:int = 2;
private static var STATE_SHRINK:int = 3;
public function Block(_arg1:String){
m_over = new Sprite();
super();
m_type = _arg1;
mouseChildren = false;
mouseEnabled = false;
cacheAsBitmap = true;
}
public function create():void{
setStatus("ACTIVE");
var _local1:Class = (getDefinitionByName((m_type + m_radioActive)) as Class);
var _local2:Sprite = (new (_local1) as Sprite);
_local2.name = "A_I";
addChild(_local2);
var _local3:Class = (getDefinitionByName(((m_type + m_radioActive) + "_over")) as Class);
var _local4:BitmapData = (new _local3(0, 0) as BitmapData);
var _local5:Bitmap = new Bitmap(_local4);
m_over.visible = false;
m_over.addChild(_local5);
_local5.x = (_local5.x - (_local5.width / 2));
_local5.y = (_local5.y - (_local5.height / 2));
m_over.name = "A_O";
addChild(m_over);
if (m_type != "BOMB"){
return;
};
var _local6:BitmapData = new BOMB_inactive_over(0, 0);
var _local7:Bitmap = new Bitmap(_local6);
_local7.name = "I_O";
_local7.x = (_local7.x - (_local7.width / 2));
_local7.y = (_local7.y - (_local7.height / 2));
addChild(_local7);
var _local8:BitmapData = new BOMB_inactive(0, 0);
var _local9:Bitmap = new Bitmap(_local8);
_local9.name = "I_I";
_local9.x = (_local9.x - (_local9.width / 2));
_local9.y = (_local9.y - (_local9.height / 2));
addChild(_local9);
}
public function markAsRadioActive():void{
m_radioActive = "_R";
}
public function init(_arg1:int, _arg2:int):void{
var _local3:Object = getStaticPos(_arg1, _arg2);
x = (m_currX = _local3.x);
y = (m_currY = _local3.y);
}
public function tick():void{
switch (m_state){
case STATE_IDLE:
break;
case STATE_FALL:
m_destY.update();
m_currY = m_destY.getValue();
if (m_destY.isDone()){
m_state = STATE_IDLE;
};
break;
case STATE_TWEAK:
m_destX.update();
m_currX = m_destX.getValue();
if (m_destX.isDone()){
m_state = STATE_IDLE;
};
break;
};
}
public function render():void{
y = m_currY;
x = m_currX;
scaleX = m_scaleX;
scaleY = m_scaleY;
}
public function setGrid(_arg1:int, _arg2:int):void{
m_row = _arg1;
m_col = _arg2;
}
public function setHigh(_arg1:Boolean):void{
m_isHigh = _arg1;
if (m_type == "BOMB"){
mouseOverBomb(_arg1);
} else {
m_over.visible = _arg1;
};
if (_arg1){
buttonMode = true;
} else {
buttonMode = false;
};
}
public function setStatus(_arg1:String):void{
m_status = _arg1;
}
public function doFall(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Object = getStaticPos(_arg1, _arg2);
m_destY = new EaseInQuadInterpolator(y, _local4.y, 5);
m_state = STATE_FALL;
}
public function doTweak(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Object = getStaticPos(_arg1, _arg2);
m_destX = new EaseInQuadInterpolator(x, _local4.x, 5);
m_state = STATE_TWEAK;
}
public function setBombInitActive(_arg1:Boolean):void{
if (_arg1){
getChildAt(2).visible = (getChildAt(3).visible = false);
getChildAt(0).visible = true;
m_bombActive = "A";
} else {
getChildAt(0).visible = (getChildAt(1).visible = false);
};
}
private function mouseOverBomb(_arg1:Boolean):void{
if (_arg1){
getChildByName((m_bombActive + "_O")).visible = true;
getChildByName((m_bombActive + "_I")).visible = false;
} else {
getChildByName((m_bombActive + "_I")).visible = true;
getChildByName((m_bombActive + "_O")).visible = false;
};
}
public function isActiveBomb():Boolean{
if (m_bombActive == "A"){
return (true);
};
return (false);
}
public function isRadioActive():Boolean{
if (m_radioActive != ""){
return (true);
};
return (false);
}
public function getFall():int{
return (m_fallHeight);
}
public function getRow():int{
return (m_row);
}
public function getCol():int{
return (m_col);
}
public function isHigh():Boolean{
return (m_isHigh);
}
public function getType():String{
return (m_type);
}
public function getStatus():String{
return (m_status);
}
public function getStaticPos(_arg1:int, _arg2:int):Object{
var _local3:Object = new Object();
_local3.y = ((Y_OFF + (_arg1 * B_HEIGHT)) + (B_HEIGHT / 2));
_local3.x = ((X_OFF + (_arg2 * B_WIDTH)) + (B_WIDTH / 2));
return (_local3);
}
}
}//package
Section 43
//BOMB (BOMB)
package {
import flash.display.*;
public dynamic class BOMB extends MovieClip {
}
}//package
Section 44
//BOMB_inactive (BOMB_inactive)
package {
import flash.display.*;
public dynamic class BOMB_inactive extends BitmapData {
public function BOMB_inactive(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 45
//BOMB_inactive_over (BOMB_inactive_over)
package {
import flash.display.*;
public dynamic class BOMB_inactive_over extends BitmapData {
public function BOMB_inactive_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 46
//BOMB_over (BOMB_over)
package {
import flash.display.*;
public dynamic class BOMB_over extends BitmapData {
public function BOMB_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 47
//bombAnimRotate (bombAnimRotate)
package {
import anim.*;
public dynamic class bombAnimRotate extends AutoLoopingFlare25Fps {
}
}//package
Section 48
//bombDetonation (bombDetonation)
package {
import flash.media.*;
public dynamic class bombDetonation extends Sound {
}
}//package
Section 49
//bonus90 (bonus90)
package {
import flash.media.*;
public dynamic class bonus90 extends Sound {
}
}//package
Section 50
//btnClick (btnClick)
package {
import flash.media.*;
public dynamic class btnClick extends Sound {
}
}//package
Section 51
//Calc (Calc)
package {
public class Calc {
private var m_rows:int;
private var m_cols:int;
private var m_blocks:Array;
private var m_high:Array;
private var m_checkMyNeighbour:Array;
public function Calc(){
m_high = new Array();
m_checkMyNeighbour = new Array();
super();
}
public function setRowCol(_arg1:int, _arg2:int):void{
m_rows = _arg1;
m_cols = _arg2;
}
public function setLevel(_arg1:Array):void{
m_blocks = _arg1;
}
public function isOob(_arg1:int, _arg2:int):Boolean{
if ((((_arg1 < 0)) || ((_arg2 < 0)))){
return (true);
};
if ((((_arg1 >= m_rows)) || ((_arg2 >= m_cols)))){
return (true);
};
return (false);
}
public function isIdle(_arg1:int, _arg2:int):Boolean{
if (m_blocks[_arg1][_arg2].getStatus() == "IDLE"){
return (true);
};
return (false);
}
private function isValid(_arg1:int, _arg2:int):Boolean{
if (isOob(_arg1, _arg2)){
return (false);
};
if (isIdle(_arg1, _arg2)){
return (false);
};
return (true);
}
public function moreMoves():Boolean{
var _local4:int;
var _local5:int;
var _local1:int;
while (_local1 < m_cols) {
if (m_blocks[(m_rows - 1)][_local1].isActiveBomb()){
return (true);
};
_local1++;
};
var _local2:int;
while (_local2 < m_cols) {
_local4 = (m_rows - 1);
while (_local4 > 0) {
if (((!((m_blocks[_local4][_local2].getType() == "EMPTY"))) && (!((m_blocks[_local4][_local2].getType() == "BOMB"))))){
if (m_blocks[_local4][_local2].getType() == m_blocks[(_local4 - 1)][_local2].getType()){
return (true);
};
};
_local4--;
};
_local2++;
};
var _local3:int;
while (_local3 < m_rows) {
_local5 = 0;
while (_local5 < (m_cols - 1)) {
if (((!((m_blocks[_local3][_local5].getType() == "EMPTY"))) && (!((m_blocks[_local3][_local5].getType() == "BOMB"))))){
if (m_blocks[_local3][_local5].getType() == m_blocks[_local3][(_local5 + 1)].getType()){
return (true);
};
};
_local5++;
};
_local3++;
};
return (false);
}
public function getHigh():Array{
return (m_high);
}
public function clearArr():void{
m_high = new Array();
}
public function remHighlight():void{
var _local1:int;
while (_local1 < m_high.length) {
m_high[_local1].setHigh(false);
_local1++;
};
clearArr();
}
public function highlightCluster(_arg1:int, _arg2:int):void{
m_blocks[_arg1][_arg2].setHigh(true);
m_high.push(m_blocks[_arg1][_arg2]);
if (((!(m_blocks[_arg1][_arg2].isActiveBomb())) && ((m_blocks[_arg1][_arg2].getType() == "BOMB")))){
return;
};
if (m_blocks[_arg1][_arg2].isActiveBomb()){
doAddBombNeighbours(_arg1, _arg2);
} else {
doHighlight(_arg1, _arg2);
};
}
private function doHighlight(_arg1:int, _arg2:int):void{
var _local4:Block;
var _local3:String = m_blocks[_arg1][_arg2].getType();
checkLeft(_arg1, (_arg2 - 1), _local3);
checkRight(_arg1, (_arg2 + 1), _local3);
checkUp((_arg1 - 1), _arg2, _local3);
checkDown((_arg1 + 1), _arg2, _local3);
if (m_checkMyNeighbour.length > 0){
_local4 = m_checkMyNeighbour.shift();
doHighlight(_local4.getRow(), _local4.getCol());
};
}
private function checkLeft(_arg1:int, _arg2:int, _arg3:String):void{
if (isOob(_arg1, _arg2)){
return;
};
var _local4:int = _arg2;
while (_local4 >= 0) {
if (m_blocks[_arg1][_local4].getType() != _arg3){
return;
};
if (m_blocks[_arg1][_local4].isHigh()){
return;
};
m_blocks[_arg1][_local4].setHigh(true);
m_high.push(m_blocks[_arg1][_local4]);
m_checkMyNeighbour.push(m_blocks[_arg1][_local4]);
_local4--;
};
}
private function checkRight(_arg1:int, _arg2:int, _arg3:String):void{
if (isOob(_arg1, _arg2)){
return;
};
var _local4:int = _arg2;
while (_local4 < m_cols) {
if (m_blocks[_arg1][_local4].getType() != _arg3){
return;
};
if (m_blocks[_arg1][_local4].isHigh()){
return;
};
m_blocks[_arg1][_local4].setHigh(true);
m_high.push(m_blocks[_arg1][_local4]);
m_checkMyNeighbour.push(m_blocks[_arg1][_local4]);
_local4++;
};
}
private function checkUp(_arg1:int, _arg2:int, _arg3:String):void{
if (isOob(_arg1, _arg2)){
return;
};
var _local4:int = _arg1;
while (_local4 >= 0) {
if (m_blocks[_local4][_arg2].getType() != _arg3){
return;
};
if (m_blocks[_local4][_arg2].isHigh()){
return;
};
m_blocks[_local4][_arg2].setHigh(true);
m_high.push(m_blocks[_local4][_arg2]);
m_checkMyNeighbour.push(m_blocks[_local4][_arg2]);
_local4--;
};
}
private function checkDown(_arg1:int, _arg2:int, _arg3:String):void{
if (isOob(_arg1, _arg2)){
return;
};
var _local4:int = _arg1;
while (_local4 < m_rows) {
if (m_blocks[_local4][_arg2].getType() != _arg3){
return;
};
if (m_blocks[_local4][_arg2].isHigh()){
return;
};
m_blocks[_local4][_arg2].setHigh(true);
m_high.push(m_blocks[_local4][_arg2]);
m_checkMyNeighbour.push(m_blocks[_local4][_arg2]);
_local4++;
};
}
public function doAddColumnBlast(_arg1:int):void{
var _local2:int;
while (_local2 < m_rows) {
if (m_blocks[_local2][_arg1].getStatus() == "ACTIVE"){
m_high.push(m_blocks[_local2][_arg1]);
};
_local2++;
};
}
private function doAddBombNeighbours(_arg1:int, _arg2:int):void{
if (isValid(_arg1, (_arg2 - 1))){
m_high.push(m_blocks[_arg1][(_arg2 - 1)]);
};
if (isValid(_arg1, (_arg2 + 1))){
m_high.push(m_blocks[_arg1][(_arg2 + 1)]);
};
if (isValid((_arg1 - 1), _arg2)){
m_high.push(m_blocks[(_arg1 - 1)][_arg2]);
};
if (isValid((_arg1 - 1), (_arg2 + 1))){
m_high.push(m_blocks[(_arg1 - 1)][(_arg2 + 1)]);
};
if (isValid((_arg1 - 1), (_arg2 - 1))){
m_high.push(m_blocks[(_arg1 - 1)][(_arg2 - 1)]);
};
}
public function getDestroyed():Block{
var _local2:int;
var _local1:int;
while (_local1 < m_cols) {
_local2 = (m_rows - 1);
while (_local2 >= 0) {
if (m_blocks[_local2][_local1].getStatus() == "DESTROYED"){
m_blocks[_local2][_local1].setStatus("CHECKED");
return (m_blocks[_local2][_local1]);
};
_local2--;
};
_local1++;
};
return (null);
}
public function getFirstEmptyCol():Number{
var _local1:int = (m_rows - 1);
var _local2:int;
while (_local2 < m_cols) {
if (m_blocks[_local1][_local2].getStatus() == "IDLE"){
return (_local2);
};
_local2++;
};
return (-1);
}
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].getRow() + "_") + _arg1[_local3].getCol()) + ":"));
_local3++;
};
return (_local2);
}
public function traceLv():void{
var _local2:uint;
var _local1:uint;
while (_local1 < m_rows) {
_local2 = 0;
while (_local2 < m_cols) {
trace(m_blocks[_local1][_local2].getStatus());
_local2++;
};
_local1++;
};
}
}
}//package
Section 52
//CLEAR (CLEAR)
package {
import anim.*;
public dynamic class CLEAR extends AutoSingleFlare50Fps {
}
}//package
Section 53
//clearAll_BLUE (clearAll_BLUE)
package {
import anim.*;
public dynamic class clearAll_BLUE extends AutoSingleFlare25Fps {
public function clearAll_BLUE(){
addFrameScript(109, frame110);
}
function frame110(){
}
}
}//package
Section 54
//clearAll_RED (clearAll_RED)
package {
import anim.*;
public dynamic class clearAll_RED extends AutoSingleFlare25Fps {
}
}//package
Section 55
//clearAll_YELLOW (clearAll_YELLOW)
package {
import anim.*;
public dynamic class clearAll_YELLOW extends AutoSingleFlare25Fps {
public function clearAll_YELLOW(){
addFrameScript(99, frame100);
}
function frame100(){
pedal.stop();
}
}
}//package
Section 56
//colBlastActivated (colBlastActivated)
package {
import flash.media.*;
public dynamic class colBlastActivated extends Sound {
}
}//package
Section 57
//colBlastReleased (colBlastReleased)
package {
import flash.media.*;
public dynamic class colBlastReleased extends Sound {
}
}//package
Section 58
//colBuzz (colBuzz)
package {
import flash.media.*;
public dynamic class colBuzz extends Sound {
}
}//package
Section 59
//colContraction (colContraction)
package {
import flash.media.*;
public dynamic class colContraction extends Sound {
}
}//package
Section 60
//combo1 (combo1)
package {
import flash.media.*;
public dynamic class combo1 extends Sound {
}
}//package
Section 61
//combo2 (combo2)
package {
import flash.media.*;
public dynamic class combo2 extends Sound {
}
}//package
Section 62
//combo3 (combo3)
package {
import flash.media.*;
public dynamic class combo3 extends Sound {
}
}//package
Section 63
//combo4 (combo4)
package {
import flash.media.*;
public dynamic class combo4 extends Sound {
}
}//package
Section 64
//DB (DB)
package {
import flash.display.*;
public dynamic class DB extends MovieClip {
}
}//package
Section 65
//DB_over (DB_over)
package {
import flash.display.*;
public dynamic class DB_over extends BitmapData {
public function DB_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 66
//DB_R (DB_R)
package {
import flash.display.*;
public dynamic class DB_R extends MovieClip {
}
}//package
Section 67
//DB_R_over (DB_R_over)
package {
import flash.display.*;
public dynamic class DB_R_over extends BitmapData {
public function DB_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 68
//fanfare100 (fanfare100)
package {
import flash.media.*;
public dynamic class fanfare100 extends Sound {
}
}//package
Section 69
//gameOver (gameOver)
package {
import anim.*;
public dynamic class gameOver extends AutoSingleFlare25Fps {
public function gameOver(){
addFrameScript(200, frame201);
}
function frame201(){
nextFrame();
}
}
}//package
Section 70
//GG (GG)
package {
import flash.display.*;
public dynamic class GG extends MovieClip {
}
}//package
Section 71
//GG_over (GG_over)
package {
import flash.display.*;
public dynamic class GG_over extends BitmapData {
public function GG_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 72
//GG_R (GG_R)
package {
import flash.display.*;
public dynamic class GG_R extends MovieClip {
}
}//package
Section 73
//GG_R_over (GG_R_over)
package {
import flash.display.*;
public dynamic class GG_R_over extends BitmapData {
public function GG_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 74
//Gui (Gui)
package {
import anim.*;
import flash.display.*;
import utils.*;
import com.greensock.*;
import flash.utils.*;
import com.greensock.plugins.*;
import flash.events.*;
import flash.text.*;
public class Gui {
private var m_blast:MovieClip;
private var m_blastOnStage:Boolean;// = false
private var m_isTimeWarning:Boolean;// = false
private var m_root:MovieClip;
private var X_OFF;// = 76
private var Y_OFF;// = 76
private var m_rows:int;
private var m_cols:int;
private var m_time1:int;
private var m_time2:int;
private var m_time3:int;
private var m_sh:SharedData;
private var m_textF:TextFormat;
private var m_noMoreMoves:MovieClip;
private var m_scorePop:MovieClip;
private var m_gameOver:MovieClip;
private var m_clearAll:MovieClip;
private var m_lvSign:MovieClip;
private var m_theme:MovieClip;
private var m_pickTheme:MovieClip;
private var m_shortWin:MovieClip;
private var m_shrikArr:Array;
private var m_scale:Number;
private var m_shrink:Interpolator;
private var m_shrinkBlock:Boolean;
private var m_shrinkDone:Boolean;
private var m_themPicked:Function;
private var m_isExpanded:Boolean;
private var m_currY:Number;
private var m_destY:Interpolator;
private var m_renderScore:Boolean;
private var m_scoreDelay:int;
private var m_guiDelay:int;// = 0
private var m_puLockUp:Boolean;
private var m_clearMeter:Boolean;
private var m_stopAtFrame:int;
private var m_colUnits:Array;
private var m_totUnits:int;// = 0
private var m_roundUnits:int;// = 0
public function Gui(_arg1:MovieClip, _arg2:SharedData){
m_shrikArr = new Array();
m_colUnits = new Array();
super();
m_root = _arg1;
m_sh = _arg2;
TweenPlugin.activate([BezierPlugin]);
m_root.mcGame.perc100.visible = false;
m_root.mcGame.txtTimeLeft.text = I18n.getString("txtTimeLeft");
m_root.mcGame.txtYourScore.text = I18n.getString("txtYourScore");
m_root.mcGame.txtCurrLevel.text = I18n.getString("txtCurrLevel");
keepletterSpacing(m_root.mcIntro.txtGameInstructions, I18n.getString("txtGameInstructions"));
keepletterSpacing(m_root.mcIntro.txtStartIn, I18n.getString("txtStartIn"));
keepletterSpacing(m_root.mcIntro.txtClickToStart, I18n.getString("txtClickToStart"));
keepletterSpacing(m_root.mcIntro.instr.txt1, I18n.getString("txtInstruction_text_1"));
keepletterSpacing(m_root.mcIntro.instr.txt2, I18n.getString("txtInstruction_text_2"));
keepletterSpacing(m_root.mcIntro.instr.txt3, I18n.getString("txtInstruction_text_3"));
keepletterSpacing(m_root.mcIntro.instr.txt4, I18n.getString("txtInstruction_text_4"));
keepletterSpacing(m_root.mcIntro.instr.txt5, I18n.getString("txtInstruction_text_5"));
m_root.music.buttonMode = (m_root.sound.buttonMode = (m_root.endgame.buttonMode = true));
m_root.music.mouseChildren = (m_root.sound.mouseChildren = (m_root.endgame.mouseChildren = false));
addBtnListeners();
setTimeLamps(false);
}
private function setTheme():void{
var _local1:Class = (getDefinitionByName(("theme_" + m_sh.currTheme)) as Class);
m_theme = (new (_local1) as MovieClip);
m_root.addChild(m_theme);
m_root.setChildIndex(m_theme, 0);
m_theme.mouseChildren = false;
m_theme.mouseEnabled = false;
if (m_sh.currTheme == "BLUE"){
m_theme.bg.prop1.stop();
m_theme.bg.prop2.stop();
m_theme.bg.prop3.stop();
};
if (m_sh.currTheme == "YELLOW"){
m_theme.bg.stop();
};
if (m_sh.currTheme == "RED"){
m_theme.bg.medium.stop();
m_theme.bg.small.stop();
m_theme.bg.mini.stop();
m_theme.bg.large.stop();
};
}
public function setRowCol(_arg1:int, _arg2:int):void{
m_rows = _arg1;
m_cols = _arg2;
}
public function tick():void{
var _local1:int;
if (m_renderScore){
m_destY.update();
m_currY = m_destY.getValue();
m_scoreDelay--;
if (((m_destY.isDone()) && ((m_scoreDelay <= 0)))){
forceDestroy();
};
};
if (m_shrinkBlock){
m_shrink.update();
if (m_shrink.isDone()){
m_shrinkDone = true;
m_shrinkBlock = false;
_local1 = 0;
while (_local1 < m_shrikArr.length) {
m_root.removeChild(m_shrikArr[_local1]);
m_shrikArr[_local1] = null;
_local1++;
};
};
};
if (m_clearMeter){
if (m_guiDelay != 0){
m_guiDelay--;
return;
};
m_stopAtFrame--;
if (m_stopAtFrame > 0){
m_lvSign.sign.mcClearMeter.nextFrame();
m_lvSign.sign.txtNumClearedPercentage.text = (m_lvSign.sign.mcClearMeter.currentFrame + "%");
if (m_lvSign.sign.mcClearMeter.currentFrame == SharedData.PULIMIT){
m_sh.soundMngr.get("bonus90").play();
m_lvSign.sign.mcClearMeter.mcPuSymbol.txtQualified.text = I18n.getString("txtQualified");
m_lvSign.sign.mcClearMeter.mcPuSymbol.visible = true;
};
} else {
m_clearMeter = false;
m_guiDelay = 0;
};
};
if (m_puLockUp){
if (m_stopAtFrame > 0){
m_gameOver.nextFrame();
if ((((m_gameOver.currentFrame == 101)) || ((m_gameOver.currentFrame == 201)))){
m_sh.soundMngr.get("themeUnlocked").play();
};
} else {
m_puLockUp = false;
};
m_stopAtFrame--;
};
}
public function render():void{
if (m_renderScore){
m_scorePop.y = m_currY;
};
}
public function setInstructions(){
if ((((m_root.mcIntro.instr.currentFrame >= 200)) && ((m_root.mcIntro.instr.currentFrame < 400)))){
m_root.mcIntro.instr.txt2.visible = true;
m_root.mcIntro.instr.txt1.visible = false;
};
if ((((m_root.mcIntro.instr.currentFrame >= 400)) && ((m_root.mcIntro.instr.currentFrame < 600)))){
m_root.mcIntro.instr.txt3.visible = true;
m_root.mcIntro.instr.txt2.visible = false;
};
if ((((m_root.mcIntro.instr.currentFrame >= 600)) && ((m_root.mcIntro.instr.currentFrame < 800)))){
m_root.mcIntro.instr.txt4.visible = true;
m_root.mcIntro.instr.txt3.visible = false;
};
if (m_root.mcIntro.instr.currentFrame > 800){
m_root.mcIntro.instr.txt5.visible = true;
m_root.mcIntro.instr.txt4.visible = false;
};
}
public function clearAnim(_arg1:Array):void{
var _local3:MovieClip;
m_shrikArr = new Array();
m_shrink = new EaseOutInterpolator(1, 0, 3);
m_shrinkDone = false;
m_shrinkBlock = true;
var _local2:int;
while (_local2 < _arg1.length) {
_local3 = new CLEAR();
_local3.x = _arg1[_local2].x;
_local3.y = _arg1[_local2].y;
m_root.addChild(_local3);
m_shrikArr.push(_local3);
m_root.removeChild(_arg1[_local2]);
_local2++;
};
if (_arg1[0].isActiveBomb()){
m_sh.soundMngr.get("bombDetonation").play();
return;
};
if (_arg1.length <= 5){
m_sh.soundMngr.get("combo1").play();
};
if ((((_arg1.length > 5)) && ((_arg1.length <= 10)))){
m_sh.soundMngr.get("combo2").play();
};
if ((((_arg1.length > 10)) && ((_arg1.length <= 20)))){
m_sh.soundMngr.get("combo3").play();
};
if (_arg1.length > 20){
m_sh.soundMngr.get("combo4").play();
};
}
public function isShrinkDone():Boolean{
return (m_shrinkDone);
}
public function remBlast():void{
if (m_blast != null){
m_root.removeChild(m_blast);
m_blast = null;
};
}
public function attachBlast():void{
m_blast = new blastcolumn();
m_blast.x = (X_OFF + 15);
m_blast.y = Y_OFF;
m_root.addChild(m_blast);
m_blastOnStage = true;
}
public function updateBlastCol():int{
var _local1:int;
var _local2:int;
var _local3:Object;
if (m_blastOnStage){
_local1 = Math.floor(((m_root.mouseY - Y_OFF) / Block.B_HEIGHT));
_local2 = Math.floor(((m_root.mouseX - X_OFF) / Block.B_WIDTH));
if (isOob(_local1, _local2)){
return (999);
};
_local3 = getStaticPos(_local1, _local2);
m_blast.x = (_local3.x + 15);
return (_local2);
};
return (999);
}
private function forceDestroy():void{
m_renderScore = false;
m_root.removeChild(m_scorePop);
m_scorePop = null;
}
public function scorePop(_arg1:Array, _arg2:int, _arg3:int, _arg4:int):void{
if (m_scorePop != null){
forceDestroy();
};
m_scorePop = new mcScorePop();
if (isRadio(_arg1)){
m_scorePop.radioCont.gotoAndStop(_arg1[0].getType());
} else {
m_scorePop.radioCont.visible = false;
};
m_scorePop.txtScore.text = _arg2;
m_root.addChild(m_scorePop);
m_scorePop.x = (_arg3 - 10);
m_scorePop.y = (_arg4 - 40);
m_scoreDelay = 30;
if (_arg2 >= 400){
m_scorePop.scaleX = (m_scorePop.scaleY = 2);
};
m_destY = new EaseOutInterpolator(m_scorePop.y, (m_scorePop.y - 10), 20);
m_renderScore = true;
}
private function isRadio(_arg1:Array):Boolean{
var _local2:int;
while (_local2 < _arg1.length) {
if (_arg1[_local2].isRadioActive()){
return (true);
};
_local2++;
};
return (false);
}
public function stepUpBlastMeter(_arg1:int):void{
if ((((m_root.mcBlastometer.currentFrame < 9)) || ((_arg1 < 9)))){
m_root.mcBlastometer.gotoAndStop(_arg1);
};
}
public function nextLevel():void{
m_root.mcGame.mcLevelNum.nextFrame();
}
public function setTimeLamps(_arg1:Boolean):void{
m_root.mcGame.lampL.visible = (m_root.mcGame.lampR.visible = _arg1);
if (_arg1){
m_root.mcGame.lampL.start();
m_root.mcGame.lampR.start();
} else {
m_root.mcGame.lampL.stop();
m_root.mcGame.lampR.stop();
m_isTimeWarning = false;
};
}
public function isTimeWarning():Boolean{
return (m_isTimeWarning);
}
public function isLampActive():Boolean{
return (m_root.mcGame.lampL.visible);
}
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)));
m_root.mcGame.mcTimeNum3.gotoAndStop(getFrame(m_time1));
m_root.mcGame.mcTimeNum2.gotoAndStop(getFrame(m_time2));
m_root.mcGame.mcTimeNum1.gotoAndStop(getFrame(m_time3));
if ((((((((m_time1 == 0)) && ((m_time2 == 0)))) && ((m_time3 == 5)))) && (!(m_isTimeWarning)))){
m_isTimeWarning = true;
};
}
public function updateScore(_arg1:String):void{
var _local2:Array = _arg1.split("");
_local2.reverse();
if (_local2.length > 8){
updateScore("99999999");
return;
};
var _local3:int;
while (_local3 < _local2.length) {
m_root.mcGame[("mcScoreNum" + (_local3 + 1))].gotoAndStop(getFrame(_local2[_local3]));
_local3++;
};
var _local4 = 8;
while (_local4 > _local2.length) {
m_root.mcGame[("mcScoreNum" + _local4)].gotoAndStop(0);
_local4--;
};
}
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)));
m_lvSign.sign.num_1.gotoAndStop(getFrame(_local6));
m_lvSign.sign.num_2.gotoAndStop(getFrame(_local7));
if ((((((_local5 == 0)) && ((_local6 == 0)))) && ((_local7 == 0)))){
return (true);
};
return (false);
}
private function setNumPolygonsEnd(_arg1:String):void{
var _local2:Array = _arg1.split("");
_local2.reverse();
if (_local2.length > 5){
setNumPolygons("99999");
return;
};
var _local3:int;
while (_local3 < _local2.length) {
m_gameOver[("mcTimeNum" + (_local3 + 1))].gotoAndStop(getFrame(_local2[_local3]));
_local3++;
};
}
public function gameIsOver():void{
m_gameOver = new gameOver();
m_gameOver.stop();
m_gameOver.introBgr.gotoAndStop(m_sh.currTheme);
keepletterSpacing(m_gameOver.txtPowerUnits, I18n.getString("txtPowerUnits"));
keepletterSpacing(m_gameOver.txtStartIn, I18n.getString("txtEndIn"));
keepletterSpacing(m_gameOver.txtClickToStart, I18n.getString("txtClickToEnd"));
keepletterSpacing(m_gameOver.txtGameStatus, I18n.getString("txtGameStatus"));
keepletterSpacing(m_gameOver.txtTotalScore, I18n.getString("txtTotalScore"));
keepletterSpacing(m_gameOver.txtPrevTotalScore, I18n.getString("txtPrevTotalScore"));
m_gameOver.txtPowerR.text = I18n.getString("txtPowerR");
m_gameOver.txtPowerY.text = I18n.getString("txtPowerY");
m_gameOver.txtPowerB.text = I18n.getString("txtPowerB");
m_gameOver.txtPowerNumUnitsY.text = ((200 + " ") + I18n.getString("txtPowerNumUnits"));
m_gameOver.txtPowerNumUnitsB.text = ((500 + " ") + I18n.getString("txtPowerNumUnits"));
m_gameOver.txtNumTotal.text = m_sh.scoreTotal;
m_gameOver.txtNumPrevTotal.text = m_sh.preHighScore;
setNumPolygonsEnd(m_sh.preColllectedPu.toString());
if (m_sh.preColllectedPu >= 200){
m_gameOver.gotoAndStop(101);
};
if (m_sh.preColllectedPu >= 500){
m_gameOver.gotoAndStop(202);
};
m_root.addChild(m_gameOver);
}
public function themeLockUp(_arg1:int, _arg2:int):void{
var _local5:Sprite;
var _local6:Number;
if (_arg1 < 500){
if (_arg1 < 200){
m_stopAtFrame = ((_arg1 + _arg2) / 2);
} else {
m_stopAtFrame = (((_arg1 + _arg2) - 200) / 3);
};
};
if (_arg2 == 0){
m_puLockUp = true;
return;
};
m_roundUnits = _arg2;
m_totUnits = _arg1;
var _local3:int;
while (_local3 < _arg2) {
_local5 = new triangleSign();
new triangleSign().scaleX = (_local5.scaleY = 0.65);
_local5.x = 688;
_local5.y = (248 - (_local3 * 18));
m_colUnits.push(_local5);
m_gameOver.addChild(_local5);
_local3++;
};
m_gameOver.setChildIndex(m_gameOver.topTriangle, (m_gameOver.numChildren - 1));
var _local4:int;
while (_local4 < m_colUnits.length) {
_local6 = (2 + (0.5 * _local4));
TweenLite.to(m_colUnits[_local4], 0.5, {delay:_local6, bezier:[{x:690, y:330}, {x:636, y:415}], onComplete:remTriangle});
_local4++;
};
}
private function remTriangle():void{
setNumPolygonsEnd(++m_totUnits.toString());
m_roundUnits--;
if (m_roundUnits == 0){
m_puLockUp = true;
};
}
public function gameWillExitIn(_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)));
m_gameOver.mcSecNum1.gotoAndStop(getFrame(_local7));
m_gameOver.mcSecNum2.gotoAndStop(getFrame(_local6));
if ((((((_local5 == 0)) && ((_local6 == 0)))) && ((_local7 == 0)))){
return (true);
};
return (false);
}
public function unExpand():void{
m_isExpanded = false;
m_guiDelay = 0;
}
public function expandPlayField():Boolean{
if (m_isExpanded){
return (true);
};
if (m_guiDelay == 0){
m_root.mcGame.perc100.visible = true;
};
if ((((m_sh.currLevelIdx == 0)) && ((m_root.mcGame.currentFrame == 11)))){
m_guiDelay++;
if (m_guiDelay == 30){
m_root.mcGame.perc100.visible = false;
m_isExpanded = true;
return (true);
};
} else {
if ((((m_sh.currLevelIdx == 1)) && ((m_root.mcGame.currentFrame == 11)))){
m_guiDelay++;
if (m_guiDelay == 35){
m_root.mcGame.perc100.visible = false;
m_isExpanded = true;
return (true);
};
} else {
if ((((m_sh.currLevelIdx == 2)) && ((m_root.mcGame.currentFrame == 11)))){
m_guiDelay++;
if (m_guiDelay == 40){
m_root.mcGame.perc100.visible = false;
m_isExpanded = true;
return (true);
};
} else {
m_root.mcGame.nextFrame();
};
};
};
return (false);
}
public function addClearAll():void{
var _local1:Class = (getDefinitionByName(("clearAll_" + m_sh.currTheme)) as Class);
m_clearAll = (new (_local1) as MovieClip);
m_root.addChild(m_clearAll);
m_sh.soundMngr.get("fanfare100").play();
}
public function clearAllDone():Boolean{
if (m_clearAll.currentFrame == m_clearAll.totalFrames){
return (true);
};
return (false);
}
public function remClearAll():void{
if (m_clearAll != null){
m_root.removeChild(m_clearAll);
m_clearAll = null;
};
}
public function setNumPolygons(_arg1:String):void{
var _local2:Array = _arg1.split("");
_local2.reverse();
if (_local2.length > 5){
setNumPolygons("99999");
return;
};
var _local3:int;
while (_local3 < _local2.length) {
m_pickTheme[("mcTimeNum" + (_local3 + 1))].gotoAndStop(getFrame(_local2[_local3]));
_local3++;
};
}
public function gameIntroWillEndIn(_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)));
m_root.mcIntro.mcMin.gotoAndStop(getFrame(_local6));
m_root.mcIntro.mcSec.gotoAndStop(getFrame(_local7));
if ((((((_local5 == 0)) && ((_local6 == 0)))) && ((_local7 == 0)))){
return (true);
};
return (false);
}
public function pickTheme(_arg1:Function):void{
m_themPicked = _arg1;
m_root.mcIntro.nextFrame();
m_pickTheme = new mcPickTheme();
keepletterSpacing(m_pickTheme.txtPowerUnits, I18n.getString("txtPowerUnits"));
keepletterSpacing(m_pickTheme.txtChooseTheme, I18n.getString("txtChooseTheme"));
keepletterSpacing(m_pickTheme.txtOnlyActive, I18n.getString("txtOnlyActive"));
keepletterSpacing(m_root.mcIntro.txtClickToStart, I18n.getString("txtClickOnTheme"));
m_pickTheme.txtPowerR.text = I18n.getString("txtPowerR");
m_pickTheme.txtPowerY.text = I18n.getString("txtPowerY");
m_pickTheme.txtPowerB.text = I18n.getString("txtPowerB");
m_pickTheme.txtPowerNumUnitsY.text = ((200 + " ") + I18n.getString("txtPowerNumUnits"));
m_pickTheme.txtPowerNumUnitsB.text = ((500 + " ") + I18n.getString("txtPowerNumUnits"));
setNumPolygons(m_sh.preColllectedPu.toString());
m_root.addChild(m_pickTheme);
m_root.mcIntro.RED.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.RED.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.RED.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.mcIntro.RED.buttonMode = true;
m_root.mcIntro.RED.mouseChildren = false;
m_pickTheme.RED.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.RED.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.RED.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.RED.buttonMode = true;
m_pickTheme.RED.mouseChildren = false;
m_pickTheme.YELLOW.gotoAndStop("inactive");
m_pickTheme.BLUE.gotoAndStop("inactive");
if (m_sh.preColllectedPu >= 200){
m_root.mcIntro.YELLOW.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.YELLOW.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.YELLOW.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.mcIntro.YELLOW.buttonMode = true;
m_root.mcIntro.YELLOW.mouseChildren = false;
m_pickTheme.YELLOW.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.YELLOW.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.YELLOW.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.YELLOW.buttonMode = true;
m_pickTheme.YELLOW.mouseChildren = false;
m_pickTheme.YELLOW.gotoAndStop("active");
m_pickTheme.yKey.visible = false;
};
if (m_sh.preColllectedPu >= 500){
m_root.mcIntro.BLUE.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.BLUE.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.BLUE.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.mcIntro.BLUE.buttonMode = true;
m_root.mcIntro.BLUE.mouseChildren = false;
m_pickTheme.BLUE.addEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.BLUE.addEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.BLUE.addEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.BLUE.buttonMode = true;
m_pickTheme.BLUE.mouseChildren = false;
m_pickTheme.BLUE.gotoAndStop("active");
m_pickTheme.bKey.visible = false;
};
}
private function themeOver(_arg1:MouseEvent):void{
var _local2:String = _arg1.currentTarget.name;
m_root.mcIntro[_local2].gotoAndPlay(2);
m_root.mcIntro.introBgr.gotoAndStop(_local2);
}
private function themeOut(_arg1:MouseEvent):void{
var _local2:String;
if (m_root.mcIntro != null){
_local2 = _arg1.currentTarget.name;
m_root.mcIntro[_local2].gotoAndStop(1);
};
}
public function themePicked(_arg1:MouseEvent):void{
if (_arg1 == null){
m_sh.currTheme = m_sh.currTheme;
} else {
m_sh.currTheme = _arg1.currentTarget.name.toString();
};
setTheme();
m_root.mcIntro.BLUE.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.YELLOW.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.RED.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_root.mcIntro.BLUE.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.BLUE.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.mcIntro.RED.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.RED.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.mcIntro.YELLOW.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_root.mcIntro.YELLOW.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.BLUE.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.BLUE.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.BLUE.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.YELLOW.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.YELLOW.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.YELLOW.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_pickTheme.RED.removeEventListener(MouseEvent.MOUSE_DOWN, themePicked);
m_pickTheme.RED.removeEventListener(MouseEvent.MOUSE_OVER, themeOver);
m_pickTheme.RED.removeEventListener(MouseEvent.MOUSE_OUT, themeOut);
m_root.removeChild(m_root.mcIntro);
m_root.removeChild(m_pickTheme);
m_root.mcIntro = null;
m_pickTheme = null;
m_root.music.x = 257.2;
m_root.sound.x = 219.2;
m_root.music.y = (m_root.sound.y = 531);
m_themPicked();
}
public function isPercentRunning():Boolean{
return (m_clearMeter);
}
public function levelSignHide():void{
if (m_lvSign != null){
m_root.removeChild(m_lvSign);
m_lvSign = null;
};
m_clearMeter = false;
}
public function levelSign(_arg1:Boolean, _arg2:Boolean):void{
var _local3:Class = (getDefinitionByName(("signAnim_" + m_sh.currTheme)) as Class);
m_lvSign = (new (_local3) as MovieClip);
m_lvSign.sign.mcClearMeter.mcPuSymbol.visible = false;
m_root.addChild(m_lvSign);
m_lvSign.sign.txtClearedPercentage.text = I18n.getString("txtClearedPercentage");
m_lvSign.sign.txtScore.text = I18n.getString("txtScore");
m_lvSign.sign.txtClearBonus.text = I18n.getString("txtClearBonus");
m_lvSign.sign.txtTotal.text = I18n.getString("txtTotal");
m_lvSign.sign.txtLevel.text = I18n.getString("txtLevel", (m_sh.currLevelIdx + 1));
if (_arg2){
m_lvSign.sign.txtStatus.text = I18n.getString("txtStatusTimeUp");
} else {
m_lvSign.sign.txtStatus.text = I18n.getString("txtStatus");
};
m_lvSign.sign.txtNumClearBonus.text = m_sh.scoreBonus;
m_lvSign.sign.txtNumScore.text = m_sh.scoreLevel;
m_lvSign.sign.txtNumTotal.text = m_sh.scoreTotal;
if (m_sh.currLevelIdx == 2){
m_lvSign.sign.txtStartIn.text = I18n.getString("txtEndIn");
m_lvSign.sign.txtStartGame.text = I18n.getString("txtEndGame");
m_lvSign.sign.txtQualified.text = I18n.getString("txtQualifiedEnd");
} else {
if (_arg1){
m_lvSign.sign.txtQualified.text = I18n.getString("txtQualifiedTrue");
m_lvSign.sign.txtStartIn.text = I18n.getString("txtStartIn");
m_lvSign.sign.txtStartGame.text = I18n.getString("txtStartGame");
} else {
m_lvSign.sign.txtQualified.text = I18n.getString("txtQualifiedFalse");
m_lvSign.sign.txtStartIn.text = I18n.getString("txtEndIn");
m_lvSign.sign.txtStartGame.text = I18n.getString("txtEndGame");
};
};
m_lvSign.sign.txtNumClearedPercentage.text = 0;
m_lvSign.sign.mcClearMeter.gotoAndStop(1);
m_lvSign.sign.mcClearMeter.meterScale.gotoAndStop((m_sh.currLevelIdx + 1));
m_clearMeter = true;
m_stopAtFrame = m_sh.clearPerc;
m_guiDelay = 60;
if (m_sh.currTheme == "BLUE"){
TweenLite.to(m_lvSign.sign, 1, {x:0});
};
}
public function setMusic(_arg1:int=666):void{
if (_arg1 == 666){
m_root.music.gotoAndStop(m_sh.preMusic);
_arg1 = m_sh.preMusic;
} else {
m_root.music.gotoAndStop(_arg1);
};
if ((_arg1 == 1)){
_arg1 = 1;
} else {
_arg1 = 0;
};
m_sh.musicMngr.setVolume(_arg1);
}
public function setSound(_arg1:int=666):void{
if (_arg1 == 666){
m_root.sound.gotoAndStop(m_sh.preSound);
_arg1 = m_sh.preSound;
} else {
m_root.sound.gotoAndStop(_arg1);
};
if ((_arg1 == 1)){
_arg1 = 1;
} else {
_arg1 = 0;
};
m_sh.soundMngr.setVolume(_arg1);
}
private function addBtnListeners():void{
m_root.music.addEventListener(MouseEvent.CLICK, btnClicked);
m_root.sound.addEventListener(MouseEvent.CLICK, btnClicked);
m_root.endgame.addEventListener(MouseEvent.CLICK, btnClicked);
}
public function remBtnListeners():void{
m_root.music.removeEventListener(MouseEvent.CLICK, btnClicked);
m_root.sound.removeEventListener(MouseEvent.CLICK, btnClicked);
m_root.endgame.removeEventListener(MouseEvent.CLICK, btnClicked);
}
public function launchShortModeWin():void{
m_shortWin = new shortModeAlien();
m_shortWin.x = 245;
m_shortWin.y = -400;
m_shortWin.t.text = I18n.getString("txtRegister");
m_root.addChild(m_shortWin);
m_root.setChildIndex(m_shortWin, (m_root.numChildren - 1));
m_root.setChildIndex(m_root.mcLogo, (m_root.numChildren - 1));
TweenLite.to(m_shortWin, 0.5, {y:0});
}
public function remShortModeWin():void{
if (m_shortWin != null){
m_root.removeChild(m_shortWin);
m_shortWin = null;
};
}
private function btnClicked(_arg1:MouseEvent):void{
var _local2:int = _arg1.currentTarget.currentFrame;
if ((_local2 == 1)){
_local2 = 2;
} else {
_local2 = 1;
};
if (_arg1.currentTarget.name == "music"){
setMusic(_local2);
m_sh.preMusic = _local2;
};
if (_arg1.currentTarget.name == "sound"){
setSound(_local2);
m_sh.preSound = _local2;
};
if (_arg1.currentTarget.name == "endgame"){
m_sh.exitButton = true;
};
m_sh.soundMngr.get("btnClick").play();
}
private function getFrame(_arg1:int):int{
if (_arg1 == 0){
return (11);
};
++_arg1;
return (_arg1);
}
public function keepletterSpacing(_arg1:TextField, _arg2:String):void{
m_textF = _arg1.getTextFormat();
m_textF.bold = true;
_arg1.text = _arg2;
_arg1.setTextFormat(m_textF);
}
private function getStaticPos(_arg1:int, _arg2:int):Object{
var _local3:Object = new Object();
_local3.y = (Y_OFF + (_arg1 * Block.B_HEIGHT));
_local3.x = (X_OFF + (_arg2 * Block.B_WIDTH));
return (_local3);
}
private function isOob(_arg1:int, _arg2:int):Boolean{
if ((((_arg1 < 0)) || ((_arg2 < 0)))){
return (true);
};
if ((((_arg1 >= m_rows)) || ((_arg2 >= m_cols)))){
return (true);
};
return (false);
}
}
}//package
Section 75
//intro (intro)
package {
import flash.media.*;
public dynamic class intro extends Sound {
}
}//package
Section 76
//introBlockAnim (introBlockAnim)
package {
import anim.*;
public dynamic class introBlockAnim extends AutoSingleFlare40Fps {
public function introBlockAnim(){
addFrameScript(0, frame1);
}
function frame1(){
txt2.visible = false;
txt3.visible = false;
txt4.visible = false;
txt5.visible = false;
}
}
}//package
Section 77
//KK2Base (KK2Base)
package {
import flash.display.*;
import utils.*;
import com.midasplayer.sound.*;
import flash.events.*;
import flash.system.*;
import flash.external.*;
public class KK2Base extends MovieClip {
public var mcIntro:MovieClip;
public var mcGame:MovieClip;
public var sound:MovieClip;
public var endgame:MovieClip;
public var music:MovieClip;
public var mcLogo:MovieClip;
public var mcBlastometer:MovieClip;
private var DEBUG_MODE:Boolean;
private var m_mainTmr:Timer;
private var m_input:MouseInput;
private var m_sharedData:SharedData;
private var m_game:KK2Game;
public static const TICKS_PER_SECOND:int = 25;
public static var m_music:SoundManager;
public static var m_sound:SoundManager;
public function KK2Base(){
DEBUG_MODE = true;
if (!init()){
};
}
private function init():Boolean{
var _local1:Object;
var _local2:XML;
var _local3:XML;
var _local5:String;
m_sharedData = new SharedData();
if (DEBUG_MODE){
_local5 = "";
_local5 = ((((((((((((((((((((((((((((((((((((((((((((("<gamedata short=\"false\" randomseed=\"129405665\" numPowerUnits=\"501\" highScore=\"6800\" stateSound=\"2\" stateMusic=\"2\" >" + "<text id=\"instruction_headline\">GAME INSTRUCTIONS</text>") + "<text id=\"instruction_text_1\">CLEAR AWAY AS MANY CUBES AS POSSIBLE. ALL TOUCHING CUBES IN GROUPS OF TWO OR MORE CAN BE CLEARED AWAY. CLEAR ENOUGH CUBES TO ADVANCE TO THE NEXT LEVEL.</text>") + "<text id=\"instruction_text_2\">Use radioactive cubes to increase your scores.</text>") + "<text id=\"instruction_text_3\">Use the bomb to remove surrounding blocks. Can only be used at the bottom.</text>") + "<text id=\"instruction_text_4\">Activate the column blast by clearing away big groups. Use it to empty a whole column at once.</text>") + "<text id=\"instruction_text_5\">If you remove at least 85% of the cubes in a level, you get a POWER unit.</text>") + "<text id=\"txtInstruction_text_1\">Remove as many cubes as possible. All touching cubes in groups of two or more of the same colour can be removed. Clear enough cubes to advance to the next level.</text>") + "<text id=\"txtInstruction_text_2\">Use radioactive lights to increase scores.</text>") + "<text id=\"txtInstruction_text_3\">Use the bomb to remove surrounding blocks. Can only be used at the bottom.</text>") + "<text id=\"txtInstruction_text_4\">Activate the column blast by clearing away big groups. Use it to empty a whole column at once.</text>") + "<text id=\"txtInstruction_text_5\">If you remove at least 85% of the cubes in a level, you get a POWER unit.</text>") + "<text id=\"txtStatus\">INGA FLER DRAG</text>") + "<text id=\"txtStatusTimeUp\">TIDEN TOG SLUT</text>") + "<text id=\"txtLevel\">NIVÅ {0} SLUT</text>") + "<text id=\"txtQualifiedTrue\">Grattis du kom till nästa nivå!</text>") + "<text id=\"txtQualifiedFalse\">You did not qualify for the next level.</text>") + "<text id=\"txtQualifiedEnd\">Spelet är slut.</text>") + "<text id=\"txtScore\">Poäng</text>") + "<text id=\"txtClearBonus\">Bonus</text>") + "<text id=\"txtTotal\">RESULTAT</text>") + "<text id=\"txtEndIn\">SECONDS UNTIL END</text>") + "<text id=\"txtStartIn\">SECONDS UNTIL START</text>") + "<text id=\"txtClearedPercentage\">RENSADE KUBER</text>") + "<text id=\"txtEndGame\">END GAME</text>") + "<text id=\"txtStartGame\">NEXT LEVEL</text>") + "<text id=\"txtGameStatus\">GAME OVER</text>") + "<text id=\"txtTotalScore\">RESULTAT</text>") + "<text id=\"txtPrevTotalScore\">PERSONAL RECORD</text>") + "<text id=\"txtPowerUnits\">YOUR COLLECTED POWER UNITS</text>") + "<text id=\"txtOnlyActive\">You can only choose activated power pylons.</text>") + "<text id=\"txtClickToStart\">CLICK TO CONTINUE</text>") + "<text id=\"txtClickOnTheme\">PICK A THEME</text>") + "<text id=\"txtClickToEnd\">CLICK TO END GAME</text>") + "<text id=\"txtChooseTheme\">CHOOSE THEME!</text>") + "<text id=\"txtTimeLeft\">TIME LEFT</text>") + "<text id=\"txtYourScore\">YOUR SCORE</text>") + "<text id=\"txtCurrLevel\">LEVEL</text>") + "<text id=\"txtRegister\">To play the full game register now!</text>") + "<text id=\"txtQualified\">You collected a POWER UNIT</text>") + "<text id=\"txtPowerR\">Oil power</text>") + "<text id=\"txtPowerY\">Nuclear power</text>") + "<text id=\"txtPowerB\">Wind power</text>") + "<text id=\"txtPowerNumUnits\">POWER UNITS</text>") + "<text id=\"txtGameInstructions\">GAME INSTRUCTIONS</text>") + "</gamedata>");
trace(_local5);
_local1 = {message:_local5, success:true};
} else {
if (!ExternalInterface.available){
return (false);
};
_local1 = ExternalInterface.call("getGameData");
};
if ((((_local1 == null)) || (!(_local1.success)))){
return (false);
};
_local2 = new XML(_local1.message);
m_sharedData.preMusic = int(_local2.@stateMusic);
m_sharedData.preSound = int(_local2.@stateSound);
m_sharedData.preColllectedPu = int(_local2.@numPowerUnits);
m_sharedData.preHighScore = int(_local2.@highScore);
m_sharedData.globalSeed = int(_local2.@randomseed);
m_sharedData.isShortMode = (_local2.@short == "true");
if (DEBUG_MODE){
m_sharedData.globalSeed = (int((Math.random() * 10000000000)) + 1);
};
var _local4:Object = new Object();
for each (_local3 in _local2.children()) {
_local4[_local3.@id] = _local3.text();
};
I18n.init(_local4);
m_input = new MouseInput();
m_game = new KK2Game(this, m_input, m_sharedData);
m_game.init();
stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
m_music = new SoundManager();
m_sound = new SoundManager();
m_mainTmr = new Timer(TICKS_PER_SECOND);
addEventListener("enterFrame", advanceTime);
return (true);
}
private function advanceTime(_arg1:Event):void{
var _local2:int = m_mainTmr.advanceTime();
var _local3:uint;
while (_local3 < _local2) {
tick();
_local3++;
};
render(m_mainTmr.alpha);
}
private function tick():void{
m_game.tick();
}
private function render(_arg1:Number):void{
m_game.render(_arg1);
}
public function mousePressed(_arg1:MouseEvent){
m_input.mousePressed();
}
public function mouseReleased(_arg1:MouseEvent){
m_input.mouseReleased();
}
private function getMode():Boolean{
if (((!((Capabilities.playerType == "External"))) && (!((Capabilities.playerType == "StandAlone"))))){
return (false);
};
return (true);
}
public function getSharedData():SharedData{
return (m_sharedData);
}
}
}//package
Section 78
//KK2Game (KK2Game)
package {
import flash.display.*;
import utils.*;
import com.midasplayer.sound.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class KK2Game {
private var m_sh:SharedData;
private var m_root:MovieClip;
private var m_random:Random;
private var m_calc:Calc;
private var m_input:MouseInput;
private var m_score:Score;
private var m_gui:Gui;
private var m_tick:int;// = 0
private var m_typesUse:Array;
private var m_blocks:Array;
private var m_highBlocks:Array;
private var m_prevR:int;// = 666
private var m_prevC:int;// = 666
private var m_delay:int;// = 0
private var m_hasDropped:Boolean;
private var m_mouse:Array;
private var TIME_EXIT:int;// = 300
private var TIME_LEVEL:int;// = 210
private var TIME_INTRO:Number;// = 795
private var m_cleanSweep:Boolean;
private var m_didQualify:Boolean;
private var m_countTime:Boolean;// = false
private var m_currLimit:int;
private var m_currTime:int;// = 0
private var m_levelIdx:int;// = 0
private var m_rows:int;
private var m_cols:int;
private var X_OFF;// = 76
private var Y_OFF;// = 76
private var m_numPowerUnits:int;// = 0
private var m_state:int;// = 0
private var m_GUIdestroyed:Array;
private var m_GUIfall:Array;
private var m_GUItweak:Array;
private var m_modeDestroy:Boolean;// = false
private var m_modeFall:Boolean;// = false
private var m_modeTweak:Boolean;// = false
private var m_currTick:int;// = 0
private var m_delayGui:int;// = 0
private var m_timeCount:int;// = 0
private var m_moreMoves:Boolean;// = true
private var m_timeIsUp:Boolean;
private var m_themePicked:Boolean;
private var m_endLevel:Boolean;
private var m_forceAdjust:Boolean;// = false
private var m_sampleX:int;
private var m_sampleY:int;
private var m_randSfx:Boolean;// = false
private var m_randTme:int;// = 0
private var m_blastActive:Boolean;// = false
private var url:String;
private var request:URLRequest;
private var variables:URLVariables;
public static var m_music:SoundManager = new SoundManager();
public static var m_sound:SoundManager = new SoundManager();
public static var m_typesAll:Array = ["YY", "GG", "DB", "RR"];
public static var NUM_LEVELS:int = 3;
public static var NUM_COLS:Array = [10, 15, 20];
public static var NUM_ROWS:Array = [10, 10, 10];
public static var CLEAR_PERCENT:Array = [70, 80, 0];
public static var STAR_PERCENT:Array = [3, 4, 5];
public static var BOMB_PERCENT:Array = [3, 4, 5];
public static var NUM_COLORS:Array = [4, 4, 4];
public static var ACTIVATION_LIMIT:Array = [200, 250, 300];
public static var TIME_LIMIT:Array = [((1 * 60) * 25), ((1.5 * 60) * 25), ((3 * 60) * 25)];
public static var STATE_IDLE:int = 0;
public static var STATE_INTRO:int = 1;
public static var STATE_PLAY:int = 2;
public static var STATE_LEVEL_COMPLETE:int = 3;
public static var STATE_GAME_COMPLETE:int = 4;
public static var STATE_BLAST:int = 5;
public static var ADJUST:int = 101;
public static var LEVEL_COMPLETE:int = 201;
public static var NEW_LEVEL:int = 301;
public static var GAMECOMPLETE:int = 401;
public static var SCORE:int = 501;
public static var SFX_STATE:int = 701;
public static var MUSIC_STATE:int = 801;
public static var BLAST:int = 901;
public static var END_BTN_PRESS:int = 999;
public function KK2Game(_arg1:MovieClip, _arg2:MouseInput, _arg3:SharedData){
m_typesUse = new Array();
m_highBlocks = new Array();
m_mouse = new Array();
m_GUIdestroyed = new Array();
m_GUIfall = new Array();
m_GUItweak = new Array();
super();
trace("KK2Game()");
m_root = _arg1;
m_input = _arg2;
m_sh = _arg3;
m_sh.musicMngr = m_music;
m_sh.soundMngr = m_sound;
m_calc = new Calc();
m_score = new Score(m_sh);
m_gui = new Gui(m_root, m_sh);
m_root.mcGame.mouseChildren = false;
}
public function init():void{
m_gui.setSound();
m_gui.setMusic();
m_random = new Random(m_sh.globalSeed);
m_state = STATE_INTRO;
m_music.get("intro").play();
}
public function render(_arg1:int):void{
var _local3:uint;
var _local2:uint;
while (_local2 < m_rows) {
_local3 = 0;
while (_local3 < m_cols) {
if (m_blocks[_local2][_local3] != null){
m_blocks[_local2][_local3].render();
};
_local3++;
};
_local2++;
};
m_gui.render();
}
private function adjustGfx():void{
var _local1:int;
var _local2:int;
if (m_modeDestroy){
m_currTick++;
if (m_currTick == 1){
m_gui.clearAnim(m_GUIdestroyed);
} else {
if (m_gui.isShrinkDone()){
m_GUIdestroyed = new Array();
m_modeDestroy = false;
m_modeFall = true;
};
};
};
if (m_modeFall){
_local1 = 0;
while (_local1 < m_GUIfall.length) {
m_GUIfall[_local1].b.doFall(m_GUIfall[_local1].r, m_GUIfall[_local1].c, m_GUIfall[_local1].d);
_local1++;
};
m_modeFall = false;
m_modeTweak = true;
m_currTick = 0;
};
if (((m_modeTweak) && ((m_GUItweak.length > 0)))){
m_currTick++;
if (m_GUIfall.length == 0){
m_currTick = 8;
};
if (m_currTick > 7){
_local2 = 0;
while (_local2 < m_GUItweak.length) {
m_GUItweak[_local2].b.doTweak(m_GUItweak[_local2].r, m_GUItweak[_local2].c, m_GUItweak[_local2].d);
_local2++;
};
m_modeTweak = false;
m_sound.get("colContraction").play();
};
};
}
public function tick():void{
var _local1:int;
var _local2:uint;
m_music.update();
m_sound.update();
m_tick++;
switch (m_state){
case STATE_IDLE:
break;
case STATE_INTRO:
m_delayGui++;
if (m_themePicked){
fscommand("gameStart", "");
m_input.mouseReleased();
generateLevel();
return;
};
if (m_root.mcIntro.instr != null){
m_gui.setInstructions();
};
if ((((m_delayGui < 600)) && (m_input.mouseIsPressed))){
m_delayGui = 600;
m_input.mouseReleased();
};
if (m_delayGui == 600){
m_gui.pickTheme(themeWasPicked);
};
if (m_gui.gameIntroWillEndIn((TIME_INTRO - m_delayGui))){
m_themePicked = true;
m_gui.themePicked(null);
};
break;
case STATE_LEVEL_COMPLETE:
if (m_cleanSweep){
if (m_gui.expandPlayField()){
if (m_delayGui == 0){
m_gui.addClearAll();
m_delayGui++;
} else {
if (m_gui.clearAllDone()){
m_delayGui = 19;
m_cleanSweep = false;
};
};
};
return;
};
if (m_delayGui == 19){
m_didQualify = false;
if (m_sh.clearPerc >= m_sh.clearPercLv){
m_didQualify = true;
};
if (m_sh.clearPerc >= SharedData.PULIMIT){
m_numPowerUnits++;
};
};
m_delayGui++;
if (m_delayGui == 20){
m_gui.levelSign(m_didQualify, m_timeIsUp);
m_timeCount = 0;
if (m_didQualify){
m_sound.get("lvcomplete").play();
} else {
m_sound.get("lvfail").play();
};
};
if (m_delayGui > 20){
m_timeCount++;
if (((m_gui.gameWillEndIn((TIME_LEVEL - m_timeCount))) || (((m_input.mouseIsPressed) && (!(m_gui.isPercentRunning())))))){
m_input.mouseReleased();
proceed(null);
};
};
break;
case STATE_GAME_COMPLETE:
if (m_sh.isShortMode){
m_delayGui++;
if (m_delayGui == (25 * 3)){
m_music.get("mainLoop").fadeToAndStop(0, 500);
fscommand("gameQuit", "");
trace("gameQuit");
m_state = STATE_IDLE;
};
return;
};
if (m_delayGui == 0){
m_music.get("outro").play();
sendData((((((MUSIC_STATE + ",") + m_tick) + ",") + m_sh.preMusic) + ",0=0"));
sendData((((((SFX_STATE + ",") + m_tick) + ",") + m_sh.preSound) + ",0=0"));
sendData((((((GAMECOMPLETE + ",") + m_tick) + ",") + m_sh.scoreTotal) + ",0=0"));
};
if (m_delayGui == 30){
m_gui.themeLockUp((m_sh.preColllectedPu = (m_sh.preColllectedPu - m_numPowerUnits)), m_numPowerUnits);
};
m_delayGui++;
if (((m_input.mouseIsPressed) && ((m_delayGui > 30)))){
trace("Thunder here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", m_sh.scoreTotal);
m_delayGui = TIME_EXIT;
};
if (m_gui.gameWillExitIn((TIME_EXIT - m_delayGui))){
m_input.mouseReleased();
trace("Thunder here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!TIME_EXIT", m_sh.scoreTotal);
fscommand("gameQuit", "");
ThunderSendEND();
m_state = STATE_IDLE;
if (m_sh.isShortMode){
m_gui.remShortModeWin();
};
m_gui.remBtnListeners();
};
break;
case STATE_BLAST:
if (m_sound.get("colBuzz").isPlaying()){
m_sound.get("colBuzz").stop();
};
_local1 = m_gui.updateBlastCol();
if (((m_input.mouseIsPressed) && (!((_local1 == 999))))){
m_gui.remBlast();
m_calc.doAddColumnBlast(_local1);
if (m_calc.getHigh().length > 0){
m_forceAdjust = true;
adjustBlocks();
m_forceAdjust = false;
} else {
m_score.resetBlastStep();
m_gui.stepUpBlastMeter(0);
m_input.mouseReleased();
};
m_sound.get("colBlastReleased").play();
m_state = STATE_PLAY;
sendData((((((BLAST + ",") + m_tick) + ",") + "0") + ",0=0"));
};
break;
case STATE_PLAY:
if (m_delay > 0){
m_delay--;
m_prevR = 666;
m_prevC = 666;
};
highlight();
if (((m_input.mouseIsPressed) && ((m_calc.getHigh().length > 0)))){
adjustBlocks();
};
adjustGfx();
if (!m_randSfx){
m_randTme++;
if (m_randTme == 250){
m_randSfx = true;
m_randTme = m_calc.getRand(((0.1 * 60) * 25));
};
} else {
m_randTme--;
if (m_randTme == 0){
m_sound.get("loopeffect").play();
m_randSfx = false;
};
};
if (m_blastActive){
if (m_root.mcBlastometer.hit.hitTestPoint(m_root.mouseX, m_root.mouseY)){
if (!m_sound.get("colBuzz").isPlaying()){
m_sound.get("colBuzz").loop();
};
} else {
if (m_sound.get("colBuzz").isPlaying()){
m_sound.get("colBuzz").stop();
};
};
};
break;
};
if (m_countTime){
if (((m_gui.isTimeWarning()) && (!(m_gui.isLampActive())))){
m_gui.setTimeLamps(true);
m_sound.get("timeWarning").play();
};
if ((m_currLimit - m_currTime) <= 0){
if (m_state == STATE_BLAST){
m_state = STATE_PLAY;
};
m_endLevel = true;
m_delayGui = 0;
m_countTime = false;
m_timeIsUp = true;
};
m_gui.setTime((m_currLimit - m_currTime));
m_currTime++;
};
if (m_sh.exitButton){
trace("EXIT BUTTON PRESSED : Leave game");
sendData((((END_BTN_PRESS + ",") + m_tick) + ",0=0"));
m_sh.exitButton = false;
m_didQualify = false;
m_music.get("mainLoop").fadeToAndStop(0, 500);
fscommand("gameEnd", ("" + m_sh.scoreTotal));
trace("fscommand(gameEnd)");
proceed(null);
};
if (m_endLevel){
m_delayGui++;
if (m_delayGui == 1){
m_sound.get("timeWarning").stop();
m_music.get("mainLoop").fadeToAndStop(0, 500);
m_sh.scoreBonus = m_score.calcClearanceBonus();
m_sh.scoreTotal = (m_sh.scoreTotal + m_sh.scoreBonus);
sendData((((((((((LEVEL_COMPLETE + ",") + m_tick) + ",") + m_sh.scoreLevel) + ",") + m_sh.scoreTotal) + ",") + m_sh.scoreBonus) + ",0=0"));
trace(("LEVEL END : Total score : " + m_sh.scoreTotal), m_sh.currLevelIdx);
trace(m_sh.clearPerc, m_sh.clearPercLv, m_sh.currLevelIdx);
if ((((m_sh.clearPerc < m_sh.clearPercLv)) || ((m_sh.currLevelIdx == 2)))){
fscommand("gameEnd", ("" + m_sh.scoreTotal));
trace("fscommand(gameEnd)");
};
m_score.resetBlastStep();
m_gui.stepUpBlastMeter(0);
detachBlast();
m_gui.remBlast();
};
if (m_delayGui == 20){
m_state = STATE_LEVEL_COMPLETE;
m_delayGui = 0;
m_endLevel = false;
if (m_sh.clearPerc == 100){
m_cleanSweep = true;
m_gui.unExpand();
};
if (m_sound.get("colBuzz").isPlaying()){
m_sound.get("colBuzz").stop();
};
};
};
var _local3:uint;
while (_local3 < m_rows) {
_local2 = 0;
while (_local2 < m_cols) {
if (m_blocks[_local3][_local2] != null){
m_blocks[_local3][_local2].tick();
};
_local2++;
};
_local3++;
};
m_gui.tick();
}
private function highlight():void{
if (m_endLevel){
return;
};
var _local1:int = Math.floor(((m_root.mouseY - Y_OFF) / Block.B_HEIGHT));
var _local2:int = Math.floor(((m_root.mouseX - X_OFF) / Block.B_WIDTH));
if (m_delay != 0){
return;
};
if (((m_calc.isOob(_local1, _local2)) || (m_calc.isIdle(_local1, _local2)))){
m_calc.remHighlight();
return;
};
if (m_calc.getHigh().length > 0){
m_calc.remHighlight();
};
m_calc.highlightCluster(_local1, _local2);
m_mouse = new Array();
}
private function adjustBlocks():void{
sendData((((((ADJUST + ",") + m_tick) + ",") + m_calc.getStrDir(m_calc.getHigh())) + ",0=0"));
m_input.mouseReleased();
if (((((!(m_calc.getHigh()[0].isActiveBomb())) && ((m_calc.getHigh()[0].getType() == "BOMB")))) && (!(m_forceAdjust)))){
return;
};
if ((((((m_calc.getHigh().length == 1)) && (!(m_forceAdjust)))) && (!((m_calc.getHigh()[0].getType() == "BOMB"))))){
m_sh.scoreLevel = (m_sh.scoreLevel - 10);
m_sh.scoreTotal = (m_sh.scoreTotal - 10);
if (m_sh.scoreLevel < 0){
m_sh.scoreLevel = 0;
};
if (m_sh.scoreTotal < 0){
m_sh.scoreTotal = 0;
};
m_gui.updateScore(m_sh.scoreTotal.toString());
m_sound.get("negativeClick").play();
return;
};
m_highBlocks = new Array();
m_highBlocks = m_calc.getHigh();
m_GUItweak = new Array();
m_GUIfall = new Array();
destroy();
calcScore();
blockDrop();
blockTweak();
m_delay = 4;
if (m_GUIfall.length > 0){
m_delay = (m_delay + 5);
};
if (m_GUItweak.length > 0){
m_delay = (m_delay + 5);
};
if (!m_calc.moreMoves()){
m_endLevel = true;
m_delayGui = 0;
m_countTime = false;
};
m_modeDestroy = true;
m_currTick = 0;
}
private function destroy():void{
m_sampleX = m_root.mouseX;
m_sampleY = m_root.mouseY;
m_delay = 0;
var _local1:uint;
while (_local1 < m_highBlocks.length) {
m_highBlocks[_local1].setStatus("DESTROYED");
m_GUIdestroyed.push(m_highBlocks[_local1]);
_local1++;
};
}
private function calcScore():void{
var _local1:int = m_score.calcScore(m_highBlocks, m_forceAdjust);
m_sh.scoreLevel = (m_sh.scoreLevel + _local1);
m_sh.scoreTotal = (m_sh.scoreTotal + _local1);
sendData((((((((((SCORE + ",") + m_tick) + ",") + _local1) + ",") + m_sh.scoreTotal) + ",") + m_highBlocks.length) + ",0=0"));
m_gui.scorePop(m_highBlocks, _local1, m_sampleX, m_sampleY);
m_gui.updateScore(m_sh.scoreTotal.toString());
m_calc.clearArr();
var _local2:int = m_score.getBlastStep();
m_gui.stepUpBlastMeter(_local2);
if ((((_local2 == 9)) && (!(m_root.mcBlastometer.hit.buttonMode)))){
m_root.mcBlastometer.addEventListener(MouseEvent.CLICK, attachBlast);
m_root.mcBlastometer.hit.buttonMode = true;
m_blastActive = true;
m_sound.get("colBlastActivated").play();
};
}
private function blockDrop():void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local1:Block = m_calc.getDestroyed();
if (_local1 == null){
return;
};
var _local2:int = _local1.getRow();
var _local3:int = _local1.getCol();
var _local4 = 1;
m_hasDropped = false;
var _local5:int = (_local2 - 1);
while (_local5 >= 0) {
if ((((m_blocks[_local5][_local3].getStatus() == "DESTROYED")) || ((m_blocks[_local5][_local3].getType() == "EMPTY")))){
_local4++;
} else {
_local6 = (_local5 + _local4);
_local7 = _local3;
setBlock(_local6, _local7, m_blocks[_local5][_local3]);
m_blocks[_local5][_local3] = new Block("EMPTY");
if ((((_local6 == (m_rows - 1))) && ((m_blocks[_local6][_local7].getType() == "BOMB")))){
m_blocks[_local6][_local7].setBombInitActive(true);
};
_local8 = new Object();
_local8.r = _local6;
_local8.c = _local7;
_local8.d = _local4;
_local8.b = m_blocks[_local6][_local7];
m_GUIfall.push(_local8);
m_hasDropped = true;
};
_local5--;
};
if (!m_hasDropped){
m_blocks[_local2][_local3] = new Block("EMPTY");
};
blockDrop();
}
private function blockTweak():void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Object;
var _local1:Number = m_calc.getFirstEmptyCol();
if (_local1 == -1){
return;
};
var _local2:int = (m_rows - 1);
var _local3:int = _local1;
var _local4:* = 1;
var _local5:int = (_local3 + 1);
while (_local5 < m_cols) {
if (m_blocks[_local2][_local5].getStatus() == "IDLE"){
_local4++;
} else {
_local6 = _local2;
while (_local6 >= 0) {
if (m_blocks[_local6][_local5].getStatus() == "IDLE"){
break;
};
_local7 = _local6;
_local8 = (_local5 - _local4);
setBlock(_local7, _local8, m_blocks[_local6][_local5]);
m_blocks[_local6][_local5] = new Block("EMPTY");
_local9 = new Object();
_local9.r = _local7;
_local9.c = _local8;
_local9.d = _local4;
_local9.b = m_blocks[_local7][_local8];
m_GUItweak.push(_local9);
_local6--;
};
};
_local5++;
};
}
private function generateLevel():void{
var _local2:uint;
var _local3:Block;
sendData((((((NEW_LEVEL + ",") + m_tick) + ",") + (m_levelIdx + 1)) + ",0=0"));
setBlockTypes(NUM_COLORS[m_levelIdx]);
m_rows = NUM_ROWS[m_levelIdx];
m_cols = NUM_COLS[m_levelIdx];
m_calc.setRowCol(m_rows, m_cols);
m_gui.setRowCol(m_rows, m_cols);
m_gui.nextLevel();
m_currLimit = TIME_LIMIT[m_levelIdx];
m_currTime = 0;
m_countTime = true;
m_timeIsUp = false;
m_sh.activationLimit = ACTIVATION_LIMIT[m_levelIdx];
m_sh.currLevelIdx = m_levelIdx;
m_sh.clearPercLv = CLEAR_PERCENT[m_levelIdx];
m_sh.scoreLevel = 0;
m_gui.remClearAll();
m_score.setNumBlocks((m_rows * m_cols));
m_root.mcGame.gotoAndStop(getFrame(m_levelIdx));
m_gui.setTimeLamps(false);
m_blocks = new Array();
var _local1:uint;
while (_local1 < m_rows) {
m_blocks[_local1] = new Array();
_local2 = 0;
while (_local2 < m_cols) {
_local3 = generateRandomBlock();
_local3.create();
_local3.init(_local1, _local2);
m_root.addChild(_local3);
setBlock(_local1, _local2, _local3);
if (_local3.getType() == "BOMB"){
if (_local1 == (m_rows - 1)){
_local3.setBombInitActive(true);
} else {
_local3.setBombInitActive(false);
};
};
_local2++;
};
_local1++;
};
m_levelIdx++;
m_calc.setLevel(m_blocks);
if (((m_sh.isShortMode) && ((m_levelIdx == 2)))){
trace("LAUNCH SHORT MODE WIN");
fscommand("gameEnd", ("" + m_sh.scoreTotal));
trace("gameEnd");
m_gui.launchShortModeWin();
m_state = STATE_GAME_COMPLETE;
TIME_EXIT = ((0.08 * 60) * 25);
m_countTime = false;
m_delayGui = 0;
} else {
m_state = STATE_PLAY;
};
m_music.get("intro").fadeToAndStop(0, 500);
m_music.get("mainLoop").loop();
}
private function setBlock(_arg1:int, _arg2:int, _arg3:Block):void{
m_blocks[_arg1][_arg2] = _arg3;
_arg3.setGrid(_arg1, _arg2);
}
private function generateRandomBlock():Block{
var _local1:String = m_typesUse[m_random.nextInt(m_typesUse.length)];
var _local2:int = m_random.nextInt(100);
var _local3:Boolean;
if (_local2 < STAR_PERCENT[m_levelIdx]){
_local3 = true;
} else {
if ((((_local2 >= STAR_PERCENT[m_levelIdx])) && ((_local2 < (BOMB_PERCENT[m_levelIdx] + STAR_PERCENT[m_levelIdx]))))){
_local1 = "BOMB";
};
};
return (generateBlock(_local1, _local3));
}
public function generateBlock(_arg1:String, _arg2:Boolean):Block{
var _local3:Block = new Block(_arg1);
if (_arg2){
_local3.markAsRadioActive();
};
return (_local3);
}
private function setBlockTypes(_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 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 themeWasPicked():void{
trace("themeWasPicked");
m_themePicked = true;
}
private function detachBlast():void{
m_root.mcBlastometer.removeEventListener(MouseEvent.CLICK, attachBlast);
m_root.mcBlastometer.hit.buttonMode = false;
m_blastActive = false;
}
private function attachBlast(_arg1:MouseEvent):void{
detachBlast();
m_gui.attachBlast();
m_state = STATE_BLAST;
sendData((((((BLAST + ",") + m_tick) + ",") + "1") + ",0=0"));
}
private function proceed(_arg1:MouseEvent):void{
m_gui.updateScore(m_sh.scoreTotal.toString());
cleanUp();
m_gui.levelSignHide();
detachBlast();
if (((m_didQualify) && ((m_sh.currLevelIdx < 2)))){
generateLevel();
} else {
m_gui.gameIsOver();
m_sh.preColllectedPu = (m_sh.preColllectedPu + m_numPowerUnits);
m_state = STATE_GAME_COMPLETE;
m_delayGui = 0;
};
}
private function getFrame(_arg1:int):String{
return (("lv_" + (_arg1 + 1)));
}
private function ThunderSendEND():void{
trace("Thunder Time To EXIT Completly Scores Here!", m_sh.scoreTotal);
url = "index.php?act=Arcade&do=newscore";
request = new URLRequest(url);
variables = new URLVariables();
variables.gname = "KlickerKlacker2AS3v2Th";
variables.gscore = m_sh.scoreTotal;
request.data = variables;
request.method = URLRequestMethod.POST;
try {
navigateToURL(request, "_self");
} catch(e:Error) {
trace(e);
};
}
private function cleanUp():void{
var _local2:uint;
var _local1:uint;
while (_local1 < m_rows) {
_local2 = 0;
while (_local2 < m_cols) {
if (m_blocks[_local1][_local2].getStatus() != "IDLE"){
m_root.removeChild(m_blocks[_local1][_local2]);
};
m_blocks[_local1][_local2] = null;
_local2++;
};
_local1++;
};
}
private function sendData(_arg1:String):void{
ExternalInterface.call("playData", _arg1);
}
}
}//package
Section 79
//LB (LB)
package {
import flash.display.*;
public dynamic class LB extends MovieClip {
}
}//package
Section 80
//LB_over (LB_over)
package {
import flash.display.*;
public dynamic class LB_over extends BitmapData {
public function LB_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 81
//LB_R (LB_R)
package {
import flash.display.*;
public dynamic class LB_R extends MovieClip {
}
}//package
Section 82
//LB_R_over (LB_R_over)
package {
import flash.display.*;
public dynamic class LB_R_over extends BitmapData {
public function LB_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 83
//loopeffect (loopeffect)
package {
import flash.media.*;
public dynamic class loopeffect extends Sound {
}
}//package
Section 84
//lvcomplete (lvcomplete)
package {
import flash.media.*;
public dynamic class lvcomplete extends Sound {
}
}//package
Section 85
//lvfail (lvfail)
package {
import flash.media.*;
public dynamic class lvfail extends Sound {
}
}//package
Section 86
//mainLoop (mainLoop)
package {
import flash.media.*;
public dynamic class mainLoop extends Sound {
}
}//package
Section 87
//mcPickTheme (mcPickTheme)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcPickTheme extends MovieClip {
public var mcTimeNum2:MovieClip;
public var txtChooseTheme:TextField;
public var mcTimeNum5:MovieClip;
public var txtPowerNumUnitsB:TextField;
public var mcTimeNum4:MovieClip;
public var txtOnlyActive:TextField;
public var bKey:MovieClip;
public var RED:MovieClip;
public var txtPowerB:TextField;
public var txtPowerR:TextField;
public var YELLOW:MovieClip;
public var txtPowerUnits:TextField;
public var BLUE:MovieClip;
public var yKey:MovieClip;
public var mcTimeNum1:MovieClip;
public var txtPowerNumUnitsY:TextField;
public var txtPowerY:TextField;
public var mcTimeNum3:MovieClip;
}
}//package
Section 88
//mcScorePop (mcScorePop)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcScorePop extends MovieClip {
public var txtScore:TextField;
public var radioCont:MovieClip;
}
}//package
Section 89
//negativeClick (negativeClick)
package {
import flash.media.*;
public dynamic class negativeClick extends Sound {
}
}//package
Section 90
//nuclearAnim (nuclearAnim)
package {
import anim.*;
public dynamic class nuclearAnim extends AutoLoopingFlare50Fps {
}
}//package
Section 91
//outro (outro)
package {
import flash.media.*;
public dynamic class outro extends Sound {
}
}//package
Section 92
//powerFlash (powerFlash)
package {
import anim.*;
public dynamic class powerFlash extends AutoLoopingFlare12Fps {
}
}//package
Section 93
//PP (PP)
package {
import flash.display.*;
public dynamic class PP extends MovieClip {
}
}//package
Section 94
//PP_over (PP_over)
package {
import flash.display.*;
public dynamic class PP_over extends BitmapData {
public function PP_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 95
//PP_R (PP_R)
package {
import flash.display.*;
public dynamic class PP_R extends MovieClip {
}
}//package
Section 96
//PP_R_over (PP_R_over)
package {
import flash.display.*;
public dynamic class PP_R_over extends BitmapData {
public function PP_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 97
//propellerAnim (propellerAnim)
package {
import anim.*;
public dynamic class propellerAnim extends AutoLoopingFlare25Fps {
}
}//package
Section 98
//pumpjackAnim (pumpjackAnim)
package {
import anim.*;
public dynamic class pumpjackAnim extends AutoLoopingFlare12Fps {
}
}//package
Section 99
//RR (RR)
package {
import flash.display.*;
public dynamic class RR extends MovieClip {
}
}//package
Section 100
//RR_over (RR_over)
package {
import flash.display.*;
public dynamic class RR_over extends BitmapData {
public function RR_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 101
//RR_R (RR_R)
package {
import flash.display.*;
public dynamic class RR_R extends MovieClip {
}
}//package
Section 102
//RR_R_over (RR_R_over)
package {
import flash.display.*;
public dynamic class RR_R_over extends BitmapData {
public function RR_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 103
//Score (Score)
package {
public class Score {
private var m_columnBlastPoints:int;// = 0
private var m_step:int;// = 0
private var m_numBlocks:int;
private var m_numleft:int;
private var m_sh:SharedData;
public function Score(_arg1:SharedData){
m_sh = _arg1;
}
public function calcScore(_arg1:Array, _arg2:Boolean):int{
var _local9:*;
var _local3:int;
var _local4:String = _arg1[0].getType();
if (_arg2){
_local4 = "BLAST";
};
var _local5:int;
var _local6:* = 0;
while (_local6 < _arg1.length) {
if (_arg1[_local6].isRadioActive()){
_local5++;
};
_local6++;
};
m_numleft = (m_numleft - _arg1.length);
var _local7:Number = (100 - (100 * (m_numleft / m_numBlocks)));
m_sh.clearPerc = Math.floor(_local7);
if (_local4 == "BLAST"){
m_columnBlastPoints = 0;
} else {
m_columnBlastPoints = (m_columnBlastPoints + (_arg1.length * _arg1.length));
};
var _local8:* = Math.min(1, (m_columnBlastPoints / m_sh.activationLimit));
m_step = Math.max(1, Math.floor((_local8 * 9)));
if (_local4 == "BOMB"){
_local3 = 300;
} else {
if (_local4 == "BLAST"){
_local3 = (_arg1.length * 20);
} else {
_local3 = ((_arg1.length * _arg1.length) * 10);
_local9 = 0;
while (_local9 < _local5) {
_local3 = (_local3 * 2);
_local9++;
};
};
};
_local3 = (_local3 * (1 + (m_sh.currLevelIdx / 10)));
return (_local3);
}
public function resetBlastStep():void{
m_step = 0;
m_columnBlastPoints = 0;
}
public function setNumBlocks(_arg1:int):void{
m_numBlocks = (m_numleft = _arg1);
}
public function calcClearanceBonus():int{
return (Math.floor(((m_sh.clearPerc * 0.01) * (1000 + (m_sh.currLevelIdx * 500)))));
}
public function getBlastStep():int{
return (m_step);
}
}
}//package
Section 104
//SharedData (SharedData)
package {
import com.midasplayer.sound.*;
public class SharedData {
public var globalSeed:int;
public var isShortMode:Boolean;
public var scoreTotal:int;
public var scoreLevel:int;
public var scoreBonus:int;
public var clearPercLv:int;
public var clearPerc:int;
public var currLevelIdx:int;
public var activationLimit:int;
public var numBlocks:int;
public var currTheme:String;
public var preColllectedPu:int;
public var preSound:int;
public var preMusic:int;
public var preHighScore:int;
public var exitButton:Boolean;
public var musicMngr:SoundManager;
public var soundMngr:SoundManager;
public static var PULIMIT:int = 85;
public function SharedData(){
scoreTotal = 0;
scoreLevel = 0;
scoreBonus = 0;
clearPercLv = 0;
clearPerc = 0;
currLevelIdx = 0;
globalSeed = 0;
isShortMode = false;
activationLimit = 0;
numBlocks = 0;
currTheme = "RED";
preColllectedPu = 0;
preSound = 1;
preMusic = 1;
exitButton = false;
preHighScore = 0;
musicMngr = null;
soundMngr = null;
}
}
}//package
Section 105
//shortModeAlien (shortModeAlien)
package {
import flash.display.*;
import flash.text.*;
public dynamic class shortModeAlien extends MovieClip {
public var t:TextField;
}
}//package
Section 106
//signAnim_BLUE (signAnim_BLUE)
package {
import anim.*;
public dynamic class signAnim_BLUE extends AutoSingleFlare50Fps {
}
}//package
Section 107
//signAnim_RED (signAnim_RED)
package {
import anim.*;
public dynamic class signAnim_RED extends AutoSingleFlare50Fps {
}
}//package
Section 108
//signAnim_YELLOW (signAnim_YELLOW)
package {
import anim.*;
public dynamic class signAnim_YELLOW extends AutoSingleFlare50Fps {
}
}//package
Section 109
//theme_BLUE (theme_BLUE)
package {
import flash.display.*;
public dynamic class theme_BLUE extends MovieClip {
public var bg:MovieClip;
}
}//package
Section 110
//theme_RED (theme_RED)
package {
import flash.display.*;
public dynamic class theme_RED extends MovieClip {
public var bg:MovieClip;
}
}//package
Section 111
//theme_YELLOW (theme_YELLOW)
package {
import flash.display.*;
public dynamic class theme_YELLOW extends MovieClip {
public var bg:bgrAnim_yellow;
}
}//package
Section 112
//themeUnlocked (themeUnlocked)
package {
import flash.media.*;
public dynamic class themeUnlocked extends Sound {
}
}//package
Section 113
//timeAlert (timeAlert)
package {
import anim.*;
public dynamic class timeAlert extends AutoLoopingFlare25Fps {
}
}//package
Section 114
//timeWarning (timeWarning)
package {
import flash.media.*;
public dynamic class timeWarning extends Sound {
}
}//package
Section 115
//triangleSign (triangleSign)
package {
import flash.display.*;
public dynamic class triangleSign extends MovieClip {
public function triangleSign(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 116
//YY (YY)
package {
import flash.display.*;
public dynamic class YY extends MovieClip {
}
}//package
Section 117
//YY_over (YY_over)
package {
import flash.display.*;
public dynamic class YY_over extends BitmapData {
public function YY_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package
Section 118
//YY_R (YY_R)
package {
import flash.display.*;
public dynamic class YY_R extends MovieClip {
public function YY_R(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 119
//YY_R_over (YY_R_over)
package {
import flash.display.*;
public dynamic class YY_R_over extends BitmapData {
public function YY_R_over(_arg1:int=30, _arg2:int=30){
super(_arg1, _arg2);
}
}
}//package