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 {
public class AutoLoopingFlare25Fps extends BaseFlare {
public function AutoLoopingFlare25Fps(){
m_isPaused = false;
m_isLoop = true;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 3
//AutoLoopingRndStart25Fps (anim.AutoLoopingRndStart25Fps)
package anim {
public class AutoLoopingRndStart25Fps extends BaseFlare {
public function AutoLoopingRndStart25Fps(){
m_isPaused = false;
m_isLoop = true;
m_frameOffset = Math.floor(((Math.random() * totalFrames) - 1));
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 4
//AutoSingleFlare12Fps (anim.AutoSingleFlare12Fps)
package anim {
public class AutoSingleFlare12Fps extends BaseFlare {
public function AutoSingleFlare12Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(12);
start();
}
}
}//package anim
Section 5
//AutoSingleFlare25Fps (anim.AutoSingleFlare25Fps)
package anim {
import flash.text.*;
public class AutoSingleFlare25Fps extends BaseFlare {
public var txtScore:TextField;
public function AutoSingleFlare25Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(25);
start();
}
}
}//package anim
Section 6
//AutoSingleFlare50Fps (anim.AutoSingleFlare50Fps)
package anim {
import flash.display.*;
public class AutoSingleFlare50Fps extends BaseFlare {
public var mcNum:MovieClip;
public var mcTime:MovieClip;
public function AutoSingleFlare50Fps(){
m_isPaused = false;
m_isLoop = false;
m_isRemoveAfterPlay = false;
setFrameRate(50);
start();
}
}
}//package anim
Section 7
//AutoSingleRndStart20Fps (anim.AutoSingleRndStart20Fps)
package anim {
public class AutoSingleRndStart20Fps extends BaseFlare {
public function AutoSingleRndStart20Fps(){
m_isPaused = false;
m_isLoop = false;
m_frameOffset = Math.floor((Math.random() * 2));
m_isRemoveAfterPlay = false;
setFrameRate(20);
start();
}
}
}//package anim
Section 8
//BaseFlare (anim.BaseFlare)
package anim {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class BaseFlare extends MovieClip {
protected var m_isLoop:Boolean;
protected var m_isPaused:Boolean;
protected var m_frameOffset:int;
private var m_restartAt:int;
private var m_firstRender:Boolean;
private var m_step:Number;
private var m_lastFrame:uint;
protected var m_frameRate:int;
protected var m_isRemoveAfterPlay:Boolean;
private var m_startTime:int;
public function BaseFlare(){
super.stop();
m_lastFrame = 0;
m_restartAt = 0;
m_frameOffset = 0;
m_isPaused = false;
m_isRemoveAfterPlay = true;
m_firstRender = true;
m_isLoop = true;
if (!m_isPaused){
start();
};
setFrameRate(30);
}
override public function stop():void{
m_firstRender = true;
removeEventListener(Event.ENTER_FRAME, enterFrame);
if (m_isRemoveAfterPlay){
parent.removeChild(this);
};
}
public function setDestroyAfterPlay(_arg1:Boolean):void{
m_isRemoveAfterPlay = _arg1;
}
public function start():void{
m_lastFrame = 0;
m_firstRender = true;
addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function setLoopRestartFrame(_arg1:int):void{
m_restartAt = _arg1;
}
public function setLoop(_arg1:Boolean):void{
m_isLoop = _arg1;
}
public function setFrameRate(_arg1:int):void{
m_frameRate = _arg1;
m_step = ((1 / m_frameRate) * 1000);
}
public function enterFrame(_arg1:Event):void{
var _local2:int = getTimer();
if (m_firstRender){
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;
};
}
public function setFrameOffSet(_arg1:int):void{
m_frameOffset = _arg1;
}
}
}//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{
m_value = PennerEase.easeInQuad(m_dt, m_startValue, (m_targetValue - m_startValue), m_duration);
}
}
}//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);
}
private function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
override public function nextPosition():void{
m_value = easeOut(m_dt, m_startValue, (m_targetValue - m_startValue), m_duration);
}
}
}//package anim
Section 11
//Interpolator (anim.Interpolator)
package anim {
public class Interpolator {
protected var m_startValue:Number;
protected var m_finished:Boolean;
protected var m_duration:int;
protected var m_dt:int;
protected var m_dv:Number;
protected var m_targetValue:Number;
protected var m_value:Number;
public function Interpolator(_arg1:Number, _arg2:Number, _arg3:int){
m_startValue = _arg1;
m_targetValue = _arg2;
m_duration = _arg3;
m_dt = 0;
m_value = _arg1;
m_finished = false;
m_dv = (m_targetValue - m_startValue);
}
public function nextPosition():void{
m_value = (((m_dv * m_dt) / m_duration) + m_startValue);
}
public function getValue():Number{
return (m_value);
}
public function update():Boolean{
if (!m_finished){
m_dt++;
nextPosition();
if (m_dt == m_duration){
m_value = m_targetValue;
m_finished = true;
};
};
return (m_finished);
}
public function getTargetValue():Number{
return (m_targetValue);
}
public function getElapsedPercent():Number{
if (m_duration == 0){
return (1);
};
return ((Math.max(0, (m_duration - m_dt)) / m_duration));
}
public function isDone():Boolean{
return (m_finished);
}
}
}//package anim
Section 12
//PennerEase (anim.PennerEase)
package anim {
public class PennerEase {
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package anim
Section 13
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
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 14
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
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 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);
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package com.greensock.core
Section 15
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var timeline:SimpleTimeline;
public var data;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
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 renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
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 set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
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 get totalTime():Number{
return (this.cachedTotalTime);
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
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 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);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
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 pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
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);
}
}
}//package com.greensock.core
Section 16
//FastEase (com.greensock.easing.FastEase)
package com.greensock.easing {
import com.greensock.*;
public class FastEase {
public static function activateEase(_arg1:Function, _arg2:int, _arg3:uint):void{
TweenLite.fastEaseLookup[_arg1] = [_arg2, _arg3];
}
public static function activate(_arg1:Array):void{
var _local3:Object;
var _local2:int = _arg1.length;
while (_local2--) {
_local3 = _arg1[_local2];
if (_local3.hasOwnProperty("power")){
activateEase(_local3.easeIn, 1, _local3.power);
activateEase(_local3.easeOut, 2, _local3.power);
activateEase(_local3.easeInOut, 3, _local3.power);
if (_local3.hasOwnProperty("easeNone")){
activateEase(_local3.easeNone, 1, 0);
};
};
};
}
}
}//package com.greensock.easing
Section 17
//Linear (com.greensock.easing.Linear)
package com.greensock.easing {
public class Linear extends FastEase {
public static const power:uint = 0;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package com.greensock.easing
Section 18
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _target: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 killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
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 onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
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 19
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
private static var _propNames:Array = [];
protected static var _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = ColorMatrixFilter;
var _local4:Object = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
var _local5:Array = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
}
}//package com.greensock.plugins
Section 20
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = _arg2.length;
while (_local3--) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local2:int = _info.length;
if (this.round){
while (_local2--) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package com.greensock.plugins
class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 21
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _remove:Boolean;
protected var _target:Object;
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
public function onCompleteTween():void{
var _local1:Array;
var _local2:int;
if (_remove){
_local1 = _target.filters;
if (!(_local1[_index] is _type)){
_local2 = _local1.length;
while (_local2--) {
if ((_local1[_local2] is _type)){
_local1.splice(_local2, 1);
break;
};
};
} else {
_local1.splice(_index, 1);
};
_target.filters = _local1;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local4:Array = _target.filters;
var _local8:Object = ((_arg1 is BitmapFilter)) ? {} : _arg1;
_index = -1;
if (_local8.index != null){
_index = _local8.index;
} else {
_local6 = _local4.length;
while (_local6--) {
if ((_local4[_local6] is _type)){
_index = _local6;
break;
};
};
};
if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){
_index = ((_local8.index)!=null) ? _local8.index : _local4.length;
_local4[_index] = _arg2;
_target.filters = _local4;
};
_filter = _local4[_index];
if (_local8.remove == true){
_remove = true;
this.onComplete = onCompleteTween;
};
_local6 = _arg3.length;
while (_local6--) {
_local5 = _arg3[_local6];
if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){
if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){
_local7 = new HexColorsPlugin();
_local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]);
_tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false);
} else {
if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){
_filter[_local5] = _arg1[_local5];
} else {
addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5);
};
};
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local3:PropTween;
var _local2:int = _tweens.length;
var _local4:Array = _target.filters;
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
if (!(_local4[_index] is _type)){
_local2 = (_index = _local4.length);
while (_local2--) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package com.greensock.plugins
Section 22
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function killProps(_arg1:Object):void{
var _local2:int = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
_local2--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
}
}//package com.greensock.plugins
Section 23
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class TweenPlugin {
public var activeDisable:Boolean;
protected var _changeFactor:Number;// = 0
protected var _tweens:Array;
public var onDisable:Function;
public var propName:String;
public var round:Boolean;
public var onEnable:Function;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
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));
};
};
}
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);
};
};
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
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);
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
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);
}
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);
}
}
}//package com.greensock.plugins
Section 24
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import com.greensock.plugins.*;
import flash.utils.*;
public class TweenLite extends TweenCore {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:uint;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.101;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
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 easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
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);
};
}
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 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;
}
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 = {};
}
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 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];
};
}
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));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
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 to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 25
//mcRayGun_49 (FlashDiamond_fla.mcRayGun_49)
package FlashDiamond_fla {
import flash.display.*;
public dynamic class mcRayGun_49 extends MovieClip {
public var rayRot:mcRayRot;
public function mcRayGun_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package FlashDiamond_fla
Section 26
//Music_168 (FlashDiamond_fla.Music_168)
package FlashDiamond_fla {
import flash.display.*;
public dynamic class Music_168 extends MovieClip {
public function Music_168(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package FlashDiamond_fla
Section 27
//Sound_167 (FlashDiamond_fla.Sound_167)
package FlashDiamond_fla {
import flash.display.*;
public dynamic class Sound_167 extends MovieClip {
public function Sound_167(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package FlashDiamond_fla
Section 28
//Symbol1_73 (FlashDiamond_fla.Symbol1_73)
package FlashDiamond_fla {
import flash.display.*;
public dynamic class Symbol1_73 extends MovieClip {
public function Symbol1_73(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package FlashDiamond_fla
Section 29
//ManagedSound (snd.ManagedSound)
package snd {
import flash.media.*;
public class ManagedSound {
public var activeSounds:Array;
private var manager:SoundManager;
private var ClassReference:Class;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
public function stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function loop(_arg1:Number=1, _arg2:Number=0, _arg3:Number=999999999):ManagedSoundChannel{
var _local4:SoundChannel = new ClassReference().play(0, _arg3, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local4));
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_arg1, _arg2);
_local3++;
};
}
public function isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].panTo(_arg1, _arg2);
_local3++;
};
}
public function setPan(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setPan(_arg1);
_local2++;
};
}
public function setVolume(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setVolume(_arg1);
_local2++;
};
}
}
}//package snd
Section 30
//ManagedSoundChannel (snd.ManagedSoundChannel)
package snd {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ManagedSoundChannel {
private var fadeStartVolume:Number;// = -1
private var channel:SoundChannel;
private var fadeEndVolume:Number;// = -1
private var targetVolume:Number;
private var targetPan:Number;
private var sound:ManagedSound;
private var stopAfterFade:Boolean;// = false
private var panEndTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var manager:SoundManager;
private var playing:Boolean;// = true
private var panStartTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var panEndVolume:Number;// = -1
private var panStartVolume:Number;// = -1
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
this.manager = _arg1;
this.sound = _arg2;
this.channel = _arg3;
_arg2.activeSounds.push(this);
if (_arg3 == null){
soundComplete(null);
return;
};
_arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete);
targetVolume = _arg3.soundTransform.volume;
targetPan = _arg3.soundTransform.pan;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
public function update():void{
var _local1:Number;
if (!playing){
return;
};
if (fadeStartTime >= 0){
_local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1));
targetVolume = (targetVolume * targetVolume);
if (_local1 == 1){
fadeStartTime = -1;
};
if ((((_local1 == 1)) && (stopAfterFade))){
stop();
};
};
if (panStartTime >= 0){
_local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1));
if (_local1 == 1){
panStartTime = -1;
};
};
var _local2:Number = (targetVolume * manager.volume);
var _local3:Number = targetPan;
if (channel == null){
return;
};
if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){
channel.soundTransform = new SoundTransform(_local2, _local3);
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeStartVolume = Math.sqrt(targetVolume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
stopAfterFade = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function isPlaying():Boolean{
return (playing);
}
}
}//package snd
Section 31
//SoundManager (snd.SoundManager)
package snd {
import flash.utils.*;
public class SoundManager {
private var fadeStartVolume:Number;// = -1
private var lastTime:Number;// = -1
private var managedSounds:Array;
private var fadeEndTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var fadeEndVolume:Number;// = -1
public var volume:Number;// = 1
private var managedSoundMap:Object;
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function update():void{
var _local3:Number;
var _local1:Number = getTimer();
if (lastTime < 0){
lastTime = _local1;
};
if (fadeStartTime >= 0){
_local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3));
volume = (volume * volume);
if (_local3 == 1){
fadeStartTime = -1;
};
};
var _local2:int;
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function getFromClass(_arg1:Class):ManagedSound{
var _local2:String = getQualifiedClassName(_arg1);
if (managedSoundMap[_local2] == null){
managedSoundMap[_local2] = new ManagedSound(this, _arg1);
managedSounds.push(managedSoundMap[_local2]);
};
return (managedSoundMap[_local2]);
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(_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 fadeTo(_arg1:Number, _arg2:Number):void{
fadeStartVolume = Math.sqrt(volume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
}
public function setVolume(_arg1:Number):void{
this.volume = _arg1;
fadeStartTime = -1;
}
}
}//package snd
Section 32
//Debug (utils.Debug)
package utils {
import flash.system.*;
import flash.external.*;
public class Debug {
public static var enabled:Boolean = false;
public static var debugWindow:DebugWindow;
public static var useExternal:Boolean = false;
public static function printMem():void{
print((("MEM: " + (System.totalMemory / 1000000).toFixed(2)) + "mb"));
}
public static function printCapabilities():void{
print(("Capabilities.serverString: " + Capabilities.serverString), "AAAAFF");
}
public static function print(_arg1:String, _arg2:String=null):void{
if (!enabled){
return;
};
if (useExternal){
if (_arg2 == null){
ExternalInterface.call("jsPrintDebug", _arg1);
} else {
ExternalInterface.call("jsPrintDebug", _arg1, _arg2);
};
};
if (debugWindow != null){
debugWindow.print(_arg1, _arg2);
debugWindow.parent.setChildIndex(debugWindow, (debugWindow.parent.numChildren - 1));
};
}
}
}//package utils
Section 33
//DebugWindow (utils.DebugWindow)
package utils {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.system.*;
public class DebugWindow extends Sprite {
private var _tf:TextField;
private var _text:Array;
public function DebugWindow(){
_text = [];
super();
var _local1:TextFormat = new TextFormat();
_local1.size = 9;
_local1.font = "Verdana";
_tf = new TextField();
_tf.wordWrap = true;
_tf.multiline = true;
_tf.x = 5;
_tf.y = 15;
_tf.width = (325 + 150);
_tf.height = 460;
_tf.defaultTextFormat = _local1;
_tf.textColor = 0xAAAAAA;
addChild(_tf);
graphics.lineStyle(1, 0, 1);
graphics.beginFill(0, 0.6);
graphics.drawRect(0, 0, 330, 460);
var _local2:Sprite = new Sprite();
_local2.graphics.lineStyle(1, 0, 1);
_local2.graphics.beginFill(0xCCCCCC, 0.75);
_local2.graphics.drawRect(0, 0, 330, 10);
_local2.buttonMode = true;
addChild(_local2);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, onClicked, false, 0, true);
_local2.addEventListener(MouseEvent.MOUSE_UP, onReleased, false, 0, true);
var _local3:Sprite = new Sprite();
_local3.x = 310;
_local3.y = 0;
_local3.graphics.lineStyle(1, 0, 1);
_local3.graphics.beginFill(0xFFFFFF);
_local3.graphics.drawRect(0, 0, 20, 10);
_local3.buttonMode = true;
_local3.addEventListener(MouseEvent.MOUSE_DOWN, copyText, false, 0, true);
addChild(_local3);
}
private function copyText(_arg1:MouseEvent):void{
var _local2 = "";
var _local3:int;
while (_local3 < _text.length) {
_local2 = (_local2 + (_text[_local3] + "\n"));
_local3++;
};
System.setClipboard(_local2);
print("DebugWindow.copyText() content copied to clipboard", null);
}
private function onReleased(_arg1:MouseEvent):void{
stopDrag();
}
public function print(_arg1:String, _arg2:String):void{
var _local5:String;
if (_arg2 != null){
if (_arg2.toLowerCase() == "ff3333"){
_arg1.split("<").join("{");
};
};
_arg1.split(">").join("}");
var _local3:Date = new Date();
var _local4:String = ((((_local3.getHours() + ":") + Formatter.addZero(_local3.getMinutes())) + ":") + Formatter.addZero(_local3.getSeconds()));
if (_arg2 != null){
_local5 = (((((("<b>" + _local4) + " - </b><font color=\"#") + _arg2) + "\">") + _arg1) + "</font>");
} else {
_local5 = ((("<b>" + _local4) + " - </b>") + _arg1);
};
_text.push(_local5);
if (_tf.numLines > 32){
_text.shift();
};
var _local6 = "";
var _local7:int;
while (_local7 < _text.length) {
_local6 = (_local6 + (_text[_local7] + "\n"));
_local7++;
};
_tf.htmlText = _local6;
}
private function onClicked(_arg1:MouseEvent):void{
startDrag();
}
}
}//package utils
Section 34
//Formatter (utils.Formatter)
package utils {
import flash.text.*;
public class Formatter {
public static var HOURS_PER_DAY:int = 8;
public static function formatDateNoTime(_arg1:Date):String{
return (((((_arg1.getFullYear() + "-") + addZero((_arg1.getMonth() + 1))) + "-") + addZero(_arg1.getDate())));
}
public static function formatTime(_arg1:Number):String{
return ("");
}
public static function shortenTextByLetters(_arg1:String, _arg2:int):String{
return ("");
}
public static function formatDate(_arg1:Date):String{
return (((((((((_arg1.getFullYear() + "-") + addZero((_arg1.getMonth() + 1))) + "-") + addZero(_arg1.getDate())) + " ") + addZero(_arg1.getHours())) + ":") + addZero(_arg1.getMinutes())));
}
public static function shortenTextByPixels(_arg1:TextField, _arg2:int):String{
return ("");
}
public static function addZero(_arg1:Number):String{
return (((_arg1 < 10)) ? ("0" + _arg1) : ("" + _arg1));
}
public static function formatDuration(_arg1:int):String{
var _local2:int = (_arg1 / HOURS_PER_DAY);
var _local3:int = (_arg1 - (_local2 * HOURS_PER_DAY));
return ((((_local2 + "d ") + _local3) + "h"));
}
}
}//package utils
Section 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 binaryShiftRight(_arg1:Number):void{
var _local5:*;
var _local6:*;
var _local2:* = ((_arg1 / 15) >> 0);
var _local3:* = (_arg1 - (_local2 * 15));
var _local4:* = (p.length - 1);
while (_local4 > 0) {
_local5 = 0;
while (_local5 < _local2) {
p[_local5] = p[(_local5 + 1)];
_local5++;
};
var _temp1 = _local4;
_local4 = (_local4 - 1);
var _local7 = _temp1;
p[_local7] = 0;
};
if (_local3 > 0){
_local6 = 0;
while (_local6 < _local3) {
shr();
_local6++;
};
};
}
public function mul32(_arg1:Number):void{
mul64(new Integer64(_arg1));
}
public function add32(_arg1:Number):void{
var _local2:* = 0;
var _local3:* = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
var _local4:* = (_arg1 & 32767);
_arg1 = (_arg1 >> 15);
var _local5:* = (_arg1 & 3);
_local2 = (_local2 + (p[0] + _local3));
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[1] + _local4));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (p[2] + _local5));
p[2] = (_local2 & 32767);
}
public function binaryShiftLeft(_arg1:Number):void{
var _local2:* = 0;
while (_local2 < _arg1) {
shl();
_local2++;
};
}
public function mul64(_arg1:Integer64):void{
var _local4:*;
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < 5) {
_local4 = _arg1.p[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[3]));
r[_local3][3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[4]));
r[_local3][4] = (_local2 & 32767);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]));
p[3] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]));
p[4] = (_local2 & 7);
}
private function shr():void{
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = (p.length - 1);
while (_local3 >= 0) {
_local1 = ((p[_local3] & 1) << 14);
p[_local3] = (p[_local3] >> 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3--;
_local2 = _local1;
};
}
public function init32(_arg1:Number):void{
p[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
p[2] = (_arg1 & 3);
p[3] = 0;
p[4] = 0;
}
public function init(_arg1:Integer64):void{
var _local2:* = 0;
while (_local2 < p.length) {
p[_local2] = _arg1.p[_local2];
_local2++;
};
}
private function merge(_arg1:Number):Number{
var _local2:* = 0;
while (_local2 < 3) {
p[_local2] = (p[_local2] + (_arg1 & 32767));
_arg1 = (_arg1 >>> 15);
_local2++;
};
return (_arg1);
}
public function binaryNot(_arg1:Integer64):void{
p[0] = (p[0] ^ _arg1.p[0]);
p[1] = (p[1] ^ _arg1.p[1]);
p[2] = (p[2] ^ _arg1.p[2]);
p[3] = (p[3] ^ _arg1.p[3]);
p[4] = (p[4] ^ _arg1.p[4]);
}
public function get lsb():Number{
return (((p[0] | (p[1] << 15)) | ((p[2] & 3) << 30)));
}
public function get msb():Number{
return (((((p[2] >> 2) | ((p[3] << 15) >> 2)) | ((p[4] << (15 * 2)) >> 2)) & 2147483647));
}
public function mulu32(_arg1:Number):void{
var _local4:*;
var _local2:* = 0;
s[0] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[1] = (_arg1 & 32767);
_arg1 = (_arg1 >>> 15);
s[2] = (_arg1 & 3);
var _local3:* = 0;
while (_local3 < 3) {
_local4 = s[_local3];
_local2 = (_local4 * p[0]);
r[_local3][0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[1]));
r[_local3][1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (_local4 * p[2]));
r[_local3][2] = (_local2 & 3);
_local3++;
};
_local2 = r[0][0];
p[0] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + (r[0][1] + r[1][0]));
p[1] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0]));
p[2] = (_local2 & 3);
p[3] = 0;
p[4] = 0;
}
private function shl():void{
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = p.length;
while (_local3 < _local4) {
_local1 = ((p[_local3] & 0x4000) >> 14);
p[_local3] = (p[_local3] << 1);
p[_local3] = ((p[_local3] | _local2) & 32767);
_local3++;
_local2 = _local1;
};
}
public function add64(_arg1:Integer64):void{
var _local2:* = 0;
var _local3:* = 1;
var _local4:* = 0;
while ((((_local3 < p.length)) && (!((_arg1.p[_local4] == 0))))) {
_local3++;
};
_local4 = 0;
while (_local4 < _local3) {
_local2 = (_local2 + (p[_local4] + _arg1.p[_local4]));
p[_local4] = (_local2 & 32767);
_local2 = (_local2 >> 15);
_local4++;
};
}
}
}//package utils
Section 37
//MouseInput (utils.MouseInput)
package utils {
public class MouseInput {
public var yMouse:int;
public var xMouse:int;
public var mouseIsPressed:Boolean;
public function MouseInput(){
trace("Welcome Input()");
}
public function mouseReleased(){
mouseIsPressed = false;
}
public function printInput(){
}
public function reset(){
mouseIsPressed = false;
}
public function init(){
reset();
}
public function setMousePos(_arg1:Number, _arg2:Number){
xMouse = _arg1;
yMouse = _arg2;
}
public function mousePressed(){
mouseIsPressed = true;
}
}
}//package utils
Section 38
//Random (utils.Random)
package utils {
import flash.utils.*;
public class Random {
private var mta:Array;
private var mti:Number;
private var lastSeed:Number;
private static var MATRIX_A:Number = 2567483615;
public static var nr:int = 0;
private static var UPPER_MASK:Number = 2147483648;
private static var LOWER_MASK:Number = 2147483647;
private static var M:Number = 397;
private static var N:Number = 624;
private static var mag01:Array = [0, 2567483615];
public function Random(_arg1:Number){
mta = new Array(N);
mti = (N + 1);
if (_arg1){
init_genrand(_arg1);
};
}
private function init_genrand(_arg1:Number):void{
_arg1 = int(_arg1);
var _local2:* = getTimer();
lastSeed = _arg1;
mta[0] = _arg1;
var _local3:* = _arg1;
var _local4:* = new Integer64(null);
var _local5:Number = N;
mti = 1;
while (mti < _local5) {
_local4.init32(((_local3 >>> 30) ^ _local3));
_local4.mulu32(1812433253);
_local3 = (mta[mti] = int((_local4.lsb + mti)));
mti++;
};
var _local6:* = getTimer();
}
public function nextFloat(){
return ((next(24) / (1 << 24)));
}
public function nextDouble(){
return ((next(24) / (1 << 24)));
}
public function get seed():Number{
return (lastSeed);
}
public function next(_arg1:Number){
if (_arg1 < 32){
return ((genrand_int32() & ((1 << _arg1) - 1)));
};
return (genrand_int32());
}
public function set seed(_arg1:Number){
init_genrand(_arg1);
}
public function nextInt(_arg1:Number){
nr++;
return (((genrand_int32() & 2147483647) % _arg1));
}
private function genrand_int32(){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:Number = N;
var _local2:Number = 0;
if (mti >= _local1){
if (mti == (_local1 + 1)){
init_genrand(5489);
};
_local3 = M;
_local4 = UPPER_MASK;
_local5 = LOWER_MASK;
_local6 = mag01;
_local7 = getTimer();
_local8 = 0;
_local9 = (_local1 - _local3);
_local10 = (_local3 - _local1);
_local8 = 0;
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local3)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local9 = (_local1 - 1);
while (_local8 < _local9) {
_local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5));
mta[_local8] = ((mta[(_local8 + _local10)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
_local8++;
};
_local2 = ((mta[(_local1 - 1)] & _local4) | (mta[0] & _local5));
mta[(_local1 - 1)] = ((mta[(_local3 - 1)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]);
mti = 0;
_local11 = getTimer();
};
_local2 = mta[mti++];
_local2 = (_local2 ^ (_local2 >>> 11));
_local2 = (_local2 ^ ((_local2 << 7) & 2636928640));
_local2 = (_local2 ^ ((_local2 << 15) & 4022730752));
_local2 = (_local2 ^ (_local2 >>> 18));
return (_local2);
}
}
}//package utils
Section 39
//Timer (utils.Timer)
package utils {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = -1
public var passedTime:Number;// = 0
private var msPerTick:Number;
private var ticksPerSecond:Number;
public var timeScale:Number;// = 1
public var alpha:Number;// = 0
public static var currentTime:Number = 0;
public function Timer(_arg1){
this.ticksPerSecond = _arg1;
msPerTick = (1000 / _arg1);
}
public function advanceTime(){
if (lastTime == -1){
lastTime = getTimer();
};
var _local1:* = getTimer();
passedTime = (_local1 - lastTime);
passedTime = (passedTime * timeScale);
currentTime = (currentTime + passedTime);
lastTime = _local1;
unprocessedTime = (unprocessedTime + passedTime);
var _local2:int = int((unprocessedTime / msPerTick));
unprocessedTime = (unprocessedTime - (_local2 * msPerTick));
alpha = (unprocessedTime / msPerTick);
return (_local2);
}
}
}//package utils
Section 40
//B_BOMBSHAKE (B_BOMBSHAKE)
package {
import anim.*;
public dynamic class B_BOMBSHAKE extends AutoLoopingRndStart25Fps {
}
}//package
Section 41
//B_OVER (B_OVER)
package {
import anim.*;
public dynamic class B_OVER extends AutoLoopingFlare12Fps {
}
}//package
Section 42
//B_VOBBLE (B_VOBBLE)
package {
import anim.*;
public dynamic class B_VOBBLE extends AutoSingleRndStart20Fps {
}
}//package
Section 43
//BB (BB)
package {
import flash.display.*;
public dynamic class BB extends MovieClip {
public var VOBBLE:BB_inner;
public var OVER:MovieClip;
public var SHAKE:BB_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 44
//BB_bombshake (BB_bombshake)
package {
import anim.*;
public dynamic class BB_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 45
//BB_inner (BB_inner)
package {
import anim.*;
public dynamic class BB_inner extends AutoSingleRndStart20Fps {
}
}//package
Section 46
//big_diamond (big_diamond)
package {
import anim.*;
public dynamic class big_diamond extends AutoLoopingFlare25Fps {
}
}//package
Section 47
//Block (Block)
package {
import flash.display.*;
import anim.*;
import flash.utils.*;
public class Block extends Sprite {
public var col:int;
private var m_isVobbling:Boolean;
private var m_currX:Number;
private var m_currY:Number;
public var RENDER:Boolean;// = true
public var SPECIAL:int;// = 0
public var row:int;
private var m_clip:MovieClip;
private var m_destY:Interpolator;
private var X_OFF:int;// = 76
private var Y_OFF:int;// = 76
private var m_destX:Interpolator;
public var MARKED:int;// = 0
public var STATUS:String;// = "IDLE"
public var TYPE:String;
private var m_isHigh:Boolean;// = false
public var m_state:int;// = 0
private static var STATE_VOBBLE:int = 3;
private static var STATE_IDLE:int = 0;
private static var STATE_BOUNCE:int = 4;
private static var STATE_FALL:int = 1;
private static var STATE_TWEAK:int = 2;
public function Block(_arg1:String){
m_clip = new MovieClip();
super();
TYPE = _arg1;
mouseChildren = false;
mouseEnabled = false;
cacheAsBitmap = true;
}
public function create():void{
var _local1:Class;
if (SPECIAL == 0){
_local1 = (getDefinitionByName(TYPE) as Class);
m_clip = (new (_local1) as MovieClip);
m_clip.SHAKE.stop();
m_clip.SHAKE.visible = false;
m_clip.VOBBLE.stop();
m_clip.VOBBLE.visible = false;
m_clip.OVER.visible = false;
addChild(m_clip);
} else {
createSpecial();
};
}
public function setHigh(_arg1:Boolean, _arg2:Boolean):void{
if (SPECIAL != 0){
if (_arg1){
m_clip.OVER.start();
} else {
m_clip.OVER.stop();
};
};
if (_arg1){
m_clip.OVER.visible = true;
m_clip.VOBBLE.visible = false;
m_clip.SHAKE.visible = false;
m_clip.IDLE.visible = false;
} else {
m_clip.OVER.visible = false;
if (_arg2){
m_clip.VOBBLE.visible = true;
} else {
m_clip.IDLE.visible = true;
};
};
}
public function set setX(_arg1:Number):void{
m_currX = (x = _arg1);
}
public function setGrid(_arg1:int, _arg2:int):void{
row = _arg1;
col = _arg2;
}
public function stopVobble():void{
m_clip.VOBBLE.stop();
m_clip.VOBBLE.gotoAndStop(1);
m_clip.VOBBLE.visible = false;
m_clip.IDLE.visible = true;
}
public function isHigh():Boolean{
return (m_isHigh);
}
public function doTweak(_arg1:int, _arg2:int, _arg3:int):void{
m_destX = new EaseInQuadInterpolator(x, _arg1, _arg3);
m_state = STATE_TWEAK;
}
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 doFall(_arg1:int, _arg2:int, _arg3:int):void{
m_destY = new EaseInQuadInterpolator(y, _arg2, _arg3);
m_state = STATE_FALL;
}
public function setHighBomb(_arg1:Boolean, _arg2:Boolean):void{
if (_arg2){
m_clip.IDLE.visible = false;
m_clip.SHAKE.visible = false;
m_clip.VOBBLE.visible = false;
m_clip.OVER.visible = true;
m_clip.OVER.start();
return;
};
if (((_arg1) && (!(m_clip.SHAKE.visible)))){
m_clip.SHAKE.visible = true;
m_clip.SHAKE.start();
m_clip.VOBBLE.visible = false;
m_clip.IDLE.visible = false;
};
if (((!(_arg1)) && (m_clip.SHAKE.visible))){
m_clip.SHAKE.visible = false;
m_clip.SHAKE.stop();
m_clip.IDLE.visible = true;
};
}
public function render():void{
if (RENDER){
y = m_currY;
x = m_currX;
};
}
public function doVobble():void{
m_clip.VOBBLE.start();
if (((m_clip.OVER.visible) || (m_clip.SHAKE.visible))){
return;
};
m_clip.VOBBLE.visible = true;
m_clip.SHAKE.visible = false;
m_clip.IDLE.visible = false;
m_clip.OVER.visible = false;
}
public function createSpecial():void{
var _local1:Class;
if (SPECIAL == 2){
_local1 = (getDefinitionByName(("COLOR_" + TYPE)) as Class);
m_clip = (new (_local1) as MovieClip);
addChild(m_clip);
} else {
_local1 = (getDefinitionByName(TYPE) as Class);
m_clip = (new (_local1) as MovieClip);
addChild(m_clip);
};
m_clip.OVER.stop();
m_clip.OVER.visible = false;
m_clip.SHAKE.stop();
m_clip.SHAKE.visible = false;
m_clip.VOBBLE.stop();
m_clip.VOBBLE.visible = false;
}
public function setSpecial(_arg1:int):void{
SPECIAL = _arg1;
}
public function set setY(_arg1:Number):void{
m_currY = (y = _arg1);
}
}
}//package
Section 48
//board_throw (board_throw)
package {
import flash.media.*;
public dynamic class board_throw extends Sound {
}
}//package
Section 49
//board_vobble (board_vobble)
package {
import flash.media.*;
public dynamic class board_vobble extends Sound {
}
}//package
Section 50
//BOMB (BOMB)
package {
import flash.display.*;
public dynamic class BOMB extends MovieClip {
public var VOBBLE:BOMB_inner;
public var OVER:BOMB_over;
public var SHAKE:BOMB_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 51
//BOMB_bombshake (BOMB_bombshake)
package {
import anim.*;
public dynamic class BOMB_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 52
//bomb_color (bomb_color)
package {
import flash.media.*;
public dynamic class bomb_color extends Sound {
}
}//package
Section 53
//BOMB_inner (BOMB_inner)
package {
import anim.*;
public dynamic class BOMB_inner extends AutoSingleRndStart20Fps {
}
}//package
Section 54
//BOMB_over (BOMB_over)
package {
import anim.*;
public dynamic class BOMB_over extends AutoLoopingFlare12Fps {
}
}//package
Section 55
//bomb_regular (bomb_regular)
package {
import flash.media.*;
public dynamic class bomb_regular extends Sound {
}
}//package
Section 56
//cleansweep_0 (cleansweep_0)
package {
import flash.media.*;
public dynamic class cleansweep_0 extends Sound {
}
}//package
Section 57
//cleansweep_1 (cleansweep_1)
package {
import flash.media.*;
public dynamic class cleansweep_1 extends Sound {
}
}//package
Section 58
//clear_square (clear_square)
package {
import flash.media.*;
public dynamic class clear_square extends Sound {
}
}//package
Section 59
//clearSquare (clearSquare)
package {
import anim.*;
public dynamic class clearSquare extends AutoSingleFlare25Fps {
}
}//package
Section 60
//ClipGroup0 (ClipGroup0)
package {
import anim.*;
public dynamic class ClipGroup0 extends AutoLoopingFlare25Fps {
}
}//package
Section 61
//COLOR_BB (COLOR_BB)
package {
import flash.display.*;
public dynamic class COLOR_BB extends MovieClip {
public var VOBBLE:B_VOBBLE;
public var OVER:B_OVER;
public var SHAKE:B_BOMBSHAKE;
public var IDLE:MovieClip;
}
}//package
Section 62
//COLOR_GG (COLOR_GG)
package {
import flash.display.*;
public dynamic class COLOR_GG extends MovieClip {
public var VOBBLE:G_VOBBLE;
public var OVER:G_OVER;
public var SHAKE:G_BOMBSHAKE;
public var IDLE:MovieClip;
}
}//package
Section 63
//COLOR_RR (COLOR_RR)
package {
import flash.display.*;
public dynamic class COLOR_RR extends MovieClip {
public var VOBBLE:R_VOBBLE;
public var OVER:R_OVER;
public var SHAKE:R_BOMBSHAKE;
public var IDLE:MovieClip;
}
}//package
Section 64
//COLOR_YY (COLOR_YY)
package {
import flash.display.*;
public dynamic class COLOR_YY extends MovieClip {
public var VOBBLE:Y_VOBBLE;
public var OVER:Y_OVER;
public var SHAKE:Y_BOMBSHAKE;
public var IDLE:MovieClip;
}
}//package
Section 65
//colorbomb1 (colorbomb1)
package {
import anim.*;
public dynamic class colorbomb1 extends AutoLoopingFlare25Fps {
}
}//package
Section 66
//colorBomb2 (colorBomb2)
package {
import anim.*;
public dynamic class colorBomb2 extends AutoLoopingFlare25Fps {
}
}//package
Section 67
//colorBomb3 (colorBomb3)
package {
import anim.*;
public dynamic class colorBomb3 extends AutoLoopingFlare25Fps {
}
}//package
Section 68
//colorbomb4 (colorbomb4)
package {
import anim.*;
public dynamic class colorbomb4 extends AutoLoopingFlare25Fps {
}
}//package
Section 69
//combo (combo)
package {
import flash.media.*;
public dynamic class combo extends Sound {
}
}//package
Section 70
//combo_diamond (combo_diamond)
package {
import anim.*;
public dynamic class combo_diamond extends AutoSingleFlare25Fps {
}
}//package
Section 71
//DIAMOND (DIAMOND)
package {
import flash.display.*;
public dynamic class DIAMOND extends MovieClip {
public var VOBBLE:DIAMOND_inner;
public var OVER:DIAMOND_over;
public var SHAKE:DIAMOND_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 72
//diamond_0 (diamond_0)
package {
import flash.media.*;
public dynamic class diamond_0 extends Sound {
}
}//package
Section 73
//diamond_1 (diamond_1)
package {
import flash.media.*;
public dynamic class diamond_1 extends Sound {
}
}//package
Section 74
//diamond_2 (diamond_2)
package {
import flash.media.*;
public dynamic class diamond_2 extends Sound {
}
}//package
Section 75
//diamond_big_inner (diamond_big_inner)
package {
import anim.*;
public dynamic class diamond_big_inner extends AutoLoopingFlare25Fps {
}
}//package
Section 76
//diamond_bling (diamond_bling)
package {
import flash.media.*;
public dynamic class diamond_bling extends Sound {
}
}//package
Section 77
//DIAMOND_bombshake (DIAMOND_bombshake)
package {
import anim.*;
public dynamic class DIAMOND_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 78
//diamond_combo (diamond_combo)
package {
import flash.media.*;
public dynamic class diamond_combo extends Sound {
}
}//package
Section 79
//DIAMOND_inner (DIAMOND_inner)
package {
import anim.*;
public dynamic class DIAMOND_inner extends AutoSingleRndStart20Fps {
}
}//package
Section 80
//DIAMOND_over (DIAMOND_over)
package {
import anim.*;
public dynamic class DIAMOND_over extends AutoLoopingFlare12Fps {
}
}//package
Section 81
//empty_board (empty_board)
package {
import flash.media.*;
public dynamic class empty_board extends Sound {
}
}//package
Section 82
//EXPLO (EXPLO)
package {
import anim.*;
public dynamic class EXPLO extends AutoSingleFlare25Fps {
}
}//package
Section 83
//ExtraTime (ExtraTime)
package {
import anim.*;
public dynamic class ExtraTime extends AutoSingleFlare50Fps {
}
}//package
Section 84
//FDBase (FDBase)
package {
import flash.display.*;
import utils.*;
import flash.events.*;
import flash.text.*;
import flash.system.*;
import flash.external.*;
public class FDBase extends MovieClip {
private var m_game:FDGame;
public var MUSIC:MovieClip;
public var debugRenderFPS_txt:TextField;
private var tickTime:int;// = 0
public var mcScore:MovieClip;
public var TIMER:MovieClip;
public var mcRayGunCover:MovieClip;
private var DEBUG_MODE:Boolean;// = true
public var gunRight:MovieClip;
private var m_sharedData:SharedData;
public var INTRO:MovieClip;
public var txtGameContinueIn:TextField;
public var QUIT:MovieClip;
private var m_debugWindow:DebugWindow;
private var renderStartTime:Number;
private var m_mainTmr:Timer;
public var mcBgGrid:MovieClip;
public var gunLeft:MovieClip;
public var mcLogo:MovieClip;
public var SOUND:MovieClip;
private var renderFPS:Number;// = 0
public var txtTme:TextField;
private var m_input:MouseInput;
public static const TICKS_PER_SECOND:int = 25;
public function FDBase(){
Debug.enabled = false;
if (Debug.enabled){
m_debugWindow = new DebugWindow();
Debug.debugWindow = m_debugWindow;
m_debugWindow.x = (755 - 25);
m_debugWindow.y = 25;
addChild(m_debugWindow);
};
DEBUG_MODE = true;
if (!init()){
Debug.print("Main.init() ERROR : failed ", "FF0000");
} else {
Debug.print("Main.init() entry point ", "33FF55");
};
Debug.print(("Main.init() DEBUG : " + DEBUG_MODE), "33FF55");
}
public function mouseReleased(_arg1:MouseEvent){
m_input.mouseReleased();
}
private function init():Boolean{
var _local1:Object;
var _local3:XML;
var _local5:String;
m_sharedData = new SharedData();
if (DEBUG_MODE){
_local5 = "";
_local5 = (((((((((((((((((((((((((((((((((("<gamedata short=\"false\" randomseed=\"129405665\" firstTime=\"1\" highScore=\"365000\" highScoreCombo=\"250502\" highScoreClearBonus=\"10055\" timeBonus=\"4200\" stateSound=\"1\" stateMusic=\"1\" >" + "<text id=\"txtIngameHead\">INSTRUCTIONS</text>") + "<text id=\"txtIngame1\">Click BIG groups of same coloured tiles to generate diamonds. </text>") + "<text id=\"txtIngame2\">DIAMONDS. Collect as many as possible, they are worth a fortune.</text>") + "<text id=\"txtIngame3\">Press space to advance new row of tiles.</text>") + "<text id=\"txtIngame4\">Try to finish with an empty board to earn bonus points.</text>") + "<text id=\"txtIngame5\">TILE. Click groups of same coloured tiles to generate diamonds.</text>") + "<text id=\"txtIngame6\">COLOUR. removes all tiles of savme colour.</text>") + "<text id=\"txtIngame7\">DIAMOND. Collect as many as possible, they are worth a fortune.</text>") + "<text id=\"txtIngame8\">BOMB. Watch Out! Destroys all adjacent tiles, including diamonds.</text>") + "<text id=\"txtStartGame\">START</text>") + "<text id=\"txtGameOver\">GAME OVER</text>") + "<text id=\"txtPersonalBest\">PERSONAL BEST</text>") + "<text id=\"txtThisGame\">THIS GAME</text>") + "<text id=\"txtScore\">SCORE</text>") + "<text id=\"txtTimeBonus\">TIME BONUS</text>") + "<text id=\"txtTotalScore\">TOTAL SCORE</text>") + "<text id=\"txtClearBonus\">BONUS</text>") + "<text id=\"txtGeneratedDiam\">GENERATED</text>") + "<text id=\"txtSavedDiam\">SAVED</text>") + "<text id=\"txtXTime\">Extra Time!</text>") + "<text id=\"txtXTimeNum\">+{0} sec</text>") + "<text id=\"txtTme\">TIME</text>") + "<text id=\"txtGameEndsIn\">GAME ENDS IN {0} SECONDS</text>") + "<text id=\"txtGameStartsIn\">GAME WILL START IN {0} SECONDS</text>") + "<text id=\"txtRegister\">REGISTER NOW!</text>") + "<text id=\"txtHowTo1\">Keep saving diamonds! Collecting them will finish the game.</text>") + "<text id=\"txtHowTo2\">Use the spacebar to speed up your game and increase your score.</text>") + "<text id=\"txtGameContinueIn\">GAME WILL CONTINUE IN {0} SECONDS</text>") + "<boosters>") + "<a value=\"1\" />") + "<b value=\"1\" />") + "<c value=\"1\" />") + "</boosters>") + "</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);
};
var _local2:XML = new XML(_local1.message);
m_sharedData.preMusic = int(_local2.@stateMusic);
m_sharedData.preSound = int(_local2.@stateSound);
m_sharedData.preHighScoreTotal = int(_local2.@highScore);
m_sharedData.preHighScoreCombo = int(_local2.@highScoreCombo);
m_sharedData.preHighTimeBonus = int(_local2.@timeBonus);
m_sharedData.preScoreBonusClear = int(_local2.@highScoreClearBonus);
m_sharedData.globalSeed = int(_local2.@randomseed);
m_sharedData.isShortMode = (_local2.@short == "true");
m_sharedData.gamesPlayed = int(_local2.@firstTime);
if (_local2.boosters != null){
m_sharedData.EXTRATIME = ((int(_local2.boosters.a.@value) == 0)) ? 0 : (25 * 10);
m_sharedData.boostForceColor = ((int(_local2.boosters.b.@value) == 0)) ? false : true;
m_sharedData.boostNoBomb = ((int(_local2.boosters.c.@value) == 0)) ? false : true;
};
if (DEBUG_MODE){
m_sharedData.globalSeed = int((Math.random() * 2147483647));
};
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 FDGame(this, m_input, m_sharedData);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
m_mainTmr = new Timer(TICKS_PER_SECOND);
addEventListener("enterFrame", advanceTime);
return (true);
}
private function render(_arg1:Number):void{
m_game.render(_arg1);
}
private function tick():void{
m_game.tick();
}
private function getMode():Boolean{
Debug.print(("Environment : " + Capabilities.playerType), "33FF55");
if (((!((Capabilities.playerType == "External"))) && (!((Capabilities.playerType == "StandAlone"))))){
return (false);
};
return (true);
}
public function mousePressed(_arg1:MouseEvent){
m_input.mousePressed();
}
private function advanceTime(_arg1:Event):void{
var _local2:int = m_mainTmr.advanceTime();
var _local3:uint;
while (_local3 < _local2) {
tick();
_local3++;
};
render(m_mainTmr.alpha);
}
}
}//package
Section 85
//FDGame (FDGame)
package {
import flash.display.*;
import utils.*;
import flash.events.*;
import snd.*;
import flash.system.*;
import flash.external.*;
public class FDGame {
private var m_modeDestroy:Boolean;// = false
private var m_atLeast:int;// = 0
private var m_countTime:Boolean;// = false
private var m_sndDelay:int;// = 0
private var m_tick:int;// = 0
private var m_FEED:int;// = 100
private var m_level:Level;
private var m_destroyDelay:int;// = 0
private var END_TYPE:int;// = 0
private var m_state:int;// = 0
private var m_score:Score;
private var m_GUItweak:Array;
private var m_GUIfall:Array;
private var m_delayGui:int;// = 0
private var m_modeFall:Boolean;// = false
private var m_mouse:Array;
private var TIME_INTRO:Number;// = 450
private var m_modeDiamond:Boolean;// = false
private var m_sh:SharedData;
private var m_gui:Gui;
private var m_modeFeed:Boolean;// = false
private var m_root:MovieClip;
private var m_howToCuntBack:int;// = 275
private var m_GUIfeed:Array;
private var m_currTick:int;// = 0
private var m_GUIvobbling:Array;
private var m_doRender:Boolean;// = false
private var m_blocks:Array;
private var m_howTo:MovieClip;
private var m_flashDiamondTick:int;// = 0
private var m_endGame:Boolean;// = false
private var m_input:MouseInput;
private var m_diamondCount:int;// = 0
private var m_currTime:int;// = 0
private var m_newRowDelay:int;// = 0
private var m_numRowPush;// = 0
private var m_GUInewrow:Array;
private var m_modeTweak:Boolean;// = false
private var m_destroyed:Array;
private var m_spacePressed:Boolean;// = false
private var m_prevCmboWasDiamond:Boolean;
private var m_delayEnd:int;// = 0
private var m_GUIdiamond:Array;
private var m_spaceEnabled:Boolean;// = true
private var TIMELIMIT:int;// = 2250
private var m_doVobble:Boolean;// = false
private var m_howToCunt:int;// = 0
private var m_megaClearBonus:Boolean;// = false
private var m_GUIdestroyed:Array;
public static var STATE_PLAY:int = 2;
public static var TIME:int = 901;
public static var m_music:SoundManager = new SoundManager();
public static var SFX_STATE:int = 701;
public static var STATE_GAME_COMPLETE:int = 4;
public static var NEW_LEVEL:int = 301;
public static var STATE_IDLE:int = 0;
public static var FEED:int = 201;
public static var COMBO:int = 101;
public static var RESET:int = 100;
public static var SCORE:int = 501;
public static var GAME_END:int = 401;
public static var MUSIC_STATE:int = 801;
public static var m_sound:SoundManager = new SoundManager();
public static var STATE_INTRO:int = 1;
public static var BONUS:int = 601;
public function FDGame(_arg1:MovieClip, _arg2:MouseInput, _arg3:SharedData){
m_mouse = new Array();
m_destroyed = new Array();
m_GUIdestroyed = new Array();
m_GUIfall = new Array();
m_GUItweak = new Array();
m_GUIfeed = new Array();
m_GUIdiamond = new Array();
m_GUIvobbling = new Array();
m_GUInewrow = new Array();
super();
trace("FDGame()");
m_root = _arg1;
m_input = _arg2;
m_sh = _arg3;
TIMELIMIT = (TIMELIMIT + m_sh.EXTRATIME);
m_sh.musicMngr = m_music;
m_sh.soundMngr = m_sound;
m_level = new Level(m_sh);
m_score = new Score(m_sh);
m_gui = new Gui(m_root, m_sh);
m_gui.setSndSfx();
m_state = STATE_INTRO;
m_sh.getAllClips = m_level.getAllBlocks;
m_music.get("intro_loop").loop(0.8);
m_root.INTRO.INSTR.txtIngameHead.text = I18n.getString("txtIngameHead");
m_root.INTRO.INSTR.mcStartGame.txtStartGame.text = I18n.getString("txtStartGame");
m_root.INTRO.INSTR.visible = false;
m_root.mcLogo.visible = false;
if (m_sh.isShortMode){
TIMELIMIT = ((0.75 * 60) * 25);
};
}
private function generateLevel():void{
var _local3:int;
var _local4:Block;
m_level.setBlockTypes(3);
var _local1 = -1;
if (m_sh.boostForceColor){
m_sh.boostForceColor = false;
_local1 = m_level.getNextInt(m_sh.COLS);
};
m_blocks = new Array();
var _local2:int;
while (_local2 < 11) {
m_blocks[_local2] = new Array();
_local3 = 0;
while (_local3 < m_sh.COLS) {
if ((((_local2 < 7)) || ((_local2 == 10)))){
_local4 = new Block("EMPTY");
} else {
if ((((_local2 == 9)) && ((_local3 == _local1)))){
_local4 = m_level.generateRandomBlock(false, true);
} else {
_local4 = m_level.generateRandomBlock(false, false);
};
_local4.setX = getX(_local3);
_local4.setY = getY(_local2);
_local4.create();
m_root.addChild(_local4);
};
setBlock(_local2, _local3, _local4);
_local3++;
};
_local2++;
};
newRow(true);
m_countTime = true;
m_doRender = true;
m_level.setLevel(m_blocks);
m_state = STATE_PLAY;
m_root.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
if (m_sh.EXTRATIME){
m_gui.extraTimePuff();
};
if (m_gui.randInt(25) == 0){
m_flashDiamondTick = m_gui.randInt(TIMELIMIT);
trace("***");
trace(("FLASH DIAMOND " + m_flashDiamondTick));
trace("***");
};
}
private function leftToMiddle(_arg1:int):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Object;
var _local2:int = (m_sh.ROWS - 1);
var _local3:int = _arg1;
var _local4 = 1;
var _local5:int = (_local3 - 1);
while (_local5 >= 0) {
if (m_blocks[_local2][_local5].TYPE == "EMPTY"){
_local4++;
} else {
_local6 = _local2;
while (_local6 >= 0) {
if (m_blocks[_local6][_local5].TYPE == "EMPTY"){
break;
};
_local7 = _local6;
_local8 = (_local5 + _local4);
setBlock(_local7, _local8, m_blocks[_local6][_local5]);
m_blocks[_local6][_local5] = new Block("EMPTY");
_local9 = new Object();
_local9.x = getX(_local8);
_local9.y = getY(_local7);
_local9.b = m_blocks[_local7][_local8];
m_GUItweak.push(_local9);
_local6--;
};
};
_local5--;
};
}
private function newRow(_arg1:Boolean=false):void{
var _local3:Block;
m_numRowPush++;
if (!_arg1){
m_sound.get("new_row").play();
};
var _local2:int;
while (_local2 < m_sh.COLS) {
_local3 = m_level.generateRandomBlock(true, false);
_local3.setX = getX(_local2);
_local3.setY = (getY(m_sh.ROWS) + 4);
_local3.create();
m_root.addChildAt(_local3, m_root.getChildIndex(m_root.mcRayGunCover));
setBlock(10, _local2, _local3);
_local3.visible = false;
m_GUInewrow.push(_local3);
_local2++;
};
}
private function blockDrop():void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local1:Block = m_level.getDestroyed();
if (_local1 == null){
return;
};
var _local2:int = _local1.row;
var _local3:int = _local1.col;
var _local4 = 1;
var _local5:int = (_local2 - 1);
while (_local5 >= 0) {
if (m_blocks[_local5][_local3].TYPE == "EMPTY"){
_local4++;
} else {
_local6 = (_local5 + _local4);
_local7 = _local3;
setBlock(_local6, _local7, m_blocks[_local5][_local3]);
m_blocks[_local5][_local3] = new Block("EMPTY");
_local8 = new Object();
_local8.x = getX(_local7);
_local8.y = getY(_local6);
_local8.b = m_blocks[_local6][_local7];
m_GUIfall.push(_local8);
};
_local5--;
};
blockDrop();
}
private function rowControl(_arg1:Boolean):void{
var _local2:int;
if (m_doVobble){
if (!m_level.isFullGrid()){
m_spaceEnabled = true;
trace(("CONTENT NO LONGER FIRST ROW : DISABLE VOBBLING (SPECIAL)" + _arg1), m_FEED);
m_GUIvobbling = m_level.getAllBlocks();
m_doVobble = false;
m_sh.boardVobbling = false;
m_gui.stopVobbling();
_local2 = 0;
while (_local2 < m_GUIvobbling.length) {
m_GUIvobbling[_local2].stopVobble();
_local2++;
};
m_GUIvobbling = new Array();
m_sound.get("board_vobble").stop();
if (_arg1){
resetFeed();
};
};
} else {
if (m_level.isFullGrid()){
trace("CONTENT ON FIRST ROW : START VOBBLING");
m_doVobble = true;
m_sh.boardVobbling = true;
m_GUIvobbling = m_level.getAllBlocks();
m_gui.startVobbling(m_GUIvobbling);
m_GUIvobbling = new Array();
m_spaceEnabled = false;
m_sound.get("board_vobble").play();
};
};
}
private function calcScore():void{
var _local1:int = m_score.calcScore(m_sh.HIGH);
m_sh.scoreTotal = (m_sh.scoreTotal + _local1);
m_sh.scoreCombo = (m_sh.scoreCombo + _local1);
sendData((((((((((((SCORE + ",") + m_tick) + ",") + _local1) + ",") + m_sh.scoreTotal) + ",") + m_sh.HIGH.length) + ",") + m_sh.scoreType) + ",0=0"));
if (m_sh.scoreType == 1){
m_sh.diamondSav = m_sh.HIGH.length;
} else {
m_gui.updateScoreTxt(_local1);
};
m_gui.scorePop(_local1);
m_level.remHighlight();
}
private function setBlock(_arg1:int, _arg2:int, _arg3:Block):void{
m_blocks[_arg1][_arg2] = _arg3;
_arg3.row = _arg1;
_arg3.col = _arg2;
}
private function rightToMiddle(_arg1:int):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Object;
var _local2:int = (m_sh.ROWS - 1);
var _local3:int = _arg1;
var _local4 = 1;
var _local5:int = (_local3 + 1);
while (_local5 < m_sh.COLS) {
if (m_blocks[_local2][_local5].TYPE == "EMPTY"){
_local4++;
} else {
_local6 = _local2;
while (_local6 >= 0) {
if (m_blocks[_local6][_local5].TYPE == "EMPTY"){
break;
};
_local7 = _local6;
_local8 = (_local5 - _local4);
setBlock(_local7, _local8, m_blocks[_local6][_local5]);
m_blocks[_local6][_local5] = new Block("EMPTY");
_local9 = new Object();
_local9.x = getX(_local8);
_local9.y = getY(_local7);
_local9.b = m_blocks[_local7][_local8];
m_GUItweak.push(_local9);
_local6--;
};
};
_local5++;
};
}
private function sendData(_arg1:String):void{
ExternalInterface.call("playData", _arg1);
}
private function dropDiamond():void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Block;
var _local6:Object;
var _local1:int = m_level.numTotDiamonds();
if (((!((m_diamondCount == 0))) && (!((m_sh.scoreType == 1))))){
_local2 = 0;
while (_local2 < m_diamondCount) {
_local3 = m_level.rndDiamondCol();
_local4 = m_level.getDiamondRow(_local3);
_local5 = m_level.generateSpecial("DIAMOND", 1);
_local5.setX = getX(_local3);
_local5.setY = getY(-2);
_local5.create();
m_root.addChild(_local5);
setBlock(_local4, _local3, _local5);
_local6 = new Object();
_local6.x = getX(_local3);
_local6.y = getY(_local4);
_local6.b = m_blocks[_local4][_local3];
m_GUIdiamond.push(_local6);
_local2++;
};
};
m_gui.scorePopOnTop();
if ((((_local1 < 10)) && ((m_level.numTotDiamonds() >= 10)))){
m_sound.get("ten_diamonds").play();
};
}
private function blockTweak():void{
if (m_sh.scoreType == 1){
return;
};
var _local1:Array = m_level.getFirstEmptyCol();
var _local2:int;
while (_local2 < _local1.length) {
if (_local1[_local2] < 5){
leftToMiddle(_local1[_local2]);
} else {
rightToMiddle(_local1[_local2]);
};
_local2++;
};
}
private function adjustGfx():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
if (m_GUInewrow.length > 0){
m_newRowDelay++;
if (m_newRowDelay == 5){
doShowNewRow();
if (((m_sh.isShortMode) && ((m_numRowPush == 11)))){
m_endGame = true;
};
};
};
if (m_GUIfeed.length > 0){
m_currTick++;
if (m_currTick == 1){
_local1 = 0;
while (_local1 < m_GUIfeed.length) {
m_GUIfeed[_local1].b.doFall(m_GUIfeed[_local1].x, m_GUIfeed[_local1].y, 3);
_local1++;
};
};
if (m_currTick == 4){
m_GUIfeed = new Array();
m_currTick = 0;
} else {
if (m_currTick < 4){
return;
};
};
};
if (m_modeDestroy){
m_currTick++;
if (m_currTick == 1){
m_gui.clearAnim(m_GUIdestroyed);
};
if (m_currTick == m_destroyDelay){
m_GUIdestroyed = new Array();
m_modeDestroy = false;
m_currTick = 0;
} else {
if (m_currTick < m_destroyDelay){
return;
};
};
};
if (m_modeFall){
m_currTick++;
if (m_currTick == 1){
_local2 = 0;
while (_local2 < m_GUIfall.length) {
m_GUIfall[_local2].b.doFall(m_GUIfall[_local2].x, m_GUIfall[_local2].y, 5);
_local2++;
};
};
if (m_currTick == 6){
m_GUIfall = new Array();
m_modeFall = false;
m_currTick = 0;
} else {
if (m_currTick < 6){
return;
};
};
};
if (m_modeDiamond){
m_currTick++;
if (m_currTick == 1){
m_gui.playDelay(m_GUIdiamond);
_local3 = 0;
while (_local3 < m_GUIdiamond.length) {
m_GUIdiamond[_local3].b.doFall(m_GUIdiamond[_local3].x, m_GUIdiamond[_local3].y, 6);
_local3++;
};
};
if (m_currTick == 7){
m_GUIdiamond = new Array();
m_modeDiamond = false;
m_currTick = 0;
} else {
if (m_currTick < 7){
return;
};
};
};
if (m_modeTweak){
m_currTick++;
if (m_currTick == 1){
_local4 = 0;
while (_local4 < m_GUItweak.length) {
m_GUItweak[_local4].b.doTweak(m_GUItweak[_local4].x, m_GUItweak[_local4].y, 4);
_local4++;
};
};
if (m_currTick == 5){
m_GUItweak = new Array();
m_modeTweak = false;
m_currTick = 0;
} else {
if (m_currTick < 5){
return;
};
};
};
}
private function doShowNewRow():void{
m_newRowDelay = 0;
var _local1:int;
while (_local1 < m_GUInewrow.length) {
m_gui.setBlackWhite(m_GUInewrow[_local1]);
m_GUInewrow[_local1].visible = true;
_local1++;
};
m_GUInewrow = new Array();
}
private function keyDownListener(_arg1:KeyboardEvent){
if (_arg1.keyCode == 32){
m_spacePressed = true;
};
}
public function render(_arg1:int):void{
var _local3:int;
if (!m_doRender){
return;
};
var _local2:int;
while (_local2 < m_sh.ROWS) {
_local3 = 0;
while (_local3 < m_sh.COLS) {
m_blocks[_local2][_local3].render();
_local3++;
};
_local2++;
};
m_gui.render();
}
public function tick():void{
var _local2:int;
var _local3:int;
var _local4:Block;
var _local5:Array;
var _local6:int;
var _local7:Array;
var _local8:int;
var _local9:Array;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:Array;
var _local14:int;
var _local15:int;
m_music.update();
m_sound.update();
m_root.stage.focus = m_root.stage;
if (m_input.mouseIsPressed){
_local2 = m_gui.hitSfx();
if (_local2 != 0){
m_gui.setSndSfx(_local2);
m_input.mouseReleased();
};
};
m_tick++;
switch (m_state){
case STATE_IDLE:
break;
case STATE_INTRO:
m_currTick++;
if (!m_gui.REM){
if (!m_root.INTRO.INSTR.visible){
if (m_currTick == 20){
m_sound.get("diamond_bling").play();
};
if (m_currTick == 50){
m_root.INTRO.INSTR.visible = true;
m_gui.hideLogo();
m_gui.setInstr();
};
return;
};
};
if (!m_gui.REM){
m_gui.gameWillXXXIn(TIME_INTRO--, 1);
};
if (((m_input.mouseIsPressed) && (!(m_gui.REM)))){
m_input.mouseReleased();
if (m_gui.hitStart()){
TIME_INTRO = 1;
} else {
TIME_INTRO = (25 * 9);
};
};
if (TIME_INTRO == (25 * 9)){
_local3 = m_gui.INSTR;
if (_local3 == 2){
TIME_INTRO = 1;
} else {
TIME_INTRO = (25 * 9);
m_gui.setInstr();
};
};
if (TIME_INTRO == 1){
m_gui.remIntroScreen();
m_gui.REM = true;
m_music.get("intro_loop").fadeToAndStop(0.01, 2000);
TIME_INTRO = 0;
m_currTick = 0;
};
if (TIME_INTRO == 0){
trace(m_currTick);
};
if ((((TIME_INTRO == 0)) && ((m_currTick == 12)))){
m_currTick = 0;
fscommand("gameStart", "");
Debug.print("[gameStart]", "33FF55");
sendData((((((NEW_LEVEL + ",") + m_tick) + ",") + 1) + ",0=0"));
generateLevel();
};
return;
case STATE_PLAY:
if (m_sndDelay != 666){
m_sndDelay++;
if (m_sndDelay == 1){
m_sound.get("start_game").play();
};
if (m_sndDelay == 20){
m_music.get("game_loop").loop(0.8);
m_sndDelay = 666;
};
};
if ((((m_sh.gamesPlayed == 0)) && (!(m_sh.isShortMode)))){
_local4 = m_level.isValidDiamondCombo();
if (_local4 != null){
trace("WE HAVE A VALID DIAMOND COMBO : Num");
m_sh.gamesPlayed = 666;
_local5 = m_level.getAllBlocks();
_local6 = 0;
while (_local6 < _local5.length) {
if (_local5[_local6].TYPE != "DIAMOND"){
m_gui.setBlackWhite(_local5[_local6]);
};
_local6++;
};
m_howTo = new mcHowTo();
m_howTo.txtHowTo.text = I18n.getString("txtHowTo1");
m_howTo.x = getX(_local4.col);
if (_local4.row < 3){
m_howTo.y = ((getY(_local4.row) + m_howTo.height) + 50);
} else {
m_howTo.y = getY(_local4.row);
};
if (m_doVobble){
resetFeed();
m_sound.get("board_vobble").stop();
m_gui.stopVobbling();
_local7 = m_level.getAllBlocks();
_local8 = 0;
while (_local8 < _local7.length) {
_local7[_local8].stopVobble();
_local8++;
};
};
};
};
if ((((((m_sh.gamesPlayed == 666)) && ((m_delayGui == 0)))) && (!(m_sh.isShortMode)))){
m_howToCunt++;
if (m_howToCunt == 1){
sendData((((((((TIME + ",") + m_tick) + ",") + 0) + ",") + m_currTime) + ",0=0"));
};
if (m_howToCunt == 15){
m_root.addChild(m_howTo);
};
m_gui.gameWillXXXIn(m_howToCuntBack--, 3);
if (m_howToCunt == (125 + 25)){
m_howTo.x = 384;
m_howTo.y = 515;
m_howTo.txtHowTo.text = I18n.getString("txtHowTo2");
};
if (m_howToCunt == (250 + 25)){
m_sh.gamesPlayed = 1;
m_root.removeChild(m_howTo);
_local9 = m_level.getAllBlocks();
_local10 = 0;
while (_local10 < _local9.length) {
m_gui.setColor(_local9[_local10]);
_local10++;
};
if (m_doVobble){
m_gui.startVobbling(_local9);
m_sound.get("board_vobble").play();
};
m_root.txtGameContinueIn.text = "";
sendData((((((((TIME + ",") + m_tick) + ",") + 1) + ",") + m_currTime) + ",0=0"));
} else {
return;
};
};
highLight();
if (((m_input.mouseIsPressed) && ((m_sh.HIGH.length > 0)))){
adjustBlocks();
};
if (m_gui.randSfx()){
m_music.get(("sfx_" + m_gui.randInt(10))).play();
};
if (controlFeed()){
m_delayGui = (m_delayGui + 4);
m_level.remHighlight();
};
if (m_countTime){
m_currTime++;
_local11 = m_gui.setTime((TIMELIMIT - m_currTime));
if (_local11 == 3){
m_gui.startCountDown();
};
if (_local11 == 2){
m_sound.get(("hurry_" + m_gui.randInt(3))).play();
};
if (_local11 == 1){
m_sound.get("time_warning").play(1, 0);
};
if ((((_local11 == 0)) && (!(m_endGame)))){
m_endGame = true;
END_TYPE = 3;
};
};
if (m_input.mouseIsPressed){
m_input.mouseReleased();
if (((m_gui.hitQuit()) && (!(m_endGame)))){
m_endGame = true;
END_TYPE = 2;
};
};
if (m_endGame){
m_music.get("game_loop").fadeToAndStop(0, 500);
m_sound.get("time_warning").stop();
m_gui.stopCountDown();
m_root.removeChild(m_root.TIMER);
m_root.txtTme.text = "";
if (m_doVobble){
m_gui.stopVobbling();
m_sound.get("board_vobble").stop();
m_GUIvobbling = m_level.getAllBlocks();
_local12 = 0;
while (_local12 < m_GUIvobbling.length) {
m_GUIvobbling[_local12].stopVobble();
_local12++;
};
};
if (m_sh.isShortMode){
m_gui.launchShortWin();
END_TYPE = 3;
};
if (END_TYPE == 1){
m_sound.get("diamond_combo").play();
};
if (END_TYPE == 2){
trace("EXIT BUTTON PRESSED");
m_gui.bezierThrow(m_level.getAllBlocks());
m_sound.get("board_throw").play();
};
if (END_TYPE == 3){
trace("TIME IS UP");
m_sound.get("time_out").play();
m_gui.bezierThrow(m_level.getAllBlocks());
m_sound.get("board_throw").play();
};
if (END_TYPE == 4){
trace("ROOF ON FIRE : play anim");
m_gui.bezierThrow(m_level.getAllBlocks());
m_sound.get("board_throw").play();
};
if ((((END_TYPE == 1)) && (m_level.isBoardEmpty()))){
m_megaClearBonus = true;
};
sendData((((((MUSIC_STATE + ",") + m_tick) + ",") + m_sh.preMusic) + ",0=0"));
sendData((((((SFX_STATE + ",") + m_tick) + ",") + m_sh.preSound) + ",0=0"));
sendData((((((GAME_END + ",") + m_tick) + ",") + END_TYPE) + ",0=0"));
fscommand("gameEnd", ("" + m_sh.scoreTotal));
Debug.print(("[gameEnd]" + m_sh.scoreTotal), "33FF55");
m_root.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
m_state = STATE_GAME_COMPLETE;
};
break;
case STATE_GAME_COMPLETE:
m_delayEnd++;
if (m_delayEnd == 30){
m_music.get("game_over").play();
};
if (END_TYPE == 1){
if (m_delayEnd == 1){
m_gui.showDiamondCombo(true);
_local13 = m_level.getAllBlocks();
_local14 = 0;
while (_local14 < _local13.length) {
m_gui.setBlackWhite(_local13[_local14]);
_local14++;
};
};
if (m_delayEnd == 65){
m_gui.showDiamondCombo(false);
m_gui.showClearSquare(true);
m_gui.fireGridPopSeq(m_level.getAllEmptyBlocks());
m_sound.get("clear_square").play();
};
if (m_delayEnd == 71){
m_atLeast++;
if (((!(m_gui.gridPopSfxDone())) || ((m_atLeast < 40)))){
m_delayEnd = 70;
return;
};
};
if (m_delayEnd == 79){
m_gui.showClearSquare(false);
};
if (m_megaClearBonus){
if (m_delayEnd == 81){
m_gui.aimAndPrepare();
};
if (m_delayEnd == 91){
m_gui.unleashHell();
m_gui.remGui();
m_sound.get("mega_laser").play();
};
if (m_delayEnd == 101){
m_gui.showMegaClear();
m_sound.get("mega_diamond").play();
};
} else {
if (m_delayEnd == 89){
m_gui.gameOver();
m_gui.remGui();
};
};
};
if (END_TYPE != 1){
if (m_delayEnd == 50){
m_gui.gameOver();
m_gui.remGui();
};
};
if (((m_input.mouseIsPressed) && (m_gui.m_endGame))){
m_gui.TIME_EXIT = 0;
};
if (m_gui.END){
m_music.get("game_over").fadeToAndStop(0, 200);
m_state = STATE_IDLE;
fscommand("gameQuit", "");
};
break;
};
adjustGfx();
var _local1:int;
while (_local1 < m_sh.ROWS) {
_local15 = 0;
while (_local15 < m_sh.COLS) {
m_blocks[_local1][_local15].tick();
_local15++;
};
_local1++;
};
m_gui.tick();
if (m_tick == m_flashDiamondTick){
m_sound.get("flash_diamond").play();
};
}
private function controlFeed():Boolean{
var _local1:Boolean;
m_gui.stateHandler(m_FEED--);
if (((m_spacePressed) && (m_spaceEnabled))){
m_spacePressed = false;
m_FEED = 0;
};
if (m_FEED == 0){
resetFeed();
if (((m_doVobble) && (!(m_endGame)))){
trace("GAME OVER : content higher than first row");
m_endGame = true;
END_TYPE = 4;
} else {
if (m_delayGui == 0){
if (m_GUInewrow.length > 0){
doShowNewRow();
};
sendData((((FEED + ",") + m_tick) + ",0=0"));
feeder();
newRow();
_local1 = true;
rowControl(false);
m_gui.gunFire();
};
};
};
return (_local1);
}
private function highLight():void{
if (m_delayGui > 0){
m_delayGui--;
return;
};
var _local1:int = Math.floor((((m_root.mouseY - m_sh.Y_OFF) + (m_sh.B_HEIGHT / 2)) / m_sh.B_HEIGHT));
var _local2:int = Math.floor((((m_root.mouseX - m_sh.X_OFF) + (m_sh.B_WIDTH / 2)) / m_sh.B_WIDTH));
if (!m_level.isValid(_local1, _local2)){
m_level.remHighlight();
return;
};
if (m_level.isSameCluster(_local1, _local2)){
return;
};
if (m_sh.HIGH.length > 0){
m_level.remHighlight();
};
if (m_blocks[_local1][_local2].SPECIAL < 3){
m_level.highlightCluster(_local1, _local2);
if (m_sh.HIGH.length < 3){
m_level.remHighlight();
return;
};
if (m_level.hasColorBomb()){
m_level.addEquals(m_blocks[_local1][_local2].TYPE);
m_sh.scoreType = 2;
} else {
m_sh.scoreType = m_blocks[_local1][_local2].SPECIAL;
};
m_level.doHighlight();
};
if (m_blocks[_local1][_local2].SPECIAL == 3){
m_sh.HIGH.push(m_blocks[_local1][_local2]);
m_level.addNeighbours(_local1, _local2);
m_level.doHighlightBomb();
m_sh.scoreType = 3;
};
}
private function resetFeed():void{
m_FEED = RESET;
if (m_sound.get("board_vobble").isPlaying()){
m_sound.get("board_vobble").stop();
m_sound.get("board_vobble").play();
trace("Start vobble sfx : resetFeed");
};
}
private function getX(_arg1:int):int{
return (((m_sh.X_OFF + (_arg1 * m_sh.B_WIDTH)) - (m_sh.B_WIDTH / 2)));
}
private function getY(_arg1:int):int{
return (((m_sh.Y_OFF + (_arg1 * m_sh.B_HEIGHT)) - (m_sh.B_HEIGHT / 2)));
}
private function feeder():void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Object;
var _local1:int;
while (_local1 <= m_sh.ROWS) {
_local2 = 0;
while (_local2 < m_sh.COLS) {
if (m_blocks[_local1][_local2].TYPE != "EMPTY"){
_local3 = (_local1 - 1);
_local4 = _local2;
setBlock(_local3, _local4, m_blocks[_local1][_local2]);
m_blocks[_local1][_local2] = new Block("EMPTY");
_local5 = new Object();
_local5.x = getX(_local4);
_local5.y = getY(_local3);
_local5.b = m_blocks[_local3][_local4];
m_GUIfeed.push(_local5);
};
if (_local1 == 10){
m_gui.setColor(_local5.b);
};
_local2++;
};
_local1++;
};
}
private function adjustBlocks():void{
sendData((((((((COMBO + ",") + m_tick) + ",") + m_level.getStrDir(m_sh.HIGH)) + ",") + m_sh.scoreType) + ",0=0"));
m_input.mouseReleased();
destroy();
calcScore();
blockDrop();
rowControl(true);
dropDiamond();
blockTweak();
rowControl(false);
if (m_GUIdestroyed.length > 0){
if (m_sh.scoreType == 3){
m_delayGui = (m_delayGui + 4);
m_destroyDelay = 4;
} else {
m_delayGui = (m_delayGui + 2);
m_destroyDelay = 2;
};
m_modeDestroy = true;
};
if (m_GUIfall.length > 0){
m_delayGui = (m_delayGui + 5);
m_modeFall = true;
};
if (m_GUItweak.length > 0){
m_delayGui = (m_delayGui + 4);
m_modeTweak = true;
};
if (m_GUIdiamond.length > 0){
m_delayGui = (m_delayGui + 6);
m_modeDiamond = true;
};
m_currTick = 0;
if (m_sh.scoreType == 1){
trace("--");
trace("WE HAVE A DIAMOND COMBO : End game");
m_sh.scoreBonusTime = m_score.getPercTimeBonus(TIMELIMIT, m_currTime);
m_sh.scoreBonusClear = m_score.getPercClearedBonus(m_level.getNumEmpty());
sendData((((((((((((((((BONUS + ",") + m_tick) + ",") + m_sh.scoreBonusTime) + ",") + m_sh.scoreBonusClear) + ",") + m_sh.scoreDiamond) + ",") + m_sh.timePerc) + ",") + m_currTime) + ",") + m_sh.scoreTotal) + ",0=0"));
m_sh.scoreTotal = (m_sh.scoreTotal + (m_sh.scoreBonusTime + m_sh.scoreBonusClear));
END_TYPE = 1;
m_endGame = true;
};
}
private function destroy():void{
m_sh.MouseX = m_root.mouseX;
m_sh.MouseY = m_root.mouseY;
if (m_sh.scoreType == 0){
m_sound.get("combo").play();
} else {
if (m_sh.scoreType == 3){
m_sound.get("bomb_regular").play();
} else {
if (m_sh.scoreType == 2){
m_sound.get("bomb_color").play();
};
};
};
var _local1:uint;
while (_local1 < m_sh.HIGH.length) {
m_sh.HIGH[_local1].STATUS = "DESTROYED";
m_GUIdestroyed.push(m_sh.HIGH[_local1]);
_local1++;
};
if (m_sh.scoreType == 1){
return;
};
m_diamondCount = m_level.getNumDiamonds(m_sh.HIGH.length);
if (m_level.isBoardEmpty()){
m_diamondCount = (m_diamondCount + 3);
m_sound.get(("cleansweep_" + m_gui.randInt(2))).play();
m_gui.gridGlow();
};
if (m_diamondCount > 0){
if ((((m_gui.randInt(10) < 5)) && (!(m_level.isBoardEmpty())))){
m_sound.get(("diamond_" + m_gui.randInt(3))).play();
};
if (m_prevCmboWasDiamond){
m_diamondCount = (m_diamondCount + 1);
};
m_prevCmboWasDiamond = true;
} else {
m_prevCmboWasDiamond = false;
};
m_sh.diamondTot = (m_sh.diamondTot + m_diamondCount);
}
private function onMouseMove(_arg1:Event):void{
var _local2:int = Math.floor((((m_root.mouseY - m_sh.Y_OFF) + (m_sh.B_HEIGHT / 2)) / m_sh.B_HEIGHT));
var _local3:int = Math.floor((((m_root.mouseX - m_sh.X_OFF) + (m_sh.B_WIDTH / 2)) / m_sh.B_WIDTH));
var _local4:Object = new Object();
_local4.r = _local2;
_local4.c = _local3;
m_mouse.push(_local4);
}
}
}//package
Section 86
//flash_diamond (flash_diamond)
package {
import flash.media.*;
public dynamic class flash_diamond extends Sound {
}
}//package
Section 87
//G_BOMBSHAKE (G_BOMBSHAKE)
package {
import anim.*;
public dynamic class G_BOMBSHAKE extends AutoLoopingRndStart25Fps {
}
}//package
Section 88
//G_OVER (G_OVER)
package {
import anim.*;
public dynamic class G_OVER extends AutoLoopingFlare12Fps {
}
}//package
Section 89
//G_VOBBLE (G_VOBBLE)
package {
import anim.*;
public dynamic class G_VOBBLE extends AutoSingleRndStart20Fps {
}
}//package
Section 90
//game_loop (game_loop)
package {
import flash.media.*;
public dynamic class game_loop extends Sound {
}
}//package
Section 91
//GAME_OVER (GAME_OVER)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GAME_OVER extends MovieClip {
public var txtThisGame:TextField;
public var txtScore:TextField;
public var mcHighTime:MovieClip;
public var txtTimeBonus:TextField;
public var txtSavedDiamPerc:TextField;
public var txtPersonalBest:TextField;
public var mcHighClear:MovieClip;
public var txtGeneratedDiamNum:TextField;
public var txtSavedDiam:TextField;
public var mcHighCombo:MovieClip;
public var txtSavedDiamNum:TextField;
public var txtClearBonus:TextField;
public var txtScoreNum:TextField;
public var txtClearBonusNum:TextField;
public var mcHighAll:MovieClip;
public var txtTimeBonusNum:TextField;
public var txtGameEndsIn:TextField;
public var txtTotalScoreNum:TextField;
public var txtGeneratedDiam:TextField;
public var txtGameOver:TextField;
public var txtTotalScore:TextField;
}
}//package
Section 92
//game_over (game_over)
package {
import flash.media.*;
public dynamic class game_over extends Sound {
}
}//package
Section 93
//GG (GG)
package {
import flash.display.*;
public dynamic class GG extends MovieClip {
public var VOBBLE:GG_inner;
public var OVER:MovieClip;
public var SHAKE:GG_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 94
//GG_bombshake (GG_bombshake)
package {
import anim.*;
public dynamic class GG_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 95
//GG_inner (GG_inner)
package {
import anim.*;
public dynamic class GG_inner extends AutoSingleRndStart20Fps {
}
}//package
Section 96
//globare (globare)
package {
import anim.*;
public dynamic class globare extends AutoSingleFlare25Fps {
}
}//package
Section 97
//gridGlow (gridGlow)
package {
import anim.*;
public dynamic class gridGlow extends AutoSingleFlare25Fps {
}
}//package
Section 98
//GRIDPOP (GRIDPOP)
package {
import flash.display.*;
public dynamic class GRIDPOP extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 99
//Gui (Gui)
package {
import flash.display.*;
import utils.*;
import com.greensock.*;
import anim.*;
import com.greensock.plugins.*;
import com.greensock.easing.*;
import flash.utils.*;
public class Gui {
private var m_scorePop:MovieClip;
private var m_vobble:Boolean;
private var m_countDown:Boolean;// = true
private var m_clearSquareBonus:int;
private var m_explo:Interpolator;
private var m_currY:Number;
private var m_exploBlock:Boolean;// = true
private var m_laserLeft:MovieClip;
private var m_scoreDelay:int;
private var m_diamondCountTme:int;// = 0
private var m_rayGunCount:int;// = 0
private var m_diamondCombo:MovieClip;
private var m_laserRight:MovieClip;
private var m_countMc:MovieClip;// = null
private var m_register:MovieClip;
private var m_gridPopCount:int;// = 0
private var m_highBlinkDo:Boolean;
private var m_highCount:int;// = 0
private var m_scoreStep:int;
private var m_randSfx:Boolean;// = false
public var TIME_EXIT:int;// = 300
private var m_playDelay:Boolean;
private var m_countNr:int;// = 0
private var m_sh:SharedData;
private var m_vobbleCount:int;// = 0
private var m_diamondStep:int;
private var m_scoreAnim:Boolean;
private var m_exploArr:Array;
private var m_root:MovieClip;
private var m_gameOver:MovieClip;
private var m_rayGunArr:Array;
public var REM:Boolean;// = false
private var m_gridGlow:Boolean;
private var m_highBlink:Array;
private var m_gridGlowCount:int;// = 0
public var m_endGame:Boolean;
private var m_destY:Interpolator;
private var m_megaClear:MovieClip;
private var m_extraTime:MovieClip;
private var m_diamondCount:Boolean;// = false
private var m_scoreCount:int;
public var END:Boolean;
private var m_vobbleArr:Array;
private var m_playArr:Array;
private var m_scoreOld:int;
private var m_renderScore:Boolean;
public var INSTR:int;// = 0
private var m_randTme:int;// = 0
private var m_countDownSec:int;// = 0
private var m_vobbleDelay:int;// = 0
private var m_diamondSpin:MovieClip;
private var m_rayGunShot:Boolean;
private var TIMELIMIT:int;// = 2250
private var m_playCount:int;// = 0
private var m_clearSquare:MovieClip;
public function Gui(_arg1:MovieClip, _arg2:SharedData){
m_vobbleArr = new Array();
m_playArr = new Array();
m_exploArr = new Array();
m_explo = new EaseOutInterpolator(1, 0, 3);
m_highBlink = new Array();
m_register = new MovieClip();
super();
m_root = _arg1;
m_sh = _arg2;
TIMELIMIT = (TIMELIMIT + m_sh.EXTRATIME);
if (m_sh.isShortMode){
TIMELIMIT = ((0.75 * 60) * 25);
};
TweenPlugin.activate([BezierPlugin]);
TweenPlugin.activate([ColorMatrixFilterPlugin]);
m_root.mcRayGunCover.coverGlow.stop();
m_root.TIMER.mcWarning.visible = false;
m_root.TIMER.mcTimerBg.stop();
m_root.mcBgGrid.gridGlow.stop();
m_root.mcScore.txtCurrScore.text = I18n.getString("txtScore");
m_root.txtTme.text = I18n.getString("txtTme");
hideAllInstr();
}
public function remIntroScreen():void{
TweenLite.to(m_root.INTRO, 0.5, {alpha:0, onComplete:doRemIntro});
}
private function onScaleComplete(_arg1:MovieClip):void{
TweenLite.to(_arg1, 1, {y:(_arg1.y - 5), alpha:0, onComplete:onMoveComplete, onCompleteParams:[_arg1]});
m_gridPopCount--;
if (m_gridPopCount == 0){
m_sh.soundMngr.get("clear_square").fadeToAndStop(0, 0.2);
};
m_clearSquareBonus = (m_clearSquareBonus + 500);
m_clearSquare.txtScore.text = formatScore(m_clearSquareBonus);
}
public function hideLogo():void{
TweenLite.to(m_root.INTRO.LOGO, 0.3, {scaleX:0, scaleY:0, alpha:0});
m_root.mcLogo.visible = true;
TweenLite.from(m_root.mcLogo, 0.3, {scaleX:0, scaleY:0, alpha:0});
}
public function startCountDown():void{
m_countDown = true;
m_countDownSec = 25;
m_countNr = 10;
}
public function fireGridPopSeq(_arg1:Array):void{
var _local3:MovieClip;
m_gridPopCount = _arg1.length;
var _local2:int;
while (_local2 < _arg1.length) {
_local3 = new GRIDPOP();
_local3.inner.txtScore.text = "500";
_local3.scaleX = (_local3.scaleY = 0.4);
_local3.alpha = 0;
_local3.x = getX(_arg1[_local2].col);
_local3.y = getY(_arg1[_local2].row);
m_root.addChildAt(_local3, m_root.getChildIndex(m_clearSquare));
TweenLite.to(_local3, 0.2, {delay:(_local2 * 0.03), alpha:1, scaleX:1, scaleY:1, onComplete:onScaleComplete, onCompleteParams:[_local3]});
_local2++;
};
}
public function isDestroyDone():Boolean{
return (true);
}
public function clearAnim(_arg1:Array):void{
var _local3:MovieClip;
if (m_sh.scoreType == 3){
m_exploArr = new Array();
m_explo = new EaseOutInterpolator(1, 0, 4);
m_exploBlock = true;
_local3 = new EXPLO();
_local3.x = _arg1[0].x;
_local3.y = _arg1[0].y;
m_root.addChild(_local3);
m_exploArr.push(_local3);
};
var _local2:int;
while (_local2 < _arg1.length) {
m_root.removeChild(_arg1[_local2]);
_local2++;
};
}
private function onCountDone():void{
m_root.removeChild(m_countMc);
m_countMc = null;
}
public function setColor(_arg1:Block):void{
TweenLite.to(_arg1, 0.5, {colorMatrixFilter:{saturation:1}});
}
public function extraTimePuff():void{
m_extraTime = new ExtraTime();
m_extraTime.setDestroyAfterPlay(true);
m_extraTime.mcTime.txtXTime.text = I18n.getString("txtXTime");
m_extraTime.mcNum.txtXTimeNum.text = I18n.getString("txtXTimeNum", 10);
m_extraTime.x = 701;
m_extraTime.y = 49;
m_root.addChild(m_extraTime);
}
private function hideAllInstr():void{
var _local1 = 1;
while (_local1 < 9) {
m_root.INTRO.INSTR[("mcInstr" + _local1)].alpha = 0;
TweenLite.killTweensOf(m_root.INTRO.INSTR[("mcInstr" + _local1)]);
_local1++;
};
var _local2 = 1;
while (_local2 < 5) {
m_root.INTRO.INSTR[("txtIngame" + _local2)].alpha = 1;
_local2++;
};
}
private function rndInt(_arg1:int, _arg2:int):int{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
public function randSfx():Boolean{
if (!m_randSfx){
m_randTme++;
if (m_randTme == 150){
m_randSfx = true;
m_randTme = randInt(((0.1 * 60) * 25));
};
} else {
m_randTme--;
if (m_randTme == 0){
m_randSfx = false;
return (true);
};
};
return (false);
}
public function showDiamondCombo(_arg1:Boolean):void{
if (_arg1){
m_diamondCombo = new combo_diamond();
m_diamondCombo.x = -391;
m_diamondCombo.y = 271;
m_root.addChild(m_diamondCombo);
m_diamondCount = true;
m_diamondStep = (m_sh.scoreDiamond / 20);
} else {
TweenLite.to(m_diamondCombo, 0.1, {alpha:0});
};
}
public function gameWillXXXIn(_arg1:int, _arg2:int):Boolean{
var _local3:int = (_arg1 / 25);
var _local4:int = (_local3 / 60);
_local3 = (_local3 - (_local4 * 60));
var _local5:int = int((_local3 / 10));
var _local6:int = _local4;
var _local7:int = _local5;
var _local8:int = int((_local3 - (_local5 * 10)));
if (_arg2 == 1){
m_root.INTRO.INSTR.txtGameStartsIn.text = I18n.getString("txtGameStartsIn", ((_local7 + "") + _local8));
} else {
if (_arg2 == 2){
m_gameOver.txtGameEndsIn.text = I18n.getString("txtGameEndsIn", ((_local7 + "") + _local8));
} else {
if (_arg2 == 3){
m_root.txtGameContinueIn.text = I18n.getString("txtGameContinueIn", ((_local7 + "") + _local8));
};
};
};
if (_arg1 == 0){
return (true);
};
return (false);
}
public function remGui():void{
m_root.removeChild(m_root.mcScore);
m_root.removeChild(m_root.mcRayGunCover);
m_root.removeChild(m_root.mcBgGrid);
var _local1:Array = m_sh.getAllClips();
var _local2:int;
while (_local2 < _local1.length) {
m_root.removeChild(_local1[_local2]);
_local2++;
};
}
public function bezierThrow(_arg1:Array):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local2:int;
while (_local2 < _arg1.length) {
_arg1[_local2].RENDER = false;
_arg1[_local2].stopVobble();
_local3 = rndInt(215, 710);
_local4 = ((_arg1[_local2].x > _local3)) ? _local4 = 1;
_local4 : _local4 = 2;
_local4;
_local5 = rndInt(30, 40);
_local5 = ((_local4 == 2)) ? _local5 = (_local5 + _local3);
_local5 : _local5 = (_local3 - _local5);
_local5;
TweenLite.to(_arg1[_local2], rndNr(1, 1.5), {bezier:[{x:_local3, y:(_arg1[_local2].y - rndInt(200, 250))}, {x:_local5, y:700}], ease:Linear.easeNone});
_local2++;
};
}
public function setTime(_arg1:int):int{
var _local2:int = (_arg1 / 25);
var _local3:int = (_local2 / 60);
_local2 = (_local2 - (_local3 * 60));
var _local4:int = int((_local2 / 10));
var _local5:int = _local3;
var _local6:int = _local4;
var _local7:int = int((_local2 - (_local4 * 10)));
updateBar(_arg1);
var _local8 = 999;
if (_arg1 == (25 * 10)){
_local8 = 3;
};
if (_arg1 == (25 * 25)){
_local8 = 2;
};
if (_arg1 == (25 * 11)){
_local8 = 1;
m_root.TIMER.mcTimerBg.start();
m_root.TIMER.mcWarning.visible = true;
m_root.TIMER.mcScale.visible = false;
};
if (_arg1 == 0){
_local8 = 0;
};
return (_local8);
}
public function stopVobbling():void{
m_vobble = false;
m_vobbleArr = new Array();
m_vobbleCount = 0;
}
private function remMega():void{
m_root.removeChild(m_megaClear);
}
public function aimAndPrepare():void{
m_laserLeft = new laser_left();
m_laserRight = new laser_right();
m_laserLeft.x = 280;
m_laserRight.x = 520;
m_laserRight.y = (m_laserLeft.y = 350);
m_laserRight.visible = (m_laserLeft.visible = false);
m_root.addChild(m_laserRight);
m_root.addChild(m_laserLeft);
m_root.gunRight.gotoAndStop(1);
m_root.gunLeft.gotoAndStop(1);
m_root.gunRight.rayRot.start();
m_root.gunLeft.rayRot.start();
m_diamondSpin = new big_diamond();
m_diamondSpin.x = 401;
m_diamondSpin.y = 250;
m_diamondSpin.visible = false;
m_root.addChild(m_diamondSpin);
}
public function setSndSfx(_arg1:int=666):void{
if (_arg1 == 666){
m_sh.soundMngr.setVolume(m_sh.preSound);
m_sh.musicMngr.setVolume(m_sh.preMusic);
if (m_sh.preSound == 0){
m_root.SOUND.gotoAndStop(2);
};
if (m_sh.preMusic == 0){
m_root.MUSIC.gotoAndStop(2);
};
};
if (_arg1 == 1){
if (m_sh.preSound == 1){
m_root.SOUND.gotoAndStop(2);
m_sh.preSound = 0;
} else {
m_root.SOUND.gotoAndStop(1);
m_sh.preSound = 1;
};
m_sh.soundMngr.setVolume(m_sh.preSound);
};
if (_arg1 == 2){
if (m_sh.preMusic == 1){
m_root.MUSIC.gotoAndStop(2);
m_sh.preMusic = 0;
} else {
m_root.MUSIC.gotoAndStop(1);
m_sh.preMusic = 1;
};
m_sh.musicMngr.setVolume(m_sh.preMusic);
};
}
public function stopCountDown():void{
m_countDown = false;
TweenLite.killTweensOf(m_countMc);
if (m_countMc != null){
m_root.removeChild(m_countMc);
m_countMc = null;
};
}
public function scorePop(_arg1:int):void{
if (m_scorePop != null){
forceDestroy();
};
m_scorePop = new mcScorePop();
m_scoreDelay = 30;
m_scorePop.x = (m_sh.MouseX - 10);
m_scorePop.y = (m_sh.MouseY - 40);
m_scorePop.txtScore.text = _arg1;
m_root.addChild(m_scorePop);
m_destY = new EaseOutInterpolator(m_scorePop.y, (m_scorePop.y - 10), 20);
m_renderScore = true;
}
public function setBlackWhite(_arg1:Block):void{
TweenLite.to(_arg1, 0, {colorMatrixFilter:{saturation:0}});
}
public function showMegaClear():void{
m_megaClear = new mega_clear_bonus();
m_megaClear.x = 440;
m_megaClear.y = 201;
m_root.addChild(m_megaClear);
TweenLite.to(m_megaClear, 0.1, {delay:4.5, alpha:0, onComplete:remMega});
}
public function updateScoreTxt(_arg1:int):void{
m_scoreOld = (m_sh.scoreTotal - _arg1);
m_scoreStep = (_arg1 / 10);
m_scoreCount = 0;
m_scoreAnim = true;
}
public function stateHandler(_arg1:int):void{
if ((((((_arg1 == 75)) || ((_arg1 == 50)))) || ((_arg1 == 25)))){
m_root.gunLeft.nextFrame();
m_root.gunRight.nextFrame();
};
if (_arg1 == 98){
m_root.gunLeft.gotoAndStop(1);
m_root.gunRight.gotoAndStop(1);
};
}
public function hitQuit():Boolean{
if (m_root.QUIT.hitTestPoint(m_root.mouseX, m_root.mouseY)){
return (true);
};
return (false);
}
private function fadeInNumber():void{
if (m_countMc != null){
m_root.removeChild(m_countMc);
};
m_countNr--;
if (m_countNr == 0){
return;
};
var _local1:Class = (getDefinitionByName(("mcTimeNr_" + m_countNr)) as Class);
var _local2:BitmapData = (new _local1(0, 0) as BitmapData);
var _local3:Bitmap = new Bitmap(_local2);
_local3.x = (_local3.x - (_local3.width / 2));
_local3.y = (_local3.y - (_local3.height / 2));
m_countMc = new MovieClip();
m_countMc.x = 401;
m_countMc.y = 273;
m_countMc.addChild(_local3);
m_root.addChildAt(m_countMc, m_root.getChildIndex(m_root.mcBgGrid));
TweenLite.from(m_countMc, 0.3, {alpha:0.5, scaleX:0.9, scaleY:0.9, onComplete:onCountDone, ease:Linear.easeNone});
}
public function showClearSquare(_arg1:Boolean):void{
if (_arg1){
m_clearSquare = new clearSquare();
m_clearSquare.x = 202;
m_clearSquare.y = -104;
m_root.addChild(m_clearSquare);
} else {
TweenLite.to(m_clearSquare, 0.1, {alpha:0});
};
}
public function hitStart():Boolean{
if (m_root.INTRO.INSTR.mcStartGame.hitTestPoint(m_root.mouseX, m_root.mouseY)){
return (true);
};
return (false);
}
public function randInt(_arg1:int):int{
return (Math.floor((Math.random() * _arg1)));
}
private function rndNr(_arg1:Number, _arg2:Number):Number{
return (((Math.random() * (_arg2 - _arg1)) + _arg1));
}
public function render():void{
if (m_renderScore){
m_scorePop.y = m_currY;
};
}
private function updateBar(_arg1:int):void{
var _local2:Number = (_arg1 / TIMELIMIT);
m_root.TIMER.mcScale.scaleY = _local2;
m_root.TIMER.mcWarning.scaleY = _local2;
}
public function launchShortWin():void{
m_register = new mcRegister();
m_register.inner.txtRegister.text = I18n.getString("txtRegister");
m_register.x = 402;
m_register.y = 294;
m_root.addChild(m_register);
TIME_EXIT = (25 * 3);
}
private function doRemIntro():void{
m_root.removeChild(m_root.INTRO);
m_root.INTRO = null;
}
public function forceDestroy():void{
m_renderScore = false;
if (m_scorePop != null){
m_root.removeChild(m_scorePop);
};
m_scorePop = null;
}
public function tick():void{
var _local1:int;
var _local2:Object;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:int;
if (m_renderScore){
m_destY.update();
m_currY = m_destY.getValue();
m_scoreDelay--;
if (((m_destY.isDone()) && ((m_scoreDelay <= 0)))){
forceDestroy();
};
};
if (m_vobble){
if (m_vobbleCount == 10){
stopVobbling();
} else {
m_vobbleDelay++;
if (m_vobbleDelay == 2){
m_vobbleDelay = 0;
} else {
return;
};
_local1 = 0;
while (_local1 < m_vobbleArr.length) {
if (m_vobbleArr[_local1].row == m_vobbleCount){
m_vobbleArr[_local1].doVobble();
};
_local1++;
};
m_vobbleCount++;
};
};
if (m_playDelay){
m_playCount++;
if (m_playCount == 4){
_local2 = m_playArr.shift();
_local3 = _local2.b.col;
m_playCount = 0;
_local4 = 0;
_local5 = 0.2;
if (_local3 == 0){
_local4 = -65;
} else {
if (_local3 == 1){
_local4 = -55;
} else {
if (_local3 == 2){
_local4 = -40;
} else {
if (_local3 == 3){
_local4 = -20;
} else {
if (_local3 == 6){
_local4 = 20;
} else {
if (_local3 == 7){
_local4 = 40;
} else {
if (_local3 == 8){
_local4 = 55;
} else {
if (_local3 == 9){
_local4 = 65;
} else {
_local5 = 1;
};
};
};
};
};
};
};
};
m_sh.soundMngr.get("new_diamond").play(_local5, _local4);
};
if (m_playArr.length == 0){
m_playCount = 0;
m_playDelay = false;
};
};
if (m_countDown){
m_countDownSec--;
if (m_countDownSec == 0){
fadeInNumber();
m_countDownSec = 25;
};
};
if (m_exploBlock){
m_explo.update();
if (m_explo.isDone()){
m_exploBlock = false;
_local6 = 0;
while (_local6 < m_exploArr.length) {
m_root.removeChild(m_exploArr[_local6]);
m_exploArr[_local6] = null;
_local6++;
};
};
};
if (m_gridGlow){
m_gridGlowCount++;
if (m_gridGlowCount == 10){
m_gridGlow = false;
m_root.mcBgGrid.gridGlow.start();
if (m_sh.scoreType != 1){
m_sh.soundMngr.get("empty_board").play();
};
};
};
if (m_scoreAnim){
m_scoreCount++;
m_root.mcScore.txtScore.text = formatScore((m_scoreOld + (m_scoreCount * m_scoreStep)));
if (m_scoreCount == 10){
m_root.mcScore.txtScore.text = formatScore(m_sh.scoreTotal);
m_scoreAnim = false;
};
};
if (m_diamondCount){
m_diamondCountTme++;
m_diamondCombo.txtScore.text = formatScore((m_diamondCountTme * m_diamondStep));
if (m_diamondCountTme == 20){
m_diamondCombo.txtScore.text = formatScore(m_sh.scoreDiamond);
m_diamondCount = false;
};
};
if (m_endGame){
if (gameWillXXXIn(TIME_EXIT--, 2)){
m_endGame = false;
END = true;
m_highBlinkDo = false;
};
};
if (m_highBlinkDo){
m_highCount++;
if (m_highCount == 15){
m_highCount = 0;
_local7 = 0;
while (_local7 < m_highBlink.length) {
if (m_highBlink[_local7].visible){
m_highBlink[_local7].visible = false;
trace(("set " + false));
} else {
m_highBlink[_local7].visible = true;
trace(("set " + true));
};
_local7++;
};
};
};
}
public function gunFire():void{
m_root.gunLeft.gotoAndStop(5);
m_root.gunRight.gotoAndStop(5);
m_root.mcRayGunCover.coverGlow.start();
}
private function onMoveComplete(_arg1:MovieClip):void{
m_root.removeChild(_arg1);
_arg1 = null;
}
public function setInstr():void{
var _local2:int;
var _local3:Number;
var _local4:Number;
hideAllInstr();
trace(("setInstr ()" + INSTR));
var _local1 = 1;
while (_local1 < 5) {
_local2 = ((INSTR * 4) + _local1);
m_root.INTRO.INSTR[("txtIngame" + _local1)].text = I18n.getString(("txtIngame" + _local2));
if (INSTR == 1){
_local4 = (_local1 - 0.8);
_local3 = (1 * _local4);
} else {
_local4 = (_local1 - 1);
_local3 = (1 * _local4);
trace(_local3);
};
TweenLite.to(m_root.INTRO.INSTR[("mcInstr" + _local2)], 0.5, {alpha:1, delay:_local3});
TweenLite.from(m_root.INTRO.INSTR[("txtIngame" + _local1)], 0.5, {alpha:0, delay:_local3});
_local1++;
};
INSTR++;
}
public function playDelay(_arg1:Array):void{
m_playDelay = true;
m_playArr = _arg1;
}
public function startVobbling(_arg1:Array):void{
m_vobble = true;
m_vobbleArr = _arg1;
}
public function unleashHell():void{
m_laserRight.visible = (m_laserLeft.visible = true);
TweenLite.from(m_laserRight, 0.4, {alpha:0});
TweenLite.to(m_laserRight, 0.2, {alpha:0, delay:0.4, overwrite:0});
TweenLite.from(m_laserLeft, 0.4, {alpha:0});
TweenLite.to(m_laserLeft, 0.2, {alpha:0, delay:0.4, overwrite:0});
var _local1:MovieClip = new mcFlashOuter();
_local1.x = 400;
_local1.y = 270;
m_root.addChild(_local1);
TweenLite.from(_local1, 0.1, {delay:0.3, scaleX:0, scaleY:0});
TweenLite.to(_local1, 0.2, {delay:0.4, alpha:0, overwrite:0});
m_diamondSpin.visible = true;
TweenLite.from(m_diamondSpin, 0.3, {delay:0.5, alpha:0, scaleX:0.6, scaleY:0.6});
TweenLite.to(m_diamondSpin, 0.3, {delay:5, alpha:0, scaleX:0, scaleY:0, overwrite:0, onComplete:gameOver});
}
private function getY(_arg1:int):Number{
return ((m_sh.Y_OFF + (_arg1 * m_sh.B_HEIGHT)));
}
private function getX(_arg1:int):Number{
return ((m_sh.X_OFF + (_arg1 * m_sh.B_WIDTH)));
}
public function scorePopOnTop():void{
if (m_scorePop != null){
m_root.setChildIndex(m_scorePop, (m_root.numChildren - 1));
};
}
public function formatScore(_arg1:int):String{
var _local3:Array;
var _local4:int;
var _local2:String = _arg1.toString();
if (_local2.length > 3){
_local3 = _local2.split("");
_local3.reverse();
_local2 = "";
_local4 = (_local3.length - 1);
while (_local4 >= 0) {
if (_local4 == 2){
_local2 = (_local2 + ".");
};
_local2 = (_local2 + _local3[_local4]);
_local4--;
};
};
return (_local2);
}
public function gameOver():void{
m_gameOver = new GAME_OVER();
m_gameOver.mcHighCombo.star_combo.visible = (m_gameOver.mcHighClear.star_bonus.visible = (m_gameOver.mcHighTime.star_time.visible = (m_gameOver.mcHighAll.star_total.visible = false)));
m_gameOver.x = 387;
m_gameOver.y = 316;
m_gameOver.txtGameOver.text = I18n.getString("txtGameOver");
m_gameOver.txtThisGame.text = I18n.getString("txtThisGame");
m_gameOver.txtPersonalBest.text = I18n.getString("txtPersonalBest");
m_gameOver.txtScore.text = I18n.getString("txtScore");
m_gameOver.txtTimeBonus.text = I18n.getString("txtTimeBonus");
m_gameOver.txtTotalScore.text = I18n.getString("txtTotalScore");
m_gameOver.txtGeneratedDiam.text = I18n.getString("txtGeneratedDiam");
m_gameOver.txtSavedDiam.text = I18n.getString("txtSavedDiam");
m_gameOver.txtClearBonus.text = I18n.getString("txtClearBonus");
m_gameOver.txtClearBonusNum.text = formatScore(m_sh.scoreBonusClear);
m_gameOver.txtTotalScoreNum.text = formatScore(m_sh.scoreTotal);
m_gameOver.txtTimeBonusNum.text = formatScore(m_sh.scoreBonusTime);
m_gameOver.txtScoreNum.text = formatScore(m_sh.scoreCombo);
if (m_sh.scoreCombo > m_sh.preHighScoreCombo){
m_gameOver.mcHighCombo.txtScoreNumAllHigh.text = formatScore(m_sh.scoreCombo);
m_gameOver.mcHighCombo.star_combo.visible = true;
m_highBlink.push(m_gameOver.mcHighCombo.star_combo);
} else {
m_gameOver.mcHighCombo.txtScoreNumAllHigh.text = formatScore(m_sh.preHighScoreCombo);
};
if (m_sh.scoreBonusClear > m_sh.preScoreBonusClear){
m_gameOver.mcHighClear.txtClearBonusAllHigh.text = formatScore(m_sh.scoreBonusClear);
m_gameOver.mcHighClear.star_bonus.visible = true;
m_highBlink.push(m_gameOver.mcHighClear.star_bonus);
} else {
m_gameOver.mcHighClear.txtClearBonusAllHigh.text = formatScore(m_sh.preScoreBonusClear);
};
if (m_sh.scoreBonusTime > m_sh.preHighTimeBonus){
m_gameOver.mcHighTime.txtTimeBonusAllHigh.text = formatScore(m_sh.scoreBonusTime);
m_gameOver.mcHighTime.star_time.visible = true;
m_highBlink.push(m_gameOver.mcHighTime.star_time);
} else {
m_gameOver.mcHighTime.txtTimeBonusAllHigh.text = formatScore(m_sh.preHighTimeBonus);
};
if (m_sh.scoreTotal > m_sh.preHighScoreTotal){
m_gameOver.mcHighAll.txtTotalScoreAllHigh.text = formatScore(m_sh.scoreTotal);
m_gameOver.mcHighAll.star_total.visible = true;
m_highBlink.push(m_gameOver.mcHighAll.star_total);
} else {
m_gameOver.mcHighAll.txtTotalScoreAllHigh.text = formatScore(m_sh.preHighScoreTotal);
};
m_gameOver.txtGeneratedDiamNum.text = m_sh.diamondTot;
m_gameOver.txtSavedDiamNum.text = m_sh.diamondSav;
var _local1:int = (100 * (m_sh.diamondSav / m_sh.diamondTot));
m_gameOver.txtSavedDiamPerc.text = _local1;
if (m_sh.isShortMode){
m_root.addChildAt(m_gameOver, m_root.getChildIndex(m_register));
} else {
m_root.addChild(m_gameOver);
};
if (m_highBlink.length > 0){
m_highBlinkDo = true;
};
m_endGame = true;
}
public function gunReset():void{
}
public function gridGlow():void{
m_gridGlow = true;
m_gridGlowCount = 0;
}
public function hitSfx():int{
if (m_root.SOUND.hitTestPoint(m_root.mouseX, m_root.mouseY)){
return (1);
};
if (m_root.MUSIC.hitTestPoint(m_root.mouseX, m_root.mouseY)){
return (2);
};
return (0);
}
public function gridPopSfxDone():Boolean{
if (m_gridPopCount == 0){
return (true);
};
return (false);
}
}
}//package
Section 100
//hurry_0 (hurry_0)
package {
import flash.media.*;
public dynamic class hurry_0 extends Sound {
}
}//package
Section 101
//hurry_1 (hurry_1)
package {
import flash.media.*;
public dynamic class hurry_1 extends Sound {
}
}//package
Section 102
//hurry_2 (hurry_2)
package {
import flash.media.*;
public dynamic class hurry_2 extends Sound {
}
}//package
Section 103
//intro_loop (intro_loop)
package {
import flash.media.*;
public dynamic class intro_loop extends Sound {
}
}//package
Section 104
//laser_left (laser_left)
package {
import flash.display.*;
public dynamic class laser_left extends MovieClip {
}
}//package
Section 105
//laser_right (laser_right)
package {
import flash.display.*;
public dynamic class laser_right extends MovieClip {
}
}//package
Section 106
//Level (Level)
package {
import utils.*;
public class Level {
private var m_blocks:Array;
private var m_prevColor:String;// = ""
private var m_checkMyNeighbour:Array;
private var m_count:int;// = 0
private var m_typesColorBomb:Array;
private var m_random:Random;
private var m_typesUse:Array;
private var m_sh:SharedData;
public static var COLOR_BOMB_PERCENT:Array = [2];
public static var m_typesAll:Array = ["YY", "BB", "GG", "RR"];
public static var BOMB_PERCENT:Array = [1];
public function Level(_arg1:SharedData){
m_typesUse = new Array();
m_typesColorBomb = new Array();
m_checkMyNeighbour = new Array();
super();
m_sh = _arg1;
m_random = new Random(m_sh.globalSeed);
}
public function generateSpecial(_arg1:String, _arg2:int):Block{
var _local3:Block = generateBlock(_arg1, _arg2);
return (_local3);
}
public function getFirstEmptyCol():Array{
var _local1:Array = new Array();
var _local2:int = (m_sh.ROWS - 1);
var _local3 = 5;
while (_local3 < m_sh.COLS) {
if (m_blocks[_local2][_local3].TYPE == "EMPTY"){
_local1.push(_local3);
break;
};
_local3++;
};
var _local4 = 4;
while (_local4 >= 0) {
if (m_blocks[_local2][_local4].TYPE == "EMPTY"){
_local1.push(_local4);
break;
};
_local4--;
};
return (_local1);
}
public function getNumDiamonds(_arg1:int):int{
var _local2:int = (_arg1 / 10);
return (_local2);
}
public function getStrDir(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
_local2 = (_local2 + (((_arg1[_local3].row + "_") + _arg1[_local3].col) + ":"));
_local3++;
};
return (_local2);
}
private function generateBlock(_arg1:String, _arg2:int):Block{
var _local3:Block = new Block(_arg1);
_local3.SPECIAL = _arg2;
return (_local3);
}
public function highlightCluster(_arg1:int, _arg2:int):void{
m_blocks[_arg1][_arg2].MARKED = 1;
m_sh.HIGH.push(m_blocks[_arg1][_arg2]);
setHighlight(_arg1, _arg2);
}
public function hasColorBomb():Boolean{
var _local1:int;
while (_local1 < m_sh.HIGH.length) {
if (m_sh.HIGH[_local1].SPECIAL == 2){
return (true);
};
_local1++;
};
return (false);
}
public function isValidDiamondCombo():Block{
var _local2:int;
var _local3:Block;
var _local1:int;
while (_local1 < m_sh.COLS) {
_local2 = 0;
while (_local2 < m_sh.ROWS) {
_local3 = m_blocks[_local2][_local1];
if (_local3 != null){
if (_local3.TYPE == "DIAMOND"){
return (_local3);
};
};
_local2++;
};
_local1++;
};
return (null);
}
private function checkLeft(_arg1:int, _arg2:int, _arg3:String):void{
var _local4:int = _arg2;
while (_local4 >= 0) {
if (!isValid(_arg1, _arg2)){
return;
};
if (m_blocks[_arg1][_local4].SPECIAL > 2){
return;
};
if (m_blocks[_arg1][_local4].TYPE != _arg3){
return;
};
if (m_blocks[_arg1][_local4].MARKED){
return;
};
m_blocks[_arg1][_local4].MARKED = 1;
m_sh.HIGH.push(m_blocks[_arg1][_local4]);
m_checkMyNeighbour.push(m_blocks[_arg1][_local4]);
_local4--;
};
}
public function isSameCluster(_arg1:int, _arg2:int):Boolean{
var _local3:int;
while (_local3 < m_sh.HIGH.length) {
if ((((m_sh.HIGH[_local3].row == _arg1)) && ((m_sh.HIGH[_local3].col == _arg2)))){
return (true);
};
if (m_sh.HIGH[_local3].SPECIAL == 3){
return (false);
};
_local3++;
};
return (false);
}
public function doHighlightBomb():void{
var _local1:int;
while (_local1 < m_sh.HIGH.length) {
if (_local1 == 0){
m_sh.HIGH[_local1].setHighBomb(true, true);
} else {
m_sh.HIGH[_local1].setHighBomb(true, false);
};
_local1++;
};
}
private function getAllEmptyCols():Array{
var _local1:Array = new Array();
var _local2:int;
while (_local2 < 10) {
if (m_blocks[0][_local2].TYPE == "EMPTY"){
_local1.push(_local2);
};
_local2++;
};
return (_local1);
}
public function traceLv():void{
var _local3:int;
trace("-----");
var _local1 = "";
var _local2:int;
while (_local2 < 10) {
_local3 = 0;
while (_local3 < 10) {
if (m_blocks[_local2][_local3].TYPE == "EMPTY"){
_local1 = (_local1 + "XX ");
} else {
if (m_blocks[_local2][_local3].TYPE == "DIAMOND"){
_local1 = (_local1 + "DD ");
} else {
_local1 = (_local1 + (m_blocks[_local2][_local3].TYPE + " "));
};
};
_local3++;
};
trace(_local1);
_local1 = "";
_local2++;
};
}
public function numTotDiamonds():int{
var _local3:int;
var _local1:int;
var _local2:int;
while (_local2 < 10) {
_local3 = 0;
while (_local3 < 10) {
if (m_blocks[_local2][_local3].TYPE == "DIAMOND"){
_local1++;
};
_local3++;
};
_local2++;
};
return (_local1);
}
public function remHighlight():void{
var _local1:int;
while (_local1 < m_sh.HIGH.length) {
m_sh.HIGH[_local1].setHigh(false, m_sh.boardVobbling);
m_sh.HIGH[_local1].setHighBomb(false, false);
m_sh.HIGH[_local1].MARKED = 0;
_local1++;
};
m_sh.HIGH = new Array();
}
public function isFullGrid():Boolean{
var _local1:int;
while (_local1 < 10) {
if (m_blocks[0][_local1].TYPE != "EMPTY"){
return (true);
};
_local1++;
};
return (false);
}
public function setLevel(_arg1:Array):void{
m_blocks = _arg1;
}
private function checkUp(_arg1:int, _arg2:int, _arg3:String):void{
var _local4:int = _arg1;
while (_local4 >= 0) {
if (!isValid(_local4, _arg2)){
return;
};
if (m_blocks[_local4][_arg2].SPECIAL > 2){
return;
};
if (m_blocks[_local4][_arg2].TYPE != _arg3){
return;
};
if (m_blocks[_local4][_arg2].MARKED){
return;
};
m_blocks[_local4][_arg2].MARKED = 1;
m_sh.HIGH.push(m_blocks[_local4][_arg2]);
m_checkMyNeighbour.push(m_blocks[_local4][_arg2]);
_local4--;
};
}
public function getNextInt(_arg1:int):int{
return (m_random.nextInt(_arg1));
}
public function addEquals(_arg1:String):void{
var _local3:int;
var _local2:int;
while (_local2 < 10) {
_local3 = 0;
while (_local3 < 10) {
if ((((m_blocks[_local2][_local3].TYPE == _arg1)) && ((m_blocks[_local2][_local3].MARKED == 0)))){
m_sh.HIGH.push(m_blocks[_local2][_local3]);
};
_local3++;
};
_local2++;
};
}
public function getAllEmptyBlocks():Array{
var _local3:int;
var _local1:Array = new Array();
var _local2:int;
while (_local2 < 10) {
_local3 = 0;
while (_local3 < 10) {
if (isNull(_local2, _local3)){
m_blocks[_local2][_local3].row = _local2;
m_blocks[_local2][_local3].col = _local3;
_local1.push(m_blocks[_local2][_local3]);
};
_local3++;
};
_local2++;
};
return (_local1);
}
private function checkDown(_arg1:int, _arg2:int, _arg3:String):void{
var _local4:int = _arg1;
while (_local4 < m_sh.ROWS) {
if (!isValid(_local4, _arg2)){
return;
};
if (m_blocks[_local4][_arg2].SPECIAL > 2){
return;
};
if (m_blocks[_local4][_arg2].TYPE != _arg3){
return;
};
if (m_blocks[_local4][_arg2].MARKED){
return;
};
m_blocks[_local4][_arg2].MARKED = 1;
m_sh.HIGH.push(m_blocks[_local4][_arg2]);
m_checkMyNeighbour.push(m_blocks[_local4][_arg2]);
_local4++;
};
}
public function isBoardEmpty():Boolean{
var _local2:int;
var _local1 = 9;
while (_local1 >= 0) {
_local2 = 0;
while (_local2 < 10) {
if (((((!((m_blocks[_local1][_local2].STATUS == "DESTROYED"))) && (!((m_blocks[_local1][_local2].TYPE == "EMPTY"))))) && (!((m_blocks[_local1][_local2].TYPE == "DIAMOND"))))){
return (false);
};
_local2++;
};
_local1--;
};
return (true);
}
public function rndDiamondCol():int{
var _local1:Array = getAllEmptyCols();
return (_local1[m_random.nextInt(_local1.length)]);
}
private function spliceColor(_arg1:String):void{
var _local2:int;
while (_local2 < m_typesColorBomb.length) {
if (m_typesColorBomb[_local2] == _arg1){
m_typesColorBomb.splice(_local2, 1);
break;
};
_local2++;
};
}
public function getAllBlocks():Array{
var _local3:int;
var _local1:Array = new Array();
var _local2:int;
while (_local2 < 11) {
_local3 = 0;
while (_local3 < 10) {
if (!isNull(_local2, _local3)){
_local1.push(m_blocks[_local2][_local3]);
};
_local3++;
};
_local2++;
};
return (_local1);
}
public function getDiamondRow(_arg1:int):int{
var _local2:int;
var _local3:int;
while (_local3 < 10) {
if (m_blocks[_local3][_arg1].TYPE == "EMPTY"){
_local2 = _local3;
} else {
break;
};
_local3++;
};
return (_local2);
}
public function getNumEmpty():int{
var _local1:int;
var _local3:int;
var _local2:int;
while (_local2 < m_sh.ROWS) {
_local3 = 0;
while (_local3 < m_sh.COLS) {
if (m_blocks[_local2][_local3].TYPE == "EMPTY"){
_local1++;
};
_local3++;
};
_local2++;
};
return (_local1);
}
public function getDestroyed():Block{
var _local2:int;
var _local1:int;
while (_local1 < m_sh.COLS) {
_local2 = (m_sh.ROWS - 1);
while (_local2 >= 0) {
if (m_blocks[_local2][_local1].STATUS == "DESTROYED"){
m_blocks[_local2][_local1] = new Block("EMPTY");
m_blocks[_local2][_local1].row = _local2;
m_blocks[_local2][_local1].col = _local1;
return (m_blocks[_local2][_local1]);
};
_local2--;
};
_local1++;
};
return (null);
}
public function generateRandomBlock(_arg1:Boolean, _arg2:Boolean):Block{
var _local5:int;
var _local3:String = m_typesUse[m_random.nextInt(m_typesUse.length)];
var _local4:int;
if (((_arg1) || (_arg2))){
if (_arg2){
_local5 = 1;
} else {
_local5 = m_random.nextInt(200);
if (m_sh.boostNoBomb){
while (_local5 < BOMB_PERCENT[0]) {
_local5 = m_random.nextInt(200);
};
};
};
if (_local5 < BOMB_PERCENT[0]){
_local3 = "BOMB";
_local4 = 3;
} else {
if ((((_local5 >= BOMB_PERCENT[0])) && ((_local5 < (COLOR_BOMB_PERCENT[0] + BOMB_PERCENT[0]))))){
_local4 = 2;
if (m_prevColor == _local3){
spliceColor(_local3);
_local3 = m_typesColorBomb[m_random.nextInt(m_typesColorBomb.length)];
restorColorArr();
};
m_prevColor = _local3;
};
};
};
return (generateBlock(_local3, _local4));
}
public function doHighlight():void{
var _local1:int;
while (_local1 < m_sh.HIGH.length) {
m_sh.HIGH[_local1].setHigh(true, false);
_local1++;
};
}
private function getCopy():Array{
var _local1:Array = new Array();
var _local2:int;
while (_local2 < m_typesAll.length) {
_local1.push(m_typesAll[_local2]);
_local2++;
};
return (_local1);
}
private function restorColorArr():void{
m_typesColorBomb = new Array();
var _local1:int;
while (_local1 < m_typesUse.length) {
m_typesColorBomb.push(m_typesUse[_local1]);
_local1++;
};
}
public function setBlockTypes(_arg1:int):void{
var _local4:int;
m_typesUse = new Array();
var _local2:Array = getCopy();
var _local3:int;
while (_local3 < _arg1) {
_local4 = m_random.nextInt(_local2.length);
m_typesUse.push(_local2[_local4]);
_local2.splice(_local4, 1);
_local3++;
};
restorColorArr();
}
private function setHighlight(_arg1:int, _arg2:int):void{
var _local4:Block;
var _local3:String = m_blocks[_arg1][_arg2].TYPE;
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();
setHighlight(_local4.row, _local4.col);
};
}
public function isNull(_arg1:int, _arg2:int):Boolean{
if (m_blocks[_arg1][_arg2].TYPE == "EMPTY"){
return (true);
};
return (false);
}
private function checkRight(_arg1:int, _arg2:int, _arg3:String):void{
var _local4:int = _arg2;
while (_local4 < m_sh.COLS) {
if (!isValid(_arg1, _local4)){
return;
};
if (m_blocks[_arg1][_local4].SPECIAL > 2){
return;
};
if (m_blocks[_arg1][_local4].TYPE != _arg3){
return;
};
if (m_blocks[_arg1][_local4].MARKED){
return;
};
m_blocks[_arg1][_local4].MARKED = 1;
m_sh.HIGH.push(m_blocks[_arg1][_local4]);
m_checkMyNeighbour.push(m_blocks[_arg1][_local4]);
_local4++;
};
}
public function addNeighbours(_arg1:int, _arg2:int):void{
if (isValid(_arg1, (_arg2 - 1))){
m_sh.HIGH.push(m_blocks[_arg1][(_arg2 - 1)]);
};
if (isValid(_arg1, (_arg2 + 1))){
m_sh.HIGH.push(m_blocks[_arg1][(_arg2 + 1)]);
};
if (isValid((_arg1 - 1), _arg2)){
m_sh.HIGH.push(m_blocks[(_arg1 - 1)][_arg2]);
};
if (isValid((_arg1 + 1), _arg2)){
m_sh.HIGH.push(m_blocks[(_arg1 + 1)][_arg2]);
};
if (isValid((_arg1 - 1), (_arg2 + 1))){
m_sh.HIGH.push(m_blocks[(_arg1 - 1)][(_arg2 + 1)]);
};
if (isValid((_arg1 - 1), (_arg2 - 1))){
m_sh.HIGH.push(m_blocks[(_arg1 - 1)][(_arg2 - 1)]);
};
if (isValid((_arg1 + 1), (_arg2 + 1))){
m_sh.HIGH.push(m_blocks[(_arg1 + 1)][(_arg2 + 1)]);
};
if (isValid((_arg1 + 1), (_arg2 - 1))){
m_sh.HIGH.push(m_blocks[(_arg1 + 1)][(_arg2 - 1)]);
};
}
public function isOob(_arg1:int, _arg2:int):Boolean{
if ((((_arg1 < 0)) || ((_arg2 < 0)))){
return (true);
};
if ((((_arg1 >= m_sh.ROWS)) || ((_arg2 >= m_sh.COLS)))){
return (true);
};
return (false);
}
public function isValid(_arg1:int, _arg2:int):Boolean{
if (isOob(_arg1, _arg2)){
return (false);
};
if (isNull(_arg1, _arg2)){
return (false);
};
return (true);
}
}
}//package
Section 107
//logoclip (logoclip)
package {
import anim.*;
public dynamic class logoclip extends AutoSingleFlare25Fps {
public function logoclip(){
addFrameScript(24, frame25);
}
function frame25(){
}
}
}//package
Section 108
//mcFlashOuter (mcFlashOuter)
package {
import flash.display.*;
public dynamic class mcFlashOuter extends MovieClip {
}
}//package
Section 109
//mcHowTo (mcHowTo)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcHowTo extends MovieClip {
public var txtHowTo:TextField;
}
}//package
Section 110
//mcRayRot (mcRayRot)
package {
import anim.*;
public dynamic class mcRayRot extends AutoSingleFlare25Fps {
public function mcRayRot(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 111
//mcRegister (mcRegister)
package {
import flash.display.*;
public dynamic class mcRegister extends MovieClip {
public var inner:MovieClip;
}
}//package
Section 112
//mcScorePop (mcScorePop)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcScorePop extends MovieClip {
public var txtScore:TextField;
}
}//package
Section 113
//mcTimeNr_0 (mcTimeNr_0)
package {
import flash.display.*;
public dynamic class mcTimeNr_0 extends BitmapData {
public function mcTimeNr_0(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 114
//mcTimeNr_1 (mcTimeNr_1)
package {
import flash.display.*;
public dynamic class mcTimeNr_1 extends BitmapData {
public function mcTimeNr_1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 115
//mcTimeNr_2 (mcTimeNr_2)
package {
import flash.display.*;
public dynamic class mcTimeNr_2 extends BitmapData {
public function mcTimeNr_2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 116
//mcTimeNr_3 (mcTimeNr_3)
package {
import flash.display.*;
public dynamic class mcTimeNr_3 extends BitmapData {
public function mcTimeNr_3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 117
//mcTimeNr_4 (mcTimeNr_4)
package {
import flash.display.*;
public dynamic class mcTimeNr_4 extends BitmapData {
public function mcTimeNr_4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 118
//mcTimeNr_5 (mcTimeNr_5)
package {
import flash.display.*;
public dynamic class mcTimeNr_5 extends BitmapData {
public function mcTimeNr_5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 119
//mcTimeNr_6 (mcTimeNr_6)
package {
import flash.display.*;
public dynamic class mcTimeNr_6 extends BitmapData {
public function mcTimeNr_6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 120
//mcTimeNr_7 (mcTimeNr_7)
package {
import flash.display.*;
public dynamic class mcTimeNr_7 extends BitmapData {
public function mcTimeNr_7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 121
//mcTimeNr_8 (mcTimeNr_8)
package {
import flash.display.*;
public dynamic class mcTimeNr_8 extends BitmapData {
public function mcTimeNr_8(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 122
//mcTimeNr_9 (mcTimeNr_9)
package {
import flash.display.*;
public dynamic class mcTimeNr_9 extends BitmapData {
public function mcTimeNr_9(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 123
//mega_clear_bonus (mega_clear_bonus)
package {
import anim.*;
public dynamic class mega_clear_bonus extends AutoSingleFlare25Fps {
}
}//package
Section 124
//mega_diamond (mega_diamond)
package {
import flash.media.*;
public dynamic class mega_diamond extends Sound {
}
}//package
Section 125
//mega_laser (mega_laser)
package {
import flash.media.*;
public dynamic class mega_laser extends Sound {
}
}//package
Section 126
//new_diamond (new_diamond)
package {
import flash.media.*;
public dynamic class new_diamond extends Sound {
}
}//package
Section 127
//new_row (new_row)
package {
import flash.media.*;
public dynamic class new_row extends Sound {
}
}//package
Section 128
//new_tapetsary (new_tapetsary)
package {
import anim.*;
public dynamic class new_tapetsary extends AutoLoopingFlare25Fps {
}
}//package
Section 129
//R_BOMBSHAKE (R_BOMBSHAKE)
package {
import anim.*;
public dynamic class R_BOMBSHAKE extends AutoLoopingRndStart25Fps {
}
}//package
Section 130
//R_OVER (R_OVER)
package {
import anim.*;
public dynamic class R_OVER extends AutoLoopingFlare12Fps {
}
}//package
Section 131
//R_VOBBLE (R_VOBBLE)
package {
import anim.*;
public dynamic class R_VOBBLE extends AutoSingleRndStart20Fps {
}
}//package
Section 132
//RayRotation (RayRotation)
package {
import anim.*;
public dynamic class RayRotation extends AutoSingleFlare25Fps {
}
}//package
Section 133
//RINGS (RINGS)
package {
import flash.display.*;
public dynamic class RINGS extends MovieClip {
public var INNER:RINGS_inner;
}
}//package
Section 134
//RINGS_inner (RINGS_inner)
package {
import anim.*;
public dynamic class RINGS_inner extends AutoSingleFlare12Fps {
}
}//package
Section 135
//RR (RR)
package {
import flash.display.*;
public dynamic class RR extends MovieClip {
public var VOBBLE:RR_inner;
public var OVER:MovieClip;
public var SHAKE:RR_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 136
//RR_bombshake (RR_bombshake)
package {
import anim.*;
public dynamic class RR_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 137
//RR_inner (RR_inner)
package {
import anim.*;
public dynamic class RR_inner extends AutoSingleRndStart20Fps {
}
}//package
Section 138
//Score (Score)
package {
import flash.display.*;
public class Score {
private var m_scorePop:MovieClip;
private var m_sh:SharedData;
public function Score(_arg1:SharedData){
m_sh = _arg1;
}
public function getPercTimeBonus(_arg1:int, _arg2:int):int{
var _local3:Number = (1 - (_arg2 / _arg1));
m_sh.timePerc = (Math.round((_local3 * 100)) / 100);
var _local4:int = (_local3 * (m_sh.scoreTotal - m_sh.scoreDiamond));
return (_local4);
}
public function calcScore(_arg1:Array):int{
var _local2:int;
if (m_sh.scoreType == 0){
if (_arg1.length == 3){
_local2 = 100;
};
if (_arg1.length == 4){
_local2 = 150;
};
if (_arg1.length == 5){
_local2 = 200;
};
if (_arg1.length == 6){
_local2 = 300;
};
if (_arg1.length == 7){
_local2 = 400;
};
if (_arg1.length == 8){
_local2 = 500;
};
if (_arg1.length == 9){
_local2 = 650;
};
if (_arg1.length == 10){
_local2 = 800;
};
if (_arg1.length == 11){
_local2 = 950;
};
if (_arg1.length == 12){
_local2 = 1150;
};
if (_arg1.length == 13){
_local2 = 1450;
};
if (_arg1.length > 13){
_local2 = (1450 + ((_arg1.length - 13) * 300));
};
} else {
if (m_sh.scoreType == 1){
_local2 = (_arg1.length * 10000);
m_sh.scoreDiamond = _local2;
} else {
if (m_sh.scoreType == 2){
_local2 = 500;
} else {
if (m_sh.scoreType == 3){
};
};
};
};
return (_local2);
}
public function getPercClearedBonus(_arg1:int):int{
var _local2:int;
_local2 = (_arg1 * 500);
if (_arg1 == (m_sh.ROWS * m_sh.COLS)){
_local2 = (_local2 + 50000);
};
return (_local2);
}
}
}//package
Section 139
//sfx_0 (sfx_0)
package {
import flash.media.*;
public dynamic class sfx_0 extends Sound {
}
}//package
Section 140
//sfx_1 (sfx_1)
package {
import flash.media.*;
public dynamic class sfx_1 extends Sound {
}
}//package
Section 141
//sfx_2 (sfx_2)
package {
import flash.media.*;
public dynamic class sfx_2 extends Sound {
}
}//package
Section 142
//sfx_3 (sfx_3)
package {
import flash.media.*;
public dynamic class sfx_3 extends Sound {
}
}//package
Section 143
//sfx_4 (sfx_4)
package {
import flash.media.*;
public dynamic class sfx_4 extends Sound {
}
}//package
Section 144
//sfx_5 (sfx_5)
package {
import flash.media.*;
public dynamic class sfx_5 extends Sound {
}
}//package
Section 145
//sfx_6 (sfx_6)
package {
import flash.media.*;
public dynamic class sfx_6 extends Sound {
}
}//package
Section 146
//sfx_7 (sfx_7)
package {
import flash.media.*;
public dynamic class sfx_7 extends Sound {
}
}//package
Section 147
//sfx_8 (sfx_8)
package {
import flash.media.*;
public dynamic class sfx_8 extends Sound {
}
}//package
Section 148
//sfx_9 (sfx_9)
package {
import flash.media.*;
public dynamic class sfx_9 extends Sound {
}
}//package
Section 149
//SharedData (SharedData)
package {
import snd.*;
public class SharedData {
public var MouseX:int;
public var diamondSav:int;
public var boostNoBomb:Boolean;
public var musicMngr:SoundManager;
public var ROWS:int;
public var MouseY:int;
public var preHighScoreTotal:int;
public var scoreBonusTime:int;
public var scoreCombo:int;
public var scoreBonusClear:int;
public var HIGH:Array;
public var preSound:int;
public var isShortMode:Boolean;
public var globalSeed:int;
public var boardVobbling:Boolean;
public var EXTRATIME:int;
public var preMusic:int;
public var B_HEIGHT;// = 49
public var boostForceColor:Boolean;
public var scoreTotal:int;
public var scoreDiamond:int;
public var diamondTot:int;
public var percCleared:int;
public var X_OFF;// = 181
public var Y_OFF;// = 54
public var timePerc:Number;
public var scoreType:int;
public var preHighTimeBonus:int;
public var B_WIDTH;// = 49
public var COLS:int;
public var gamesPlayed:int;
public var getAllClips:Function;
public var preHighScoreCombo:int;
public var soundMngr:SoundManager;
public var preScoreBonusClear:int;
public var exitButton:Boolean;
public function SharedData(){
scoreTotal = 0;
scoreCombo = 0;
scoreBonusClear = 0;
scoreBonusTime = 0;
scoreType = 0;
scoreDiamond = 0;
globalSeed = 0;
isShortMode = false;
preSound = 1;
preMusic = 1;
exitButton = false;
preHighScoreCombo = 0;
preHighScoreTotal = 0;
preHighTimeBonus = 0;
preScoreBonusClear = 0;
musicMngr = null;
soundMngr = null;
boardVobbling = false;
diamondTot = 0;
diamondSav = 0;
gamesPlayed = 0;
timePerc = 0;
MouseX = 0;
MouseY = 0;
ROWS = 10;
COLS = 10;
HIGH = new Array();
EXTRATIME = 0;
boostForceColor = false;
boostNoBomb = false;
}
}
}//package
Section 150
//small_diamond_l (small_diamond_l)
package {
import flash.display.*;
public dynamic class small_diamond_l extends MovieClip {
}
}//package
Section 151
//small_diamond_r (small_diamond_r)
package {
import flash.display.*;
public dynamic class small_diamond_r extends MovieClip {
}
}//package
Section 152
//sparks (sparks)
package {
import anim.*;
public dynamic class sparks extends AutoLoopingFlare25Fps {
}
}//package
Section 153
//start_game (start_game)
package {
import flash.media.*;
public dynamic class start_game extends Sound {
}
}//package
Section 154
//ten_diamonds (ten_diamonds)
package {
import flash.media.*;
public dynamic class ten_diamonds extends Sound {
}
}//package
Section 155
//time_out (time_out)
package {
import flash.media.*;
public dynamic class time_out extends Sound {
}
}//package
Section 156
//time_warning (time_warning)
package {
import flash.media.*;
public dynamic class time_warning extends Sound {
}
}//package
Section 157
//TimerBgBlink (TimerBgBlink)
package {
import anim.*;
public dynamic class TimerBgBlink extends AutoLoopingFlare12Fps {
}
}//package
Section 158
//TimerWarning (TimerWarning)
package {
import anim.*;
public dynamic class TimerWarning extends AutoLoopingFlare12Fps {
}
}//package
Section 159
//Y_BOMBSHAKE (Y_BOMBSHAKE)
package {
import anim.*;
public dynamic class Y_BOMBSHAKE extends AutoLoopingRndStart25Fps {
}
}//package
Section 160
//Y_OVER (Y_OVER)
package {
import anim.*;
public dynamic class Y_OVER extends AutoLoopingFlare12Fps {
}
}//package
Section 161
//Y_VOBBLE (Y_VOBBLE)
package {
import anim.*;
public dynamic class Y_VOBBLE extends AutoSingleRndStart20Fps {
}
}//package
Section 162
//YY (YY)
package {
import flash.display.*;
public dynamic class YY extends MovieClip {
public var VOBBLE:YY_inner;
public var OVER:MovieClip;
public var SHAKE:YY_bombshake;
public var IDLE:MovieClip;
}
}//package
Section 163
//YY_bombshake (YY_bombshake)
package {
import anim.*;
public dynamic class YY_bombshake extends AutoLoopingRndStart25Fps {
}
}//package
Section 164
//YY_inner (YY_inner)
package {
import anim.*;
public dynamic class YY_inner extends AutoSingleRndStart20Fps {
}
}//package