Section 1
//JUIComponent (com.jumpeye.core.JUIComponent)
package com.jumpeye.core {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import flash.utils.*;
public class JUIComponent extends Sprite {
protected var callLaterMethods:Dictionary;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
public var version:String;// = "3.0.0.15"
public static var inCallLaterPhase:Boolean = false;
public function JUIComponent(){
version = "3.0.0.15";
invalidateFlag = false;
_inspector = false;
isLivePreview = false;
super();
invalidHash = {};
callLaterMethods = new Dictionary();
configUI();
invalidate(InvalidationType.ALL);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
protected function validate():void{
invalidHash = {};
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
protected function draw():void{
validate();
}
protected function configUI():void{
isLivePreview = checkLivePreview();
if (numChildren > 0){
removeChildAt(0);
};
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function drawNow():void{
draw();
}
}
}//package com.jumpeye.core
Section 2
//FLASHEFFEvents (com.jumpeye.Events.FLASHEFFEvents)
package com.jumpeye.Events {
import flash.events.*;
public dynamic class FLASHEFFEvents extends Event {
public static const ROLL_OUT:String = "onRollOut";
public static const INIT:String = "init";
public static const TRANSITION_END:String = "onTransitionEnd";
public static const MOUSE_UP:String = "onMouseUp";
public static const ROLL_OVER:String = "onRollOver";
public static const TRANSITION_START:String = "onTransitionStart";
public static const COMPLETE:String = "complete";
public static const DOUBLE_CLICK:String = "onDoubleClick";
public static const MOUSE_DOWN:String = "onMouseDown";
public function FLASHEFFEvents(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("FLASHEFFEvents", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new FLASHEFFEvents(type, bubbles, cancelable));
}
}
}//package com.jumpeye.Events
Section 3
//IFeChar (com.jumpeye.flashEff.core.interfaces.IFeChar)
package com.jumpeye.flashEff.core.interfaces {
import flash.text.*;
public interface IFeChar {
function get bottomPosition():Number;
function set properties(_arg1:Object):void;
function set bottomPosition(_arg1:Number):void;
function set textField(_arg1:TextField):void;
function get text():String;
function set htmlText(_arg1:String):void;
function get type():String;
function get properties():Object;
function get textField():TextField;
function set id(_arg1:Number):void;
function get htmlText():String;
function applyTextFormat(_arg1:TextFormat):void;
function set text(_arg1:String):void;
function get id():Number;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 4
//IFeGroup (com.jumpeye.flashEff.core.interfaces.IFeGroup)
package com.jumpeye.flashEff.core.interfaces {
public interface IFeGroup {
function pushChild(_arg1:Object):Object;
function set properties(_arg1:Object):void;
function cleanMe():void;
function get type():String;
function removeChilds():void;
function get text():String;
function set childs(_arg1:Array):void;
function get properties():Object;
function set id(_arg1:Number):void;
function get childs():Array;
function set text(_arg1:String):void;
function get id():Number;
function removeChildAtIndex(_arg1:uint):Object;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 5
//IFeTable (com.jumpeye.flashEff.core.interfaces.IFeTable)
package com.jumpeye.flashEff.core.interfaces {
public interface IFeTable {
function pushChild(_arg1:Object):Object;
function get childs():Array;
function cleanMe():void;
function removeChildAtIndex(_arg1:uint):Object;
function get type():String;
function removeChilds():void;
function set childs(_arg1:Array):void;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 6
//IFlashEff (com.jumpeye.flashEff.core.interfaces.IFlashEff)
package com.jumpeye.flashEff.core.interfaces {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
public interface IFlashEff {
function applyButtonEffect():void;
function set rotation(_arg1:Number):void;
function set targetVisibility(_arg1:Boolean):void;
function set showDelay(_arg1:Number):void;
function removeButtonEffect():void;
function set name(_arg1:String):void;
function set useHandCursor(_arg1:Boolean):void;
function set buttonEffectName(_arg1:String):void;
function set _targetInstanceName(_arg1:String):void;
function set target(_arg1:DisplayObject):void;
function removeFilter(_arg1:IFlashEffFilter):Boolean;
function removeAllCommands():void;
function get height():Number;
function removeCommand(_arg1:IFlashEffCommand):void;
function buttonPress():void;
function get showTransition():IFlashEffSymbolText;
function removeEffect(_arg1:Boolean=false, _arg2:IFlashEffSymbolText=null):void;
function get filterList():Array;
function get hideTransition():IFlashEffSymbolText;
function setProperties(_arg1):void;
function set showAutoPlay(_arg1:Boolean):void;
function getFilterAt(_arg1:uint):IFlashEffFilter;
function hide():void;
function buttonRollOver():void;
function set cacheAsBitmap(_arg1:Boolean):void;
function dispatchEvent(_arg1:Event):Boolean;
function transitionEffect(_arg1:String="show"):void;
function set height(_arg1:Number):void;
function get scaleY():Number;
function get isTargetVisibleAtEnd():Boolean;
function get mouseX():Number;
function get mouseY():Number;
function get scaleX():Number;
function get absWords():Array;
function addFilterByName(_arg1:String, _arg2:Object=null):IFlashEffFilter;
function setXML(_arg1):void;
function get alpha():Number;
function get hideDelay():Number;
function get hideTransitionName():String;
function get isTransitioning():Boolean;
function set showTransition(_arg1:IFlashEffSymbolText):void;
function changeTarget(_arg1:DisplayObject):void;
function addCommand(_arg1:IFlashEffCommand, _arg2:String):IFlashEffCommand;
function set filterList(_arg1:Array):void;
function set hideTransition(_arg1:IFlashEffSymbolText):void;
function get visible():Boolean;
function getFilter(_arg1:String):IFlashEffFilter;
function get x():Number;
function get y():Number;
function get buttonEffect():IFlashEffButtonEffect;
function buttonRelease():void;
function removeAll():void;
function get rotation():Number;
function addFilter(_arg1:IFlashEffFilter):void;
function get targetVisibility():Boolean;
function get showDelay():Number;
function get commands():Array;
function removeCommandByName(_arg1:String):void;
function get absCustom():Array;
function get absChars():Array;
function get useHandCursor():Boolean;
function get buttonEffectName():String;
function set mouseChildren(_arg1:Boolean):void;
function get _targetInstanceName():String;
function get target():DisplayObject;
function get name():String;
function set width(_arg1:Number):void;
function addCommandByName(_arg1:String, _arg2:String, _arg3:Object=null):IFlashEffCommand;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get showAutoPlay():Boolean;
function get textTable():IFeTable;
function get targetOwner():MovieClip;
function get cacheAsBitmap():Boolean;
function get buttonOwner():Sprite;
function set isTargetVisibleAtEnd(_arg1:Boolean):void;
function get absLines():Array;
function set xmlPath(_arg1:String):void;
function set showTransitionName(_arg1:String):void;
function set alpha(_arg1:Number):void;
function drawTextTable(_arg1:String, _arg2:String, _arg3:Number, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Array=null):Boolean;
function removeAllFilters():void;
function set mouseEnabled(_arg1:Boolean):void;
function set hideDelay(_arg1:Number):void;
function set hideTransitionName(_arg1:String):void;
function set drawAfterFilters(_arg1:Boolean):void;
function set hideAutoPlay(_arg1:Boolean):void;
function get mouseChildren():Boolean;
function get textField():TextField;
function get absMatrix():Array;
function get partialTable():IFeTable;
function set buttonEffect(_arg1:IFlashEffButtonEffect):void;
function removeShowTransition():void;
function removeHideTransition():void;
function get mouseEnabled():Boolean;
function get showTransitionName():String;
function get width():Number;
function get xmlPath():String;
function set visible(_arg1:Boolean):void;
function get hideAutoPlay():Boolean;
function get drawAfterFilters():Boolean;
function set x(_arg1:Number):void;
function set buttonMode(_arg1:Boolean):void;
function set y(_arg1:Number):void;
function set partialPatternName(_arg1:String):void;
function get buttonMode():Boolean;
function get textOwnerClip():Sprite;
function get initialTargetTransform():Transform;
function removeAllCommandsByEventType(_arg1:String):void;
function get partialPatternName():String;
function get partialTextOwnerClip():Sprite;
function show(_arg1=null):void;
function buttonRollOut():void;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 7
//IFlashEffButtonEffect (com.jumpeye.flashEff.core.interfaces.IFlashEffButtonEffect)
package com.jumpeye.flashEff.core.interfaces {
import flash.display.*;
public interface IFlashEffButtonEffect {
function set target(_arg1:DisplayObject):void;
function buttonRollOver():void;
function remove():void;
function get tweenType():String;
function get tweenDuration():Number;
function get easeType():String;
function set tweenType(_arg1:String):void;
function apply():void;
function set easeType(_arg1:String):void;
function get target():DisplayObject;
function buttonRelease():void;
function buttonPress():void;
function set component(_arg1:IFlashEff):void;
function get component():IFlashEff;
function set tweenDuration(_arg1:Number):void;
function buttonRollOut():void;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 8
//IFlashEffCommand (com.jumpeye.flashEff.core.interfaces.IFlashEffCommand)
package com.jumpeye.flashEff.core.interfaces {
import flash.display.*;
public interface IFlashEffCommand {
function get target():DisplayObject;
function set target(_arg1:DisplayObject):void;
function set component(_arg1:IFlashEff):void;
function run():void;
function get component():IFlashEff;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 9
//IFlashEffFilter (com.jumpeye.flashEff.core.interfaces.IFlashEffFilter)
package com.jumpeye.flashEff.core.interfaces {
import flash.display.*;
public interface IFlashEffFilter {
function set target(_arg1:Sprite):void;
function remove():void;
function get target():Sprite;
function set component(_arg1:IFlashEff):void;
function get component():IFlashEff;
function apply():void;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 10
//IFlashEffSymbol (com.jumpeye.flashEff.core.interfaces.IFlashEffSymbol)
package com.jumpeye.flashEff.core.interfaces {
import flash.display.*;
public interface IFlashEffSymbol extends IFlashEffSymbolText {
function set target(_arg1:DisplayObject):void;
function get target():DisplayObject;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 11
//IFlashEffSymbolText (com.jumpeye.flashEff.core.interfaces.IFlashEffSymbolText)
package com.jumpeye.flashEff.core.interfaces {
public interface IFlashEffSymbolText {
function hide():void;
function remove():void;
function get tweenType():String;
function get easeType():String;
function set tweenType(_arg1:String):void;
function get component():IFlashEff;
function set easeType(_arg1:String):void;
function set component(_arg1:IFlashEff):void;
function show():void;
function set tweenDuration(_arg1:Number):void;
function get tweenDuration():Number;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 12
//IFlashEffText (com.jumpeye.flashEff.core.interfaces.IFlashEffText)
package com.jumpeye.flashEff.core.interfaces {
import flash.text.*;
public interface IFlashEffText extends IFlashEffSymbolText {
function set partialBlurAmount(_arg1:Number):void;
function set partialStart(_arg1:Number):void;
function get partialPercent():Number;
function set selectedStrings(_arg1:Array):void;
function get target():TextField;
function set partialPercent(_arg1:Number):void;
function get partialBlurAmount():Number;
function get partialStart():Number;
function set target(_arg1:TextField):void;
function get selectedStrings():Array;
function set partialGroup(_arg1:String):void;
function get partialGroup():String;
}
}//package com.jumpeye.flashEff.core.interfaces
Section 13
//FESDesertIllusion (com.jumpeye.flashEff.symbol.desertIllusion.FESDesertIllusion)
package com.jumpeye.flashEff.symbol.desertIllusion {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import fl.transitions.*;
import flash.filters.*;
import flash.utils.*;
import fl.transitions.easing.*;
import com.jumpeye.Events.*;
import com.jumpeye.flashEff.utils.wavesEffect.*;
public class FESDesertIllusion extends MovieClip implements IFlashEffSymbol {
private var maxWaveSize;
private var transitionType:String;
private var t;
private var _scaleAmount:Number;// = 1
private var _target:DisplayObject;
private var owner:Object;
private var bounds:Object;
private var _tweenType:String;// = "Regular"
private var _smooth:Boolean;// = false
private var _wavesIntensity:Number;// = 100
private var _blurQuality:Number;// = 3
private var _tweenDuration:Number;// = 2
private var waveIntensity;
private var _blurAmount;// = 3
protected var _component:IFlashEff;
private var _easeType:String;// = "easeOut"
private var _waveSize:Number;// = 100
private var _preset:Number;
public function FESDesertIllusion(_arg1:IFlashEff=null){
_tweenDuration = 2;
_easeType = "easeOut";
_tweenType = "Regular";
_blurQuality = 3;
_wavesIntensity = 100;
_waveSize = 100;
_smooth = false;
owner = {};
_scaleAmount = 1;
_blurAmount = 3;
super();
this.component = _arg1;
this.init();
}
private function destroy(){
if (owner){
if (owner["wave"]){
if ((owner["wave"].bitmap is BitmapData)){
owner["wave"].bitmap.dispose();
};
};
if (owner["tweenAlpha"]){
owner["tweenAlpha"].stop();
};
if (owner["tweenWave"]){
owner["tweenWave"].stop();
};
if (owner["tweenFilterT"]){
owner["tweenFilterT"].stop();
};
if (owner["tweenScaleY"]){
owner["tweenScaleY"].stop();
};
if (owner["tweenScaleX"]){
owner["tweenScaleX"].stop();
};
};
if (target){
target.filters = [];
target.alpha = 1;
};
if (owner["wave"]){
};
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0.01;
};
this._tweenDuration = _arg1;
}
public function get tweenType():String{
return (this._tweenType);
}
public function get easeType():String{
return (this._easeType);
}
public function get scaleAmount():Number{
return (this._scaleAmount);
}
private function hdlChangeFilter(_arg1:TweenEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.target.position;
_local3 = _arg1.target.obj;
_local4 = getBlurFilter(_local2);
_local5 = target.filters;
_local5.push(_local4);
target.filters = _local5;
}
public function set scaleAmount(_arg1:Number):void{
this._scaleAmount = _arg1;
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
public function get blurQuality():Number{
return (this._blurQuality);
}
public function get waveSize():Number{
return (_waveSize);
}
public function remove():void{
destroy();
}
private function hdlScaleXChange(_arg1:TweenEvent){
this.component.targetOwner.x = (owner.origX - (this.component.targetOwner.width / 2));
}
public function get wavesIntensity():Number{
return (_wavesIntensity);
}
private function getBlurFilter(_arg1):BlurFilter{
var _local2:Number;
var _local3:Number;
_local2 = _arg1;
_local3 = _arg1;
return (new BlurFilter(_local2, _local3, _blurQuality));
}
public function get preset():Number{
return (this._preset);
}
public function show():void{
startTransition("show");
}
protected function init():void{
this.scaleX = 0;
this.scaleY = 0;
this.visible = false;
}
public function set target(_arg1:DisplayObject):void{
this._target = _arg1;
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function get component():IFlashEff{
return (this._component);
}
public function set blurQuality(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
this._blurQuality = _arg1;
}
public function set waveSize(_arg1:Number):void{
this._waveSize = _arg1;
}
public function hide():void{
startTransition("hide");
}
public function set blurAmount(_arg1:Number):void{
this._blurAmount = _arg1;
}
private function transition(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
this.target.visible = true;
owner.scX = (target.width / target.getBounds(target).width);
owner.scY = (target.height / target.getBounds(target).height);
owner.origX = (target.x + (target.width / 2));
owner.origY = (target.y + (target.height / 2));
_local1 = ((transitionType)=="show") ? 0 : 1;
_local2 = ((transitionType)=="show") ? 1 : 0;
_local3 = ((transitionType)=="show") ? maxWaveSize : 0;
_local4 = ((transitionType)=="show") ? 0 : maxWaveSize;
owner["wave"] = new JWavesEffect(target, smooth, _blurQuality, (target.width * scaleAmount), (target.height * scaleAmount));
owner["wave"].baseX = waveIntensity;
owner["wave"].baseY = waveIntensity;
owner["tweenAlpha"] = new Tween(target, "alpha", None.easeNone, _local1, _local2, t, true);
owner["tweenWave"] = new Tween(owner["wave"], "value", this.easeFunc, _local3, _local4, t, true);
owner["tweenWave"].addEventListener(TweenEvent.MOTION_FINISH, hdlMotionFinished);
_local5 = ((transitionType)=="show") ? (target.scaleX * scaleAmount) : owner.scX;
_local6 = ((transitionType)=="show") ? owner.scX : (target.scaleX * scaleAmount);
_local7 = ((transitionType)=="show") ? (target.scaleY * scaleAmount) : owner.scY;
_local8 = ((transitionType)=="show") ? owner.scY : (target.scaleY * scaleAmount);
_local9 = ((transitionType)=="show") ? blurAmount : 0;
_local10 = ((transitionType)=="show") ? 0 : blurAmount;
owner["tweenScaleX"] = new Tween(target, "scaleX", this.easeFunc, _local5, _local6, t, true);
owner["tweenScaleX"].addEventListener(TweenEvent.MOTION_CHANGE, hdlScaleXChange);
owner["tweenScaleY"] = new Tween(target, "scaleY", this.easeFunc, _local7, _local8, t, true);
owner["tweenScaleY"].addEventListener(TweenEvent.MOTION_CHANGE, hdlScaleYChange);
owner["tweenFilterT"] = new Tween({}, "prop", None.easeNone, _local9, _local10, t, true);
owner["tweenFilterT"].addEventListener(TweenEvent.MOTION_CHANGE, hdlChangeFilter);
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_START));
}
private function startTransition(_arg1:String){
var _local2:*;
owner.gain = waveSize;
owner.customParam1 = wavesIntensity;
transitionType = _arg1;
maxWaveSize = ((((owner.gain == "")) || (isNaN(Number(owner.gain))))) ? 100 : owner.gain;
maxWaveSize = Math.max(0, maxWaveSize);
waveIntensity = ((((owner.customParam1 == "")) || (isNaN(Number(owner.customParam1))))) ? 100 : owner.customParam1;
t = this._tweenDuration;
target = this.component.targetOwner;
bounds = target.getBounds(target);
_local2 = target.getBounds(target.parent);
owner["targetObj"] = {x:target.x, y:target.y, width:(_local2.width * target.scaleX), height:(_local2.height * target.scaleY), scaleX:target.scaleX, scaleY:target.scaleY, xMin:_local2.x, yMin:_local2.y};
transition();
}
private function hdlMotionFinished(_arg1:TweenEvent){
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
}
public function set smooth(_arg1:Boolean):void{
this._smooth = _arg1;
}
public function set wavesIntensity(_arg1:Number):void{
this._wavesIntensity = _arg1;
}
public function get target():DisplayObject{
return (this._target);
}
public function get blurAmount():Number{
return (this._blurAmount);
}
public function get smooth():Boolean{
return (this._smooth);
}
public function set preset(_arg1:Number):void{
this._preset = _arg1;
}
public function get easeFunc():Function{
var easeFunc:*;
try {
easeFunc = (getDefinitionByName(("fl.transitions.easing." + this.tweenType)) as Class);
return (easeFunc[this.easeType]);
} catch(e:ReferenceError) {
throw ("FlashEff WARNING: tween or ease type unknown");
return (null);
};
return (null);
}
private function hdlScaleYChange(_arg1:TweenEvent){
this.component.targetOwner.y = (owner.origY - (this.component.targetOwner.height / 2));
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
}
}//package com.jumpeye.flashEff.symbol.desertIllusion
Section 14
//FESSquareFade (com.jumpeye.flashEff.symbol.squareEffect.FESSquareFade)
package com.jumpeye.flashEff.symbol.squareEffect {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.geom.*;
import gs.*;
import flash.utils.*;
import com.jumpeye.Events.*;
public class FESSquareFade extends MovieClip implements IFlashEffSymbol {
private var maskClip:Sprite;
public var forceSquareDimension:Boolean;// = false
private var _squareHeight:Number;// = 40
private var _delay:Number;// = 100
protected var maskObjects:Object;
protected var lin:Number;// = 0
private var _target:DisplayObject;
private var _tweenType:String;// = "Regular"
private var _squareWidth:Number;// = 40
protected var timeMatrix:Array;
private var _tweenDuration:Number;// = 2
protected var finalSquareHeight:Number;// = 40
private var _groupDuration:Number;// = 1
protected var isShow:Boolean;// = true
protected var finalSquareWidth:Number;// = 40
protected var _component:IFlashEff;
protected var col:Number;// = 0
protected var targetBounds:Rectangle;
private var _easeType:String;// = "easeOut"
protected var tweensFinished:Number;// = 0
private var _preset:Number;// = 1
public function FESSquareFade(_arg1:IFlashEff=null){
forceSquareDimension = false;
finalSquareWidth = 40;
finalSquareHeight = 40;
lin = 0;
col = 0;
tweensFinished = 0;
isShow = true;
_squareWidth = 40;
_squareHeight = 40;
_delay = 100;
_tweenDuration = 2;
_easeType = "easeOut";
_tweenType = "Regular";
_preset = 1;
_groupDuration = 1;
super();
this.component = _arg1;
this.init();
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0.001){
_arg1 = 0.001;
};
this._tweenDuration = _arg1;
}
public function get tweenType():String{
return (this._tweenType);
}
public function get easeType():String{
return (this._easeType);
}
public function set groupDuration(_arg1:Number):void{
if (_arg1 < 0.001){
_arg1 = 0.001;
};
this._groupDuration = _arg1;
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
public function get squareHeight():Number{
return (this._squareHeight);
}
public function get squareWidth():Number{
return (this._squareWidth);
}
public function remove():void{
var _local1:*;
var _local2:*;
var _local3:Object;
if (this.maskClip != null){
if (this.maskClip.parent != null){
this.maskClip.parent.removeChild(this.maskClip);
};
this.maskClip = null;
this.target.mask = null;
};
if (this.maskObjects != null){
_local1 = 0;
while (_local1 < this.lin) {
_local2 = 0;
while (_local2 < this.col) {
_local3 = this.maskObjects[((("clip" + _local1) + "_") + _local2)];
TweenLite.killTweensOf(_local3.clip, false);
_local2++;
};
_local1++;
};
};
this.maskObjects = null;
this.timeMatrix = null;
}
public function get preset():Number{
return (this._preset);
}
public function show():void{
if (this.component != null){
this.startTransition(true);
};
}
protected function drawSquares(_arg1:Sprite, _arg2:uint):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:uint;
var _local10:Number;
var _local11:uint;
var _local12:Number;
var _local13:*;
this.timeMatrix = [];
this.maskObjects = {};
_local3 = Math.round(this.finalSquareHeight);
_local4 = Math.round(this.finalSquareWidth);
_local6 = 0;
_local8 = 0;
_local9 = 0;
while (_local9 < this.lin) {
this.timeMatrix[_local9] = [];
_local5 = 0;
_local7 = 0;
_local10 = Math.floor(_local8);
if (_local9 == (this.lin - 1)){
_local10 = Math.ceil(((_local8 + this.finalSquareHeight) - _local3));
};
_local11 = 0;
while (_local11 < this.col) {
this.timeMatrix[_local9][_local11] = 0;
_local12 = Math.floor(_local7);
if (_local11 == (this.col - 1)){
_local12 = Math.ceil(((_local7 + this.finalSquareWidth) - _local4));
};
_local13 = new Sprite();
_local13.name = ((("clip" + _local9) + "_") + _local11);
this.maskObjects[((("clip" + _local9) + "_") + _local11)] = {clip:_local13};
_local13.x = _local5;
_local13.y = _local6;
this.createRectangle(_local13, (_local4 + _local12), (_local3 + _local10));
_arg1.addChild(_local13);
_local13.alpha = _arg2;
_local5 = (_local5 + _local13.width);
_local7 = ((_local7 + this.finalSquareWidth) - _local13.width);
_local11++;
};
_local6 = (_local6 + (_local3 + _local10));
_local8 = (((_local8 + this.finalSquareHeight) - _local3) - _local10);
_local9++;
};
}
protected function init():void{
this.scaleX = 0;
this.scaleY = 0;
this.visible = false;
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function set target(_arg1:DisplayObject):void{
this._target = _arg1;
}
public function get component():IFlashEff{
return (this._component);
}
public function get groupDuration():Number{
return (this._groupDuration);
}
public function hide():void{
if (this.component != null){
this.startTransition(false);
};
}
public function set squareHeight(_arg1:Number){
if (_arg1 < 1){
_arg1 = 1;
};
this._squareHeight = _arg1;
this.finalSquareHeight = _arg1;
}
public function set squareWidth(_arg1:Number){
if (_arg1 < 1){
_arg1 = 1;
};
this._squareWidth = _arg1;
this.finalSquareWidth = _arg1;
}
protected function startTransition(_arg1:Boolean):void{
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:uint;
var _local6:Array;
var _local7:Number;
var _local8:Object;
this.targetBounds = this.target.getBounds(this.target);
if (this.squareHeight > this.targetBounds.height){
this.finalSquareHeight = this.targetBounds.height;
};
if (this.squareWidth > this.targetBounds.width){
this.finalSquareWidth = this.targetBounds.width;
};
this.lin = Math.floor(((this.targetBounds.height / this.finalSquareHeight) * this.target.scaleY));
this.col = Math.floor(((this.targetBounds.width / this.finalSquareWidth) * this.target.scaleX));
isShow = _arg1;
if (forceSquareDimension == false){
if ((lin * col) > 1600){
this.lin = Math.min(this.lin, 40);
this.col = Math.min(this.col, 40);
};
};
this.finalSquareHeight = ((this.targetBounds.height / this.lin) * this.target.scaleY);
this.finalSquareWidth = ((this.targetBounds.width / this.col) * this.target.scaleX);
_local2 = 1;
_local3 = 0;
if (_arg1 == true){
_local2 = 0;
_local3 = 1;
};
maskClip = new Sprite();
maskClip.name = "maskClip";
maskClip.x = (this.target.x + (this.targetBounds.x * this.target.scaleX));
maskClip.y = (this.target.y + (this.targetBounds.y * this.target.scaleY));
maskClip.rotation = this.target.rotation;
maskClip.visible = false;
this.component.targetOwner.addChild(maskClip);
this.target.mask = maskClip;
this.target.cacheAsBitmap = true;
maskClip.cacheAsBitmap = true;
drawSquares(maskClip, _local2);
this.tweensFinished = 0;
_local6 = [];
JFESquarePresets.getModifiedPresetsArray(this.preset, this.lin, this.col, this.timeMatrix, _local6);
if (_local6.MAX > 2){
_local7 = Math.max(((this.tweenDuration - this.groupDuration) / (_local6.MAX - 1)), 0);
} else {
_local7 = Math.max((this.tweenDuration - this.groupDuration), 0);
};
_local4 = 0;
while (_local4 < this.lin) {
_local5 = 0;
while (_local5 < this.col) {
_local8 = this.maskObjects[((("clip" + _local4) + "_") + _local5)];
TweenLite.to(_local8.clip, this.groupDuration, {alpha:_local3, delay:(this.timeMatrix[_local4][_local5] * _local7), ease:this.easeFunc, onComplete:motionFinish});
_local5++;
};
_local4++;
};
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_START));
}
public function get target():DisplayObject{
return (this._target);
}
public function set preset(_arg1:Number):void{
this._preset = _arg1;
}
public function get easeFunc():Function{
var easeFunc:*;
try {
easeFunc = (getDefinitionByName(("fl.transitions.easing." + this.tweenType)) as Class);
return (easeFunc[this.easeType]);
} catch(e:ReferenceError) {
throw ("FlashEff WARNING: tween or ease type unknown");
return (null);
};
return (null);
}
private function createRectangle(_arg1:Sprite, _arg2:Number, _arg3:Number){
var clip = _arg1;
var w = _arg2;
var h = _arg3;
var _local5 = clip.graphics;
with (_local5) {
beginFill(0xFF0000, 100);
lineTo(w, 0);
lineTo(w, h);
lineTo(0, h);
lineTo(0, 0);
endFill();
};
}
protected function motionFinish():void{
tweensFinished++;
if (tweensFinished == (this.lin * this.col)){
this.remove();
if (this.isShow == false){
if (this.target != null){
this.target.visible = false;
};
};
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
};
}
}
}//package com.jumpeye.flashEff.symbol.squareEffect
Section 15
//JFESquarePresets (com.jumpeye.flashEff.symbol.squareEffect.JFESquarePresets)
package com.jumpeye.flashEff.symbol.squareEffect {
public dynamic class JFESquarePresets {
public function JFESquarePresets():void{
}
public static function getPresetsArray(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Array, _arg5:Object=null):Array{
var _local6:*;
var _local7:uint;
var _local8:Number;
var _local9:uint;
var _local10:uint;
var _local11:uint;
_local8 = 0;
switch (_arg1){
default:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = _local7;
_local7++;
};
_local6++;
};
_local8 = _arg3;
break;
case 2:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (_arg3 - _local7);
_local7++;
};
_local6++;
};
_local8 = _arg3;
break;
case 3:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = _local6;
_local7++;
};
_local6++;
};
_local8 = _arg2;
break;
case 4:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (_arg2 - _local6);
_local7++;
};
_local6++;
};
_local8 = _arg2;
break;
case 5:
_local9 = (Math.ceil((_arg3 / 2)) - 1);
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _local9) {
_arg4[_local6][_local7] = (_local9 - _local7);
_arg4[_local6][((_arg3 - _local7) - 1)] = (_local9 - _local7);
_local7++;
};
_local6++;
};
_local8 = _local9;
break;
case 6:
_local9 = Math.ceil((_arg3 / 2));
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _local9) {
_arg4[_local6][_local7] = _local7;
_arg4[_local6][((_arg3 - _local7) - 1)] = _local7;
_local7++;
};
_local6++;
};
_local8 = _local9;
break;
case 7:
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = _local6;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local6;
_local7++;
};
_local6++;
};
_local8 = _local9;
break;
case 8:
_local9 = (Math.ceil((_arg2 / 2)) - 1);
_local6 = 0;
while (_local6 <= _local9) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (_local9 - _local6);
_arg4[((_arg2 - _local6) - 1)][_local7] = (_local9 - _local6);
_local7++;
};
_local6++;
};
_local8 = _local9;
break;
case 9:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (_local6 + _local7);
_local7++;
};
_local6++;
};
_local8 = ((_local6 + _local7) - 1);
break;
case 10:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((((_arg3 + _arg2) - _local6) - _local7) - 2);
_local7++;
};
_local6++;
};
_local8 = ((_local6 + _local7) - 1);
break;
case 11:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (((_arg2 + _local7) - _local6) - 1);
_local7++;
};
_local6++;
};
_local8 = ((_local6 + _local7) - 1);
break;
case 12:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = (((_arg3 - _local7) + _local6) - 1);
_local7++;
};
_local6++;
};
_local8 = ((_local6 + _local7) - 1);
break;
case 13:
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
_local7 = _local6;
while (_local7 < (_arg3 - _local6)) {
_arg4[_local6][_local7] = _local6;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local6;
_local7++;
};
if (_local6 <= uint((_arg3 / 2))){
_local7 = (_local6 + 1);
while (_local7 < ((_arg2 - _local6) - 1)) {
_arg4[_local7][_local6] = _local6;
_arg4[_local7][((_arg3 - _local6) - 1)] = _local6;
_local7++;
};
};
_local6++;
};
_local8 = _local9;
break;
case 14:
_local9 = (Math.ceil((_arg2 / 2)) - 1);
_local10 = Math.min(_local9, (_arg3 / 2));
_local6 = 0;
while (_local6 < _local9) {
_local7 = _local6;
while (_local7 < (_arg3 - _local6)) {
_arg4[_local6][_local7] = (_local10 - _local6);
_arg4[((_arg2 - _local6) - 1)][_local7] = (_local10 - _local6);
_local7++;
};
if (_local6 <= uint((_arg3 / 2))){
_local7 = (_local6 + 1);
while (_local7 < ((_arg2 - _local6) - 1)) {
_arg4[_local7][_local6] = (_local10 - _local6);
_arg4[_local7][((_arg3 - _local6) - 1)] = (_local10 - _local6);
_local7++;
};
};
_local6++;
};
_local8 = _local9;
break;
case 15:
_local11 = 0;
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
if (_local6 <= ((_arg3 - _local6) - 1)){
_local7 = _local6;
while (_local7 <= ((_arg2 - _local6) - 2)) {
_local11++;
_arg4[_local7][_local6] = _local11;
_local7++;
};
};
_local7 = _local6;
while (_local7 <= ((_arg3 - _local6) - 1)) {
_local11++;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local11;
_local7++;
};
if (((_arg3 - _local6) - 1) > _local6){
_local7 = ((_arg2 - _local6) - 2);
while (_local7 > _local6) {
_local11++;
_arg4[_local7][((_arg3 - _local6) - 1)] = _local11;
_local7--;
};
};
if (_local6 < ((_arg2 - _local6) - 1)){
_local7 = ((_arg3 - _local6) - 1);
while (_local7 > _local6) {
_local11++;
_arg4[_local6][_local7] = _local11;
_local7--;
};
};
_local6++;
};
_local8 = _local11;
break;
case 16:
_local11 = (_arg3 * _arg2);
_local8 = _local11;
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
if (_local6 <= ((_arg3 - _local6) - 1)){
_local7 = _local6;
while (_local7 <= ((_arg2 - _local6) - 2)) {
_local11--;
_arg4[_local7][_local6] = _local11;
_local7++;
};
};
_local7 = _local6;
while (_local7 <= ((_arg3 - _local6) - 1)) {
_local11--;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local11;
_local7++;
};
if (((_arg3 - _local6) - 1) > _local6){
_local7 = ((_arg2 - _local6) - 2);
while (_local7 > _local6) {
_local11--;
_arg4[_local7][((_arg3 - _local6) - 1)] = _local11;
_local7--;
};
};
if (_local6 < ((_arg2 - _local6) - 1)){
_local7 = ((_arg3 - _local6) - 1);
while (_local7 > _local6) {
_local11--;
_arg4[_local6][_local7] = _local11;
_local7--;
};
};
_local6++;
};
break;
case 17:
_local11 = 0;
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
if (((_arg2 - _local6) - 1) >= _local6){
_local7 = _local6;
while (_local7 <= ((_arg3 - _local6) - 1)) {
_local11++;
_arg4[_local6][_local7] = _local11;
_local7++;
};
};
if (((_arg3 - _local6) - 1) >= _local6){
_local7 = _local6;
while (_local7 < ((_arg2 - _local6) - 1)) {
_local11++;
_arg4[_local7][((_arg3 - _local6) - 1)] = _local11;
_local7++;
};
};
if (_local6 < ((_arg3 - _local6) - 1)){
if (((_arg2 - _local6) - 1) > _local6){
_local7 = (_arg3 - _local6);
while (_local7 > _local6) {
_local11++;
_arg4[((_arg2 - _local6) - 1)][(_local7 - 1)] = _local11;
_local7--;
};
};
};
if (_local6 < ((_arg3 - _local6) - 1)){
_local7 = ((_arg2 - _local6) - 2);
while (_local7 > _local6) {
_local11++;
_arg4[_local7][_local6] = _local11;
_local7--;
};
};
_local6++;
};
_local8 = _local11;
break;
case 18:
_local11 = (_arg3 * _arg2);
_local8 = _local11;
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
if (((_arg2 - _local6) - 1) >= _local6){
_local7 = _local6;
while (_local7 <= ((_arg3 - _local6) - 1)) {
_local11--;
_arg4[_local6][_local7] = _local11;
_local7++;
};
};
if (((_arg3 - _local6) - 1) >= _local6){
_local7 = _local6;
while (_local7 < ((_arg2 - _local6) - 1)) {
_local11--;
_arg4[_local7][((_arg3 - _local6) - 1)] = _local11;
_local7++;
};
};
if (_local6 < ((_arg3 - _local6) - 1)){
if (((_arg2 - _local6) - 1) > _local6){
_local7 = (_arg3 - _local6);
while (_local7 > _local6) {
_local11--;
_arg4[((_arg2 - _local6) - 1)][(_local7 - 1)] = _local11;
_local7--;
};
};
};
if (_local6 < ((_arg3 - _local6) - 1)){
_local7 = ((_arg2 - _local6) - 2);
while (_local7 > _local6) {
_local11--;
_arg4[_local7][_local6] = _local11;
_local7--;
};
};
_local6++;
};
break;
case 19:
_local8 = 0;
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = uint(((Math.random() * _arg3) * _arg2));
_local8 = Math.max(_local8, _arg4[_local6][_local7]);
_local7++;
};
_local6++;
};
break;
case 20:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((_local6 + _local7) % 2);
_local7++;
};
_local6++;
};
_local8 = 2;
break;
};
if (_arg5 != null){
_arg5.MAX = _local8;
};
return (_arg4);
}
public static function getModifiedPresetsArray(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Array, _arg5:Object=null):Array{
var _local6:*;
var _local7:uint;
var _local8:Number;
var _local9:uint;
var _local10:Number;
_local8 = 0;
switch (_arg1){
default:
if (_arg1 > 8){
return (JFESquarePresets.getPresetsArray(_arg1, _arg2, _arg3, _arg4, _arg5));
};
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((_local6 * (_arg3 - 1)) + _local7);
_local7++;
};
_local6++;
};
_local8 = (_arg3 * _arg2);
break;
case 2:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((_local6 * (_arg3 - 1)) + (_arg3 - _local7));
_local7++;
};
_local6++;
};
_local8 = (_arg2 * _arg3);
break;
case 3:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((_local7 * (_arg2 - 1)) + _local6);
_local7++;
};
_local6++;
};
_local8 = (_arg2 * _arg3);
break;
case 4:
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _arg3) {
_arg4[_local6][_local7] = ((_local7 * (_arg2 - 1)) + (_arg2 - _local6));
_local7++;
};
_local6++;
};
_local8 = (_arg2 * _arg3);
break;
case 5:
_local9 = Math.ceil((_arg3 / 2));
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _local9) {
_local10 = ((Math.ceil((_local6 * _local9)) + (_local9 - _local7)) - 1);
_arg4[_local6][_local7] = _local10;
_arg4[_local6][((_arg3 - _local7) - 1)] = _local10;
_local8 = Math.max(_local8, _local10);
_local7++;
};
_local6++;
};
break;
case 6:
_local9 = Math.ceil((_arg3 / 2));
_local6 = 0;
while (_local6 < _arg2) {
_local7 = 0;
while (_local7 < _local9) {
_local10 = (Math.ceil((_local6 * _local9)) + _local7);
_arg4[_local6][_local7] = _local10;
_arg4[_local6][((_arg3 - _local7) - 1)] = _local10;
_local8 = Math.max(_local10, _local8);
_local7++;
};
_local6++;
};
break;
case 7:
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
_local7 = 0;
while (_local7 < _arg3) {
_local10 = Math.ceil(((_local7 * _local9) + _local6));
_arg4[_local6][_local7] = _local10;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local10;
_local8 = Math.max(_local10, _local8);
_local7++;
};
_local6++;
};
break;
case 8:
_local9 = Math.ceil((_arg2 / 2));
_local6 = 0;
while (_local6 < _local9) {
_local7 = 0;
while (_local7 < _arg3) {
_local10 = ((Math.ceil((_local7 * _local9)) + (_local9 - _local6)) - 1);
_arg4[_local6][_local7] = _local10;
_arg4[((_arg2 - _local6) - 1)][_local7] = _local10;
_local8 = Math.max(_local10, _local8);
_local7++;
};
_local6++;
};
break;
};
if (_arg5 != null){
_arg5.MAX = _local8;
};
return (_arg4);
}
}
}//package com.jumpeye.flashEff.symbol.squareEffect
Section 16
//FESStripes (com.jumpeye.flashEff.symbol.stripes.FESStripes)
package com.jumpeye.flashEff.symbol.stripes {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import gs.*;
import flash.utils.*;
import fl.transitions.easing.*;
import com.jumpeye.Events.*;
public class FESStripes extends MovieClip implements IFlashEffSymbol {
var numberStr:Number;// = 0
var startPoint:Number;// = 0
var k:String;
private var _target:DisplayObject;
var finishPoint:Number;// = 0
private var _tweenType:String;// = "Regular"
var obj:Object;
var totalDuration:Number;// = 0
private var _tweenDuration:Number;// = 2
var clipXScale:Number;// = 0
private var _groupDuration:Number;// = 1
var clip:Sprite;
private var _stripeThickness:Number;// = 25
var kk:Number;// = 0
protected var _component:IFlashEff;
private var _easeType:String;// = "easeOut"
var rest:Number;// = 0
private var _preset:Number;
public function FESStripes(_arg1:IFlashEff=null){
_tweenDuration = 2;
_stripeThickness = 25;
_groupDuration = 1;
_easeType = "easeOut";
_tweenType = "Regular";
startPoint = 0;
kk = 0;
finishPoint = 0;
clipXScale = 0;
numberStr = 0;
rest = 0;
totalDuration = 0;
obj = {};
super();
this.component = _arg1;
this.init();
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0.001;
};
this._tweenDuration = _arg1;
}
public function get tweenType():String{
return (this._tweenType);
}
public function get easeType():String{
return (this._easeType);
}
public function set groupDuration(_arg1:Number):void{
this._groupDuration = _arg1;
}
function onMotionChanged(... _args){
_args[2].scaleX = _args[1].prop;
}
public function remove():void{
var _local1:*;
if ((obj.tweens is Array)){
for (_local1 in obj.tweens) {
TweenLite.killTweensOf(obj.tweens[_local1]);
};
};
this._component.targetOwner.mask = null;
if (this.component.targetOwner){
if ((obj.clip is Sprite)){
if (this.component.targetOwner.contains(obj.clip)){
this.component.targetOwner.removeChild(obj.clip);
};
};
};
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
public function get preset():Number{
return (this._preset);
}
public function show():void{
obj.show = true;
obj.me = this;
startTransition(obj);
}
protected function init():void{
this.scaleX = 0;
this.scaleY = 0;
this.visible = false;
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function set target(_arg1:DisplayObject):void{
this._target = _arg1;
}
public function get component():IFlashEff{
return (this._component);
}
private function startTween(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4, _arg5){
var _local6:*;
clearInterval(_arg4[("interval" + _arg5)]);
_local6 = (_arg4.tweens[_arg3] = {});
_local6.prop = _arg4.startPoint;
}
public function get groupDuration():Number{
return (this._groupDuration);
}
public function hide():void{
obj.me = this;
obj.show = false;
startTransition(obj);
}
public function set stripeThickness(_arg1:Number):void{
this._stripeThickness = _arg1;
}
private function startTransition(_arg1){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:*;
var _local10:*;
var _local11:Number;
var _local12:Number;
var _local13:Sprite;
var _local14:Number;
var _local15:Number;
var _local16:Object;
if ((((this._tweenDuration <= 0)) || (isNaN(this._tweenDuration)))){
this._tweenDuration = 0.1;
};
if (this._tweenDuration < this._groupDuration){
this._tweenDuration = this._groupDuration;
};
if ((((this._groupDuration <= 0)) || (isNaN(this._groupDuration)))){
this._groupDuration = 0.1;
};
if ((((this._stripeThickness <= 0)) || (isNaN(this._stripeThickness)))){
this._stripeThickness = 5;
};
if (_arg1.show == true){
_arg1.startPoint = 0;
_arg1.finishPoint = 1;
clipXScale = 1;
} else {
_arg1.startPoint = 1;
_arg1.finishPoint = 0;
clipXScale = 0;
};
_arg1.clipXScale = clipXScale;
_local2 = 100;
_arg1.targetBounds = target.getBounds(_target);
if (_arg1.squareHeight > _arg1.targetBounds.height){
_arg1.squareHeight = _arg1.targetBounds.height;
};
if (_arg1.squareWidth > _arg1.targetBounds.width){
_arg1.squareWidth = _arg1.targetBounds.width;
};
_local3 = 0;
_local3 = (_arg1.targetBounds.height * target.scaleY);
_local4 = 0;
_local4 = (_arg1.targetBounds.width * target.scaleX);
numberStr = Math.floor((_local3 / stripeThickness));
_arg1.numberStr = numberStr;
rest = Math.ceil((_local3 % stripeThickness));
_arg1.stripeThicknessFinal = (stripeThickness + (rest / numberStr));
kk = 1;
_local8 = 0;
_local7 = _local8;
_local6 = _local7;
_local5 = _local6;
_arg1.groupDuration = _groupDuration;
switch (Number(this.preset)){
case 2:
_local5 = 180;
_local6 = _local4;
kk = 1;
_local7 = _arg1.stripeThicknessFinal;
break;
case 3:
kk = 1;
_local11 = _local3;
_local3 = _local4;
numberStr = Math.floor((_local4 / stripeThickness));
rest = (_local4 % stripeThickness);
_arg1.stripeThicknessFinal = (stripeThickness + (rest / numberStr));
_local5 = 90;
_local8 = 1;
_local4 = _local11;
break;
case 4:
kk = 1;
_local12 = _local3;
numberStr = Math.round((_local4 / stripeThickness));
rest = Math.ceil((_local4 % stripeThickness));
_arg1.stripeThicknessFinal = (stripeThickness + (rest / numberStr));
kk = 0;
k = "=numbStr";
_local5 = -90;
_local8 = 1;
_local7 = _local3;
_local4 = _local12;
numberStr = (numberStr - 1);
break;
default:
break;
};
_arg1.numberStripes = numberStr;
if (_arg1.show == true){
};
_local9 = new Sprite();
this.component.targetOwner.addChild(_local9);
_arg1.clip = _local9;
_arg1.tweens = new Array();
_arg1.clip.rotation = target.rotation;
this._component.targetOwner.mask = _local9;
target.visible = true;
_arg1.tweensFinished = 0;
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_START));
_local10 = kk;
while (_local10 <= numberStr) {
_local13 = new Sprite();
_local9.addChild(_local13);
_local13.cacheAsBitmap = true;
_local14 = _arg1.stripeThicknessFinal;
_local13.graphics.beginFill(0xFF0000);
_local13.graphics.drawRect(0, 0, (_local4 + 1), (_local14 + 1));
_local13.graphics.endFill();
_local13.y = ((_arg1.targetBounds.y * target.scaleY) + ((_local14 * (_local10 - 1)) * (1 - _local8)));
_local13.x = ((_arg1.targetBounds.x * target.scaleX) + ((_local14 * _local10) * _local8));
_local13.rotation = _local5;
_local13.x = (_local13.x + _local6);
_local13.y = (_local13.y + _local7);
if (_arg1.show == true){
_local13.scaleX = 0;
};
_local15 = _tweenDuration;
totalDuration = _arg1.totalDuration;
_arg1.delay = Math.max(((tweenDuration - groupDuration) / numberStr), 0);
_local16 = (_arg1.tweens[_local10] = {});
_local16.prop = _arg1.startPoint;
if (_arg1.show == true){
TweenLite.to(_local16, this.groupDuration, {prop:_arg1.finishPoint, delay:(_arg1.delay * (_local10 - 1)), ease:easeFunc, onComplete:onMotionFinish, onUpdate:onMotionChanged, onUpdateParams:[_arg1, _local16, _local13], onCompleteParams:[_arg1, _local16, _local13]});
} else {
TweenLite.to(_local16, this.groupDuration, {prop:_arg1.finishPoint, delay:(_arg1.delay * _local10), ease:easeFunc, onComplete:onMotionFinish, onUpdate:onMotionChanged, onUpdateParams:[_arg1, _local16, _local13], onCompleteParams:[_arg1, _local16, _local13]});
};
_local10++;
};
}
function onMotionFinish(... _args){
clip = _args[2];
obj.tweensFinished++;
if ((((obj.tweensFinished == obj.numberStr)) || ((obj.tweensFinished == (obj.numberStr + 1))))){
clip.scaleX = obj.clipXScale;
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
} else {
clip.scaleX = obj.clipXScale;
};
}
public function get target():DisplayObject{
return (this._target);
}
public function get stripeThickness():Number{
return (this._stripeThickness);
}
public function set preset(_arg1:Number):void{
this._preset = _arg1;
}
public function get easeFunc():Function{
var easeFunc:*;
try {
easeFunc = (getDefinitionByName(("fl.transitions.easing." + this.tweenType)) as Class);
return (easeFunc[this.easeType]);
} catch(e:ReferenceError) {
throw ("FlashEff WARNING: tween or ease type unknown");
return (null);
};
return (null);
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
}
}//package com.jumpeye.flashEff.symbol.stripes
Section 17
//FESWaves (com.jumpeye.flashEff.symbol.waves.FESWaves)
package com.jumpeye.flashEff.symbol.waves {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.geom.*;
import fl.transitions.*;
import flash.utils.*;
import fl.transitions.easing.*;
import com.jumpeye.Events.*;
public class FESWaves extends MovieClip implements IFlashEffSymbol {
private var sqWidth;
private var isMotionFinished:Boolean;
private var targetHeight:Number;
private var _height;
private var maskClip:Sprite;
private var start;
private var _waveThickness:Number;// = 20
private var lin;
private var _target:DisplayObject;
private var targetWidth;
private var maxItems:Number;
private var aux:Boolean;
private var _tweenType:String;// = "Regular"
private var _duration:Number;
private var _tweenDuration:Number;// = 2
private var sqHeight:Number;
private var _groupDuration:Number;// = 1
private var scale:String;
private var final:Number;
private var delay;
protected var _component:IFlashEff;
private var col:Number;
protected var targetBounds:Rectangle;
private var _easeType:String;// = "easeOut"
private var tweensFinished:Number;// = 0
private var _preset:Number;
public function FESWaves(_arg1:IFlashEff=null){
_tweenDuration = 2;
_easeType = "easeOut";
_tweenType = "Regular";
tweensFinished = 0;
_groupDuration = 1;
_waveThickness = 20;
super();
this.component = _arg1;
this.init();
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0.001;
};
this._tweenDuration = _arg1;
}
public function get tweenType():String{
return (this._tweenType);
}
public function get easeType():String{
return (this._easeType);
}
public function set groupDuration(_arg1:Number):void{
if (_arg1 <= 0){
_arg1 = 0.001;
};
this._groupDuration = _arg1;
}
private function initSquare(_arg1:Sprite){
if (aux == true){
_arg1[scale] = 0;
} else {
_arg1[scale] = 1;
};
}
public function get waveThickness(){
return (this._waveThickness);
}
public function remove():void{
var _local1:*;
var _local2:*;
var _local3:Object;
if ((maskClip is Sprite)){
this.target.mask = null;
this.component.targetOwner.removeChild(maskClip);
maskClip = null;
};
_local1 = 0;
while (_local1 < this.lin) {
_local2 = 0;
while (_local2 < this.col) {
_local3 = this.component.targetOwner.clips[((("maskClip" + _local1) + "_") + _local2)];
clearInterval(_local3.interval);
if ((_local3.tween is Tween)){
_local3.tween.stop();
};
_local2++;
};
_local1++;
};
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
private function startSquareTransition(_arg1:Object):void{
var _local2:*;
_local2 = this;
_arg1.tweenObject = {};
_arg1.tween = new Tween(_arg1.clip, scale, this.easeFunc, start, final, this._groupDuration, true);
_arg1.tween.addEventListener(TweenEvent.MOTION_CHANGE, this.motionChange);
_arg1.tween.addEventListener(TweenEvent.MOTION_FINISH, this.motionFinish);
clearInterval(_arg1.interval);
}
public function get preset():Number{
return (this._preset);
}
public function set waveThickness(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 15;
} else {
if (_arg1 <= 0){
_arg1 = 1;
};
};
this._waveThickness = _arg1;
}
protected function motionChange(_arg1:TweenEvent):void{
}
protected function init():void{
this.scaleX = 0;
this.scaleY = 0;
this.visible = false;
}
public function get component():IFlashEff{
return (this._component);
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function set target(_arg1:DisplayObject):void{
this._target = _arg1;
}
public function show():void{
startTransition(true);
}
public function set duration(_arg1:Number):void{
this._duration = _arg1;
}
public function get groupDuration(){
return (this._groupDuration);
}
public function hide():void{
startTransition(false);
}
private function startTransition(_arg1:Boolean){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:uint;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:*;
var _local10:*;
tweensFinished = 0;
aux = _arg1;
_local2 = this.component.targetOwner;
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_START));
_local3 = this;
_local2.clips = {};
switch (Number(this._preset)){
default:
this.scale = "scaleX";
this.drawSquare(true);
_local4 = 0;
while (_local4 < this.col) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
clearInterval(_local10.interval);
_local3.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
case 2:
this.scale = "scaleX";
this.drawSquare(true);
_local6 = this.target.rotation;
this.maskClip.rotation = this.target.rotation;
_local4 = 0;
while (_local4 < this.col) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = this.target.height;
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
case 3:
this.scale = "scaleX";
this.drawSquare(true);
_local4 = 0;
while (_local4 < this.col) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = this.target.height;
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((this.col - _local4) - 1) * this.delay) * 1000), _local10);
_local4++;
};
break;
case 4:
this.scale = "scaleX";
this.drawSquare(true);
_local4 = 0;
while (_local4 < this.col) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((this.col - _local4) - 1) * this.delay) * 1000), _local10);
this.maskClip.rotation = this.target.rotation;
_local4++;
};
break;
case 5:
this.scale = "scaleY";
this.drawSquare(false);
_local4 = 0;
while (_local4 < this.lin) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
this.maskClip.rotation = this.target.rotation;
_local4++;
};
break;
case 6:
this.scale = "scaleY";
this.drawSquare(false);
this.maskClip.rotation = this.target.rotation;
_local4 = 0;
while (_local4 < this.lin) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
this.maskClip.rotation = this.target.rotation;
_local4++;
};
break;
case 7:
this.scale = "scaleY";
this.drawSquare(false);
_local4 = 0;
while (_local4 < this.lin) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((this.lin - _local4) - 1) * this.delay) * 1000), _local10);
this.maskClip.rotation = this.target.rotation;
_local4++;
};
break;
case 8:
this.scale = "scaleY";
this.drawSquare(false);
_local4 = 0;
while (_local4 < this.lin) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((this.lin - _local4) - 1) * this.delay) * 1000), _local10);
this.maskClip.rotation = this.target.rotation;
_local4++;
};
break;
case 9:
this.scale = "scaleX";
this.drawSquare(true);
_local7 = Math.floor((this.col / 2));
_local8 = 1;
maxItems = (_local7 * this.lin);
this.maskClip.rotation = this.target.rotation;
if (_local7 == ((this.col - 1) / 2)){
maxItems++;
_local8 = 0;
_local10 = _local2.clips[("maskClip0_" + _local7)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, 0, _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local7) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local7 - _local4) - _local8) * this.delay) * 1000), _local10);
_local10 = _local2.clips[("maskClip0_" + ((this.col - _local4) - 1))];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local7 - _local4) - _local8) * this.delay) * 1000), _local10);
_local4++;
};
break;
case 10:
this.scale = "scaleX";
this.drawSquare(true);
this.maskClip.rotation = this.target.rotation;
_local8 = 1;
_local7 = Math.floor((this.col / 2));
maxItems = (_local7 * this.lin);
if (_local7 == ((this.col - 1) / 2)){
maxItems++;
_local8 = 0;
_local10 = _local2.clips[("maskClip0_" + _local7)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, 0, _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local7) {
_local10 = _local2.clips[("maskClip0_" + ((this.col - _local4) - 1))];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local7 - _local4) - _local8) * this.delay) * 1000), _local10);
_local10 = _local2.clips[("maskClip0_" + _local4)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local7 - _local4) - _local8) * this.delay) * 1000), _local10);
_local4++;
};
break;
case 11:
this.scale = "scaleX";
this.drawSquare(true);
_local7 = Math.floor((this.col / 2));
maxItems = (_local7 * this.lin);
this.maskClip.rotation = this.target.rotation;
if (_local7 == ((this.col - 1) / 2)){
maxItems++;
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local10 = _local2.clips[("maskClip0_" + _local7)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local7 * this.delay) * 1000), _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local7) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local10 = _local2.clips[("maskClip0_" + ((this.col - _local4) - 1))];
((this.col - _local4) - 1);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
case 12:
this.scale = "scaleX";
this.drawSquare(true);
_local7 = Math.floor((this.col / 2));
maxItems = (_local7 * this.lin);
if (_local7 == ((this.col - 1) / 2)){
maxItems++;
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local10 = _local2.clips[("maskClip0_" + _local7)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local7 * this.delay) * 1000), _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local7) {
_local10 = _local2.clips[("maskClip0_" + _local4)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local10 = _local2.clips[("maskClip0_" + ((this.col - _local4) - 1))];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
case 13:
this.scale = "scaleY";
this.drawSquare(false);
this.maskClip.rotation = this.target.rotation;
_local8 = 1;
_local9 = Math.floor((this.lin / 2));
maxItems = (_local9 * this.col);
if (_local9 == ((this.lin - 1) / 2)){
maxItems++;
_local8 = 0;
_local10 = _local2.clips[((("maskClip" + _local9) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, 0, _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local9) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local9 - _local4) - _local8) * this.delay) * 1000), _local10);
_local10 = _local2.clips[((("maskClip" + ((this.lin - _local4) - 1)) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
_local10.interval = setInterval(this.startSquareTransition, ((((_local9 - _local4) - _local8) * this.delay) * 1000), _local10);
_local4++;
};
break;
case 14:
this.scale = "scaleY";
this.drawSquare(false);
_local9 = Math.floor((this.lin / 2));
maxItems = (_local9 * this.col);
_local8 = 1;
if (_local9 == ((this.lin - 1) / 2)){
maxItems++;
_local8 = 0;
_local10 = _local2.clips[((("maskClip" + _local9) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, 0, _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local9) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
_local10.interval = setInterval(this.startSquareTransition, ((((_local9 - _local4) - _local8) * this.delay) * 1000), _local10);
_local10 = _local2.clips[((("maskClip" + ((this.lin - _local4) - 1)) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((((_local9 - _local4) - _local8) * this.delay) * 1000), _local10);
_local4++;
};
break;
case 15:
this.scale = "scaleY";
this.drawSquare(false);
_local9 = Math.floor((this.lin / 2));
maxItems = (_local9 * this.col);
if (_local9 == ((this.lin - 1) / 2)){
maxItems++;
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local10 = _local2.clips[((("maskClip" + _local9) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local9 * this.delay) * 1000), _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local9) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local10 = _local2.clips[((("maskClip" + ((this.lin - _local4) - 1)) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
case 16:
this.scale = "scaleY";
this.drawSquare(false);
_local9 = Math.floor((this.lin / 2));
maxItems = (_local9 * this.col);
if (_local9 == ((this.lin - 1) / 2)){
maxItems++;
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local10 = _local2.clips[((("maskClip" + _local9) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local9 * this.delay) * 1000), _local10);
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / (maxItems - 1)), 0);
_local4 = 0;
while (_local4 < _local9) {
_local10 = _local2.clips[((("maskClip" + _local4) + "_") + 0)];
_local10.clip.rotation = 180;
_local10.clip.x = (_local10.clip.x + this.sqWidth);
_local10.clip.y = (_local10.clip.y + this.sqHeight);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local10 = _local2.clips[((("maskClip" + ((this.lin - _local4) - 1)) + "_") + 0)];
clearInterval(_local10.interval);
this.initSquare(_local10.clip);
_local10.interval = setInterval(this.startSquareTransition, ((_local4 * this.delay) * 1000), _local10);
_local4++;
};
break;
};
}
protected function drawSquare(_arg1:Boolean):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = this;
if (aux == true){
start = 0;
final = 1;
} else {
start = 1;
final = 0;
};
this.targetBounds = this.target.getBounds(this.target);
this.targetWidth = (this.targetBounds.width * this.target.scaleX);
this.targetHeight = (this.targetBounds.height * this.target.scaleY);
if (_arg1 == false){
if (_waveThickness > this.targetHeight){
_waveThickness = this.targetHeight;
};
sqWidth = this.targetWidth;
sqHeight = _waveThickness;
} else {
if (_waveThickness > this.targetWidth){
_waveThickness = this.targetWidth;
};
sqWidth = _waveThickness;
sqHeight = _waveThickness;
};
this.lin = Math.floor((this.targetHeight / this.sqHeight));
this.col = Math.floor((this.targetWidth / this.sqWidth));
_local3 = this.sqHeight;
if (_arg1 == true){
this.lin = 1;
} else {
this.col = 1;
};
delay = Math.max(((this.tweenDuration - this._groupDuration) / ((this.lin * this.col) - 1)), 0);
if (((this.lin * this.col) - 1) == 0){
delay = 0;
};
_local5 = 0;
_local4 = _local5;
if ((this.targetHeight / this.sqHeight) != this.lin){
_local4 = ((this.targetHeight - (this.lin * this.sqHeight)) / this.lin);
this.sqHeight = (this.sqHeight + Math.ceil(_local4));
};
if ((this.targetWidth / this.sqWidth) != this.col){
_local5 = ((this.targetWidth - (this.col * this.sqWidth)) / this.col);
this.sqWidth = (this.sqWidth + Math.ceil(_local5));
};
maskClip = new Sprite();
this.maskClip.name = "maskClip";
this.component.targetOwner.addChild(maskClip);
_local6 = 0;
while (_local6 < this.lin) {
_local7 = 0;
while (_local7 < this.col) {
_local8 = (this.component.targetOwner.clips[((("maskClip" + _local6) + "_") + _local7)] = {});
_local8.clip = maskClip.addChild(new Sprite());
_local2.createRectangle(_local8.clip, this.sqWidth, this.sqHeight);
_local8.clip.x = ((this.targetBounds.x * this.target.scaleX) + (_local7 * this.sqWidth));
_local8.clip.y = ((this.targetBounds.y * this.target.scaleY) + (_local6 * this.sqHeight));
if (aux == true){
_local8.clip[scale] = 0;
};
_local7++;
};
_local6++;
};
maskClip.x = this.target.x;
maskClip.y = this.target.y;
maskClip.rotation = this.target.rotation;
this.target.mask = maskClip;
maskClip.visible = false;
}
public function get target():DisplayObject{
return (this._target);
}
public function get duration(){
return (this._duration);
}
public function set preset(_arg1:Number):void{
this._preset = _arg1;
}
public function get easeFunc():Function{
var easeFunc:*;
try {
easeFunc = (getDefinitionByName(("fl.transitions.easing." + this.tweenType)) as Class);
return (easeFunc[this.easeType]);
} catch(e:ReferenceError) {
throw ("FlashEff WARNING: tween or ease type unknown");
return (null);
};
return (null);
}
private function createRectangle(_arg1:Sprite, _arg2, _arg3){
var clip = _arg1;
var _wid = _arg2;
var _hei = _arg3;
var _local5 = clip.graphics;
with (_local5) {
beginFill(0);
drawRect(0, 0, _wid, _hei);
endFill();
};
}
protected function motionFinish(_arg1:TweenEvent):void{
tweensFinished++;
if (tweensFinished == (this.lin * this.col)){
if (aux == false){
this.target.visible = false;
};
if (maskClip){
this.target.mask = null;
this.component.targetOwner.removeChild(maskClip);
maskClip = null;
};
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
};
}
}
}//package com.jumpeye.flashEff.symbol.waves
Section 18
//FeTDefaultFade (com.jumpeye.flashEff.text.defaultFade.FeTDefaultFade)
package com.jumpeye.flashEff.text.defaultFade {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.events.*;
import fl.transitions.*;
import flash.filters.*;
import fl.transitions.easing.*;
public class FeTDefaultFade implements IFlashEffSymbol {
private var _partialBlurAmount:Number;// = 0
private var _tweenDuration:Number;// = 0
private var _easeType:String;// = "easeOut"
private var _target:DisplayObject;
private var _partialStart:Number;// = 50
private var _tweenType:String;// = "Regular"
protected var tween:Tween;
protected var _component:IFlashEff;
public function FeTDefaultFade(_arg1:IFlashEff=null){
_partialStart = 50;
_partialBlurAmount = 0;
_tweenDuration = 0;
_easeType = "easeOut";
_tweenType = "Regular";
super();
this.component = _arg1;
}
public function get partialBlurAmount():Number{
return (this._partialBlurAmount);
}
public function show():void{
if (this.target != null){
this.startTransition(true);
};
}
protected function motionChange(_arg1:TweenEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:BitmapFilter;
var _local5:Array;
_local2 = _arg1.currentTarget.obj.alpha;
_local3 = (this.partialBlurAmount * (1 - _local2));
_local4 = new BlurFilter(_local3, _local3, 2);
_local5 = new Array();
_local5.push(_local4);
this.target.filters = _local5;
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
public function remove():void{
if ((this.tween is Tween)){
this.tween.stop();
};
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
public function set partialBlurAmount(_arg1:Number):void{
this._partialBlurAmount = _arg1;
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function set target(_arg1:DisplayObject):void{
this._target = _arg1;
}
public function get component():IFlashEff{
return (this._component);
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
this._tweenDuration = _arg1;
}
public function set partialStart(_arg1:Number):void{
this._partialStart = _arg1;
}
public function get tweenType():String{
return (this._tweenType);
}
public function get easeType():String{
return (this._easeType);
}
public function hide():void{
if (this.target != null){
this.startTransition(false);
};
}
public function get target():DisplayObject{
return (this._target);
}
protected function startTransition(_arg1:Boolean=true):void{
var _local2:*;
var _local3:*;
var _local4:Number;
_local2 = 1;
_local3 = 0;
if (_arg1 == true){
_local2 = 0;
_local3 = 1;
};
this.target.alpha = _local2;
if ((this.tween is Tween)){
this.tween.stop();
};
_local4 = (this.tweenDuration * (1 - (this.partialStart / 100)));
if (_local4 <= 0){
_local4 = 0.001;
};
this.tween = new Tween(this.target, "alpha", None.easeNone, _local2, _local3, _local4, true);
this.tween.addEventListener(TweenEvent.MOTION_FINISH, this.motionFinish);
if (this.partialBlurAmount > 0){
this.tween.addEventListener(TweenEvent.MOTION_CHANGE, this.motionChange);
};
}
public function get partialStart():Number{
return (this._partialStart);
}
protected function motionFinish(_arg1:TweenEvent):void{
var _local2:Event;
_local2 = new Event("defaultPatternFinish");
this.component.dispatchEvent(_local2);
}
}
}//package com.jumpeye.flashEff.text.defaultFade
Section 19
//FETHorizontalDisolve (com.jumpeye.flashEff.text.horizontalDisolve.FETHorizontalDisolve)
package com.jumpeye.flashEff.text.horizontalDisolve {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.text.*;
import fl.transitions.*;
import flash.filters.*;
import flash.utils.*;
import fl.transitions.easing.*;
import com.jumpeye.flashEff.text.patternsPresets.*;
import com.jumpeye.Events.*;
public class FETHorizontalDisolve extends MovieClip implements IFlashEffText {
private var _translateDurationPercent:Number;// = 70
private var _glowColor:Number;// = 0xFFFFFF
private var _alphaPercentage:Number;// = 100
private var i;
private var j:uint;
private var lin:uint;
private var _target:TextField;
protected var owner:Object;
private var _tweenType:String;// = "Regular"
private var _blurQuality:Number;// = 2
private var timeMatrix:Array;
private var lettersChanges;// = 20
private var presetObject:Object;
private var _tweenDuration:Number;// = 2
private var finalDuration:Number;
private var _maxBlurY:Number;// = 20
private var _selectedStrings:Array;
private var _groupDuration:Number;// = 1
private var _partialStart:Number;// = 50
private var percLet;// = 0.5
private var _partialGroup:String;// = "letters"
private var prop:Number;// = 0
private var _partialBlurAmount:Number;// = 0
protected var _component:IFlashEff;
private var objMatrix:Array;
private var _groupSize:Number;// = 7
private var _easeType:String;// = "easeOut"
private var _partialPercent:Number;// = 100
private var newDelay:Number;
private var bol:Boolean;
private var chars;
private var _glowAmount:Number;// = 5
private var _maxHorizontalSpace:Number;// = 50
private var tweensFinished:Number;// = 0
private var _preset:Number;
public function FETHorizontalDisolve(_arg1:IFlashEff=null){
_maxBlurY = 20;
_groupDuration = 1;
_blurQuality = 2;
_partialPercent = 100;
_partialBlurAmount = 0;
_partialStart = 50;
_glowAmount = 5;
_glowColor = 0xFFFFFF;
_tweenDuration = 2;
_maxHorizontalSpace = 50;
tweensFinished = 0;
_translateDurationPercent = 70;
lettersChanges = 20;
percLet = 0.5;
prop = 0;
_alphaPercentage = 100;
_groupSize = 7;
chars = ["A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "Q", "q", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "W", "w", "X", "x", "Y", "y", "Z", "z"];
_partialGroup = "letters";
_easeType = "easeOut";
_tweenType = "Regular";
super();
this.component = _arg1;
this.init();
}
public function set partialBlurAmount(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
this._partialBlurAmount = _arg1;
}
public function set component(_arg1:IFlashEff):void{
this._component = _arg1;
}
protected function getGlow(_arg1):BitmapFilter{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Number;
_local2 = this.glowColor;
_local3 = 1;
_local4 = _arg1;
_local5 = _arg1;
_local6 = (_arg1 / 2);
_local7 = false;
_local8 = false;
_local9 = BitmapFilterQuality.HIGH;
return (new GlowFilter(_local2, _local3, _local4, _local5, _local6, _local9, _local7, _local8));
}
public function get partialBlurAmount():Number{
return (this._partialBlurAmount);
}
protected function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function set tweenDuration(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
this._tweenDuration = _arg1;
}
public function get glowAmount():Number{
return (this._glowAmount);
}
public function get easeType():String{
return (this._easeType);
}
public function get tweenType():String{
return (this._tweenType);
}
protected function setLetters(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
clearInterval(owner[((("changeLetInt" + _arg2) + "_") + _arg3)]);
_local5 = (_arg4 / lettersChanges);
_arg1.clip.noChanges = 0;
_arg1.clip["changeInt"] = setInterval(setText, _local5, _arg1.clip);
}
public function set groupSize(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 7;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 100){
_arg1 = 100;
};
this._groupSize = ((Number(_arg1)) || (5));
}
public function set groupDuration(_arg1:Number):void{
if (_arg1 < 0.001){
_arg1 = 0.001;
};
this._groupDuration = ((Number(_arg1)) || (1));
}
protected function hdlChangeGlow(_arg1:TweenEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = _arg1.target.position;
_local3 = _arg1.target.obj;
_local4 = _local3.clip;
_local5 = _local3.i;
_local6 = _local3.j;
_local7 = _local4.filters;
_local8 = getGlow(_local2);
_local4.filters = [_local8];
}
public function set maxHorizontalSpace(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 100;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 500){
_arg1 = 500;
};
this._maxHorizontalSpace = ((Number(_arg1)) || (100));
}
public function set glowAmount(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 5;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 100){
_arg1 = 100;
};
this._glowAmount = ((Number(_arg1)) || (5));
}
public function set easeType(_arg1:String):void{
this._easeType = _arg1;
}
public function get alphaPercentage():Number{
return (this._alphaPercentage);
}
public function set tweenType(_arg1:String):void{
this._tweenType = _arg1;
}
protected function hdlYChange(_arg1:TweenEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1.target.obj;
_local3 = ((bol)==true) ? (_arg1.target.time < (_arg1.target.duration * percLet)) : (_arg1.target.time > (_arg1.target.duration * (1 - percLet)));
if (_local3){
_local4 = Math.round((Math.random() * (chars.length - 1)));
_local5 = chars[_local4];
_local2.textField.text = _local5;
_local2.textField.setTextFormat(_local2.txtForm);
} else {
if (_local2.isSetNormal == undefined){
stopChangingLetters(_local2);
};
};
}
public function remove():void{
this.clearProperties();
}
protected function setText(_arg1){
var _local2:*;
var _local3:*;
_local2 = Math.round((Math.random() * (chars.length - 1)));
_local3 = chars[_local2];
_arg1.textField.text = _local3;
_arg1.textField.setTextFormat(_arg1.txtForm);
_arg1.noChanges++;
if (_arg1.noChanges >= (lettersChanges / 2)){
stopChangingLetters(_arg1);
};
}
protected function stTween(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
clearInterval(owner[((("clipInterval" + _arg2) + "_") + _arg3)]);
_arg1.clip.finText = _arg1.clip.textField.text;
_arg1.clip.txtForm = _arg1.clip.textField.getTextFormat();
_local5 = ((bol)==true) ? 0 : ((owner.duration * (1 - (translateDurationPercent / 100))) * 1000);
_local6 = ((bol)==true) ? (((owner.duration * translateDurationPercent) / 100) * 1000) : 0;
owner[((("alphaInt" + _arg2) + "_") + _arg3)] = setInterval(setAlphaTween, _local5, _arg1, _arg2, _arg3);
owner[((("glowIntIn" + _arg2) + "_") + _arg3)] = setInterval(setGlowTweenIn, _local5, _arg1, _arg2, _arg3);
owner[((("posInt" + _arg2) + "_") + _arg3)] = setInterval(setPositionTween, _local5, _arg1, _arg2, _arg3);
owner[((("glowIntOut" + _arg2) + "_") + _arg3)] = setInterval(setGlowTweenOut, _local6, _arg1, _arg2, _arg3);
}
public function set partialStart(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > 100){
_arg1 = 100;
};
};
this._partialStart = _arg1;
}
public function set selectedStrings(_arg1:Array):void{
this._selectedStrings = _arg1;
}
protected function setGlowTweenIn(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
clearInterval(owner[((("glowIntIn" + _arg2) + "_") + _arg3)]);
_local4 = {};
_local4.clip = _arg1.clip;
_local4.i = _arg2;
_local4.j = _arg3;
_local5 = ((bol)==true) ? 0 : glowAmount;
_local6 = ((bol)==true) ? glowAmount : 0;
owner[((("tweenGlowIn" + _arg2) + "_") + _arg3)] = new Tween(_local4, "prop", None.easeNone, _local5, _local6, ((owner.duration * translateDurationPercent) / 100), true);
owner[((("tweenGlowIn" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_CHANGE, hdlChangeGlow);
if (bol == false){
owner[((("tweenGlowIn" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_FINISH, hdlFinishGlow);
};
}
public function get translateDurationPercent():Number{
return (this._translateDurationPercent);
}
public function get preset():Number{
return (this._preset);
}
public function get component():IFlashEff{
return (this._component);
}
public function set partialPercent(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > 100){
_arg1 = 100;
};
};
this._partialPercent = _arg1;
}
protected function init():void{
this.scaleX = 0;
this.scaleY = 0;
this.visible = false;
this.owner = {};
}
protected function setGlowTweenOut(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Number;
clearInterval(owner[((("glowIntOut" + _arg2) + "_") + _arg3)]);
_local4 = {};
_local4.clip = _arg1.clip;
_local4.i = _arg2;
_local4.j = _arg3;
_local5 = ((bol)==true) ? glowAmount : 0;
_local6 = ((bol)==true) ? 0 : glowAmount;
_local7 = (owner.duration * (1 - (translateDurationPercent / 100)));
owner[((("tweenGlowOut" + _arg2) + "_") + _arg3)] = new Tween(_local4, "prop", None.easeNone, _local5, _local6, (owner.duration * (1 - (translateDurationPercent / 100))), true);
owner[((("tweenGlowOut" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_CHANGE, hdlChangeGlow);
if (bol == true){
owner[((("tweenGlowOut" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_FINISH, hdlFinishGlow);
};
}
public function set partialGroup(_arg1:String):void{
this._partialGroup = _arg1;
}
public function show():void{
if (this.component != null){
this.startTransition(true);
};
}
public function get tweenDuration():Number{
return (this._tweenDuration);
}
public function set target(_arg1:TextField):void{
this._target = _arg1;
}
public function get groupDuration():Number{
return (this._groupDuration);
}
public function get groupSize():Number{
return (this._groupSize);
}
public function get maxHorizontalSpace():Number{
return (this._maxHorizontalSpace);
}
public function set alphaPercentage(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 100;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 100){
_arg1 = 100;
};
this._alphaPercentage = _arg1;
}
protected function hdlTextFinish(_arg1:TweenEvent){
var _local2:*;
_local2 = _arg1.target.obj.clip;
}
public function hide():void{
if (this.component != null){
this.startTransition(false);
};
}
protected function startTransition(_arg1:Boolean=true):void{
var _local2:*;
var _local3:uint;
var _local4:Object;
var _local5:*;
var _local6:*;
this.clearProperties();
bol = _arg1;
tweensFinished = 0;
this.component.drawTextTable("chars", this.partialGroup, this.partialPercent, this.selectedStrings, this.partialStart, this.partialBlurAmount);
objMatrix = this.component.absMatrix;
presetObject = JFERandomPreset.getPresetsArray(1, objMatrix, groupSize);
timeMatrix = presetObject.timeMatrix;
lin = objMatrix.length;
owner.elements = [];
owner.maxItems = presetObject.maxItems;
owner.tweensNumber = ((owner.maxItems)>1) ? objMatrix[0][0].parent.childs.length : 0;
owner.delay = ((tweenDuration - groupDuration) / Math.floor((owner.maxItems / groupSize)));
owner.delay = ((owner.delay)<0) ? 0 : owner.delay;
owner.duration = groupDuration;
_local2 = this.component.targetOwner.getBounds(this.component.targetOwner);
owner.initX = (_local2.x + (_local2.width / 2));
owner.elements = [];
i = 0;
while (i < lin) {
_local3 = objMatrix[i].length;
owner.elements[i] = [];
j = 0;
while (j < _local3) {
_local4 = (owner.elements[i][j] = {});
_local4.clip = objMatrix[i][j];
_local4.clip.alpha = ((bol)==true) ? 0 : 1;
_local4.tex = _local4.clip.textField.text;
_local4.clip.trueY = _local4.clip.x;
_local5 = ((bol)==true) ? (_local4.clip.x - randRange(-(maxHorizontalSpace), maxHorizontalSpace)) : _local4.clip.x;
_local4.clip.x = _local5;
_local6 = ((timeMatrix[i][j] * owner.delay) * 1000);
_local6 = (isNaN(_local6)) ? 0 : _local6;
owner[((("clipInterval" + i) + "_") + j)] = setInterval(stTween, _local6, _local4, i, j, timeMatrix[i][j]);
j++;
};
i++;
};
this.target.visible = false;
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_START));
}
protected function hdlYFinish(_arg1:TweenEvent){
}
public function get selectedStrings():Array{
return (this._selectedStrings);
}
public function get partialStart():Number{
return (this._partialStart);
}
protected function countTransitions(_arg1){
_arg1.target.obj.clip.filters = [];
tweensFinished++;
if (tweensFinished == owner.tweensNumber){
this.component.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
};
}
private function clearProperties():void{
var _local1:uint;
var _local2:*;
var _local3:uint;
var _local4:uint;
var _local5:Object;
if (owner.elements){
_local1 = owner.elements.length;
_local2 = 0;
while (_local2 < _local1) {
_local4 = owner.elements[_local2].length;
_local3 = 0;
while (_local3 < _local4) {
_local5 = owner.elements[_local2][_local3];
if (_local5.clip){
if (_local5.clip["changeInt"]){
clearInterval(_local5.clip["changeInt"]);
_local5.clip.filters = [];
};
};
if (owner[((("tweenAlpha" + _local2) + "_") + _local3)]){
owner[((("tweenAlpha" + _local2) + "_") + _local3)].stop();
};
if (owner[((("tweenY" + _local2) + "_") + _local3)]){
owner[((("tweenY" + _local2) + "_") + _local3)].stop();
};
if (owner[((("tweenGlowOut" + _local2) + "_") + _local3)]){
owner[((("tweenGlowOut" + _local2) + "_") + _local3)].stop();
};
if (owner[((("tweenGlowIn" + _local2) + "_") + _local3)]){
owner[((("tweenGlowIn" + _local2) + "_") + _local3)].stop();
};
if (owner[((("clipInterval" + _local2) + "_") + _local3)]){
clearInterval(owner[((("clipInterval" + _local2) + "_") + _local3)]);
};
if (owner[((("alphaInt" + _local2) + "_") + _local3)]){
clearInterval(owner[((("alphaInt" + _local2) + "_") + _local3)]);
};
if (owner[((("glowIntIn" + _local2) + "_") + _local3)]){
clearInterval(owner[((("glowIntIn" + _local2) + "_") + _local3)]);
};
if (owner[((("posInt" + _local2) + "_") + _local3)]){
clearInterval(owner[((("posInt" + _local2) + "_") + _local3)]);
};
if (owner[((("changeLetInt" + _local2) + "_") + _local3)]){
clearInterval(owner[((("changeLetInt" + _local2) + "_") + _local3)]);
};
if (owner[((("glowIntOut" + _local2) + "_") + _local3)]){
clearInterval(owner[((("glowIntOut" + _local2) + "_") + _local3)]);
};
_local3++;
};
_local2++;
};
};
}
public function get partialPercent():Number{
return (this._partialPercent);
}
protected function setPositionTween(_arg1, _arg2, _arg3){
var _local4:*;
clearInterval(owner[((("posInt" + _arg2) + "_") + _arg3)]);
_local4 = ((bol)==true) ? _arg1.clip.trueY : (_arg1.clip.x - randRange(-(maxHorizontalSpace), maxHorizontalSpace));
owner[((("tweenY" + _arg2) + "_") + _arg3)] = new Tween(_arg1.clip, "x", this.easeFunc, _arg1.clip.x, _local4, ((owner.duration * translateDurationPercent) / 100), true);
owner[((("tweenY" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_FINISH, hdlYFinish);
owner[((("tweenY" + _arg2) + "_") + _arg3)].addEventListener(TweenEvent.MOTION_CHANGE, hdlYChange);
}
public function get target():TextField{
return (this._target);
}
public function set glowColor(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 0xFFFFFF;
};
this._glowColor = ((Number(_arg1)) || (0xFFFFFF));
}
protected function setAlphaTween(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
clearInterval(owner[((("alphaInt" + _arg2) + "_") + _arg3)]);
_local4 = {};
_local4.clip = _arg1.clip;
_local4.i = _arg2;
_local4.j = _arg3;
_local5 = ((bol)==true) ? 0 : 1;
_local6 = ((bol)==true) ? 1 : 0;
owner[((("tweenAlpha" + _arg2) + "_") + _arg3)] = new Tween(_arg1.clip, "alpha", None.easeNone, _local5, _local6, ((owner.duration * translateDurationPercent) / 100), true);
}
public function get partialGroup():String{
return (this._partialGroup);
}
public function set preset(_arg1:Number):void{
this._preset = _arg1;
}
public function set translateDurationPercent(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_arg1 = 70;
};
if (_arg1 < 1){
_arg1 = 1;
};
if (_arg1 > 99){
_arg1 = 99;
};
this._translateDurationPercent = ((Number(_arg1)) || (70));
}
protected function hdlFinishGlow(_arg1:TweenEvent){
countTransitions(_arg1);
}
public function get easeFunc():Function{
var easeFunc:*;
try {
easeFunc = (getDefinitionByName(("fl.transitions.easing." + this.tweenType)) as Class);
return (easeFunc[this.easeType]);
} catch(e:ReferenceError) {
throw ("FlashEff WARNING: tween or ease type unknown");
return (null);
};
return (null);
}
public function get glowColor():Number{
return (this._glowColor);
}
protected function stopChangingLetters(_arg1){
_arg1.textField.text = _arg1.finText;
_arg1.textField.setTextFormat(_arg1.txtForm);
_arg1.isSetNormal = true;
}
}
}//package com.jumpeye.flashEff.text.horizontalDisolve
Section 20
//JFERandomPreset (com.jumpeye.flashEff.text.patternsPresets.JFERandomPreset)
package com.jumpeye.flashEff.text.patternsPresets {
public dynamic class JFERandomPreset {
public function JFERandomPreset():void{
}
public static function getPresetsArray(_arg1:uint, _arg2:Array, _arg3:uint=1, _arg4:Number=1):Object{
var _local5:*;
var _local6:int;
var _local7:Array;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:Number;
var _local12:uint;
var _local13:*;
var _local14:Array;
var _local15:Number;
var _local16:uint;
var _local17:*;
_local7 = [];
_local8 = _arg2.length;
_local10 = 0;
_local11 = 0;
_local12 = _arg3;
_local13 = [];
_local5 = 0;
while (_local5 < _local8) {
_local9 = _arg2[_local5].length;
_local6 = 0;
while (_local6 < _local9) {
_local11++;
_local6++;
};
_local5++;
};
_local10 = _local11;
_local9 = (_local10 / _local8);
switch (_arg1){
default:
_local16 = 0;
_local11 = 0;
_local6 = 0;
while (_local6 < _local10) {
if (_local16 == 0){
_local15 = Math.floor((_local6 / _local12));
};
_local13[_local6] = _local15;
_local16 = ((_local16)>=(_local12 - 1)) ? 0 : _local16 = (_local16 + 1);
_local16;
_local6++;
};
_local13 = JFERandomPreset.randomArray(_local13);
_local5 = 0;
while (_local5 < _local8) {
_local9 = _arg2[_local5].length;
_local7[_local5] = new Array();
_local6 = 0;
while (_local6 < _local9) {
_local7[_local5][_local6] = _local13[_local11];
_local11++;
_local6++;
};
_local5++;
};
break;
case 2:
_local16 = 0;
_local11 = 0;
_local5 = 0;
while (_local5 < _local8) {
_local9 = _arg2[_local5].length;
_local7[_local5] = new Array();
_local14 = [];
_local17 = 0;
while (_local17 < _local9) {
_local14[_local17] = _local17;
_local17++;
};
_local14 = JFERandomPreset.randomArray(_local14);
_local6 = 0;
while (_local6 < _local9) {
if (_local16 == 0){
_local15 = Math.floor((_local11 / _local12));
};
_local7[_local5][_local14[_local6]] = _local15;
_local16 = ((_local16)>=(_local12 - 1)) ? 0 : _local16 = (_local16 + 1);
_local16;
_local11++;
_local6++;
};
_local5++;
};
break;
};
return ({maxItems:_local10, timeMatrix:_local7});
}
public static function randomArray(_arg1):Array{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_local4 = Math.floor((Math.random() * _arg1.length));
_arg1[_local2] = _arg1[_local4];
_arg1[_local4] = _local3;
_local2++;
};
return (_arg1);
}
}
}//package com.jumpeye.flashEff.text.patternsPresets
Section 21
//FeChar (com.jumpeye.flashEff.text.FeChar)
package com.jumpeye.flashEff.text {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.text.*;
public dynamic class FeChar extends Sprite implements IFeChar {
private var _type:String;// = "FeChar"
private var _textField:TextField;
private var _bottomPosition:Number;
private var _id:Number;
private var _properties:Object;
private var _htmlText:String;// = ""
public function FeChar(_arg1:Number, _arg2:Number, _arg3:Object){
_type = "FeChar";
_htmlText = "";
super();
init();
this.text = ((_arg3.text) || (""));
this.id = _arg3.id;
this.x = _arg1;
this.y = _arg2;
this.properties = _arg3;
this.textField.embedFonts = true;
}
private function init(){
this.textField = new TextField();
this.textField.autoSize = TextFieldAutoSize.LEFT;
this.textField.selectable = false;
this.addChild(this.textField);
}
public function get id():Number{
return (this._id);
}
public function get text():String{
return (this.textField.text);
}
public function get properties():Object{
return (this._properties);
}
public function set id(_arg1:Number):void{
this._id = _arg1;
}
public function get type():String{
return (this._type);
}
public function set properties(_arg1:Object):void{
this._properties = _arg1;
}
public function set text(_arg1:String):void{
this.textField.text = _arg1;
_htmlText = _arg1;
}
public function get bottomPosition():Number{
return (_bottomPosition);
}
public function get htmlText():String{
return (_htmlText);
}
private function renewPositions(){
this.y = ((this.y + this.bottomPosition) - this.textField.getLineMetrics(0).ascent);
}
public function applyTextFormat(_arg1:TextFormat):void{
_arg1.leading = 0;
_arg1.leftMargin = 0;
_arg1.rightMargin = 0;
_arg1.letterSpacing = 0;
_arg1.indent = 0;
_arg1.blockIndent = 0;
this.textField.setTextFormat(_arg1);
this.renewPositions();
}
public function set textField(_arg1:TextField):void{
_textField = _arg1;
}
public function get textField():TextField{
return (_textField);
}
public function set bottomPosition(_arg1:Number):void{
_bottomPosition = _arg1;
}
public function set htmlText(_arg1:String):void{
this.textField.htmlText = _arg1;
_htmlText = _arg1;
}
}
}//package com.jumpeye.flashEff.text
Section 22
//FeGroup (com.jumpeye.flashEff.text.FeGroup)
package com.jumpeye.flashEff.text {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.utils.*;
public dynamic class FeGroup extends Sprite implements IFeGroup {
private var _text:String;
private var _type:String;// = "FeGroup"
private var _id:Number;
private var _properties:Object;
private var _childs:Array;
public function FeGroup(_arg1:Number, _arg2:Number, _arg3:Object){
_type = "FeGroup";
super();
init();
_childs = [];
this.x = ((_arg1) || (0));
this.y = ((_arg2) || (0));
this.text = _arg3.text;
this.id = _arg3.id;
this.properties = _arg3;
}
private function init(){
}
public function get id():Number{
return (this._id);
}
public function pushChild(_arg1:Object):Object{
var className:String;
var classInstance:Class;
var child:*;
var arg = _arg1;
className = arg.type;
try {
classInstance = (getDefinitionByName(("com.jumpeye.flashEff.text." + className)) as Class);
child = new classInstance(arg.x, arg.y, arg);
this.addChild(child);
this._childs.push(child);
} catch(e) {
throw (e);
};
return (child);
}
public function get text():String{
return (this._text);
}
public function get properties():Object{
return (this._properties);
}
public function set id(_arg1:Number):void{
this._id = _arg1;
}
public function get type():String{
return (this._type);
}
public function removeChildAtIndex(_arg1:uint):Object{
this.removeChildAt(_arg1);
return (this._childs.splice(_arg1, 1)[0]);
}
public function set properties(_arg1:Object):void{
this._properties = _arg1;
}
public function set text(_arg1:String):void{
this._text = _arg1;
}
public function removeChilds():void{
var _local1:uint;
var _local2:uint;
_local1 = this._childs.length;
_local2 = 0;
while (_local2 < _local1) {
if (this._childs[_local2].type == "FeGroup"){
this._childs[_local2].removeChilds();
};
this.removeChild(this._childs[_local2]);
_local2++;
};
this._childs = [];
}
public function set childs(_arg1:Array):void{
var len:uint;
var i:uint;
var className:String;
var classInstance:Class;
var child:*;
var arg = _arg1;
len = arg.length;
i = 0;
while (i < len) {
className = arg[i].type;
try {
classInstance = (getDefinitionByName(("com.jumpeye.flashEff.text." + className)) as Class);
child = new classInstance(arg[i].x, arg[i].y, arg[i]);
this.addChild(child);
this._childs.push(arg);
} catch(e) {
throw (e);
};
i = (i + 1);
};
}
public function cleanMe():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < this._childs.length) {
_local2 = this._childs[_local1];
if (_local2.type != "FeChar"){
_local2.cleanMe();
};
if (_local2.numChildren == 0){
this.removeChildAtIndex(_local1);
} else {
_local1++;
};
};
}
public function get childs():Array{
return (this._childs);
}
}
}//package com.jumpeye.flashEff.text
Section 23
//FeTable (com.jumpeye.flashEff.text.FeTable)
package com.jumpeye.flashEff.text {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.utils.*;
public class FeTable extends Sprite implements IFeTable {
private var tempGroup:FeGroup;
private var _type:String;// = "FeTable"
private var tempChar:FeChar;
private var _childs:Array;
public function FeTable(){
_type = "FeTable";
super();
init();
_childs = [];
}
private function init(){
}
public function pushChild(_arg1:Object):Object{
var className:String;
var classInstance:Class;
var child:*;
var arg = _arg1;
className = arg.type;
try {
classInstance = (getDefinitionByName(("com.jumpeye.flashEff.text." + className)) as Class);
child = new classInstance(arg.x, arg.y, arg);
this.addChild(child);
this._childs.push(child);
} catch(e) {
throw (e);
};
return (child);
}
public function get type():String{
return (this._type);
}
public function removeChildAtIndex(_arg1:uint):Object{
this.removeChildAt(_arg1);
return (this._childs.splice(_arg1, 1)[0]);
}
public function removeChilds():void{
var _local1:uint;
var _local2:uint;
_local1 = this._childs.length;
_local2 = 0;
while (_local2 < _local1) {
if (this._childs[_local2].type == "FeGroup"){
this._childs[_local2].removeChilds();
};
this.removeChild(this._childs[_local2]);
_local2++;
};
this._childs = [];
}
public function set childs(_arg1:Array):void{
var _local2:uint;
var _local3:uint;
_local2 = _arg1.length;
this._childs = [];
_local3 = 0;
while (_local3 < _local2) {
this.pushChild(_arg1[_local3]);
_local3++;
};
}
public function cleanMe():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < this._childs.length) {
_local2 = this._childs[_local1];
if (_local2.type != "FeChar"){
_local2.cleanMe();
};
if (_local2.numChildren == 0){
this.removeChildAtIndex(_local1);
} else {
_local1++;
};
};
}
public function get childs():Array{
return (_childs);
}
}
}//package com.jumpeye.flashEff.text
Section 24
//JWavesEffect (com.jumpeye.flashEff.utils.wavesEffect.JWavesEffect)
package com.jumpeye.flashEff.utils.wavesEffect {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
public class JWavesEffect extends Sprite {
public var bitmap:BitmapData;
private var map:Bitmap;
private var offsetPoints:Array;
private var target;
public var decrInterval:Number;
private var blurQuality:Number;
public var baseX;
public var baseY;
private var bounds:Object;
private var __value;// = 0
public var fractalNoiseVal;
private var hig:Number;
public var intervalId;
public var blurX;
public var blurY;
private var wid;
public function JWavesEffect(_arg1, _arg2:Boolean, _arg3:Number, _arg4:Number=0, _arg5:Number=0){
__value = 0;
super();
blurQuality = _arg3;
this.target = _arg1;
this.map = new Bitmap();
this.map.smoothing = _arg2;
this.addChild(map);
this.baseX = ((baseX) || (100));
this.baseY = ((baseY) || (100));
this.blurX = ((blurX) || (0));
this.blurY = ((blurY) || (0));
this.fractalNoiseVal = ((fractalNoiseVal) || (true));
this.offsetPoints = new Array();
this.offsetPoints[0] = new Point();
this.wid = ((_arg4)==0) ? _arg1.width : _arg4;
this.hig = ((_arg5)==0) ? _arg1.height : _arg5;
this.wid = ((this.wid)>2880) ? 2880 : this.wid;
this.hig = ((this.hig)>2880) ? 2880 : this.hig;
this.bitmap = new BitmapData((this.wid + 2), (this.hig + 2), true, 0);
}
public function get value():Number{
return (__value);
}
private function setEffect():void{
var _local1:Array;
this.initFilters(value);
_local1 = this.target.filters;
this.offsetPoints[0].x = this.value;
this.offsetPoints[0].y = this.value;
this.bitmap.perlinNoise(this.baseX, this.baseY, 2, 100, true, this.fractalNoiseVal, 7, true, this.offsetPoints);
_local1[0].mapBitmap = this.bitmap;
this.target.filters = _local1;
map.bitmapData = bitmap;
}
private function getDisplacement(_arg1):BitmapFilter{
var _local2:Point;
var _local3:DisplacementMapFilter;
_local2 = new Point(0, 0);
_local3 = new DisplacementMapFilter(this.bitmap, _local2, 1, 1, (_arg1 / 3), (_arg1 / 3), "color");
return (_local3);
}
private function initFilters(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:Array;
_local2 = getDisplacement(_arg1);
_local3 = getBlur(0);
_local4 = [];
_local4.push(_local2);
_local4.push(_local3);
target.filters = [_local2];
}
private function getBlur(_arg1):BitmapFilter{
var _local2:Number;
var _local3:Number;
_local2 = _arg1;
_local3 = _arg1;
return (new BlurFilter(_local2, _local3, blurQuality));
}
public function set value(_arg1:Number):void{
__value = _arg1;
this.setEffect();
}
}
}//package com.jumpeye.flashEff.utils.wavesEffect
Section 25
//JInstantiateClass (com.jumpeye.utils.JInstantiateClass)
package com.jumpeye.utils {
import fl.transitions.easing.*;
public class JInstantiateClass {
public function JInstantiateClass(){
init();
}
function init(){
var _local1:*;
_local1 = new Back();
_local1 = new Bounce();
_local1 = new Elastic();
_local1 = new None();
_local1 = new Regular();
_local1 = new Strong();
}
public static function initClasses(){
var _local1:*;
_local1 = new Back();
_local1 = new Bounce();
_local1 = new Elastic();
_local1 = new None();
_local1 = new Regular();
_local1 = new Strong();
}
}
}//package com.jumpeye.utils
Section 26
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(_arg1:Event):void{
var _local2:String;
var _local3:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
_local2 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package CPMStar
Section 27
//AdUnit_22 (DesertRifle_fla.AdUnit_22)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import CPMStar.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class AdUnit_22 extends MovieClip {
public var Served:Boolean;
public var adBox:MovieClip;
public function AdUnit_22(){
addFrameScript(0, frame1);
}
public function destroy(){
trace("AdUnit->destroy");
if (adBox){
if (glo.bal.flcAd == "mochiadsca"){
MochiAd.unload(adBox);
};
removeChild(adBox);
adBox = null;
};
}
public function cpmStar(){
var CPMStarContentSpotID:String;
var ad:DisplayObject;
trace("AdUnit->cpmStar");
CPMStarContentSpotID = "301Q43EA3418";
try {
ad = new AdLoader(CPMStarContentSpotID);
adBox.addChild(ad);
} catch(e:Error) {
trace("AdUnit->cpmStar loading error ...");
};
}
public function customAdError(_arg1:Event){
trace("Error loading custom ad ...");
}
function frame1(){
stop();
glo.bal.AdUnit = this;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (((!(Served)) && (!((glo.bal.flcAd == ""))))){
serveAd();
};
Served = false;
}
public function customAd(){
var adLoader:Loader;
trace(("AdUnit->customAd : " + glo.bal.flcAdUrl));
try {
adLoader = new Loader();
adLoader.contentLoaderInfo.addEventListener("ioError", customAdError);
adLoader.load(new URLRequest(glo.bal.flcAdUrl));
adBox.addChild(adLoader);
} catch(e:Error) {
trace("AdUnit->customAd loading error ...");
};
}
public function mochiAds(){
trace("AdUnit->mochiAds pre-game");
try {
MochiAd.showPreGameAd({clip:root, id:"87dd73d955110503", res:"700x500"});
} catch(e:Error) {
trace("AdUnit->mochiAds loading error ...");
};
}
public function serveAd(){
Served = true;
trace(("AdUnit->serveAd : " + glo.bal.flcAd));
switch (glo.bal.flcAd){
case "mochiads":
mochiAds();
break;
case "mochiadsca":
mochiAdsClickAway();
break;
case "cpmstar":
cpmStar();
break;
case "custom":
customAd();
break;
default:
cpmStar();
break;
};
}
public function mochiAdsClickAway(){
trace("AdUnit->mochiAds click-away");
try {
MochiAd.showClickAwayAd({clip:adBox, id:"87dd73d955110503"});
} catch(e:Error) {
trace("AdUnit->mochiAds loading error ...");
};
}
}
}//package DesertRifle_fla
Section 28
//aim_221 (DesertRifle_fla.aim_221)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class aim_221 extends MovieClip {
public var dot_mc:MovieClip;
public var DotSize:Number;
public var bg_mc:MovieClip;
public function aim_221(){
addFrameScript(0, frame1);
}
public function setWeapon(_arg1:Number){
if (WEAPON == _arg1){
return;
};
WEAPON = _arg1;
switch (WEAPON){
case 1:
RMIN = 2;
RMAX = 8;
DR = 1;
DotSize = 4;
break;
case 2:
RMIN = 2;
RMAX = 18;
DR = 2;
DotSize = 10;
break;
case 3:
RMIN = 2;
RMAX = 8;
DR = 1;
DotSize = 4;
break;
case 4:
RMIN = 2;
RMAX = 3;
DR = 1;
DotSize = 4;
break;
};
bg_mc.scaleX = (RMAX / 5);
bg_mc.scaleY = (RMAX / 5);
dot_mc.scaleX = (DotSize / 20);
dot_mc.scaleY = (DotSize / 20);
}
function frame1(){
stop();
this.mouseEnabled = false;
glo.bal.Aim = this;
WEAPON = 0;
setWeapon(1);
RSPEED = ((Math.PI * 2) / (3 * 16));
A = 0;
R = 2;
DotSize = 4;
}
public function nextState(){
A = (A + RSPEED);
if (A > (Math.PI * 2)){
A = (A - (Math.PI * 2));
};
R = ((R - DR) + ((Math.random() * DR) * 2));
R = (R / glo.bal.CGAME.PRECISION);
if (R > RMAX){
R = RMAX;
};
if (R < RMIN){
R = RMIN;
};
dot_mc.x = Math.round((Math.cos(A) * R));
dot_mc.y = Math.round((Math.sin(A) * R));
}
public function getAimLoc(){
PT = new Point(0, 0);
PT = dot_mc.localToGlobal(PT);
return ({x:PT.x, y:PT.y});
}
public function getAimDot():MovieClip{
return (dot_mc);
}
}
}//package DesertRifle_fla
Section 29
//ammo_189 (DesertRifle_fla.ammo_189)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class ammo_189 extends MovieClip {
public var reload2_mc:MovieClip;
public var reload_mc:MovieClip;
public var WEAPONINDEX:Number;
public var LOADED:Number;
public var ammo_txt:TextField;
public var infinite_mc:MovieClip;
public var chamber_mc:MovieClip;
public var changeweapon_mc:MovieClip;
public function ammo_189(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
public function setWeapon(_arg1:Number){
if (WEAPONINDEX == _arg1){
return;
};
WEAPONINDEX = _arg1;
gotoAndStop((WEAPONINDEX + 1));
if (WEAPONINDEX == 1){
ammo_txt.visible = false;
infinite_mc.visible = true;
} else {
ammo_txt.visible = true;
infinite_mc.visible = false;
};
}
public function setAmmo(_arg1:Number, _arg2:Number, _arg3:Number){
if (_arg2 > 0){
reload_mc.visible = false;
reload2_mc.visible = false;
changeweapon_mc.visible = false;
} else {
reload_mc.visible = true;
if (_arg3 > 0){
reload2_mc.visible = true;
} else {
changeweapon_mc.visible = true;
};
};
CARTRIDGES = _arg1;
LOADED = _arg2;
if (chamber_mc){
chamber_mc.reset();
};
ammo_txt.text = (_arg3 + "X");
}
function frame3(){
stop();
chamber_mc.reset();
}
function frame6(){
stop();
chamber_mc.reset();
}
function frame7(){
stop();
chamber_mc.reset();
}
function frame1(){
glo.bal.AMMO = this;
ammo_txt.antiAliasType = "advanced";
ammo_txt.embedFonts = true;
ammo_txt.setTextFormat(glo.bal.FORMAT04);
WEAPONINDEX = 0;
LOADED = 0;
}
function frame4(){
stop();
chamber_mc.reset();
}
function frame5(){
stop();
chamber_mc.reset();
}
function frame2(){
stop();
chamber_mc.reset();
}
public function reloading(){
reload_mc.visible = false;
reload2_mc.visible = false;
changeweapon_mc.visible = false;
}
}
}//package DesertRifle_fla
Section 30
//availableBombs_333 (DesertRifle_fla.availableBombs_333)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class availableBombs_333 extends MovieClip {
public var bombs_txt:TextField;
public function availableBombs_333(){
addFrameScript(0, frame1);
}
public function refreshABombs(){
bombs_txt.text = String((glo.bal.CGAME.A_BOMBS + glo.bal.CGAME.BOMBS.length));
}
function frame1(){
stop();
bombs_txt.antiAliasType = "advanced";
bombs_txt.embedFonts = true;
bombs_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 31
//availableWeight_319 (DesertRifle_fla.availableWeight_319)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class availableWeight_319 extends MovieClip {
public var weight_txt:TextField;
public function availableWeight_319(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
weight_txt.antiAliasType = "advanced";
weight_txt.embedFonts = true;
weight_txt.setTextFormat(glo.bal.FORMAT04);
}
public function resetWeight(){
weight_txt.text = String(glo.bal.CGAME.AWEIGHT);
}
}
}//package DesertRifle_fla
Section 32
//availableXP_268 (DesertRifle_fla.availableXP_268)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class availableXP_268 extends MovieClip {
public var xp_txt:TextField;
public function availableXP_268(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
xp_txt.antiAliasType = "advanced";
xp_txt.embedFonts = true;
xp_txt.setTextFormat(glo.bal.FORMAT04);
}
public function resetXP(){
xp_txt.text = (String(glo.bal.CGAME.XP) + " points");
}
}
}//package DesertRifle_fla
Section 33
//bar_17 (DesertRifle_fla.bar_17)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bar_17 extends MovieClip {
public function bar_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 34
//bar_206 (DesertRifle_fla.bar_206)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bar_206 extends MovieClip {
public function bar_206(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package DesertRifle_fla
Section 35
//bar_341 (DesertRifle_fla.bar_341)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bar_341 extends MovieClip {
public function bar_341(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package DesertRifle_fla
Section 36
//blood_57 (DesertRifle_fla.blood_57)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class blood_57 extends MovieClip {
public var blood_mc:MovieClip;
public function blood_57(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
}
function frame2(){
blood_mc.gotoAndPlay(2);
}
function frame30(){
stop();
}
}
}//package DesertRifle_fla
Section 37
//bloodsequence_58 (DesertRifle_fla.bloodsequence_58)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bloodsequence_58 extends MovieClip {
public function bloodsequence_58(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package DesertRifle_fla
Section 38
//body_109 (DesertRifle_fla.body_109)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class body_109 extends MovieClip {
public var dieB_mc:MovieClip;
public var expB_mc:MovieClip;
public var runL_mc:MovieClip;
public var SHOOTINGCOUNT:Number;
public var MC:MovieClip;
public var wait_mc:MovieClip;
public var runR_mc:MovieClip;
public var shoot_mc:MovieClip;
public var hit_mc:MovieClip;
public var run_mc:MovieClip;
public var expF_mc:MovieClip;
public var dieA_mc:MovieClip;
public function body_109(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
}
function frame9(){
MC = dieB_mc;
}
public function setBody(_arg1:Number){
gotoAndStop(_arg1);
}
public function shoot(_arg1:Number){
SHOOTINGCOUNT = _arg1;
setBody(6);
}
public function runLeft(){
setBody(5);
}
function frame10(){
MC = expB_mc;
}
function frame12(){
MC = wait_mc;
}
public function runRight(){
setBody(4);
}
function frame7(){
MC = hit_mc;
}
function frame1(){
stop();
}
function frame6(){
MC = shoot_mc;
}
public function wait(){
setBody(12);
}
public function runFront(){
setBody(3);
}
public function explodeBack(){
setBody(10);
}
function frame4(){
MC = runR_mc;
}
function frame5(){
MC = runL_mc;
}
public function setBody2(_arg1:MovieClip, _arg2:Boolean, _arg3:Number){
MC.stop();
MC.visible = false;
MC = _arg1;
MC.visible = true;
if (_arg2){
MC.gotoAndPlay(_arg3);
};
}
public function hit(){
setBody(7);
}
function frame3(){
MC = run_mc;
}
function frame11(){
MC = expF_mc;
}
function frame8(){
MC = dieA_mc;
}
public function dieA(){
setBody(8);
}
public function walk(){
setBody(2);
}
public function explodeFront(){
setBody(11);
}
public function dieB(){
setBody(9);
}
}
}//package DesertRifle_fla
Section 39
//body_43 (DesertRifle_fla.body_43)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class body_43 extends MovieClip {
public var dieB_mc:MovieClip;
public var expB_mc:MovieClip;
public var runL_mc:MovieClip;
public var SHOOTINGCOUNT:Number;
public var MC:MovieClip;
public var wait_mc:MovieClip;
public var runR_mc:MovieClip;
public var shoot_mc:MovieClip;
public var hit_mc:MovieClip;
public var run_mc:MovieClip;
public var expF_mc:MovieClip;
public var dieA_mc:MovieClip;
public function body_43(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
}
function frame9(){
MC = dieB_mc;
}
public function setBody(_arg1:Number){
gotoAndStop(_arg1);
}
public function shoot(_arg1:Number){
SHOOTINGCOUNT = _arg1;
setBody(6);
}
public function runLeft(){
setBody(5);
}
function frame10(){
MC = expB_mc;
}
function frame12(){
MC = wait_mc;
}
public function runRight(){
setBody(4);
}
function frame7(){
MC = hit_mc;
}
function frame1(){
stop();
}
function frame6(){
MC = shoot_mc;
}
public function wait(){
setBody(12);
}
public function runFront(){
setBody(3);
}
public function explodeBack(){
setBody(10);
}
function frame4(){
MC = runR_mc;
}
function frame5(){
MC = runL_mc;
}
public function setBody2(_arg1:MovieClip, _arg2:Boolean, _arg3:Number){
MC.stop();
MC.visible = false;
MC = _arg1;
MC.visible = true;
if (_arg2){
MC.gotoAndPlay(_arg3);
};
}
public function hit(){
setBody(7);
}
function frame3(){
MC = run_mc;
}
function frame11(){
MC = expF_mc;
}
function frame8(){
MC = dieA_mc;
}
public function dieA(){
setBody(8);
}
public function walk(){
setBody(2);
}
public function explodeFront(){
setBody(11);
}
public function dieB(){
setBody(9);
}
}
}//package DesertRifle_fla
Section 40
//body_96 (DesertRifle_fla.body_96)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class body_96 extends MovieClip {
public var dieB_mc:MovieClip;
public var expB_mc:MovieClip;
public var runL_mc:MovieClip;
public var SHOOTINGCOUNT:Number;
public var MC:MovieClip;
public var wait_mc:MovieClip;
public var runR_mc:MovieClip;
public var shoot_mc:MovieClip;
public var hit_mc:MovieClip;
public var run_mc:MovieClip;
public var expF_mc:MovieClip;
public var dieA_mc:MovieClip;
public function body_96(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
}
function frame9(){
MC = dieB_mc;
}
public function setBody(_arg1:Number){
gotoAndStop(_arg1);
}
public function shoot(_arg1:Number){
SHOOTINGCOUNT = _arg1;
setBody(6);
}
public function runLeft(){
setBody(5);
}
function frame10(){
MC = expB_mc;
}
function frame12(){
MC = wait_mc;
}
public function runRight(){
setBody(4);
}
function frame7(){
MC = hit_mc;
}
function frame1(){
stop();
}
function frame6(){
MC = shoot_mc;
}
public function wait(){
setBody(12);
}
public function runFront(){
setBody(3);
}
public function explodeBack(){
setBody(10);
}
function frame4(){
MC = runR_mc;
}
function frame5(){
MC = runL_mc;
}
public function setBody2(_arg1:MovieClip, _arg2:Boolean, _arg3:Number){
MC.stop();
MC.visible = false;
MC = _arg1;
MC.visible = true;
if (_arg2){
MC.gotoAndPlay(_arg3);
};
}
public function hit(){
setBody(7);
}
function frame3(){
MC = run_mc;
}
function frame11(){
MC = expF_mc;
}
function frame8(){
MC = dieA_mc;
}
public function dieA(){
setBody(8);
}
public function walk(){
setBody(2);
}
public function explodeFront(){
setBody(11);
}
public function dieB(){
setBody(9);
}
}
}//package DesertRifle_fla
Section 41
//bodymoves_169 (DesertRifle_fla.bodymoves_169)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bodymoves_169 extends MovieClip {
public var CLIPS:Array;
public var C:MovieClip;
public var rifle_mc:MovieClip;
public var pistol_mc:MovieClip;
public var shotgun_mc:MovieClip;
public var MC:MovieClip;
public var sniper_mc:MovieClip;
public function bodymoves_169(){
addFrameScript(0, frame1);
}
public function shotgun(){
setBody(shotgun_mc, false, 1);
}
public function setBody(_arg1:MovieClip, _arg2:Boolean=false, _arg3:Number=1){
if (MC){
MC.stop();
MC.visible = false;
};
MC = _arg1;
MC.visible = true;
if (_arg2){
MC.gotoAndPlay(_arg3);
};
parent.FIREFX = MC.fire_mc;
}
function frame1(){
stop();
CLIPS = [pistol_mc, shotgun_mc, rifle_mc, sniper_mc];
for each (C in CLIPS) {
C.UNIT = parent;
C.stop();
C.visible = false;
};
MC = pistol_mc;
MC.visible = true;
setBody(pistol_mc);
}
public function pistol(){
setBody(pistol_mc, false, 1);
}
public function rifle(){
setBody(rifle_mc, false, 1);
}
public function sniper(){
setBody(sniper_mc, false, 1);
}
}
}//package DesertRifle_fla
Section 42
//bomb_card_324 (DesertRifle_fla.bomb_card_324)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bomb_card_324 extends MovieClip {
public var cost_txt:TextField;
public var title_txt:TextField;
public var order_btn:SimpleButton;
public var COST:Number;
public var stock_txt:TextField;
public function bomb_card_324(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
COST = 15;
stock_txt.antiAliasType = "advanced";
stock_txt.embedFonts = true;
stock_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.antiAliasType = "advanced";
title_txt.embedFonts = true;
title_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.text = "LAND MINE";
cost_txt.antiAliasType = "advanced";
cost_txt.embedFonts = true;
cost_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.text = ("Cost : " + String(COST));
order_btn.addEventListener("click", btnBuy);
}
public function btnBuy(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.CGAME.A_BOMBS++;
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT - COST);
parent.refreshAllCards();
}
public function refreshCard(){
COST = 15;
stock_txt.text = (String((glo.bal.CGAME.A_BOMBS + glo.bal.CGAME.BOMBS.length)) + " in stock");
if ((((glo.bal.CGAME.AWEIGHT >= COST)) && (((glo.bal.CGAME.A_BOMBS + glo.bal.CGAME.BOMBS.length) < 5)))){
order_btn.visible = true;
} else {
order_btn.visible = false;
};
}
}
}//package DesertRifle_fla
Section 43
//bombsButtons_233 (DesertRifle_fla.bombsButtons_233)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bombsButtons_233 extends MovieClip {
public var BUTTONSLAYER:MovieClip;
public var BUTTONS:Array;
public var BOMBSREMOVE:Array;
public var tempArray:Array;
public var tempArray2:Array;
public function bombsButtons_233(){
addFrameScript(0, frame1);
}
public function destroy(){
var _local1:MovieClip;
var _local2:Number;
var _local3:Boolean;
var _local4:*;
_local3 = false;
while (BOMBSREMOVE.length > 0) {
_local2 = BOMBSREMOVE.shift();
_local1 = BUTTONS[_local2];
BUTTONS[_local2] = null;
if (_local1){
BUTTONSLAYER.removeChild(_local1);
};
_local3 = true;
};
if (_local3){
tempArray = [];
tempArray2 = [];
_local4 = 0;
while (_local4 < BUTTONS.length) {
if (BUTTONS[_local4] != null){
tempArray.push(BUTTONS[_local4]);
tempArray2.push(glo.bal.CGAME.BOMBS[_local4]);
};
_local4++;
};
BUTTONS = tempArray;
glo.bal.CGAME.BOMBS = tempArray2;
};
}
public function removeBombFromArray(_arg1:Number){
var _local2:MovieClip;
_local2 = BUTTONS[_arg1];
BUTTONS.splice(_arg1, 1);
if (_local2){
BUTTONSLAYER.removeChild(_local2);
};
}
public function createInitialBombs(){
var _local1:*;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < BUTTONS.length) {
removeBombFromArray(_local1);
_local1++;
};
BUTTONS = [];
cleanBtnsLayer();
_local1 = 0;
while (_local1 < glo.bal.CGAME.BOMBS.length) {
_local2 = new bombbutton();
BUTTONSLAYER.addChild(_local2);
BUTTONS.push(_local2);
_local2.x = (_local1 * 100);
_local2.y = 0;
_local2.visible = false;
_local1++;
};
}
public function recreateBombs(){
var _local1:Array;
var _local2:*;
var _local3:MovieClip;
while (BOMBSREMOVE.length > 0) {
bombToRInd = BOMBSREMOVE.shift();
glo.bal.CGAME.BOMBS[bombToRInd] = null;
};
_local1 = [];
_local2 = 0;
while (_local2 < glo.bal.CGAME.BOMBS.length) {
if (glo.bal.CGAME.BOMBS[_local2] != null){
_local1.push(glo.bal.CGAME.BOMBS[_local2]);
};
_local2++;
};
glo.bal.CGAME.BOMBS = _local1;
BUTTONS = [];
cleanBtnsLayer();
_local2 = 0;
while (_local2 < glo.bal.CGAME.BOMBS.length) {
_local3 = new bombbutton();
BUTTONSLAYER.addChild(_local3);
BUTTONS.push(_local3);
_local3.x = (_local2 * 100);
_local3.y = 0;
_local3.visible = false;
_local2++;
};
}
function frame1(){
stop();
glo.bal.BOMBBUTTONS = this;
BUTTONS = [];
BOMBSREMOVE = [];
tempArray = [];
tempArray2 = [];
}
public function removeBomb(_arg1:Number){
BOMBSREMOVE.push(_arg1);
}
public function cleanBtnsLayer(){
var _local1:Array;
var _local2:Number;
var _local3:*;
_local1 = [];
_local2 = BUTTONSLAYER.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local1.push(BUTTONSLAYER.getChildAt(_local3));
_local3++;
};
_local3 = 0;
while (_local3 < _local2) {
BUTTONSLAYER.removeChild(_local1[_local3]);
_local3++;
};
}
public function explode(_arg1:Number){
if (glo.bal.CGAME.BOMBS.length <= _arg1){
removeBomb(_arg1);
return;
};
glo.bal.PLAYER.explodeBomb(_arg1);
}
public function refreshBombs(_arg1:Array){
var _local2:MovieClip;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
if (!glo.bal.INTERFACE.ALIVE){
return;
};
_local4 = false;
if (BOMBSREMOVE.length > 0){
recreateBombs();
};
i = 0;
while (i < BUTTONS.length) {
_local2 = BUTTONS[i];
_local2.x = (i * 100);
_local2.y = 0;
if (glo.bal.INTERFACE.ALIVE){
_local2.setBomb(i, _arg1[i], glo.bal.CGAME.BOMBS[i][2]);
};
_local2.visible = true;
i++;
};
}
}
}//package DesertRifle_fla
Section 44
//bonusnotice_217 (DesertRifle_fla.bonusnotice_217)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bonusnotice_217 extends MovieClip {
public var text_mc:MovieClip;
public function bonusnotice_217(){
addFrameScript(0, frame1, 68, frame69);
}
public function cleanShot(){
this.visible = true;
text_mc.caption_txt.text = "CLEAN SHOT";
gotoAndPlay(2);
}
public function bonus(_arg1:Number){
this.visible = true;
text_mc.caption_txt.text = (_arg1 + " CLEAN SHOTS IN A ROW");
gotoAndPlay(2);
}
function frame1(){
stop();
this.visible = false;
glo.bal.BONUSNOTICE = this;
}
public function longRangeCleanShot(){
this.visible = true;
text_mc.caption_txt.text = "LONG RANGE CLEAN SHOT";
gotoAndPlay(2);
}
function frame69(){
stop();
this.visible = false;
}
}
}//package DesertRifle_fla
Section 45
//bubble_logo3_125 (DesertRifle_fla.bubble_logo3_125)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bubble_logo3_125 extends MovieClip {
public function bubble_logo3_125(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 46
//BubbleBoxLogoGraphicMc_127 (DesertRifle_fla.BubbleBoxLogoGraphicMc_127)
package DesertRifle_fla {
import flash.display.*;
public dynamic class BubbleBoxLogoGraphicMc_127 extends MovieClip {
public var play_latest_text:MovieClip;
}
}//package DesertRifle_fla
Section 47
//BubbleBoxSplash_123 (DesertRifle_fla.BubbleBoxSplash_123)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class BubbleBoxSplash_123 extends MovieClip {
public var play_latest_text:MovieClip;
public var link_btn:SimpleButton;
public function BubbleBoxSplash_123(){
addFrameScript(0, frame1, 169, frame170);
}
function frame170(){
stop();
parent.gotoAndStop("splash2");
}
function frame1(){
link_btn.addEventListener("click", btnBubbleBox);
}
public function btnBubbleBox(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_BUBBLEBOX_SPLASH, "_blank");
} catch(err:Error) {
};
}
}
}//package DesertRifle_fla
Section 48
//carshooterABody_62 (DesertRifle_fla.carshooterABody_62)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class carshooterABody_62 extends MovieClip {
public var right_mc:MovieClip;
public var CURMC:MovieClip;
public var left_mc:MovieClip;
public var expRight_mc:MovieClip;
public var expLeft_mc:MovieClip;
public function carshooterABody_62(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function resumePlay(){
if (CURMC){
CURMC.play();
};
}
public function showRight(){
gotoAndStop(3);
}
public function stopPlay(){
if (CURMC){
CURMC.stop();
};
}
function frame3(){
CURMC = right_mc;
}
function frame1(){
stop();
}
function frame4(){
CURMC = expLeft_mc;
}
function frame5(){
CURMC = expRight_mc;
}
function frame2(){
CURMC = left_mc;
}
public function explodeLeft(){
gotoAndStop(4);
}
public function stopShooting(){
CURMC.stopShooting();
}
public function die1(){
CURMC.die1();
}
public function showLeft(){
gotoAndStop(2);
}
public function die2(){
CURMC.die2();
}
public function explodeRight(){
gotoAndStop(5);
}
public function startShooting(){
CURMC.startShooting();
}
}
}//package DesertRifle_fla
Section 49
//carshooterAexplosion_73 (DesertRifle_fla.carshooterAexplosion_73)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class carshooterAexplosion_73 extends MovieClip {
public var d7_mc:MovieClip;
public var SpeedY:Array;
public var SpeedX:Array;
public var d2_mc:MovieClip;
public var d5_mc:MovieClip;
public var fCount:Number;
public var G:Number;
public var Pieces:Array;
public var d3_mc:MovieClip;
public var d6_mc:MovieClip;
public var d1_mc:MovieClip;
public var d4_mc:MovieClip;
public function carshooterAexplosion_73(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
G = 1;
Pieces = [d1_mc, d2_mc, d3_mc, d4_mc, d5_mc, d6_mc, d7_mc];
SpeedX = [0, 0, 0, 0, 0, 0, 0];
SpeedY = [0, 0, 0, 0, 0, 0, 0];
fCount = 0;
explode();
this.addEventListener("enterFrame", nextState);
}
public function nextState(_arg1:Object=null){
var _local2:MovieClip;
for each (_local2 in Pieces) {
_local2.speedY = (_local2.speedY + G);
if (_local2.y <= _local2.startY){
_local2.x = (_local2.x + _local2.speedX);
_local2.y = (_local2.y + _local2.speedY);
if (_local2.speedX > 0){
_local2.rotation = (_local2.rotation + 3);
} else {
_local2.rotation = (_local2.rotation - 3);
};
};
};
}
public function explode(){
var _local1:MovieClip;
var _local2:*;
var _local3:Number;
trace("Explosion->explode");
fCount = 0;
for each (_local1 in Pieces) {
_local2 = (1 + Math.round((Math.random() * 3)));
_local3 = (-15 - Math.round((Math.random() * 15)));
if (Math.random() > 0.5){
_local2 = -(_local2);
};
_local1.speedX = _local2;
_local1.speedY = _local3;
_local1.startY = (_local1.y + 70);
};
}
}
}//package DesertRifle_fla
Section 50
//carshooterAleft_63 (DesertRifle_fla.carshooterAleft_63)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class carshooterAleft_63 extends MovieClip {
public var turret_mc:MovieClip;
public var wheels_mc:MovieClip;
public var hull_mc:MovieClip;
public function carshooterAleft_63(){
addFrameScript(0, frame1, 3, frame4, 5, frame6, 7, frame8, 9, frame10, 11, frame12, 13, frame14, 14, frame15, 29, frame30, 31, frame32, 33, frame34, 35, frame36, 37, frame38, 39, frame40, 40, frame41);
}
function frame10(){
parent.parent.fire();
}
function frame14(){
parent.parent.fire();
}
function frame12(){
parent.parent.fire();
}
function frame6(){
parent.parent.fire();
}
function frame1(){
stop();
}
function frame4(){
parent.parent.fire();
}
function frame8(){
parent.parent.fire();
}
function frame30(){
parent.parent.fire();
}
function frame34(){
parent.parent.fire();
}
function frame15(){
parent.parent.HITHERO = false;
}
function frame38(){
parent.parent.fire();
}
public function stopShooting(){
this.gotoAndStop(2);
}
function frame36(){
parent.parent.fire();
}
function frame40(){
parent.parent.fire();
}
public function die1(){
hull_mc.gotoAndPlay(2);
}
public function die2(){
turret_mc.gotoAndPlay(2);
}
function frame41(){
gotoAndPlay(15);
}
function frame32(){
parent.parent.fire();
}
public function startShooting(){
this.gotoAndPlay(3);
}
}
}//package DesertRifle_fla
Section 51
//carshooterAright_72 (DesertRifle_fla.carshooterAright_72)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class carshooterAright_72 extends MovieClip {
public var turret_mc:MovieClip;
public var wheels_mc:MovieClip;
public var hull_mc:MovieClip;
public function carshooterAright_72(){
addFrameScript(0, frame1, 2, frame3, 4, frame5, 6, frame7, 8, frame9, 10, frame11, 12, frame13, 14, frame15, 29, frame30, 31, frame32, 33, frame34, 35, frame36, 37, frame38, 39, frame40, 40, frame41);
}
function frame3(){
parent.parent.fire();
}
function frame15(){
parent.parent.HITHERO = false;
}
function frame7(){
parent.parent.fire();
}
function frame1(){
stop();
}
function frame13(){
parent.parent.fire();
}
function frame5(){
parent.parent.fire();
}
function frame9(){
parent.parent.fire();
}
function frame30(){
parent.parent.fire();
}
function frame34(){
parent.parent.fire();
}
function frame36(){
parent.parent.fire();
}
function frame38(){
parent.parent.fire();
}
public function stopShooting(){
this.gotoAndStop(2);
}
function frame11(){
parent.parent.fire();
}
function frame40(){
parent.parent.fire();
}
public function die1(){
hull_mc.gotoAndPlay(2);
}
public function die2(){
turret_mc.gotoAndPlay(2);
}
function frame41(){
gotoAndPlay(15);
}
function frame32(){
parent.parent.fire();
}
public function startShooting(){
this.gotoAndPlay(3);
}
}
}//package DesertRifle_fla
Section 52
//chamberpistol_194 (DesertRifle_fla.chamberpistol_194)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class chamberpistol_194 extends MovieClip {
public function chamberpistol_194(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
reset();
}
public function reset(){
gotoAndStop(((1 + 18) - parent.LOADED));
}
}
}//package DesertRifle_fla
Section 53
//chamberrifle_198 (DesertRifle_fla.chamberrifle_198)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class chamberrifle_198 extends MovieClip {
public function chamberrifle_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
reset();
}
public function reset(){
gotoAndStop(((1 + 60) - parent.LOADED));
}
}
}//package DesertRifle_fla
Section 54
//chambershotgun_196 (DesertRifle_fla.chambershotgun_196)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class chambershotgun_196 extends MovieClip {
public function chambershotgun_196(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
reset();
}
public function reset(){
gotoAndStop(((1 + 8) - parent.LOADED));
}
}
}//package DesertRifle_fla
Section 55
//chambersniper_200 (DesertRifle_fla.chambersniper_200)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class chambersniper_200 extends MovieClip {
public function chambersniper_200(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
reset();
}
public function reset(){
gotoAndStop(((1 + 10) - parent.LOADED));
}
}
}//package DesertRifle_fla
Section 56
//changeweaponwarning_192 (DesertRifle_fla.changeweaponwarning_192)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class changeweaponwarning_192 extends MovieClip {
public var warning_txt:TextField;
public function changeweaponwarning_192(){
addFrameScript(0, frame1);
}
function frame1(){
warning_txt.antiAliasType = "advanced";
warning_txt.embedFonts = true;
warning_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 57
//clicktoplay_346 (DesertRifle_fla.clicktoplay_346)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class clicktoplay_346 extends MovieClip {
public var click_txt:TextField;
public function clicktoplay_346(){
addFrameScript(0, frame1);
}
function frame1(){
click_txt.antiAliasType = "advanced";
click_txt.embedFonts = true;
click_txt.setTextFormat(glo.bal.FORMAT04);
click_txt.defaultTextFormat = glo.bal.FORMAT04;
}
}
}//package DesertRifle_fla
Section 58
//clock_225 (DesertRifle_fla.clock_225)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class clock_225 extends MovieClip {
public var pie_mask_mc:MovieClip;
public function clock_225(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function update(_arg1:Number){
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 100){
_arg1 = 100;
};
F = (361 - Math.round((_arg1 * 3.6)));
pie_mask_mc.gotoAndStop(F);
}
}
}//package DesertRifle_fla
Section 59
//damagetext_60 (DesertRifle_fla.damagetext_60)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class damagetext_60 extends MovieClip {
public var damage_txt:TextField;
public function damagetext_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
damage_txt.antiAliasType = "advanced";
damage_txt.embedFonts = true;
damage_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 60
//damagevisual_59 (DesertRifle_fla.damagevisual_59)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class damagevisual_59 extends MovieClip {
public var damage_mc:MovieClip;
public function damagevisual_59(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
}
public function damage(_arg1:Number){
if (_arg1 > 10){
damage_mc.damage_txt.textColor = 0xFF0000;
} else {
damage_mc.damage_txt.textColor = 0xFF6600;
};
damage_mc.damage_txt.text = Math.floor(_arg1);
gotoAndPlay(3);
}
function frame2(){
stop();
}
}
}//package DesertRifle_fla
Section 61
//dieA_103 (DesertRifle_fla.dieA_103)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieA_103 extends MovieClip {
public function dieA_103(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package DesertRifle_fla
Section 62
//dieA_115 (DesertRifle_fla.dieA_115)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieA_115 extends MovieClip {
public function dieA_115(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package DesertRifle_fla
Section 63
//dieA_52 (DesertRifle_fla.dieA_52)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieA_52 extends MovieClip {
public function dieA_52(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package DesertRifle_fla
Section 64
//dieB_104 (DesertRifle_fla.dieB_104)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieB_104 extends MovieClip {
public function dieB_104(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package DesertRifle_fla
Section 65
//dieB_116 (DesertRifle_fla.dieB_116)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieB_116 extends MovieClip {
public function dieB_116(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package DesertRifle_fla
Section 66
//dieB_53 (DesertRifle_fla.dieB_53)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dieB_53 extends MovieClip {
public function dieB_53(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package DesertRifle_fla
Section 67
//diecardriveranim_121 (DesertRifle_fla.diecardriveranim_121)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class diecardriveranim_121 extends MovieClip {
public function diecardriveranim_121(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package DesertRifle_fla
Section 68
//diePoint_71 (DesertRifle_fla.diePoint_71)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class diePoint_71 extends MovieClip {
public function diePoint_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
parent.parent.DIEPT = this;
}
}
}//package DesertRifle_fla
Section 69
//dotcomalpha_136 (DesertRifle_fla.dotcomalpha_136)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dotcomalpha_136 extends MovieClip {
public var dotcom_mc:MovieClip;
public function dotcomalpha_136(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package DesertRifle_fla
Section 70
//dotcomw_137 (DesertRifle_fla.dotcomw_137)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class dotcomw_137 extends MovieClip {
public var qigames_btn:SimpleButton;
public function dotcomw_137(){
addFrameScript(0, frame1, 109, frame110);
}
function frame1(){
qigames_btn.addEventListener("click", btnQiGames);
}
function frame110(){
stop();
}
public function btnQiGames(_arg1:Event){
var e = _arg1;
try {
glo.bal.JUKEBOX.btnClick();
navigateToURL(glo.bal.URLREQ_QIGAMES, "_blank");
} catch(err:Error) {
};
}
}
}//package DesertRifle_fla
Section 71
//expB_105 (DesertRifle_fla.expB_105)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expB_105 extends MovieClip {
public function expB_105(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 72
//expB_117 (DesertRifle_fla.expB_117)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expB_117 extends MovieClip {
public function expB_117(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 73
//expB_54 (DesertRifle_fla.expB_54)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expB_54 extends MovieClip {
public function expB_54(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 74
//expF_106 (DesertRifle_fla.expF_106)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expF_106 extends MovieClip {
public function expF_106(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 75
//expF_118 (DesertRifle_fla.expF_118)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expF_118 extends MovieClip {
public function expF_118(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 76
//expF_55 (DesertRifle_fla.expF_55)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class expF_55 extends MovieClip {
public function expF_55(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 77
//finalstorytext_315 (DesertRifle_fla.finalstorytext_315)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class finalstorytext_315 extends MovieClip {
public var ACTIVE:Boolean;
public var LineIndex:Number;
public var t2:TextField;
public var t3:TextField;
public var t1:TextField;
public var t5:TextField;
public var complete_btn:SimpleButton;
public var t4:TextField;
public var menu_btn:SimpleButton;
public var FIELDS:Array;
public var INDEX:Number;
public var FrameCount:Number;
public var TEXTS:Array;
public function finalstorytext_315(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
menu_btn.addEventListener("click", btnMenu);
}
public function reset(){
var _local1:Number;
var _local2:TextField;
_local1 = 0;
while (_local1 < FIELDS.length) {
_local2 = FIELDS[_local1];
TEXTS.push(_local2.text);
_local2.text = "";
_local1++;
};
INDEX = -1;
}
public function nextState(_arg1:Object=null){
var _local2:TextField;
var _local3:String;
if (INDEX >= FIELDS.length){
ACTIVE = false;
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
gotoAndStop(3);
};
if (!ACTIVE){
return;
};
FrameCount++;
if ((FrameCount % 1) == 0){
LineIndex++;
_local2 = FIELDS[INDEX];
_local3 = TEXTS[INDEX];
_local2.multiline = true;
_local2.text = _local3.substring(0, LineIndex);
if (LineIndex >= _local3.length){
nextLine();
};
};
}
function frame1(){
stop();
}
public function nextLine(_arg1:Object=null){
INDEX++;
ACTIVE = true;
LineIndex = -1;
FrameCount = 0;
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.typewriter();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.signal();
}
public function btnComplete(_arg1:Event){
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.btnClick();
ACTIVE = false;
gotoAndStop(3);
}
public function btnMenu(_arg1:Event){
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.btnClick();
parent.gotomenu();
ACTIVE = false;
gotoAndStop(1);
}
function frame2(){
stop();
FIELDS = [t1, t2, t3, t4, t5];
TEXTS = [];
INDEX = -1;
ACTIVE = false;
LineIndex = -1;
FrameCount = 0;
reset();
nextLine();
complete_btn.addEventListener("click", btnComplete);
this.addEventListener("enterFrame", nextState);
}
}
}//package DesertRifle_fla
Section 78
//finalstoryui_314 (DesertRifle_fla.finalstoryui_314)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class finalstoryui_314 extends MovieClip {
public var ff_component:TvFuzzEffectAS3;
public var dummy_mc:MovieClip;
public var text_mc:MovieClip;
public function finalstoryui_314(){
addFrameScript(14, frame15, 29, frame30);
}
public function onComplete(_arg1:Event){
text_mc.gotoAndStop(2);
ff_component.removeFilter();
ff_component = null;
}
function frame15(){
stop();
switchToText();
}
public function gotomenu(){
this.gotoAndPlay(16);
}
function frame30(){
stop();
glo.bal.GAMEMENU.gotoAndStop("menu");
}
public function switchToText(){
ff_component = new TvFuzzEffectAS3();
ff_component.init(dummy_mc, text_mc, 40, 1);
ff_component.x = 34;
ff_component.y = 40;
addChild(ff_component);
ff_component.addEventListener(TvFuzzEffectAS3.ANIMATION_DONE, onComplete);
ff_component.mouseEnabled = false;
glo.bal.JUKEBOX.sfxnoise();
}
}
}//package DesertRifle_fla
Section 79
//firefinisher_178 (DesertRifle_fla.firefinisher_178)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class firefinisher_178 extends MovieClip {
public function firefinisher_178(){
addFrameScript(0, frame1, 13, frame14);
}
public function fire(){
gotoAndPlay(2);
}
function frame14(){
stop();
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 80
//firehellrazor_171 (DesertRifle_fla.firehellrazor_171)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class firehellrazor_171 extends MovieClip {
public function firehellrazor_171(){
addFrameScript(0, frame1, 13, frame14);
}
public function fire(){
gotoAndPlay(2);
}
function frame14(){
stop();
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 81
//firesurvivor_181 (DesertRifle_fla.firesurvivor_181)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class firesurvivor_181 extends MovieClip {
public function firesurvivor_181(){
addFrameScript(0, frame1, 13, frame14);
}
public function fire(){
gotoAndPlay(2);
}
function frame14(){
stop();
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 82
//firetec_175 (DesertRifle_fla.firetec_175)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class firetec_175 extends MovieClip {
public var flash_mc:MovieClip;
public function firetec_175(){
addFrameScript(0, frame1, 4, frame5);
}
public function fire(){
flash_mc.visible = true;
gotoAndPlay(2);
}
public function stopFire(){
flash_mc.visible = false;
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame5(){
gotoAndPlay(2);
}
}
}//package DesertRifle_fla
Section 83
//fpsmonitor_154 (DesertRifle_fla.fpsmonitor_154)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class fpsmonitor_154 extends MovieClip {
public var fps_txt:TextField;
public var memory_txt:TextField;
public var qigames_btn:SimpleButton;
public function fpsmonitor_154(){
addFrameScript(0, frame1, 1, frame2, 16, frame17);
}
public function setLowQuality(){
if (stage.quality == StageQuality.LOW){
return;
};
PREFERRED = "LOW";
stage.quality = StageQuality.LOW;
reset();
}
public function setHighQuality(){
if (stage.quality == StageQuality.HIGH){
return;
};
PREFERRED = StageQuality.HIGH;
stage.quality = PREFERRED;
reset();
}
public function monitor(){
}
public function reset(){
TS = [];
}
function frame17(){
gotoAndPlay(2);
}
function frame1(){
fps_txt.text = "--- fps";
PREFERRED = StageQuality.HIGH;
stage.quality = PREFERRED;
reset();
trace(("FPS Monitor : initial quality : " + PREFERRED));
TS = [getTimer()];
qigames_btn.addEventListener("click", btnQiGames);
}
function frame2(){
TS.push(getTimer());
if (TS.length > 5){
D = 0;
i = 5;
while (i > 0) {
D = (D + (TS[i] - TS[(i - 1)]));
i--;
};
D = (D * 0.2);
if (D == 0){
D = 1;
trace("d=0 !?");
};
FPS = ((glo.bal.FrameRate * 1000) / D);
fps_txt.text = (Math.round(FPS) + "fps");
if (FPS < 10){
fps_txt.textColor = 0xFF0000;
} else {
fps_txt.textColor = 0xFFFFFF;
};
TS.shift();
monitor();
} else {
fps_txt.text = "--- fps";
fps_txt.textColor = 0xFFFFFF;
};
RAM = Math.round((System.totalMemory / (0x0400 * 0x0400)));
memory_txt.text = (numbers.format(RAM) + " Mb RAM");
}
public function setMediumQuality(){
if (stage.quality == StageQuality.MEDIUM){
return;
};
PREFERRED = StageQuality.MEDIUM;
stage.quality = PREFERRED;
reset();
}
public function btnQiGames(_arg1:Event){
var e = _arg1;
try {
glo.bal.JUKEBOX.btnClick();
navigateToURL(glo.bal.URLREQ_QIGAMES, "_blank");
} catch(err:Error) {
trace("Open QiGames URL ...");
};
}
}
}//package DesertRifle_fla
Section 84
//fx_81 (DesertRifle_fla.fx_81)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class fx_81 extends MovieClip {
public function fx_81(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package DesertRifle_fla
Section 85
//GameAction_157 (DesertRifle_fla.GameAction_157)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class GameAction_157 extends MovieClip {
public function GameAction_157(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 86
//GameMenu_156 (DesertRifle_fla.GameMenu_156)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class GameMenu_156 extends MovieClip {
public var FADECOUNT:Number;
public function GameMenu_156(){
addFrameScript(0, frame1, 1, frame2, 39, frame40, 49, frame50, 59, frame60);
}
public function fadeOut(){
FADECOUNT = 0;
addEventListener(Event.ENTER_FRAME, evtFadeOut);
}
public function gotoPlay(){
gotoAndStop("play");
}
public function gotoHelp(){
gotoAndStop("help");
}
public function gotoMenu(){
gotoAndStop("menu");
}
public function gotoStory(){
gotoAndStop("story");
}
function frame1(){
glo.bal.GAMEMENU = this;
Mouse.show();
FADECOUNT = 0;
}
public function backFromInstructions(){
gotoMenu();
}
public function gotoLoadGame(){
gotoAndStop("load game");
}
public function evtFadeIn(_arg1:Event=null){
FADECOUNT++;
this.alpha = Math.min(1, (FADECOUNT / 30));
if (FADECOUNT > 40){
removeEventListener(Event.ENTER_FRAME, evtFadeIn);
};
}
function frame2(){
stop();
Mouse.show();
try {
System.gc();
} catch(e:Error) {
};
glo.bal.JukeBox.menuScore();
}
function frame40(){
glo.bal.JukeBox.storyScore();
Mouse.show();
}
public function gotoDifficulty(){
gotoAndStop("difficulty");
}
public function fadeIn(){
FADECOUNT = 0;
addEventListener(Event.ENTER_FRAME, evtFadeIn);
}
public function gotoNewGame(){
gotoAndStop("new game");
}
public function evtFadeOut(_arg1:Event=null){
FADECOUNT++;
this.alpha = Math.max(0, (1 - (FADECOUNT / 30)));
if (FADECOUNT > 40){
removeEventListener(Event.ENTER_FRAME, evtFadeOut);
};
}
function frame50(){
Mouse.show();
glo.bal.JukeBox.menuScore();
}
function frame60(){
Mouse.show();
}
}
}//package DesertRifle_fla
Section 87
//gamePausedUi_248 (DesertRifle_fla.gamePausedUi_248)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class gamePausedUi_248 extends MovieClip {
public var howtoplay_mc:MovieClip;
public var help_btn:SimpleButton;
public var resume_btn:SimpleButton;
public var quit_btn:SimpleButton;
public var label_txt:TextField;
public function gamePausedUi_248(){
addFrameScript(0, frame1);
}
public function activate(){
this.visible = true;
}
function frame1(){
stop();
this.visible = false;
glo.bal.PAUSEMENU = this;
howtoplay_mc.visible = false;
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
resume_btn.addEventListener("click", btnResume);
quit_btn.addEventListener("click", btnQuit);
help_btn.addEventListener("click", btnHelp);
}
public function backFromInstructions(){
howtoplay_mc.visible = false;
quit_btn.visible = true;
resume_btn.visible = true;
help_btn.visible = true;
label_txt.visible = true;
}
public function deactivate(){
this.visible = false;
glo.bal.INTERFACE.resumePlay();
}
public function btnResume(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
deactivate();
}
public function btnHelp(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
howtoplay_mc.visible = true;
quit_btn.visible = false;
resume_btn.visible = false;
help_btn.visible = false;
label_txt.visible = false;
}
public function btnQuit(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
deactivate();
glo.bal.PLAYER.quit();
}
}
}//package DesertRifle_fla
Section 88
//glassHole_166 (DesertRifle_fla.glassHole_166)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class glassHole_166 extends MovieClip {
public function glassHole_166(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package DesertRifle_fla
Section 89
//guns_205 (DesertRifle_fla.guns_205)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class guns_205 extends MovieClip {
public function guns_205(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 90
//health_209 (DesertRifle_fla.health_209)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class health_209 extends MovieClip {
public var XP_PCT;
public var health_txt:TextField;
public var xp_bar_mc:MovieClip;
public var XP_TXT;
public var XP_DISPLAYPCT;
public var health_bar_mc:MovieClip;
public var xp_txt:TextField;
public var PCT;
public var DISPLAYPCT;
public function health_209(){
addFrameScript(0, frame1, 1, frame2);
}
public function init(){
PCT = 100;
DISPLAYPCT = 0;
XP_PCT = 0;
XP_DISPLAYPCT = 0;
XP_TXT = "";
}
public function levelUp(){
gotoAndStop(3);
}
public function backToNormal(){
gotoAndStop(2);
}
function frame1(){
glo.bal.HEALTHBAR = this;
glo.bal.XPBAR = this;
glo.bal.BARS = this;
PCT = 100;
DISPLAYPCT = 0;
XP_PCT = 0;
XP_DISPLAYPCT = 0;
XP_TXT = "";
}
public function setHealth(_arg1:Number, _arg2:Number){
PCT = Math.round(((100 * _arg1) / _arg2));
if (health_txt){
health_txt.text = ((Math.round(_arg1) + " / ") + _arg2);
};
}
public function nextState(){
if (PCT != DISPLAYPCT){
if (DISPLAYPCT > PCT){
DISPLAYPCT = (DISPLAYPCT - 1);
health_bar_mc.setPct(Math.round(DISPLAYPCT));
};
if (DISPLAYPCT < PCT){
DISPLAYPCT = (DISPLAYPCT + 1);
health_bar_mc.setPct(Math.round(DISPLAYPCT));
};
};
if (XP_PCT != XP_DISPLAYPCT){
if (XP_DISPLAYPCT > XP_PCT){
XP_DISPLAYPCT = (XP_DISPLAYPCT - 1);
xp_bar_mc.setPct(Math.round(XP_DISPLAYPCT));
};
if (XP_DISPLAYPCT < XP_PCT){
XP_DISPLAYPCT = (XP_DISPLAYPCT + 1);
xp_bar_mc.setPct(Math.round(XP_DISPLAYPCT));
};
};
}
public function setLevel(_arg1:Number){
}
function frame2(){
stop();
xp_txt.text = XP_TXT;
}
public function setXP(_arg1:Number, _arg2:Number, _arg3:Number){
XP_PCT = Math.round(((100 * (_arg1 - _arg2)) / (_arg3 - _arg2)));
XP_TXT = ((_arg1 + " / ") + _arg3);
if (xp_txt != null){
xp_txt.text = XP_TXT;
};
}
}
}//package DesertRifle_fla
Section 91
//healthbartween_210 (DesertRifle_fla.healthbartween_210)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class healthbartween_210 extends MovieClip {
public function healthbartween_210(){
addFrameScript(0, frame1);
}
public function setPct(_arg1:Number){
if (_arg1 > 100){
_arg1 = 100;
};
if (_arg1 < 0){
_arg1 = 0;
};
F = (1 + Math.round(((_arg1 * 0.01) * 99)));
gotoAndStop(F);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 92
//heroHitFx_164 (DesertRifle_fla.heroHitFx_164)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class heroHitFx_164 extends MovieClip {
public var COUNT:Number;
public function heroHitFx_164(){
addFrameScript(0, frame1, 3, frame4, 20, frame21);
}
public function showSplatter(){
COUNT++;
if (this.currentFrame < 3){
gotoAndPlay(3);
};
}
function frame1(){
stop();
COUNT = 0;
glo.bal.HEROHIT = this;
}
function frame4(){
COUNT--;
trace(("COUNT " + COUNT));
if (COUNT > 0){
gotoAndPlay(3);
};
}
function frame21(){
gotoAndStop(2);
}
}
}//package DesertRifle_fla
Section 93
//heroHitFx2_167 (DesertRifle_fla.heroHitFx2_167)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class heroHitFx2_167 extends MovieClip {
public var COUNT:Number;
public function heroHitFx2_167(){
addFrameScript(0, frame1, 3, frame4, 20, frame21);
}
public function showSplatter(){
COUNT++;
if (this.currentFrame < 3){
gotoAndPlay(3);
};
}
function frame1(){
stop();
COUNT = 0;
glo.bal.HEROHIT2 = this;
}
function frame4(){
COUNT--;
if (COUNT > 0){
gotoAndPlay(3);
};
}
function frame21(){
gotoAndStop(2);
}
}
}//package DesertRifle_fla
Section 94
//hidingPanel_162 (DesertRifle_fla.hidingPanel_162)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hidingPanel_162 extends MovieClip {
public function hidingPanel_162(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
public function hideHidingPanel(){
gotoAndPlay(16);
}
function frame15(){
stop();
}
function frame1(){
stop();
glo.bal.HIDINGPANEL = this;
}
function frame25(){
stop();
}
public function showHidingPanel(){
gotoAndPlay(5);
}
}
}//package DesertRifle_fla
Section 95
//hit_102 (DesertRifle_fla.hit_102)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hit_102 extends MovieClip {
public function hit_102(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
parent.parent.backFromHit();
}
}
}//package DesertRifle_fla
Section 96
//hit_114 (DesertRifle_fla.hit_114)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hit_114 extends MovieClip {
public function hit_114(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
parent.parent.backFromHit();
}
}
}//package DesertRifle_fla
Section 97
//hit_51 (DesertRifle_fla.hit_51)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hit_51 extends MovieClip {
public function hit_51(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
parent.parent.backFromHit();
}
}
}//package DesertRifle_fla
Section 98
//hitzone_45 (DesertRifle_fla.hitzone_45)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_45 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_CHEST = this;
}
}
}//package DesertRifle_fla
Section 99
//hitzone_46 (DesertRifle_fla.hitzone_46)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_46 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_HEAD = this;
}
}
}//package DesertRifle_fla
Section 100
//hitzone_47 (DesertRifle_fla.hitzone_47)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_47 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_LEGS = this;
}
}
}//package DesertRifle_fla
Section 101
//hitzone_67 (DesertRifle_fla.hitzone_67)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_67 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_HEAD1 = this;
}
}
}//package DesertRifle_fla
Section 102
//hitzone_68 (DesertRifle_fla.hitzone_68)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_68 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_HEAD2 = this;
}
}
}//package DesertRifle_fla
Section 103
//hitzone_69 (DesertRifle_fla.hitzone_69)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_69 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_69(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_CHEST1 = this;
}
}
}//package DesertRifle_fla
Section 104
//hitzone_70 (DesertRifle_fla.hitzone_70)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_70 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_CHEST2 = this;
}
}
}//package DesertRifle_fla
Section 105
//hitzone_94 (DesertRifle_fla.hitzone_94)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_94 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent;
Parent.HZ_CHEST = this;
}
}
}//package DesertRifle_fla
Section 106
//hitzone_98 (DesertRifle_fla.hitzone_98)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hitzone_98 extends MovieClip {
public var Parent:MovieClip;
public function hitzone_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Parent = parent.parent.parent;
Parent.HZ_NECK = this;
}
}
}//package DesertRifle_fla
Section 107
//howtoplayui_255 (DesertRifle_fla.howtoplayui_255)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class howtoplayui_255 extends MovieClip {
public var LABELS:Array;
public var label7_txt:TextField;
public var label10_txt:TextField;
public var i;
public var label0_txt:TextField;
public var label4_txt:TextField;
public var label8_txt:TextField;
public var label2_txt:TextField;
public var ok_btn:SimpleButton;
public var label6_txt:TextField;
public var label1_txt:TextField;
public var label5_txt:TextField;
public var label9_txt:TextField;
public var label3_txt:TextField;
public function howtoplayui_255(){
addFrameScript(0, frame1);
}
public function btnOk(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
parent.backFromInstructions();
}
function frame1(){
stop();
LABELS = [label0_txt, label1_txt, label2_txt, label3_txt, label4_txt, label5_txt, label6_txt, label7_txt, label8_txt, label9_txt, label10_txt];
i = 0;
while (i < LABELS.length) {
LABELS[i].antiAliasType = "advanced";
LABELS[i].embedFonts = true;
LABELS[i].setTextFormat(glo.bal.FORMAT04);
i++;
};
ok_btn.addEventListener("click", btnOk);
}
}
}//package DesertRifle_fla
Section 108
//hull_64 (DesertRifle_fla.hull_64)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class hull_64 extends MovieClip {
public var blood_mc:MovieClip;
public function hull_64(){
addFrameScript(0, frame1, 1, frame2, 15, frame16);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
function frame2(){
blood_mc.gotoAndPlay(2);
}
}
}//package DesertRifle_fla
Section 109
//interaction_219 (DesertRifle_fla.interaction_219)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class interaction_219 extends MovieClip {
public var COLOR:String;
public var bg:MovieClip;
public var MSG:String;
public var label1_txt:TextField;
public function interaction_219(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21);
}
public function activate(_arg1:String, _arg2:String=null){
visible = true;
MSG = _arg1;
COLOR = _arg2;
gotoAndPlay(3);
}
function frame3(){
label1_txt.text = MSG;
switch (COLOR){
case "green":
bg.gotoAndStop(1);
break;
case "red":
bg.gotoAndStop(2);
break;
case "blue":
bg.gotoAndStop(3);
break;
case "yellow":
bg.gotoAndStop(4);
break;
case "orange":
bg.gotoAndStop(5);
break;
default:
bg.gotoAndStop(1);
break;
};
}
function frame1(){
stop();
glo.bal.INTERACTION = this;
visible = false;
MSG = "";
}
public function deactivate(){
visible = false;
gotoAndStop(2);
}
function frame21(){
gotoAndPlay(3);
}
function frame2(){
stop();
}
}
}//package DesertRifle_fla
Section 110
//interactionbg_220 (DesertRifle_fla.interactionbg_220)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class interactionbg_220 extends MovieClip {
public function interactionbg_220(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 111
//intro_128 (DesertRifle_fla.intro_128)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class intro_128 extends MovieClip {
public function intro_128(){
addFrameScript(129, frame130);
}
function frame130(){
stop();
parent.gotoAndStop("game");
}
}
}//package DesertRifle_fla
Section 112
//kamikazeBody_84 (DesertRifle_fla.kamikazeBody_84)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class kamikazeBody_84 extends MovieClip {
public var wheels_mc:MovieClip;
public var hull_mc:MovieClip;
public function kamikazeBody_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 113
//kamikazeexplosion_88 (DesertRifle_fla.kamikazeexplosion_88)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class kamikazeexplosion_88 extends MovieClip {
public var SpeedY:Array;
public var SpeedX:Array;
public var d2_mc:MovieClip;
public var fCount:Number;
public var G:Number;
public var Fire:Array;
public var Pieces:Array;
public var d3_mc:MovieClip;
public var fire1:MovieClip;
public var fire3:MovieClip;
public var fire4:MovieClip;
public var fire2:MovieClip;
public var d1_mc:MovieClip;
public var d4_mc:MovieClip;
public function kamikazeexplosion_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
G = 1;
Pieces = [d1_mc, d2_mc, d3_mc, d4_mc];
Fire = [fire1, fire2, fire3, fire4];
SpeedX = [0, 0, 0, 0, 0];
SpeedY = [0, 0, 0, 0, 0];
fCount = 0;
d1_mc.firefx = fire1;
d2_mc.firefx = fire2;
d3_mc.firefx = fire3;
d4_mc.firefx = fire4;
explode();
}
public function nextState(_arg1:Number, _arg2:Number){
var _local3:MovieClip;
for each (_local3 in Pieces) {
_local3.speedY = (_local3.speedY + G);
if (_local3.y <= _local3.startY){
_local3.x = (_local3.x + _local3.speedX);
_local3.y = (_local3.y + _local3.speedY);
_local3.firefx.x = (_local3.firefx.x + _local3.speedX);
_local3.firefx.y = (_local3.firefx.y + _local3.speedY);
if (_local3.speedX > 0){
_local3.rotation = (_local3.rotation + 3);
} else {
_local3.rotation = (_local3.rotation - 3);
};
};
};
}
public function explode(){
var _local1:MovieClip;
var _local2:*;
var _local3:Number;
trace("Explosion->explode");
fCount = 0;
for each (_local1 in Pieces) {
_local2 = (1 + Math.round((Math.random() * 3)));
_local3 = (-15 - Math.round((Math.random() * 15)));
if (Math.random() > 0.5){
_local2 = -(_local2);
};
_local1.speedX = _local2;
_local1.speedY = _local3;
_local1.startY = (_local1.y + 70);
};
glo.bal.GAME.animation(this, 60, nextState);
}
}
}//package DesertRifle_fla
Section 114
//leftToPlaceBombs_334 (DesertRifle_fla.leftToPlaceBombs_334)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class leftToPlaceBombs_334 extends MovieClip {
public var bombs_txt:TextField;
public function leftToPlaceBombs_334(){
addFrameScript(0, frame1);
}
public function refreshABombs(){
bombs_txt.text = String(glo.bal.CGAME.A_BOMBS);
}
function frame1(){
stop();
bombs_txt.antiAliasType = "advanced";
bombs_txt.embedFonts = true;
bombs_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 115
//levelBar_260 (DesertRifle_fla.levelBar_260)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class levelBar_260 extends MovieClip {
public function levelBar_260(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 116
//LevelLoading_338 (DesertRifle_fla.LevelLoading_338)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class LevelLoading_338 extends MovieClip {
public function LevelLoading_338(){
addFrameScript(0, frame1, 1, frame2, 29, frame30, 30, frame31, 45, frame46);
}
function frame1(){
glo.bal.GAMELOADER = this;
glo.bal.GAME.destroy();
glo.bal.GAME.init();
}
function frame2(){
glo.bal.PLAYER.init();
glo.bal.JukeBox.loading();
}
function frame30(){
stop();
this.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
}
function frame31(){
glo.bal.INTERFACE.init();
glo.bal.GAME.ready();
}
public function begin(){
gotoAndPlay(1);
}
function frame46(){
stop();
glo.bal.SCRIPT.startTheDay();
}
public function onClick(_arg1:Event){
this.removeEventListener(MouseEvent.MOUSE_DOWN, onClick);
play();
glo.bal.JukeBox.gameScore();
}
}
}//package DesertRifle_fla
Section 117
//levelloading_339 (DesertRifle_fla.levelloading_339)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class levelloading_339 extends MovieClip {
public var btn_qigames:SimpleButton;
public var zonetitle_txt:TextField;
public function levelloading_339(){
addFrameScript(0, frame1);
}
function frame1(){
zonetitle_txt.antiAliasType = "advanced";
zonetitle_txt.embedFonts = true;
zonetitle_txt.setTextFormat(glo.bal.FORMAT04);
zonetitle_txt.defaultTextFormat = glo.bal.FORMAT04;
zonetitle_txt.text = ("Day " + String(glo.bal.CGAME.CLEVEL));
}
}
}//package DesertRifle_fla
Section 118
//loaderfadeouttimer_28 (DesertRifle_fla.loaderfadeouttimer_28)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class loaderfadeouttimer_28 extends MovieClip {
public function loaderfadeouttimer_28(){
addFrameScript(58, frame59);
}
function frame59(){
parent.play();
}
}
}//package DesertRifle_fla
Section 119
//loaderqigames_3 (DesertRifle_fla.loaderqigames_3)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class loaderqigames_3 extends MovieClip {
public var FADECOUNT:Number;
public var pct_txt:TextField;
public var BYTESLOADED:Number;
public var PREROLLRATIO:Number;
public var bar_mc:MovieClip;
public var BYTESRATIO:Number;
public var kb_txt:TextField;
public var PREROLLTIME:Number;
public var PREROLLTIMER:Number;
public var BYTESTOTAL:Number;
public var play_btn:SimpleButton;
public function loaderqigames_3(){
addFrameScript(0, frame1, 1, frame2);
}
public function evtProgress(_arg1:ProgressEvent){
BYTESLOADED = _arg1.bytesLoaded;
BYTESTOTAL = _arg1.bytesTotal;
}
public function evtComplete(_arg1:Event){
BYTESLOADED = BYTESLOADED;
BYTESRATIO = 1;
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, evtProgress);
loaderInfo.removeEventListener(Event.COMPLETE, evtComplete);
}
function frame1(){
parent.stop();
stop();
PREROLLTIMER = 0;
PREROLLTIME = (17 * 16);
PREROLLRATIO = 0;
BYTESLOADED = 0;
BYTESTOTAL = 1;
loaderInfo.addEventListener(ProgressEvent.PROGRESS, evtProgress);
loaderInfo.addEventListener(Event.COMPLETE, evtComplete);
addEventListener(Event.ENTER_FRAME, evtEnterFrame);
}
public function btnPlay(_arg1:Event){
var evt = _arg1;
if (glo.bal.GAME_AUTH){
parent.gotoAndStop(3);
glo.bal.AdUnit.destroy();
} else {
try {
navigateToURL(glo.bal.URLREQ_PLAY);
} catch(err:Error) {
};
};
}
public function evtEnterFrame(_arg1:Event):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
if (BYTESTOTAL > 0){
BYTESRATIO = (BYTESLOADED / BYTESTOTAL);
} else {
BYTESRATIO = 0;
};
PREROLLTIMER++;
PREROLLRATIO = (PREROLLTIMER / PREROLLTIME);
_local4 = Math.min(PREROLLRATIO, BYTESRATIO);
if (_local4 < 1){
pct_txt.text = (Math.round((100 * _local4)) + "%");
if (BYTESRATIO > 0){
_local3 = Math.round((BYTESTOTAL / 0x0400));
_local2 = Math.round((_local3 * _local4));
kb_txt.text = (((_local2 + " / ") + _local3) + " kB");
} else {
kb_txt.text = "";
};
bar_mc.gotoAndStop((1 + Math.round((100 * _local4))));
} else {
pct_txt.text = "100%";
_local3 = Math.round((BYTESTOTAL / 0x0400));
kb_txt.text = (((_local3 + " / ") + _local3) + " kB");
bar_mc.gotoAndStop(101);
gotoAndStop(2);
};
}
function frame2(){
stop();
removeEventListener(Event.ENTER_FRAME, evtEnterFrame);
FADECOUNT = 0;
play_btn.addEventListener("click", btnPlay);
}
}
}//package DesertRifle_fla
Section 120
//lvlsPresentation_343 (DesertRifle_fla.lvlsPresentation_343)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class lvlsPresentation_343 extends MovieClip {
public var label2_txt:TextField;
public var label_txt:TextField;
public function lvlsPresentation_343(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
}
function frame6(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
function frame1(){
stop();
if (glo.bal.CGAME.CLEVEL != 1){
gotoAndStop(glo.bal.CGAME.CLEVEL);
};
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
}
function frame4(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
}
function frame2(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
}
function frame5(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 121
//map_232 (DesertRifle_fla.map_232)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class map_232 extends MovieClip {
public function map_232(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 122
//menu_291 (DesertRifle_fla.menu_291)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class menu_291 extends MovieClip {
public var back_btn:SimpleButton;
public var ok_btn:SimpleButton;
public var playerName_txt:TextField;
public var label1_txt:TextField;
public function menu_291(){
addFrameScript(0, frame1);
}
public function gotoHelp(){
gotoAndStop(10);
}
public function btnOk(_arg1:Event){
var _local2:gameData;
glo.bal.JUKEBOX.btnClick();
PLAYERNAME = playerName_txt.text;
if (PLAYERNAME == ""){
PLAYERNAME = "Player1";
};
C = glo.bal.GAMES.length;
if (C < 5){
_local2 = new gameData(PLAYERNAME, glo.bal.DIFFICULTY);
glo.bal.GAMES.push(_local2);
glo.bal.CGAME = new gameData("playerName", 1);
gameData.copyGame(_local2, glo.bal.CGAME);
} else {
trace("override older game ...");
_local2 = new gameData(PLAYERNAME, glo.bal.DIFFICULTY);
glo.bal.GAMES[4] = _local2;
glo.bal.CGAME = new gameData("playerName", 1);
gameData.copyGame(_local2, glo.bal.CGAME);
};
gameData.saveGames(glo.bal.GAMES);
disableButtons();
gotoAndStop(5);
}
public function btnBack(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
disableButtons();
parent.gotoMenu();
}
function frame1(){
stop();
stage.focus = playerName_txt;
glo.bal.DIFFICULTY = 2;
BTNS = [ok_btn, back_btn];
enableButtons();
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
playerName_txt.antiAliasType = "advanced";
playerName_txt.embedFonts = true;
playerName_txt.setTextFormat(glo.bal.FORMAT04);
playerName_txt.defaultTextFormat = glo.bal.FORMAT04;
ok_btn.addEventListener("click", btnOk);
back_btn.addEventListener("click", btnBack);
}
public function backFromInstructions(){
parent.gotoStory();
}
public function disableButtons(){
for (i in BTNS) {
BTNS[i].enabled = false;
};
}
public function enableButtons(){
for (i in BTNS) {
BTNS[i].enabled = true;
};
}
}
}//package DesertRifle_fla
Section 123
//menu_294 (DesertRifle_fla.menu_294)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class menu_294 extends MovieClip {
public var hard_btn:SimpleButton;
public var caption_txt:TextField;
public var medium_btn:SimpleButton;
public var easy_btn:SimpleButton;
public function menu_294(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
caption_txt.antiAliasType = "advanced";
caption_txt.embedFonts = true;
caption_txt.setTextFormat(glo.bal.FORMAT04);
BTNS = [easy_btn, medium_btn, hard_btn];
enableButtons();
easy_btn.addEventListener("click", btnEasy);
medium_btn.addEventListener("click", btnMedium);
hard_btn.addEventListener("click", btnHard);
}
public function btnHard(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.DIFFICULTY = 3;
glo.bal.CGAME.DIFFICULTY = 3;
gameData.saveGames(glo.bal.GAMES);
parent.gotoHelp();
}
public function disableButtons(){
for (i in BTNS) {
BTNS[i].enabled = false;
};
}
public function enableButtons(){
for (i in BTNS) {
BTNS[i].enabled = true;
};
}
public function btnEasy(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.DIFFICULTY = 1;
glo.bal.CGAME.DIFFICULTY = 1;
gameData.saveGames(glo.bal.GAMES);
parent.gotoHelp();
}
public function btnMedium(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.DIFFICULTY = 2;
glo.bal.CGAME.DIFFICULTY = 2;
gameData.saveGames(glo.bal.GAMES);
parent.gotoHelp();
}
}
}//package DesertRifle_fla
Section 124
//menu_301 (DesertRifle_fla.menu_301)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class menu_301 extends MovieClip {
public var cancel_btn:SimpleButton;
public var zone1_btn:SimpleButton;
public var selection_mc:MovieClip;
public var zone3_btn:SimpleButton;
public var zone5_btn:SimpleButton;
public var ICONY0;
public var game2_txt:TextField;
public var game4_txt:TextField;
public var ZONES;
public var text1_txt:TextField;
public var ok_btn:SimpleButton;
public var zone4_btn:SimpleButton;
public var game1_txt:TextField;
public var SELECTED;
public var game3_txt:TextField;
public var game5_txt:TextField;
public var zone2_btn:SimpleButton;
public var ZONEY0;
public var LABELS;
public function menu_301(){
addFrameScript(0, frame1);
}
public function btnZone1(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (C < 1){
return;
};
SELECTED = 1;
selection_mc.y = (ZONEY0 + 0);
}
public function btnZone3(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (C < 3){
return;
};
SELECTED = 3;
selection_mc.y = (ZONEY0 + 50);
}
public function btnZone5(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (C < 5){
return;
};
SELECTED = 5;
selection_mc.y = (ZONEY0 + 100);
}
public function btnZone4(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (C < 4){
return;
};
SELECTED = 4;
selection_mc.y = (ZONEY0 + 75);
}
public function btnZone2(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (C < 2){
return;
};
SELECTED = 2;
selection_mc.y = (ZONEY0 + 25);
}
public function btnOk(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.CGAME = new gameData("playerName", 1);
gameData.copyGame(glo.bal.GAMES[(SELECTED - 1)], glo.bal.CGAME);
trace("Load Game -> some checks on gamedata values");
disableButtons();
parent.gotoAndStop("shop");
}
function frame1(){
stop();
enableButtons();
LABELS = [game1_txt, game2_txt, game3_txt, game4_txt, game5_txt];
ZONES = [zone1_btn, zone2_btn, zone3_btn, zone4_btn, zone5_btn];
SELECTED = 1;
text1_txt.embedFonts = true;
text1_txt.setTextFormat(glo.bal.FORMAT04);
C = glo.bal.GAMES.length;
i = 0;
while (i < 5) {
if (i > (C - 1)){
LABELS[i].text = "";
ZONES[i].visible = false;
} else {
LABELS[i].text = ((("Level " + glo.bal.GAMES[i].CLEVEL) + " - ") + glo.bal.GAMES[i].PLAYERNAME);
};
i++;
};
ICONY0 = 36;
ZONEY0 = 36;
game1_txt.embedFonts = true;
game1_txt.setTextFormat(glo.bal.FORMAT04);
game2_txt.embedFonts = true;
game2_txt.setTextFormat(glo.bal.FORMAT04);
game3_txt.embedFonts = true;
game3_txt.setTextFormat(glo.bal.FORMAT04);
game4_txt.embedFonts = true;
game4_txt.setTextFormat(glo.bal.FORMAT04);
game5_txt.embedFonts = true;
game5_txt.setTextFormat(glo.bal.FORMAT04);
zone1_btn.addEventListener("click", btnZone1);
zone2_btn.addEventListener("click", btnZone2);
zone3_btn.addEventListener("click", btnZone3);
zone4_btn.addEventListener("click", btnZone4);
zone5_btn.addEventListener("click", btnZone5);
ok_btn.addEventListener("click", btnOk);
cancel_btn.addEventListener("click", btnCancel);
}
public function enableButtons(){
ok_btn.enabled = true;
cancel_btn.enabled = true;
}
public function disableButtons(){
ok_btn.enabled = false;
cancel_btn.enabled = false;
}
public function btnCancel(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
disableButtons();
parent.gotoMenu();
}
}
}//package DesertRifle_fla
Section 125
//menubg_4 (DesertRifle_fla.menubg_4)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class menubg_4 extends MovieClip {
public var bbox_btn:SimpleButton;
public var freecontent_btn:SimpleButton;
public var qigames_btn:SimpleButton;
public function menubg_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
qigames_btn.addEventListener("click", btnQiGames);
freecontent_btn.addEventListener("click", btnFreeContent);
bbox_btn.addEventListener("click", btnBBox);
}
public function btnFreeContent(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_FREECONTENT, "_blank");
} catch(err:Error) {
};
}
public function btnBBox(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_BUBBLEBOX_MENU, "_blank");
} catch(err:Error) {
};
}
public function btnQiGames(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_SHOOTING, "_blank");
} catch(err:Error) {
};
}
}
}//package DesertRifle_fla
Section 126
//menunew_282 (DesertRifle_fla.menunew_282)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class menunew_282 extends MovieClip {
public var moregames_btn:SimpleButton;
public var new_btn:SimpleButton;
public var load_btn:SimpleButton;
public var howtoplay_btn:SimpleButton;
public function menunew_282(){
addFrameScript(0, frame1);
}
public function order(_arg1, _arg2):Number{
if (_arg1.LASTMODIFIED > _arg2.LASTMODIFIED){
return (-1);
};
if (_arg1.LASTMODIFIED < _arg2.LASTMODIFIED){
return (1);
};
return (0);
}
public function btnLoad(_arg1:Event){
if (glo.bal.GAMES.length == 0){
return;
};
glo.bal.JUKEBOX.btnClick();
parent.gotoLoadGame();
disableButtons();
}
function frame1(){
stop();
BTNS = [load_btn, new_btn, howtoplay_btn, moregames_btn];
enableButtons();
glo.bal.GAMES = gameData.getGames();
glo.bal.GAMES.sort(order);
if (glo.bal.GAMES.length == 0){
load_btn.enabled = false;
load_btn.alpha = 0.5;
} else {
load_btn.enabled = true;
load_btn.alpha = 1;
};
load_btn.addEventListener("click", btnLoad);
new_btn.addEventListener("click", btnNew);
howtoplay_btn.addEventListener("click", btnHowToPlay);
moregames_btn.addEventListener("click", btnMoregames);
}
public function btnMoregames(_arg1:Event){
var e = _arg1;
glo.bal.JUKEBOX.btnClick();
try {
navigateToURL(glo.bal.URLREQ_MOREGAMES, "_blank");
} catch(err:Error) {
};
}
public function disableButtons(){
for (i in BTNS) {
BTNS[i].enabled = false;
};
}
public function btnNew(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
parent.gotoNewGame();
disableButtons();
}
public function enableButtons(){
for (i in BTNS) {
BTNS[i].enabled = true;
};
}
public function btnHowToPlay(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
parent.gotoHelp();
disableButtons();
}
}
}//package DesertRifle_fla
Section 127
//missioncompleted_269 (DesertRifle_fla.missioncompleted_269)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class missioncompleted_269 extends MovieClip {
public function missioncompleted_269(){
addFrameScript(0, frame1, 11, frame12, 33, frame34, 63, frame64);
}
public function activate(){
gotoAndPlay(2);
}
function frame64(){
glo.bal.PLAYER.nextLevel();
gotoAndStop(1);
}
function frame12(){
glo.bal.JukeBox.missionCompleted();
}
function frame1(){
stop();
glo.bal.MissionCompleted = this;
}
function frame34(){
glo.bal.PLAYER.gameDead();
}
}
}//package DesertRifle_fla
Section 128
//missionfailed_271 (DesertRifle_fla.missionfailed_271)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class missionfailed_271 extends MovieClip {
public var bbox_btn:SimpleButton;
public var qigames_btn:SimpleButton;
public function missionfailed_271(){
addFrameScript(0, frame1, 9, frame10, 58, frame59);
}
public function activate(){
gotoAndPlay(2);
}
function frame10(){
glo.bal.JUKEBOX.missionFailed();
glo.bal.PLAYER.gameDead();
glo.bal.INTERFACE.missionFailed();
}
function frame1(){
stop();
glo.bal.MissionFailed = this;
}
public function btnBBox(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_BUBBLEBOX_GAMEOVER, "_blank");
} catch(err:Error) {
};
}
public function btnQiGames(_arg1:Event){
var e = _arg1;
try {
navigateToURL(glo.bal.URLREQ_SHOOTING, "_blank");
} catch(err:Error) {
};
}
function frame59(){
stop();
qigames_btn.addEventListener("click", btnQiGames);
bbox_btn.addEventListener("click", btnBBox);
}
}
}//package DesertRifle_fla
Section 129
//missionfailedmenu_273 (DesertRifle_fla.missionfailedmenu_273)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class missionfailedmenu_273 extends MovieClip {
public var quit_btn:SimpleButton;
public var caption_txt:TextField;
public var tryagain_btn:SimpleButton;
public function missionfailedmenu_273(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
caption_txt.antiAliasType = "advanced";
caption_txt.embedFonts = true;
caption_txt.setTextFormat(glo.bal.FORMAT04);
BTNS = [tryagain_btn, quit_btn];
enableButtons();
tryagain_btn.addEventListener("click", btnTryAgain);
quit_btn.addEventListener("click", btnQuit);
}
public function disableButtons(){
for (i in BTNS) {
BTNS[i].enabled = false;
};
}
public function enableButtons(){
for (i in BTNS) {
BTNS[i].enabled = true;
};
}
public function btnQuit(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.quit();
parent.gotoAndStop(1);
}
public function btnTryAgain(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.tryAgain();
parent.gotoAndStop(1);
}
}
}//package DesertRifle_fla
Section 130
//negotiationCard_265 (DesertRifle_fla.negotiationCard_265)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class negotiationCard_265 extends MovieClip {
public var points_txt:TextField;
public var LEVEL:Number;
public var label2_txt:TextField;
public var bar_mc:MovieClip;
public var add_btn:SimpleButton;
public var POINTSNL:Number;
public var label1_txt:TextField;
public function negotiationCard_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
POINTSNL = 0;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
points_txt.antiAliasType = "advanced";
points_txt.embedFonts = true;
points_txt.setTextFormat(glo.bal.FORMAT04);
add_btn.addEventListener("click", btnAddLevel);
}
public function refreshCard(){
switch (glo.bal.CGAME.NEGOTIATION){
case 1:
POINTSNL = 30;
LEVEL = 1;
break;
case 1.2:
POINTSNL = 50;
LEVEL = 2;
break;
case 1.4:
POINTSNL = 70;
LEVEL = 3;
break;
case 1.6:
POINTSNL = 100;
LEVEL = 4;
break;
case 1.8:
POINTSNL = -1;
LEVEL = 5;
break;
};
bar_mc.gotoAndStop(LEVEL);
if (POINTSNL == -1){
points_txt.text = "";
} else {
points_txt.text = ("Cost : " + String(POINTSNL));
};
if ((((glo.bal.CGAME.XP >= POINTSNL)) && (!((POINTSNL == -1))))){
add_btn.visible = true;
} else {
add_btn.visible = false;
};
}
public function btnAddLevel(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
switch (glo.bal.CGAME.NEGOTIATION){
case 1:
glo.bal.CGAME.NEGOTIATION = 1.2;
break;
case 1.2:
glo.bal.CGAME.NEGOTIATION = 1.4;
break;
case 1.4:
glo.bal.CGAME.NEGOTIATION = 1.6;
break;
case 1.6:
glo.bal.CGAME.NEGOTIATION = 1.8;
break;
case 1.8:
glo.bal.CGAME.NEGOTIATION = 2;
break;
};
glo.bal.CGAME.XP = (glo.bal.CGAME.XP - POINTSNL);
parent.refreshAllCards();
}
}
}//package DesertRifle_fla
Section 131
//panels_163 (DesertRifle_fla.panels_163)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class panels_163 extends MovieClip {
public function panels_163(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(glo.bal.CGAME.HPLEVEL);
}
}
}//package DesertRifle_fla
Section 132
//pie_227 (DesertRifle_fla.pie_227)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class pie_227 extends MovieClip {
public function pie_227(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 133
//pistol_180 (DesertRifle_fla.pistol_180)
package DesertRifle_fla {
import flash.display.*;
public dynamic class pistol_180 extends MovieClip {
public var fire_mc:MovieClip;
}
}//package DesertRifle_fla
Section 134
//pistol_241 (DesertRifle_fla.pistol_241)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class pistol_241 extends MovieClip {
public function pistol_241(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 135
//playtext_27 (DesertRifle_fla.playtext_27)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class playtext_27 extends MovieClip {
public var label_txt:TextField;
public function playtext_27(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 136
//precisionCard_259 (DesertRifle_fla.precisionCard_259)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class precisionCard_259 extends MovieClip {
public var points_txt:TextField;
public var LEVEL:Number;
public var label2_txt:TextField;
public var bar_mc:MovieClip;
public var add_btn:SimpleButton;
public var POINTSNL:Number;
public var label1_txt:TextField;
public function precisionCard_259(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
POINTSNL = 0;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
points_txt.antiAliasType = "advanced";
points_txt.embedFonts = true;
points_txt.setTextFormat(glo.bal.FORMAT04);
add_btn.addEventListener("click", btnAddLevel);
}
public function refreshCard(){
switch (glo.bal.CGAME.PRECISION){
case 1:
POINTSNL = 30;
LEVEL = 1;
break;
case 1.2:
POINTSNL = 50;
LEVEL = 2;
break;
case 1.4:
POINTSNL = 70;
LEVEL = 3;
break;
case 1.6:
POINTSNL = 100;
LEVEL = 4;
break;
case 1.8:
POINTSNL = -1;
LEVEL = 5;
break;
};
bar_mc.gotoAndStop(LEVEL);
if (POINTSNL == -1){
points_txt.text = "";
} else {
points_txt.text = ("Cost : " + String(POINTSNL));
};
if ((((glo.bal.CGAME.XP >= POINTSNL)) && (!((POINTSNL == -1))))){
add_btn.visible = true;
} else {
add_btn.visible = false;
};
}
public function btnAddLevel(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
switch (glo.bal.CGAME.PRECISION){
case 1:
glo.bal.CGAME.PRECISION = 1.2;
break;
case 1.2:
glo.bal.CGAME.PRECISION = 1.4;
break;
case 1.4:
glo.bal.CGAME.PRECISION = 1.6;
break;
case 1.6:
glo.bal.CGAME.PRECISION = 1.8;
break;
case 1.8:
glo.bal.CGAME.PRECISION = 2;
break;
};
glo.bal.CGAME.XP = (glo.bal.CGAME.XP - POINTSNL);
parent.refreshAllCards();
}
}
}//package DesertRifle_fla
Section 137
//Preroll_21 (DesertRifle_fla.Preroll_21)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class Preroll_21 extends MovieClip {
public var qigames_mc:MovieClip;
public var ff_component:TvFuzzEffectAS3;
public var AdBox:MovieClip;
public var dummy_mc:MovieClip;
public function Preroll_21(){
addFrameScript(0, frame1, 19, frame20, 29, frame30, 49, frame50);
}
public function onComplete(_arg1:Event){
ff_component.removeFilter();
ff_component = null;
gotoAndStop(30);
}
public function switchToAd(){
ff_component = new TvFuzzEffectAS3();
ff_component.init(qigames_mc, dummy_mc, 40, 1);
addChild(ff_component);
ff_component.addEventListener(TvFuzzEffectAS3.ANIMATION_DONE, onComplete);
ff_component.mouseEnabled = false;
}
function frame1(){
glo.bal.PreRoll = this;
}
function frame20(){
stop();
switchToAd();
}
function frame30(){
stop();
}
public function cancel(){
trace("PreRoll->cancel");
if (ff_component){
ff_component.removeFilter();
ff_component = null;
};
gotoAndStop(50);
}
function frame50(){
stop();
}
}
}//package DesertRifle_fla
Section 138
//pressctolevelup_216 (DesertRifle_fla.pressctolevelup_216)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
public dynamic class pressctolevelup_216 extends MovieClip {
public var xp_txt:TextField;
}
}//package DesertRifle_fla
Section 139
//producedbyalpha_132 (DesertRifle_fla.producedbyalpha_132)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class producedbyalpha_132 extends MovieClip {
public var alpha_mc:MovieClip;
public function producedbyalpha_132(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package DesertRifle_fla
Section 140
//QiGamespresents_24 (DesertRifle_fla.QiGamespresents_24)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class QiGamespresents_24 extends MovieClip {
public var InstanceName_1:MovieClip;
public function QiGamespresents_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 141
//qiroll_135 (DesertRifle_fla.qiroll_135)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class qiroll_135 extends MovieClip {
public var QIROLL:Number;
public function qiroll_135(){
addFrameScript(0, frame1);
}
function frame1(){
if (isNaN(QIROLL)){
QIROLL = 0;
} else {
QIROLL++;
if (QIROLL > 3){
stop();
};
};
}
}
}//package DesertRifle_fla
Section 142
//qislide_134 (DesertRifle_fla.qislide_134)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class qislide_134 extends MovieClip {
public function qislide_134(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package DesertRifle_fla
Section 143
//regenerationCard_267 (DesertRifle_fla.regenerationCard_267)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class regenerationCard_267 extends MovieClip {
public var points_txt:TextField;
public var LEVEL:Number;
public var label2_txt:TextField;
public var bar_mc:MovieClip;
public var add_btn:SimpleButton;
public var POINTSNL:Number;
public var label1_txt:TextField;
public function regenerationCard_267(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
POINTSNL = 0;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
points_txt.antiAliasType = "advanced";
points_txt.embedFonts = true;
points_txt.setTextFormat(glo.bal.FORMAT04);
add_btn.addEventListener("click", btnAddLevel);
}
public function refreshCard(){
switch (glo.bal.CGAME.REGENERATION){
case 1:
POINTSNL = 30;
LEVEL = 1;
break;
case 1.2:
POINTSNL = 50;
LEVEL = 2;
break;
case 1.4:
POINTSNL = 70;
LEVEL = 3;
break;
case 1.6:
POINTSNL = 100;
LEVEL = 4;
break;
case 1.8:
POINTSNL = -1;
LEVEL = 5;
break;
};
bar_mc.gotoAndStop(LEVEL);
if (POINTSNL == -1){
points_txt.text = "";
} else {
points_txt.text = ("Cost : " + String(POINTSNL));
};
if ((((glo.bal.CGAME.XP >= POINTSNL)) && (!((POINTSNL == -1))))){
add_btn.visible = true;
} else {
add_btn.visible = false;
};
}
public function btnAddLevel(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
switch (glo.bal.CGAME.REGENERATION){
case 1:
glo.bal.CGAME.REGENERATION = 1.2;
break;
case 1.2:
glo.bal.CGAME.REGENERATION = 1.4;
break;
case 1.4:
glo.bal.CGAME.REGENERATION = 1.6;
break;
case 1.6:
glo.bal.CGAME.REGENERATION = 1.8;
break;
case 1.8:
glo.bal.CGAME.REGENERATION = 2;
break;
};
glo.bal.PLAYER.refreshRegenInterval();
glo.bal.CGAME.XP = (glo.bal.CGAME.XP - POINTSNL);
parent.refreshAllCards();
}
}
}//package DesertRifle_fla
Section 144
//reloading_204 (DesertRifle_fla.reloading_204)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class reloading_204 extends MovieClip {
public var bar_mc:MovieClip;
public var weapon_mc:MovieClip;
public var label1_txt:TextField;
public function reloading_204(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
glo.bal.RELOAD = this;
this.visible = false;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
}
public function done(){
this.visible = false;
}
public function reload(_arg1:Number, _arg2:Number){
this.visible = true;
weapon_mc.gotoAndStop(_arg1);
F = (22 - _arg2);
if (F > 19){
F = 19;
};
bar_mc.gotoAndPlay(F);
}
}
}//package DesertRifle_fla
Section 145
//reloadwarning_190 (DesertRifle_fla.reloadwarning_190)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class reloadwarning_190 extends MovieClip {
public var warning_txt:TextField;
public function reloadwarning_190(){
addFrameScript(0, frame1);
}
function frame1(){
warning_txt.antiAliasType = "advanced";
warning_txt.embedFonts = true;
warning_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 146
//reloadwarning2_191 (DesertRifle_fla.reloadwarning2_191)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class reloadwarning2_191 extends MovieClip {
public var warning_txt:TextField;
public function reloadwarning2_191(){
addFrameScript(0, frame1);
}
function frame1(){
warning_txt.antiAliasType = "advanced";
warning_txt.embedFonts = true;
warning_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 147
//resistanceCard_266 (DesertRifle_fla.resistanceCard_266)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class resistanceCard_266 extends MovieClip {
public var points_txt:TextField;
public var LEVEL:Number;
public var label2_txt:TextField;
public var bar_mc:MovieClip;
public var add_btn:SimpleButton;
public var POINTSNL:Number;
public var label1_txt:TextField;
public function resistanceCard_266(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
POINTSNL = 0;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
points_txt.antiAliasType = "advanced";
points_txt.embedFonts = true;
points_txt.setTextFormat(glo.bal.FORMAT04);
add_btn.addEventListener("click", btnAddLevel);
}
public function refreshCard(){
switch (glo.bal.CGAME.RESISTANCE){
case 1:
POINTSNL = 30;
LEVEL = 1;
break;
case 1.2:
POINTSNL = 50;
LEVEL = 2;
break;
case 1.4:
POINTSNL = 70;
LEVEL = 3;
break;
case 1.6:
POINTSNL = 100;
LEVEL = 4;
break;
case 1.8:
POINTSNL = -1;
LEVEL = 5;
break;
};
bar_mc.gotoAndStop(LEVEL);
if (POINTSNL == -1){
points_txt.text = "";
} else {
points_txt.text = ("Cost : " + String(POINTSNL));
};
if ((((glo.bal.CGAME.XP >= POINTSNL)) && (!((POINTSNL == -1))))){
add_btn.visible = true;
} else {
add_btn.visible = false;
};
}
public function btnAddLevel(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
switch (glo.bal.CGAME.RESISTANCE){
case 1:
glo.bal.CGAME.RESISTANCE = 1.2;
break;
case 1.2:
glo.bal.CGAME.RESISTANCE = 1.4;
break;
case 1.4:
glo.bal.CGAME.RESISTANCE = 1.6;
break;
case 1.6:
glo.bal.CGAME.RESISTANCE = 1.8;
break;
case 1.8:
glo.bal.CGAME.RESISTANCE = 2;
break;
};
glo.bal.CGAME.XP = (glo.bal.CGAME.XP - POINTSNL);
parent.refreshAllCards();
}
}
}//package DesertRifle_fla
Section 148
//rifle_174 (DesertRifle_fla.rifle_174)
package DesertRifle_fla {
import flash.display.*;
public dynamic class rifle_174 extends MovieClip {
public var fire_mc:MovieClip;
}
}//package DesertRifle_fla
Section 149
//rifle_245 (DesertRifle_fla.rifle_245)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class rifle_245 extends MovieClip {
public function rifle_245(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 150
//scopemask_158 (DesertRifle_fla.scopemask_158)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class scopemask_158 extends MovieClip {
public function scopemask_158(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
glo.bal.ScopeMask = this;
}
}
}//package DesertRifle_fla
Section 151
//seq_82 (DesertRifle_fla.seq_82)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class seq_82 extends MovieClip {
public function seq_82(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package DesertRifle_fla
Section 152
//shade_270 (DesertRifle_fla.shade_270)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class shade_270 extends MovieClip {
public var day_txt:TextField;
public var label_txt:TextField;
public function shade_270(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
day_txt.antiAliasType = "advanced";
day_txt.embedFonts = true;
day_txt.setTextFormat(glo.bal.FORMAT04);
day_txt.text = ("DAY " + String(glo.bal.CGAME.CLEVEL));
}
}
}//package DesertRifle_fla
Section 153
//shoot_101 (DesertRifle_fla.shoot_101)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class shoot_101 extends MovieClip {
public function shoot_101(){
addFrameScript(26, frame27, 27, frame28);
}
function frame27(){
parent.parent.fire();
}
function frame28(){
parent.SHOOTINGCOUNT--;
if (parent.SHOOTINGCOUNT <= 0){
parent.parent.endAttack();
} else {
gotoAndPlay(20);
};
}
}
}//package DesertRifle_fla
Section 154
//shoot_113 (DesertRifle_fla.shoot_113)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class shoot_113 extends MovieClip {
public function shoot_113(){
addFrameScript(21, frame22, 22, frame23);
}
function frame22(){
parent.parent.fire();
}
function frame23(){
parent.SHOOTINGCOUNT--;
if (parent.SHOOTINGCOUNT <= 0){
parent.parent.endAttack();
} else {
gotoAndPlay(17);
};
}
}
}//package DesertRifle_fla
Section 155
//shoot_50 (DesertRifle_fla.shoot_50)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class shoot_50 extends MovieClip {
public function shoot_50(){
addFrameScript(31, frame32, 32, frame33);
}
function frame33(){
parent.SHOOTINGCOUNT--;
if (parent.SHOOTINGCOUNT <= 0){
parent.parent.endAttack();
} else {
gotoAndPlay(25);
};
}
function frame32(){
parent.parent.fire();
}
}
}//package DesertRifle_fla
Section 156
//shotgun_177 (DesertRifle_fla.shotgun_177)
package DesertRifle_fla {
import flash.display.*;
public dynamic class shotgun_177 extends MovieClip {
public var fire_mc:MovieClip;
}
}//package DesertRifle_fla
Section 157
//shotgun_243 (DesertRifle_fla.shotgun_243)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class shotgun_243 extends MovieClip {
public function shotgun_243(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 158
//skullflash_36 (DesertRifle_fla.skullflash_36)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class skullflash_36 extends MovieClip {
public var FLASH:Boolean;
public function skullflash_36(){
addFrameScript(0, frame1, 8, frame9);
}
function frame1(){
stop();
FLASH = false;
}
function frame9(){
if (FLASH){
gotoAndPlay(5);
};
}
public function flashSkull(){
if (!FLASH){
FLASH = true;
gotoAndPlay(5);
};
}
public function stopFlashSkull(){
FLASH = false;
gotoAndStop(1);
}
}
}//package DesertRifle_fla
Section 159
//sniper_170 (DesertRifle_fla.sniper_170)
package DesertRifle_fla {
import flash.display.*;
public dynamic class sniper_170 extends MovieClip {
public var fire_mc:MovieClip;
}
}//package DesertRifle_fla
Section 160
//sniper_247 (DesertRifle_fla.sniper_247)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class sniper_247 extends MovieClip {
public function sniper_247(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 161
//soundcontrol_141 (DesertRifle_fla.soundcontrol_141)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import fl.controls.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class soundcontrol_141 extends MovieClip {
public var sfx_chk:CheckBox;
public var fps_txt:TextField;
public var music_chk:CheckBox;
public function soundcontrol_141(){
addFrameScript(0, frame1);
}
public function clickedMusic(_arg1:MouseEvent){
if (mouseY < -10){
music_chk.selected = !(music_chk.selected);
};
if (music_chk.selected){
glo.bal.JUKEBOX.musicOn();
} else {
glo.bal.JUKEBOX.musicOff();
};
}
function frame1(){
stop();
glo.bal.SOUNDCONTROL = this;
music_chk.label = "";
sfx_chk.label = "";
music_chk.selected = true;
sfx_chk.selected = true;
music_chk.focusEnabled = false;
sfx_chk.focusEnabled = false;
music_chk.addEventListener(MouseEvent.CLICK, clickedMusic);
sfx_chk.addEventListener(MouseEvent.CLICK, clickedSfx);
}
public function clickedSfx(_arg1:MouseEvent){
if (mouseY < -10){
sfx_chk.selected = !(sfx_chk.selected);
};
if (sfx_chk.selected){
glo.bal.JUKEBOX.sfxOn();
} else {
glo.bal.JUKEBOX.sfxOff();
};
}
}
}//package DesertRifle_fla
Section 162
//spacebartosnipermode_202 (DesertRifle_fla.spacebartosnipermode_202)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class spacebartosnipermode_202 extends MovieClip {
public var warning_txt:TextField;
public function spacebartosnipermode_202(){
addFrameScript(0, frame1);
}
function frame1(){
warning_txt.antiAliasType = "advanced";
warning_txt.embedFonts = true;
warning_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 163
//splash_129 (DesertRifle_fla.splash_129)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class splash_129 extends MovieClip {
public var qi_mc:MovieClip;
public var FADE;
public var SKIP;
public var dotcom_mc:MovieClip;
public var producedby_mc:MovieClip;
public var skip_btn:SimpleButton;
public var FRAMECOUNT;
public function splash_129(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
FRAMECOUNT = 0;
FADE = false;
SKIP = false;
addEventListener(Event.ENTER_FRAME, evtEnterFrame);
skip_btn.addEventListener("click", btnSkip);
}
public function btnSkip(_arg1:Event){
if (SKIP){
return;
};
SKIP = true;
parent.gotoAndPlay(72);
dotcom_mc.gotoAndStop(55);
qi_mc.gotoAndStop(45);
skip_btn.visible = false;
skip_btn.enabled = false;
}
public function evtEnterFrame(_arg1:Event){
if (SKIP){
return;
};
FRAMECOUNT++;
if (((!(FADE)) && ((FRAMECOUNT > 60)))){
};
}
}
}//package DesertRifle_fla
Section 164
//splatter_165 (DesertRifle_fla.splatter_165)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class splatter_165 extends MovieClip {
public function splatter_165(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package DesertRifle_fla
Section 165
//storybg_309 (DesertRifle_fla.storybg_309)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class storybg_309 extends MovieClip {
public function storybg_309(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 166
//storytext_311 (DesertRifle_fla.storytext_311)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class storytext_311 extends MovieClip {
public var ACTIVE:Boolean;
public var LineIndex:Number;
public var t2:TextField;
public var t3:TextField;
public var t7:TextField;
public var t1:TextField;
public var t5:TextField;
public var t4:TextField;
public var t6:TextField;
public var FIELDS:Array;
public var skip_btn:SimpleButton;
public var INDEX:Number;
public var FrameCount:Number;
public var TEXTS:Array;
public var play_btn:SimpleButton;
public function storytext_311(){
addFrameScript(0, frame1, 1, frame2);
}
public function reset(){
var _local1:Number;
var _local2:TextField;
_local1 = 0;
while (_local1 < FIELDS.length) {
_local2 = FIELDS[_local1];
TEXTS.push(_local2.text);
_local2.text = "";
_local1++;
};
INDEX = -1;
}
public function nextState(_arg1:Object=null){
var _local2:TextField;
var _local3:String;
if (INDEX >= FIELDS.length){
ACTIVE = false;
play_btn.visible = true;
skip_btn.visible = false;
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
};
if (!ACTIVE){
return;
};
FrameCount++;
if ((FrameCount % 1) == 0){
LineIndex++;
_local2 = FIELDS[INDEX];
_local3 = TEXTS[INDEX];
_local2.multiline = true;
_local2.text = _local3.substring(0, LineIndex);
if (LineIndex >= _local3.length){
nextLine();
};
};
}
public function btnSkip(_arg1:Event){
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.btnClick();
ACTIVE = false;
play_btn.visible = true;
gotoAndStop(3);
}
function frame1(){
stop();
}
public function nextLine(_arg1:Object=null){
INDEX++;
ACTIVE = true;
LineIndex = -1;
FrameCount = 0;
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.typewriter();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.signal();
}
public function btnPlay(_arg1:Event){
glo.bal.JUKEBOX.stopSfx1();
glo.bal.JUKEBOX.stopSfx2();
glo.bal.JUKEBOX.btnClick();
parent.gotoshop();
ACTIVE = false;
gotoAndStop(1);
}
function frame2(){
stop();
FIELDS = [t1, t2, t3, t4, t5, t6, t7];
TEXTS = [];
INDEX = -1;
ACTIVE = false;
LineIndex = -1;
FrameCount = 0;
play_btn.visible = false;
reset();
nextLine();
play_btn.addEventListener("click", btnPlay);
skip_btn.addEventListener("click", btnSkip);
this.addEventListener("enterFrame", nextState);
}
}
}//package DesertRifle_fla
Section 167
//storyui_308 (DesertRifle_fla.storyui_308)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class storyui_308 extends MovieClip {
public var ff_component:TvFuzzEffectAS3;
public var dummy_mc:MovieClip;
public var text_mc:MovieClip;
public function storyui_308(){
addFrameScript(14, frame15, 29, frame30);
}
public function onComplete(_arg1:Event){
text_mc.gotoAndStop(2);
ff_component.removeFilter();
ff_component = null;
}
function frame15(){
stop();
switchToText();
}
function frame30(){
stop();
glo.bal.GAMEMENU.gotoAndStop("shop");
}
public function switchToText(){
ff_component = new TvFuzzEffectAS3();
ff_component.init(dummy_mc, text_mc, 40, 1);
ff_component.x = 34;
ff_component.y = 40;
addChild(ff_component);
ff_component.addEventListener(TvFuzzEffectAS3.ANIMATION_DONE, onComplete);
ff_component.mouseEnabled = false;
glo.bal.JUKEBOX.sfxnoise();
}
public function gotoshop(){
this.gotoAndPlay(16);
}
}
}//package DesertRifle_fla
Section 168
//submitscoreBBox_278 (DesertRifle_fla.submitscoreBBox_278)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class submitscoreBBox_278 extends MovieClip {
public var PLAYERNAME;
public var bboxscore:bubblebox_score;
public var score_txt:TextField;
public var SCORE;
public var GAMEID;
public var btn_viewscores:SimpleButton;
public var label1_txt:TextField;
public function submitscoreBBox_278(){
addFrameScript(0, frame1);
}
public function activate(){
SCORE = glo.bal.CGAME.POINTS;
score_txt.text = numbers.format(SCORE);
bboxscore.setScore(SCORE, 1229);
}
function frame1(){
stop();
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
score_txt.antiAliasType = "advanced";
score_txt.embedFonts = true;
score_txt.setTextFormat(glo.bal.FORMAT04);
activate();
btn_viewscores.addEventListener("click", btnViewScores);
}
public function btnViewScores(_arg1:Event){
var e = _arg1;
glo.bal.JukeBox.btnClick();
try {
navigateToURL(glo.bal.URLREQ_BUBBLEBOX_VIEWSCORES, "_blank");
} catch(err:Error) {
trace("Open ViewScores URL ...");
};
}
}
}//package DesertRifle_fla
Section 169
//text_16 (DesertRifle_fla.text_16)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_16 extends MovieClip {
public var label_txt:TextField;
public function text_16(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 170
//text_218 (DesertRifle_fla.text_218)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_218 extends MovieClip {
public var caption_txt:TextField;
public function text_218(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
caption_txt.antiAliasType = "advanced";
caption_txt.embedFonts = true;
caption_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 171
//text_229 (DesertRifle_fla.text_229)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_229 extends MovieClip {
public var label_txt:TextField;
public function text_229(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 172
//text_230 (DesertRifle_fla.text_230)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_230 extends MovieClip {
public var label_txt:TextField;
public function text_230(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 173
//text_236 (DesertRifle_fla.text_236)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_236 extends MovieClip {
public var label_txt:TextField;
public function text_236(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 174
//text_250 (DesertRifle_fla.text_250)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_250 extends MovieClip {
public var label_txt:TextField;
public function text_250(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 175
//text_252 (DesertRifle_fla.text_252)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_252 extends MovieClip {
public var label_txt:TextField;
public function text_252(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 176
//text_254 (DesertRifle_fla.text_254)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_254 extends MovieClip {
public var label_txt:TextField;
public function text_254(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 177
//text_257 (DesertRifle_fla.text_257)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_257 extends MovieClip {
public var label_txt:TextField;
public function text_257(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 178
//text_264 (DesertRifle_fla.text_264)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_264 extends MovieClip {
public var label_txt:TextField;
public function text_264(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 179
//text_275 (DesertRifle_fla.text_275)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_275 extends MovieClip {
public var label_txt:TextField;
public function text_275(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 180
//text_277 (DesertRifle_fla.text_277)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_277 extends MovieClip {
public var label_txt:TextField;
public function text_277(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 181
//text_280 (DesertRifle_fla.text_280)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_280 extends MovieClip {
public var label_txt:TextField;
public function text_280(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 182
//text_284 (DesertRifle_fla.text_284)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_284 extends MovieClip {
public var label_txt:TextField;
public function text_284(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 183
//text_286 (DesertRifle_fla.text_286)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_286 extends MovieClip {
public var label_txt:TextField;
public function text_286(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 184
//text_288 (DesertRifle_fla.text_288)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_288 extends MovieClip {
public var label_txt:TextField;
public function text_288(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 185
//text_290 (DesertRifle_fla.text_290)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_290 extends MovieClip {
public var label_txt:TextField;
public function text_290(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 186
//text_293 (DesertRifle_fla.text_293)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_293 extends MovieClip {
public var label_txt:TextField;
public function text_293(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 187
//text_296 (DesertRifle_fla.text_296)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_296 extends MovieClip {
public var label_txt:TextField;
public function text_296(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 188
//text_298 (DesertRifle_fla.text_298)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_298 extends MovieClip {
public var label_txt:TextField;
public function text_298(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 189
//text_300 (DesertRifle_fla.text_300)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_300 extends MovieClip {
public var label_txt:TextField;
public function text_300(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 190
//text_303 (DesertRifle_fla.text_303)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_303 extends MovieClip {
public var label_txt:TextField;
public function text_303(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 191
//text_305 (DesertRifle_fla.text_305)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_305 extends MovieClip {
public var label_txt:TextField;
public function text_305(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 192
//text_313 (DesertRifle_fla.text_313)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_313 extends MovieClip {
public var label_txt:TextField;
public function text_313(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 193
//text_323 (DesertRifle_fla.text_323)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_323 extends MovieClip {
public var label_txt:TextField;
public function text_323(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
}
}
}//package DesertRifle_fla
Section 194
//text_331 (DesertRifle_fla.text_331)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class text_331 extends MovieClip {
public var label_txt:TextField;
public function text_331(){
addFrameScript(0, frame1);
}
function frame1(){
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT01);
}
}
}//package DesertRifle_fla
Section 195
//timer_224 (DesertRifle_fla.timer_224)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class timer_224 extends MovieClip {
public var clock_mc:MovieClip;
public var timer_txt:MovieClip;
public var day_txt:MovieClip;
public function timer_224(){
addFrameScript(0, frame1);
}
public function refreshTimer(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (glo.bal.SCRIPT.ENDOFDAY){
return;
};
if (glo.bal.INTERFACE.GAMEPAUSED){
return;
};
_local1 = glo.bal.SCRIPT.getRemainingTime();
if (!_local1){
this.visible = false;
return;
};
this.visible = true;
if (_local1 <= 0){
glo.bal.SCRIPT.endTheDay();
timer_txt.label_txt.text = "0:00";
return;
};
_local2 = (_local1 / 16);
_local3 = Math.floor((_local2 / 60));
_local4 = Math.ceil((_local2 % 60));
if (_local4 < 10){
timer_txt.label_txt.text = ((String(_local3) + ":0") + String(_local4));
} else {
timer_txt.label_txt.text = ((String(_local3) + ":") + String(_local4));
};
day_txt.label_txt.text = ("Day " + String(glo.bal.CGAME.CLEVEL));
_local5 = glo.bal.SCRIPT.getTotalTime();
_local6 = Math.round(((_local1 / _local5) * 100));
clock_mc.update(_local6);
}
public function resetTimer(){
clock_mc.update(100);
timer_txt.label_txt.text = "";
}
function frame1(){
stop();
glo.bal.TIMERUI = this;
}
}
}//package DesertRifle_fla
Section 196
//turret_65 (DesertRifle_fla.turret_65)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class turret_65 extends MovieClip {
public function turret_65(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package DesertRifle_fla
Section 197
//uiBombs_231 (DesertRifle_fla.uiBombs_231)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class uiBombs_231 extends MovieClip {
public var RADBOMB:Number;
public var MAPBOMBS:MovieClip;
public var UNITS:Array;
public var MAPUNITS:MovieClip;
public var BOMBS:Array;
public function uiBombs_231(){
addFrameScript(0, frame1);
}
public function refreshUnits(){
var _local1:Array;
var _local2:Number;
var _local3:MovieClip;
var _local4:Number;
_local1 = [];
_local2 = 0;
while (_local2 < glo.bal.CGAME.BOMBS.length) {
_local1.push(0);
_local2++;
};
_local4 = 0;
while (_local4 < UNITS.length) {
_local3 = UNITS[_local4][1];
_local3.x = (UNITS[_local4][0].x / 10);
_local3.y = (UNITS[_local4][0].V / 10);
if ((((((UNITS[_local4][0].x > 700)) || ((UNITS[_local4][0].x < 0)))) || (!(UNITS[_local4][0].ALIVE)))){
_local3.visible = false;
} else {
_local3.visible = true;
};
_local2 = 0;
while (_local2 < glo.bal.CGAME.BOMBS.length) {
if (UNITS[_local4][0].ALIVE){
if ((((UNITS[_local4][0].x > (glo.bal.CGAME.BOMBS[_local2][0] - RADBOMB))) && ((UNITS[_local4][0].x < (glo.bal.CGAME.BOMBS[_local2][0] + RADBOMB))))){
if ((((UNITS[_local4][0].V > (glo.bal.CGAME.BOMBS[_local2][1] - RADBOMB))) && ((UNITS[_local4][0].V < (glo.bal.CGAME.BOMBS[_local2][1] + RADBOMB))))){
var _local5 = _local1;
var _local6 = _local2;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
};
};
_local2++;
};
_local4++;
};
glo.bal.BOMBBUTTONS.refreshBombs(_local1);
}
function frame1(){
stop();
glo.bal.BOMBSUI = this;
BOMBS = [];
UNITS = [];
RADBOMB = 300;
}
public function createBombs(){
var _local1:Number;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < BOMBS.length) {
MAPBOMBS.removeChild(BOMBS[_local1]);
_local1++;
};
BOMBS = [];
_local1 = 0;
while (_local1 < UNITS.length) {
MAPUNITS.removeChild(UNITS[_local1][1]);
_local1++;
};
UNITS = [];
_local1 = 0;
while (_local1 < glo.bal.CGAME.BOMBS.length) {
_local2 = new bombIcon();
MAPBOMBS.addChild(_local2);
BOMBS.push(_local2);
_local2.x = (glo.bal.CGAME.BOMBS[_local1][0] / 10);
_local2.y = (glo.bal.CGAME.BOMBS[_local1][1] / 10);
_local2.gotoAndStop(glo.bal.CGAME.BOMBS[_local1][2]);
_local1++;
};
}
public function removeUnit(_arg1:Object){
var _local2:Number;
var _local3:Number;
_local2 = -1;
_local3 = 0;
while (_local3 < UNITS.length) {
if (_arg1 == UNITS[_local3][0]){
_local2 = _local3;
break;
};
_local3++;
};
if (_local2 > -1){
if (UNITS[_local2][1]){
MAPUNITS.removeChild(UNITS[_local2][1]);
};
UNITS.splice(_local2, 1);
};
}
public function removeBomb(_arg1:Number){
var _local2:MovieClip;
var _local3:Boolean;
var _local4:Number;
_local2 = BOMBS[_arg1];
BOMBS.splice(_arg1, 1);
MAPBOMBS.removeChild(_local2);
_local3 = false;
_local4 = 0;
while (_local4 < glo.bal.CGAME.BCOLORPOOL.length) {
if (glo.bal.CGAME.BOMBS[_arg1][2] == glo.bal.CGAME.BCOLORPOOL[_local4]){
_local3 = true;
break;
};
_local4++;
};
if (!_local3){
glo.bal.CGAME.BCOLORPOOL.push(glo.bal.CGAME.BOMBS[_arg1][2]);
};
glo.bal.BOMBBUTTONS.removeBomb(_arg1);
}
public function addUnit(_arg1:Object){
var _local2:MovieClip;
_local2 = new unitIcon();
MAPUNITS.addChild(_local2);
UNITS.push([_arg1, _local2]);
_local2.x = (_arg1.x / 10);
_local2.y = (_arg1.V / 10);
}
}
}//package DesertRifle_fla
Section 198
//uiCharacterSheet_258 (DesertRifle_fla.uiCharacterSheet_258)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class uiCharacterSheet_258 extends MovieClip {
public var back_btn:SimpleButton;
public var precision_mc:MovieClip;
public var CARDS:Array;
public var xp_mc:MovieClip;
public var resistance_mc:MovieClip;
public var negotiation_mc:MovieClip;
public var regeneration_mc:MovieClip;
public function uiCharacterSheet_258(){
addFrameScript(0, frame1);
}
public function activate(){
this.visible = true;
refreshAllCards();
}
public function refreshAllCards(){
var _local1:MovieClip;
for each (_local1 in CARDS) {
_local1.refreshCard();
};
xp_mc.resetXP();
}
public function btnBack(_arg1:Event){
parent.backFromCharSheet();
}
function frame1(){
stop();
this.visible = false;
CARDS = [precision_mc, negotiation_mc, resistance_mc, regeneration_mc];
back_btn.addEventListener("click", btnBack);
}
}
}//package DesertRifle_fla
Section 199
//uiplacebombs_332 (DesertRifle_fla.uiplacebombs_332)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class uiplacebombs_332 extends MovieClip {
public var label2_txt:TextField;
public var ab_mc:MovieClip;
public var lft_mc:MovieClip;
public var play_btn:SimpleButton;
public var label1_txt:TextField;
public var label3_txt:TextField;
public function uiplacebombs_332(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
label2_txt.antiAliasType = "advanced";
label2_txt.embedFonts = true;
label2_txt.setTextFormat(glo.bal.FORMAT04);
label3_txt.antiAliasType = "advanced";
label3_txt.embedFonts = true;
label3_txt.setTextFormat(glo.bal.FORMAT04);
play_btn.addEventListener("click", btnPlay);
}
public function refreshAvailableBombs(){
ab_mc.refreshABombs();
lft_mc.refreshABombs();
}
public function btnPlay(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
parent.gotoAndStop("play");
}
}
}//package DesertRifle_fla
Section 200
//uiShop_317 (DesertRifle_fla.uiShop_317)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class uiShop_317 extends MovieClip {
public var w3card_mc:MovieClip;
public var bombscard_mc:MovieClip;
public var w2card_mc:MovieClip;
public var aw_mc:MovieClip;
public var WCARDS:Array;
public var day_txt:TextField;
public var pistolcard_mc:MovieClip;
public var play_btn:SimpleButton;
public var w4card_mc:MovieClip;
public var cSheet_mc:MovieClip;
public function uiShop_317(){
addFrameScript(0, frame1, 2, frame3);
}
public function showCharSheet(){
var _local1:Number;
var _local2:Number;
_local1 = 100000;
_local2 = glo.bal.CGAME.RESISTANCE;
if (_local2 > glo.bal.CGAME.PRECISION){
_local2 = glo.bal.CGAME.PRECISION;
};
if (_local2 > glo.bal.CGAME.NEGOTIATION){
_local2 = glo.bal.CGAME.NEGOTIATION;
};
if (_local2 > glo.bal.CGAME.REGENERATION){
_local2 = glo.bal.CGAME.REGENERATION;
};
switch (_local2){
case 1:
_local1 = 30;
break;
case 1.2:
_local1 = 50;
break;
case 1.4:
_local1 = 70;
break;
case 1.6:
_local1 = 100;
break;
case 1.8:
_local1 = 100000;
break;
};
if (glo.bal.CGAME.XP >= _local1){
day_txt.visible = false;
aw_mc.visible = false;
w2card_mc.visible = false;
w3card_mc.visible = false;
w4card_mc.visible = false;
bombscard_mc.visible = false;
pistolcard_mc.visible = false;
play_btn.visible = false;
gotoAndStop(3);
};
}
public function refreshAllCards(){
var _local1:MovieClip;
switch (glo.bal.CGAME.CLEVEL){
case 1:
w3card_mc.visible = false;
w4card_mc.visible = false;
break;
case 2:
w3card_mc.visible = true;
w4card_mc.visible = false;
break;
case 3:
case 4:
case 5:
case 6:
w3card_mc.visible = true;
w4card_mc.visible = true;
break;
};
for each (_local1 in WCARDS) {
_local1.refreshCard();
};
aw_mc.resetWeight();
day_txt.text = ("DAY " + String(glo.bal.CGAME.CLEVEL));
}
function frame3(){
cSheet_mc.activate();
}
function frame1(){
stop();
WCARDS = [w2card_mc, w3card_mc, w4card_mc, bombscard_mc];
day_txt.antiAliasType = "advanced";
day_txt.embedFonts = true;
day_txt.setTextFormat(glo.bal.FORMAT04);
refreshAllCards();
showCharSheet();
play_btn.addEventListener("click", btnPlay);
}
public function backFromCharSheet(){
glo.bal.JUKEBOX.btnClick();
cSheet_mc.visible = false;
day_txt.visible = true;
aw_mc.visible = true;
w2card_mc.visible = true;
w3card_mc.visible = true;
w4card_mc.visible = true;
bombscard_mc.visible = true;
pistolcard_mc.visible = true;
play_btn.visible = true;
refreshAllCards();
gotoAndStop(2);
}
public function btnPlay(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
if (glo.bal.CGAME.A_BOMBS > 0){
parent.gotoAndStop("placebombs");
} else {
parent.gotoAndStop("play");
};
}
}
}//package DesertRifle_fla
Section 201
//unitbar_40 (DesertRifle_fla.unitbar_40)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class unitbar_40 extends MovieClip {
public function unitbar_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setHealth(_arg1:Number){
if (_arg1 > 100){
_arg1 = 100;
};
if (_arg1 < 0){
_arg1 = 0;
};
F = (1 + Math.round(((_arg1 * 0.01) * 99)));
gotoAndStop(F);
}
}
}//package DesertRifle_fla
Section 202
//unitslayer_161 (DesertRifle_fla.unitslayer_161)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class unitslayer_161 extends MovieClip {
public function unitslayer_161(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
glo.bal.UNITSLAYER = this;
}
}
}//package DesertRifle_fla
Section 203
//upgraderequired_29 (DesertRifle_fla.upgraderequired_29)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class upgraderequired_29 extends MovieClip {
public var current_txt:TextField;
public function upgraderequired_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
current_txt.text = Capabilities.version;
}
}
}//package DesertRifle_fla
Section 204
//wait_107 (DesertRifle_fla.wait_107)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class wait_107 extends MovieClip {
public function wait_107(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package DesertRifle_fla
Section 205
//wait_119 (DesertRifle_fla.wait_119)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class wait_119 extends MovieClip {
public function wait_119(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package DesertRifle_fla
Section 206
//wait_56 (DesertRifle_fla.wait_56)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class wait_56 extends MovieClip {
public function wait_56(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package DesertRifle_fla
Section 207
//weapon1_card_318 (DesertRifle_fla.weapon1_card_318)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weapon1_card_318 extends MovieClip {
public var title_txt:TextField;
public var stock_txt:TextField;
public function weapon1_card_318(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
stock_txt.antiAliasType = "advanced";
stock_txt.embedFonts = true;
stock_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.antiAliasType = "advanced";
title_txt.embedFonts = true;
title_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.text = "PISTOL";
}
}
}//package DesertRifle_fla
Section 208
//weapon2_card_320 (DesertRifle_fla.weapon2_card_320)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weapon2_card_320 extends MovieClip {
public var cost_txt:TextField;
public var title_txt:TextField;
public var order_btn:SimpleButton;
public var WEAPONIND:Number;
public var cartrige_txt:TextField;
public var COST:Number;
public var stock_txt:TextField;
public function weapon2_card_320(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
WEAPONIND = 2;
COST = 20;
stock_txt.antiAliasType = "advanced";
stock_txt.embedFonts = true;
stock_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.antiAliasType = "advanced";
title_txt.embedFonts = true;
title_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.text = "SHOTGUN";
cartrige_txt.antiAliasType = "advanced";
cartrige_txt.embedFonts = true;
cartrige_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.antiAliasType = "advanced";
cost_txt.embedFonts = true;
cost_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.text = ("Cost : " + String(COST));
order_btn.addEventListener("click", btnBuy);
}
public function btnBuy(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] = (glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] + (2 * glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)]));
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT - COST);
parent.refreshAllCards();
}
public function refreshCard(){
WEAPONIND = 2;
COST = 20;
stock_txt.text = (String(glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)]) + " in stock");
cartrige_txt.text = ("x " + String((2 * glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)])));
if (glo.bal.CGAME.AWEIGHT >= COST){
order_btn.visible = true;
} else {
order_btn.visible = false;
};
}
}
}//package DesertRifle_fla
Section 209
//weapon3_card_328 (DesertRifle_fla.weapon3_card_328)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weapon3_card_328 extends MovieClip {
public var cost_txt:TextField;
public var title_txt:TextField;
public var order_btn:SimpleButton;
public var WEAPONIND:Number;
public var cartrige_txt:TextField;
public var COST:Number;
public var stock_txt:TextField;
public function weapon3_card_328(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
WEAPONIND = 3;
COST = 20;
stock_txt.antiAliasType = "advanced";
stock_txt.embedFonts = true;
stock_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.antiAliasType = "advanced";
title_txt.embedFonts = true;
title_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.text = "AUTOMATIC RIFLE";
cartrige_txt.antiAliasType = "advanced";
cartrige_txt.embedFonts = true;
cartrige_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.antiAliasType = "advanced";
cost_txt.embedFonts = true;
cost_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.text = ("Cost : " + String(COST));
order_btn.addEventListener("click", btnBuy);
}
public function btnBuy(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] = (glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] + glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)]);
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT - COST);
parent.refreshAllCards();
}
public function refreshCard(){
WEAPONIND = 3;
COST = 20;
stock_txt.text = (String(glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)]) + " in stock");
cartrige_txt.text = ("x " + String(glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)]));
if (glo.bal.CGAME.AWEIGHT >= COST){
order_btn.visible = true;
} else {
order_btn.visible = false;
};
}
}
}//package DesertRifle_fla
Section 210
//weapon4_card_326 (DesertRifle_fla.weapon4_card_326)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weapon4_card_326 extends MovieClip {
public var cost_txt:TextField;
public var title_txt:TextField;
public var order_btn:SimpleButton;
public var WEAPONIND:Number;
public var cartrige_txt:TextField;
public var COST:Number;
public var stock_txt:TextField;
public function weapon4_card_326(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
WEAPONIND = 4;
COST = 15;
stock_txt.antiAliasType = "advanced";
stock_txt.embedFonts = true;
stock_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.antiAliasType = "advanced";
title_txt.embedFonts = true;
title_txt.setTextFormat(glo.bal.FORMAT04);
title_txt.text = "SNIPER";
cartrige_txt.antiAliasType = "advanced";
cartrige_txt.embedFonts = true;
cartrige_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.antiAliasType = "advanced";
cost_txt.embedFonts = true;
cost_txt.setTextFormat(glo.bal.FORMAT04);
cost_txt.text = ("Cost: " + String(COST));
order_btn.addEventListener("click", btnBuy);
}
public function btnBuy(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] = (glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)] + (2 * glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)]));
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT - COST);
parent.refreshAllCards();
}
public function refreshCard(){
WEAPONIND = 4;
COST = 15;
stock_txt.text = (String(glo.bal.CGAME.AMMO_TOTAL[(WEAPONIND - 1)]) + " in stock");
cartrige_txt.text = ("x " + String((2 * glo.bal.CGAME.AMMO_FULL[(WEAPONIND - 1)])));
if (glo.bal.CGAME.AWEIGHT >= COST){
order_btn.visible = true;
} else {
order_btn.visible = false;
};
}
}
}//package DesertRifle_fla
Section 211
//weapons_238 (DesertRifle_fla.weapons_238)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weapons_238 extends MovieClip {
public var w1_btn:SimpleButton;
public var w3_btn:SimpleButton;
public var ammo1_txt:TextField;
public var ammo3_txt:TextField;
public var i:Number;
public var BTNS:Array;
public var w4_btn:SimpleButton;
public var AMMO:Array;
public var w2_btn:SimpleButton;
public var ammo2_txt:TextField;
public var ammo4_txt:TextField;
public var label1_txt:TextField;
public function weapons_238(){
addFrameScript(0, frame1);
}
public function enableDisableButtons(){
for (i in BTNS) {
if (glo.bal.PLAYER.AMMO_TOTAL[i] > 0){
BTNS[i].enabled = true;
} else {
BTNS[i].enabled = false;
};
};
}
public function setAmmo(_arg1:Number, _arg2:Number){
AMMO[(_arg1 - 1)].text = _arg2;
enableDisableButtons();
}
function frame1(){
stop();
glo.bal.WEAPONS = this;
label1_txt.antiAliasType = "advanced";
label1_txt.embedFonts = true;
label1_txt.setTextFormat(glo.bal.FORMAT04);
AMMO = [ammo1_txt, ammo2_txt, ammo3_txt, ammo4_txt];
BTNS = [w1_btn, w2_btn, w3_btn, w4_btn];
i = 0;
while (i < 4) {
AMMO[i].antiAliasType = "advanced";
AMMO[i].embedFonts = true;
AMMO[i].setTextFormat(glo.bal.FORMAT04);
i++;
};
w1_btn.addEventListener("click", btnWeapon1);
w2_btn.addEventListener("click", btnWeapon2);
w3_btn.addEventListener("click", btnWeapon3);
w4_btn.addEventListener("click", btnWeapon4);
}
public function btnWeapon1(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.setWeapon(1);
}
public function btnWeapon2(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.setWeapon(2);
}
public function btnWeapon3(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.setWeapon(3);
}
public function btnWeapon4(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
glo.bal.PLAYER.setWeapon(4);
}
}
}//package DesertRifle_fla
Section 212
//weaponsAnim_237 (DesertRifle_fla.weaponsAnim_237)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class weaponsAnim_237 extends MovieClip {
public function weaponsAnim_237(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
public function showWeapons(){
gotoAndPlay(5);
}
public function hideWeapons(){
gotoAndPlay(16);
}
function frame15(){
stop();
}
function frame1(){
stop();
glo.bal.WEAPONSANIM = this;
}
function frame25(){
stop();
}
}
}//package DesertRifle_fla
Section 213
//xpbartween_213 (DesertRifle_fla.xpbartween_213)
package DesertRifle_fla {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class xpbartween_213 extends MovieClip {
public function xpbartween_213(){
addFrameScript(0, frame1);
}
public function setPct(_arg1:Number){
if (_arg1 > 100){
_arg1 = 100;
};
if (_arg1 < 0){
_arg1 = 0;
};
F = (1 + Math.round(((_arg1 * 0.01) * 99)));
gotoAndStop(F);
}
function frame1(){
stop();
}
}
}//package DesertRifle_fla
Section 214
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 215
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 216
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 217
//CheckBox (fl.controls.CheckBox)
package fl.controls {
import flash.display.*;
public class CheckBox extends LabelButton {
private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 << 1));
uiFocusRect.height = (background.height + (_local2 << 1));
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a CheckBox's toggle."));
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (CheckBox.createAccessibilityImplementation != null){
CheckBox.createAccessibilityImplementation(this);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 218
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 219
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 220
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 221
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 222
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 223
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.controls.*;
import fl.core.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 224
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import flash.display.*;
import fl.controls.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 225
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 226
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 227
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import flash.text.*;
import fl.core.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 228
//Back (fl.transitions.easing.Back)
package fl.transitions.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 229
//Bounce (fl.transitions.easing.Bounce)
package fl.transitions.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package fl.transitions.easing
Section 230
//Elastic (fl.transitions.easing.Elastic)
package fl.transitions.easing {
public class Elastic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package fl.transitions.easing
Section 231
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
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 easeInOut(_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));
}
}
}//package fl.transitions.easing
Section 232
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 233
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 234
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 235
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 236
//gAnimation (gdk.arcade.gAnimation)
package gdk.arcade {
import gdk.arcade.*;
class gAnimation {
public var method:Function;
public var time:Object;
public var totaltime:Number;
public var obj:Object;
function gAnimation(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Function=null){
obj = _arg1;
totaltime = _arg2;
time = _arg3;
method = _arg4;
}
}
}//package gdk.arcade
Section 237
//gGame (gdk.arcade.gGame)
package gdk.arcade {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.system.*;
import flash.ui.*;
public class gGame extends MovieClip {
public var TIMER:Number;
private var KEY2TRACK:Array;
public var viewH:Number;
public var viewW:Number;
public var UNITS:Array;
private var EVT_QUEUE:Array;
private var ANIMATIONS:Array;
public var GAMEALIVE:Boolean;
private var KEY4EVTDOWN:Array;
public var GAMEPAUSED:Boolean;
private var EVT_TIMER:Number;
public var ZONE:gZone;
public var PLAYER:Object;
private var KEY4EVTUP:Array;
public function gGame(_arg1:Number, _arg2:Number){
viewW = _arg1;
viewH = _arg2;
TIMER = 0;
EVT_TIMER = 0;
EVT_QUEUE = [];
ANIMATIONS = [];
GAMEALIVE = false;
GAMEPAUSED = false;
UNITS = [];
KEY2TRACK = [];
KEY4EVTDOWN = [];
KEY4EVTUP = [];
stage.addEventListener(KeyboardEvent.KEY_DOWN, evtKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, evtKeyUp);
addEventListener(Event.ENTER_FRAME, evtEnterFrame);
}
public function destroy(){
trace("gGame->destroy()");
GAMEALIVE = false;
ZONE = null;
UNITS = [];
ITEMS = [];
EVT_QUEUE = [];
KEY2TRACK = [];
KEY4EVTDOWN = [];
KEY4EVTUP = [];
ANIMATIONS = [];
onDestroy();
try {
System.gc();
} catch(e:Error) {
};
}
public function evt(_arg1:Number, _arg2:Function, _arg3:Object=null, _arg4:Object=null){
var _local5:gTimedEvent;
var _local6:Number;
var _local7:*;
_local5 = new gTimedEvent((EVT_TIMER + _arg1), _arg2, _arg3, _arg4, false);
_local6 = EVT_QUEUE.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local5.t < EVT_QUEUE[_local7].t){
EVT_QUEUE.splice(_local7, 0, _local5);
return (_local5);
};
_local7++;
};
EVT_QUEUE.push(_local5);
return (_local5);
}
public function resumePlay(){
var _local1:*;
if (!GAMEPAUSED){
return;
};
GAMEPAUSED = false;
for (_local1 in UNITS) {
if (UNITS[_local1].LOADED){
UNITS[_local1].resumePlay();
};
};
}
public function isKeyDown(_arg1:uint):Boolean{
var _local2:*;
for (_local2 in KEY2TRACK) {
if ((((KEY2TRACK[_local2].keycode == _arg1)) && (KEY2TRACK[_local2].isdown))){
return (true);
};
};
return (false);
}
protected function onDestroy(){
}
public function getUniqueID():Number{
return (gGame.UNIQUEIDCOUNTER++);
}
public function trackKey(_arg1:uint){
KEY2TRACK.push({keycode:_arg1, isdown:false});
}
public function setZone(_arg1:gZone){
trace(("gGame->setZone : " + _arg1));
ZONE = _arg1;
}
public function hitDetection(_arg1:Point, _arg2:Number):Boolean{
var _local3:gUnit;
var _local4:Number;
_local4 = 0;
while (_local4 < UNITS.length) {
_local3 = UNITS[_local4];
if (_local3.hitDetection(_arg1, _arg2)){
return (true);
};
_local4++;
};
return (false);
}
public function evtKeyDown(_arg1:KeyboardEvent){
var _local2:*;
for (_local2 in KEY2TRACK) {
if (KEY2TRACK[_local2].keycode == _arg1.keyCode){
KEY2TRACK[_local2].isdown = true;
break;
};
};
for (_local2 in KEY4EVTDOWN) {
if (KEY4EVTDOWN[_local2].keycode == _arg1.keyCode){
KEY4EVTDOWN[_local2].handler.call(KEY4EVTDOWN[_local2].obj, _arg1);
break;
};
};
}
public function evtMouseDown(_arg1:Event=null){
if (PLAYER){
PLAYER.evtMouseDown(mouseX, mouseY);
};
}
public function keyDownHandler(_arg1:uint, _arg2:Function, _arg3:Object){
KEY4EVTDOWN.push({keycode:_arg1, handler:_arg2, obj:_arg3});
}
public function evtMouseOut(_arg1:Event=null){
}
public function pausePlay(){
var _local1:*;
if (GAMEPAUSED){
return;
};
GAMEPAUSED = true;
for (_local1 in UNITS) {
if (UNITS[_local1].LOADED){
UNITS[_local1].pausePlay();
};
};
}
public function animation(_arg1:Object, _arg2:Number, _arg3:Function=null){
ANIMATIONS.push(new gAnimation(_arg1, _arg2, 0, _arg3));
}
public function hideMouse(){
Mouse.hide();
}
public function keyUpHandler(_arg1:uint, _arg2:Function, _arg3:Object){
KEY4EVTUP.push({keycode:_arg1, handler:_arg2, obj:_arg3});
}
protected function nextState(){
}
public function evtKeyUp(_arg1:KeyboardEvent){
var _local2:*;
for (_local2 in KEY2TRACK) {
if (KEY2TRACK[_local2].keycode == _arg1.keyCode){
KEY2TRACK[_local2].isdown = false;
break;
};
};
}
public function unit(_arg1:MovieClip){
UNITS.push(_arg1);
}
public function showMouse(){
Mouse.show();
}
public function evtMouseRollOut(_arg1:Event=null){
}
public function eventQueue(){
var _local1:gTimedEvent;
var _local2:Number;
var _local3:Array;
var _local4:Number;
var _local5:Number;
EVT_TIMER++;
_local2 = 0;
_local3 = [];
_local4 = EVT_QUEUE.length;
_local5 = 0;
while (_local5 < _local4) {
_local1 = EVT_QUEUE[_local5];
if (_local1.cancel){
_local2++;
} else {
if (EVT_TIMER >= _local1.t){
_local3.push(_local1);
_local2++;
} else {
break;
};
};
_local5++;
};
EVT_QUEUE.splice(0, _local2);
for (_local5 in _local3) {
_local1 = _local3[_local5];
_local1.method.call(_local1.obj, _local1.data);
};
}
public function ready(){
var _local1:gUnit;
GAMEALIVE = true;
GAMEPAUSED = false;
for each (_local1 in UNITS) {
_local1.init();
};
evt((10 * 24), cleanUp, this);
}
public function anyActiveUnit():Boolean{
var _local1:Number;
var _local2:gUnit;
for (_local1 in UNITS) {
_local2 = UNITS[_local1];
if (((_local2.ATTACKING) && (_local2.ALIVE))){
return (true);
};
};
return (false);
}
public function evtMouseUp(_arg1:Event=null){
if (PLAYER){
PLAYER.evtMouseUp(mouseX, mouseY);
};
}
public function createZone(_arg1:gZone){
ZONE = _arg1;
ZONES.push(ZONE);
ZONE.loadWorld(this);
ZONE.loadUnits(this);
}
public function evtEnterFrame(_arg1:Event){
var _local2:*;
var _local3:Number;
var _local4:Array;
var _local5:gAnimation;
if (!GAMEALIVE){
return;
};
if (GAMEPAUSED){
return;
};
TIMER++;
eventQueue();
if (ANIMATIONS.length > 0){
_local4 = [];
for (_local2 in ANIMATIONS) {
_local5 = ANIMATIONS[_local2];
_local5.time++;
if (_local5.method == null){
_local5.obj.animate(_local5.time, _local5.totaltime);
} else {
_local5.method.call(_local5.obj, _local5.time, _local5.totaltime);
};
if (_local5.time < _local5.totaltime){
_local4.push(_local5);
};
};
ANIMATIONS = _local4;
};
PLAYER.nextState(mouseX, mouseY);
this.nextState();
}
public function cleanUp(_arg1:Object){
var _evt = _arg1;
try {
System.gc();
} catch(e) {
};
evt((10 * 24), cleanUp, this);
}
public function evtMouseWheel(_arg1:Event=null){
}
}
}//package gdk.arcade
Section 238
//gTimedEvent (gdk.arcade.gTimedEvent)
package gdk.arcade {
import gdk.arcade.*;
class gTimedEvent {
public var method:Function;
public var data:Object;
public var t:Number;
public var obj:Object;
public var cancel:Boolean;
function gTimedEvent(_arg1:Number, _arg2:Function, _arg3:Object, _arg4:Object=null, _arg5:Boolean=false){
t = _arg1;
method = _arg2;
obj = _arg3;
data = _arg4;
cancel = _arg5;
}
}
}//package gdk.arcade
Section 239
//gUnit (gdk.arcade.gUnit)
package gdk.arcade {
import flash.display.*;
public class gUnit extends MovieClip {
public var ZONE:gZone;
public var ALIVE:Boolean;
public var GAME:gGame;
public function gUnit(){
ALIVE = false;
}
public function resumePlay(){
}
public function destroy(){
ALIVE = false;
GAME = null;
ZONE = null;
}
public function init(){
ALIVE = true;
GAME = glo.bal.GAME;
ZONE = GAME.ZONE;
}
public function clearTween(_arg1:Number, _arg2:Number){
}
public function damageSuffered(_arg1:Number){
}
public function nextState(){
}
public function clearUnit(_arg1:Number){
}
public function pausePlay(){
}
final public function death(){
if (!ALIVE){
return;
};
ALIVE = false;
onDeath();
}
public function onDeath(){
}
}
}//package gdk.arcade
Section 240
//gZone (gdk.arcade.gZone)
package gdk.arcade {
import flash.display.*;
public class gZone extends MovieClip {
public var ID:Number;
public var TITLE:String;
public var GAME:gGame;
public function gZone(_arg1:Number, _arg2:String){
GAME = glo.bal.GAME;
ID = _arg1;
TITLE = _arg2;
}
public function loadUnits(){
}
public function loadWorld(){
}
public function ready(){
}
}
}//package gdk.arcade
Section 241
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _initted:Boolean;
protected var _subTweens:Array;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _active:Boolean;
public var vars:Object;
public var tweens:Array;
public var initTime:int;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 6.21;
private static var _sprite:Sprite = new Sprite();
protected static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = killTweensOf;
protected static var _curTime:uint;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.target = _arg1;
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
_active = (((_arg2 == 0)) && ((this.delay == 0)));
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_classInitted = true;
};
this.initTime = _curTime;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
this.startTime = _curTime;
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{
var _local5:Object;
var _local6:String;
_local5 = {proxy:_arg1, target:_arg2, info:_arg4};
_subTweens.push(_local5);
for (_local6 in _arg3) {
if (_arg2.hasOwnProperty(_local6)){
if (typeof(_arg3[_local6]) == "number"){
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5});
} else {
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5});
};
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:Boolean;
var _local4:String;
var _local5:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
_local3 = (this.target is DisplayObject);
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local5 = 0;
while (_local5 < _local6.length) {
if (((!((this.target[_local5] == _local6[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens.push({o:this.target, p:_local5.toString(), s:this.target[_local5], c:(_local6[_local5] - this.target[_local5])});
};
_local5++;
};
} else {
for (_local4 in this.vars) {
if ((((((((((((((((((((((((((((((((((((_local4 == "ease")) || ((_local4 == "delay")))) || ((_local4 == "overwrite")))) || ((_local4 == "onComplete")))) || ((_local4 == "onCompleteParams")))) || ((_local4 == "onCompleteScope")))) || ((_local4 == "runBackwards")))) || ((_local4 == "onUpdate")))) || ((_local4 == "onUpdateParams")))) || ((_local4 == "onUpdateScope")))) || ((_local4 == "autoAlpha")))) || ((_local4 == "onStart")))) || ((_local4 == "onStartParams")))) || ((_local4 == "onStartScope")))) || ((_local4 == "renderOnStart")))) || ((_local4 == "proxiedEase")))) || ((_local4 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local4) + " ")) == -1))))))){
} else {
if ((((_local4 == "tint")) && (_local3))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (this.vars.alpha != undefined){
_local8.alphaMultiplier = this.vars.alpha;
delete this.vars.alpha;
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].p == "alpha"){
this.tweens.splice(_local5, 1);
break;
};
_local5--;
};
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((((!((this.vars[_local4] == null))) && (!((this.vars[_local4] == ""))))) || ((this.vars[_local4] == 0)))){
_local8.color = this.vars[_local4];
};
addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
} else {
if ((((_local4 == "frame")) && (_local3))){
addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:this.vars[_local4]}, {target:this.target});
} else {
if ((((_local4 == "volume")) && (((_local3) || ((this.target is SoundChannel)))))){
addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars[_local4]}, {target:this.target});
} else {
if (this.target.hasOwnProperty(_local4)){
if (typeof(this.vars[_local4]) == "number"){
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:(this.vars[_local4] - this.target[_local4])});
} else {
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:Number(this.vars[_local4])});
};
};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local9 = this.tweens[_local5];
this.tweens[_local5].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local5--;
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(this.vars.onStartScope, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 > this.duration){
_local2 = this.duration;
};
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - (this.duration * 1000));
render(_curTime);
return;
};
if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){
this.target.visible = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams);
};
removeTween(this);
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
_local2 = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:uint;
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_local2 = 0;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Object;
_local2 = _arg1.target.progress;
_local3 = (1 - _local2);
_local4 = _arg1.info.color;
_local5 = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 242
//E03_tv (net.flashfilter.as3.effects.E03_tv)
package net.flashfilter.as3.effects {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
public class E03_tv extends SuperEffect {
private var currBitmap:Number;// = 1
private var output:BitmapData;
private var _org_mc:Bitmap;
private var origin:Point;
public var _noiseSquare:Number;
private var currImg:BitmapData;
private var isStop:Boolean;// = false
private var maxAlpha:Number;// = 1
private var _flicker_mc:Bitmap;
private var bmp:BitmapData;
public var _targetInstanceName2:String;
private var blur:BlurFilter;
public var _animationSpeed:Number;
private var step:Number;
private var bounds:Rectangle;
public var _refreshEveryFrame:Boolean;
private var _moveDirection:int;
public function E03_tv(){
maxAlpha = 1;
currBitmap = 1;
isStop = false;
super();
}
private function shake():void{
_org_mc.x = (1 - (Math.random() * 2));
_org_mc.y = (1 - (Math.random() * 2));
blur.blurX = (2 + Math.round((Math.random() * 5)));
blur.blurY = (2 + Math.round((Math.random() * 5)));
_org_mc.filters = [blur];
}
private function setRefreshEveryFrame(_arg1:Boolean=false):void{
if ((_arg1 is Boolean) == false){
trace("ERROR - The parameter \"Refresh Every Frame\" is not defined properly!");
return;
};
_refreshEveryFrame = _arg1;
}
public function pauseFilter():void{
isStop = true;
}
public function init(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=50, _arg4:Number=1, _arg5:Boolean=false):void{
if (!super.initSuper(_arg1, _arg2)){
trace("ERROR - The parameter \"Start MovieClip\" or \"End MovieClip\" is not defined properly!");
return;
};
if ((_arg3 is Number) == false){
trace("ERROR - The parameter \"Transition Duration\" is not defined properly!");
return;
};
_animationSpeed = _arg3;
if ((((_animationSpeed < 4)) || ((_animationSpeed > 500)))){
trace("ERROR - The parameter \"Transition Duration\" has to be a number between 4 and 500.");
return;
};
if ((_arg4 is Number) == false){
trace("ERROR - The parameter \"Fuzz square\" is not defined properly!");
return;
};
_noiseSquare = _arg4;
if ((((_noiseSquare < 1)) || ((_noiseSquare > 10)))){
trace("ERROR - The parameter \"Fuzz square\" has to be a number between 1 and 10.");
return;
};
setRefreshEveryFrame(_arg5);
output = new BitmapData(_w, _h, true, 0xFFFFFF);
bounds = new Rectangle(0, 0, _w, _h);
origin = new Point();
bmp = new BitmapData((_w / _arg4), (_h / _arg4));
step = (maxAlpha / ((_arg3 - 1) / 2));
currImg = _sourceBitmapData;
output.draw(currImg);
_org_mc = new Bitmap();
_org_mc.bitmapData = output;
_targetMovieClip.addChild(_org_mc);
_flicker_mc = new Bitmap();
_flicker_mc.bitmapData = bmp;
_targetMovieClip.addChild(_flicker_mc);
blur = new BlurFilter(0, 0, 1);
_org_mc.filters = [blur];
_flicker_mc.alpha = 0;
_flicker_mc.scaleX = _arg4;
_flicker_mc.scaleY = _arg4;
_moveDirection = 0;
addEventListener(Event.ENTER_FRAME, onRenderFrame);
render();
}
public function removeFilter():void{
removeEventListener(Event.ENTER_FRAME, onRenderFrame);
output.dispose();
currImg.dispose();
bmp.dispose();
_targetMovieClip.removeChild(_org_mc);
_org_mc = null;
_targetMovieClip.removeChild(_flicker_mc);
_flicker_mc = null;
super.kill();
}
private function killTV():void{
removeEventListener(Event.ENTER_FRAME, onRenderFrame);
dispatchEvent(new Event(TvFuzzEffectAS3.ANIMATION_DONE));
}
private function onRenderFrame(_arg1:Event):void{
render();
}
override protected function initLater(_arg1:TimerEvent):void{
if (this.parent[_targetInstanceName] == undefined){
trace("ERROR - The parameter \"Start MovieClip\" is not defined properly!");
return;
};
init(this.parent[_targetInstanceName], this.parent[_targetInstanceName2], _animationSpeed, _noiseSquare, _refreshEveryFrame);
}
private function render():void{
if (_refreshEveryFrame){
_sourceBitmapData = getSourceBitmapData(_source_mc).clone();
_sourceBitmapData2 = getSourceBitmapData(_source2_mc).clone();
if (_moveDirection == 1){
currImg = _sourceBitmapData2;
} else {
currImg = _sourceBitmapData;
};
};
output.draw(currImg);
if (!isStop){
_flicker_mc.alpha = (_flicker_mc.alpha + step);
if (_flicker_mc.alpha > 0.3){
shake();
} else {
_org_mc.x = 0;
_org_mc.y = 0;
blur.blurX = 0;
blur.blurY = 0;
_org_mc.filters = [blur];
};
bmp.noise(Math.floor((1000 * Math.random())), 0, 0xFF, ((1 | 2) | 4), true);
if ((((_flicker_mc.alpha >= maxAlpha)) || ((_flicker_mc.alpha <= 0)))){
step = -(step);
if (_flicker_mc.alpha > 0.5){
currBitmap++;
if ((currBitmap % 2) == 0){
currImg = _sourceBitmapData2;
_moveDirection = 1;
} else {
currImg = _sourceBitmapData;
_moveDirection = 0;
};
output.draw(currImg);
} else {
if (_flicker_mc.alpha <= 0){
killTV();
};
};
};
};
}
public function playFilter():void{
isStop = false;
}
}
}//package net.flashfilter.as3.effects
Section 243
//SuperEffect (net.flashfilter.as3.effects.SuperEffect)
package net.flashfilter.as3.effects {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
public class SuperEffect extends MovieClip {
protected var _sourceBitmapData2:BitmapData;
private var _waitTimer:Timer;
public var _logo_mc:MovieClip;
protected var _sourceBitmapData:BitmapData;
public var _targetInstanceName:String;// = null
private var _boundX:Number;
private var _boundY:Number;
protected var _source_mc:DisplayObject;
private var _dummyVar:String;// = "dummy"
protected var _targetMovieClip:Sprite;
protected var _h:Number;
protected var _source2_mc:DisplayObject;
protected var _w:Number;
public function SuperEffect(){
var _local1:Boolean;
_targetInstanceName = null;
_dummyVar = "dummy";
super();
_local1 = ((((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))) || ((this.parent == null)));
if (_local1){
return;
};
_logo_mc.visible = false;
_waitTimer = new Timer(2, 1);
_waitTimer.addEventListener(TimerEvent.TIMER, initLater);
_waitTimer.start();
addEventListener(Event.REMOVED_FROM_STAGE, showTarget);
}
protected function getEaseTweenType(_arg1:String):Array{
var _local2:Array;
_local2 = new Array();
if (_arg1.indexOf("linearTween") != -1){
_local2.push("easeNone");
_local2.push("Linear");
} else {
if (_arg1.indexOf("easeInOut") != -1){
_local2.push("easeInOut");
_local2.push(_arg1.split("easeInOut")[1]);
} else {
if (_arg1.indexOf("easeIn") != -1){
_local2.push("easeIn");
_local2.push(_arg1.split("easeIn")[1]);
} else {
if (_arg1.indexOf("easeOut") != -1){
_local2.push("easeOut");
_local2.push(_arg1.split("easeOut")[1]);
};
};
};
};
return (_local2);
}
protected function initLater(_arg1:TimerEvent):void{
}
protected function getSourceBitmapData(_arg1:DisplayObject):BitmapData{
var _local2:BitmapData;
var _local3:Rectangle;
var _local4:Matrix;
_local2 = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local3 = _arg1.getRect(_arg1);
_local4 = new Matrix();
_local4.translate((_local3.x * -1), (_local3.y * -1));
_local2.draw(_arg1, _local4);
return (_local2);
}
protected function initSuper(_arg1:DisplayObject, ... _args):Boolean{
var _local3:Rectangle;
if ((((_arg1 == null)) || (((_arg1 is DisplayObject) == false)))){
return (false);
};
_source_mc = _arg1;
if (((!((_args.length == 0))) && ((_args[0] == null)))){
return (false);
};
_source2_mc = _args[0];
_source_mc.x = Math.round(_source_mc.x);
_source_mc.y = Math.round(_source_mc.y);
if (_source2_mc != null){
_source2_mc.x = Math.round(_source2_mc.x);
_source2_mc.y = Math.round(_source2_mc.y);
};
_local3 = _source_mc.getBounds(this.parent);
_boundX = _local3.x;
_boundY = _local3.y;
this.x = _boundX;
this.y = _boundY;
_sourceBitmapData = getSourceBitmapData(_source_mc);
_targetMovieClip = new Sprite();
this.addChild(_targetMovieClip);
_w = _sourceBitmapData.width;
_h = _sourceBitmapData.height;
if (_source2_mc != null){
_sourceBitmapData2 = getSourceBitmapData(_source2_mc);
} else {
_sourceBitmapData2 = getSourceBitmapData(_source_mc);
};
_source_mc.visible = false;
if (_source2_mc != null){
_source2_mc.visible = false;
};
_logo_mc.visible = false;
return (true);
}
public function onResize(_arg1:Number, _arg2:Number):void{
}
protected function kill():void{
showTarget();
this.parent.removeChild(this);
}
public function onUpdate(... _args):void{
}
private function showTarget(_arg1:Event=null):void{
_source_mc.visible = true;
if (_source2_mc != null){
_source2_mc.visible = true;
};
_sourceBitmapData.dispose();
if (_sourceBitmapData2 != null){
_sourceBitmapData2.dispose();
};
removeChild(_targetMovieClip);
_targetMovieClip = null;
}
}
}//package net.flashfilter.as3.effects
Section 244
//aiCarShooter (aiCarShooter)
package {
import flash.display.*;
import flash.geom.*;
public class aiCarShooter extends MovieClip {
public var OUTOFSCENE:Number;
public var CSTATE:Number;
public var MOVESPEEDX:Number;
public var CURINSCENEINT:Number;
public var VPMAX:Number;
public var V:Number;
public var FCOUNT:Number;
public var DIEPT:MovieClip;
public var CHEST_FACTOR:Number;
public var PRECISION:Number;
public var SWAPPED:Boolean;
public var HEAD_FACTOR:Number;
public var MOVEL:Number;
public var MOVER:Number;
public var DAMAGEVISUAL2:MovieClip;
public var DAMAGEVISUAL1:MovieClip;
public var ALIVE:Boolean;
public var VP:Number;
public var SCRIPT:GameScript;
public var ATTACKING:Boolean;
public var HZ_HEAD1:MovieClip;
public var HZ_HEAD2:MovieClip;
public var MOVESPEED:Number;
public var HEALTHBAR1:MovieClip;
public var HEALTHBAR2:MovieClip;
public var ID:Number;
public var ALIVE2:Boolean;
public var ALIVE1:Boolean;
public var VMAX:Number;
public var TYPE:String;
public var HZ_CHEST1:MovieClip;
public var HZ_CHEST2:MovieClip;
public var BLOODMC2:MovieClip;
public var BLOODMC1:MovieClip;
public var HEALTH1:Number;
public var HEALTH2:Number;
public var DAMAGE:Number;
public var BODY:MovieClip;
public var MININSCENEINT:Number;
public var FIRESCOPE:Number;
public var HITHERO:Boolean;
public var GAME:GameInstance;
public static var COUNTUNITS:Number = 0;
public function aiCarShooter(){
var _local1:Number;
super();
ID = aiUnit.COUNTUNITS++;
MOVESPEED = 0;
MOVESPEEDX = 7;
V = 0;
VMAX = 1400;
VP = 2;
VPMAX = Math.pow(VMAX, VP);
ALIVE = true;
ALIVE1 = true;
ALIVE2 = true;
HEALTH1 = 100;
HEALTH2 = 100;
GAME = glo.bal.GAME;
SCRIPT = glo.bal.SCRIPT;
FCOUNT = 0;
_local1 = 0;
var _temp1 = _local1;
_local1 = (_local1 + 1);
OUTOFSCENE = _temp1;
var _temp2 = _local1;
_local1 = (_local1 + 1);
MOVEL = _temp2;
var _temp3 = _local1;
_local1 = (_local1 + 1);
MOVER = _temp3;
CSTATE = OUTOFSCENE;
ATTACKING = false;
HITHERO = false;
}
public function showSide(){
if (this.x > 700){
BODY.showLeft();
} else {
BODY.showRight();
};
}
public function hitDetection(_arg1:Object):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!ALIVE){
return (0);
};
_local2 = 0;
_local3 = 0;
if (HZ_HEAD1){
if (HZ_HEAD1.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * HEAD_FACTOR));
};
};
if (HZ_CHEST1){
if (HZ_CHEST1.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * CHEST_FACTOR));
};
};
if (HZ_HEAD2){
if (HZ_HEAD2.hitTestObject(_arg1.area)){
_local3 = (_local3 + (_arg1.damage * HEAD_FACTOR));
};
};
if (HZ_CHEST2){
if (HZ_CHEST2.hitTestObject(_arg1.area)){
_local3 = (_local3 + (_arg1.damage * CHEST_FACTOR));
};
};
_local4 = (Math.pow(V, VP) / VPMAX);
if (_local4 > 1){
_local4 = 1;
};
_local2 = (_local2 * (1 + (_local4 * 0.6)));
_local3 = (_local3 * (1 + (_local4 * 0.6)));
if ((((HEALTH1 == 100)) && ((_local2 >= 100)))){
if (V < 300){
glo.bal.PLAYER.points(100);
glo.bal.BONUSNOTICE.longRangeCleanShot();
} else {
glo.bal.PLAYER.points(30);
glo.bal.BONUSNOTICE.cleanShot();
};
};
if ((((HEALTH2 == 100)) && ((_local3 >= 100)))){
if (V < 300){
glo.bal.PLAYER.points(100);
glo.bal.BONUSNOTICE.longRangeCleanShot();
} else {
glo.bal.PLAYER.points(30);
glo.bal.BONUSNOTICE.cleanShot();
};
};
if (_local2 > 0){
hitdamage1(_local2);
return (_local2);
};
if (_local3 > 0){
hitdamage2(_local3);
return (_local3);
};
}
public function death2(){
if (!ALIVE2){
return;
};
ALIVE2 = false;
endAttack();
BODY.die2();
createDriverDie();
}
public function fire(){
if (!ALIVE){
return;
};
if (!ALIVE2){
return;
};
if (!ATTACKING){
return;
};
if ((((this.x < 0)) || ((this.x > 700)))){
return;
};
if (!this.visible){
return;
};
if ((((Math.random() <= PRECISION)) && (!(HITHERO)))){
HITHERO = true;
glo.bal.PLAYER.hit(DAMAGE, this);
};
}
public function death1(){
if (!ALIVE1){
return;
};
ALIVE1 = false;
MOVESPEED = -(MOVESPEED);
if (CSTATE == MOVEL){
MOVESPEEDX = (MOVESPEEDX + 1);
} else {
MOVESPEEDX = (MOVESPEEDX - 1);
};
BODY.die1();
}
public function setNextInterval(){
if (SCRIPT.ENDOFDAY){
if ((((HEALTH1 <= 0)) || ((HEALTH2 <= 0)))){
ALIVE = false;
destroy();
return;
};
};
if ((((HEALTH1 <= 0)) && ((HEALTH2 <= 0)))){
CURINSCENEINT = (MININSCENEINT * 4);
} else {
if ((((HEALTH1 <= 0)) || ((HEALTH2 <= 0)))){
CURINSCENEINT = (MININSCENEINT * 2);
} else {
CURINSCENEINT = MININSCENEINT;
};
};
if (HEALTH1 <= 0){
HEALTH1 = 100;
ALIVE1 = true;
HEALTHBAR1.setHealth(HEALTH1);
HEALTHBAR1.visible = true;
};
if (HEALTH2 <= 0){
HEALTH2 = 100;
ALIVE2 = true;
HEALTHBAR2.setHealth(HEALTH2);
HEALTHBAR2.visible = true;
};
}
public function pausePlay(){
BODY.stopPlay();
}
public function explode(_arg1:Number):Number{
if (!ALIVE){
return;
};
ALIVE = false;
endAttack();
HEALTHBAR1.visible = false;
HEALTHBAR2.visible = false;
if (CSTATE == MOVEL){
BODY.explodeLeft();
} else {
BODY.explodeRight();
};
GAME.evt(60, fadeOut, this);
return (100);
}
public function setYandScale(){
var _local1:Number;
var _local2:Number;
_local1 = (Math.pow(V, VP) / VPMAX);
if (_local1 > 1){
_local1 = 1;
};
this.y = (220 + (_local1 * 230));
_local2 = (0.3 + (_local1 * 0.65));
this.scaleX = _local2;
this.scaleY = _local2;
}
public function moveRight(){
V = (V + MOVESPEED);
if (V > VMAX){
V = VMAX;
};
setYandScale();
this.x = (this.x + MOVESPEEDX);
if (((!(ATTACKING)) && (ALIVE2))){
if ((((this.x >= FIRESCOPE)) && ((this.x > 0)))){
startAttack();
};
};
if (ATTACKING){
if ((((this.x >= (700 - FIRESCOPE))) || ((this.x > 700)))){
endAttack();
};
};
if (this.x > 900){
CSTATE = OUTOFSCENE;
if (ATTACKING){
endAttack();
};
setNextInterval();
};
}
public function resumePlay(){
BODY.continuePlay();
}
public function unitKill(){
}
public function endAttack(){
ATTACKING = false;
HITHERO = false;
BODY.stopShooting();
}
public function fadeOut(_arg1:Object=null){
GAME.animation(this, (16 * 2), fadeOutAlpha);
GAME.evt((16 * 2), destroy, this);
}
public function fadeOutAlpha(_arg1:Number, _arg2:Number){
this.alpha = (1 - (_arg1 / _arg2));
}
public function bleed(_arg1:Number){
if (_arg1 == 1){
BLOODMC1.gotoAndPlay(2);
} else {
BLOODMC2.gotoAndPlay(2);
};
}
public function startAttack(){
if (!ALIVE){
return;
};
if (!ALIVE2){
return;
};
HITHERO = false;
ATTACKING = true;
BODY.startShooting();
}
public function nextState(){
if (!ALIVE){
return;
};
switch (CSTATE){
case OUTOFSCENE:
CURINSCENEINT--;
if (CURINSCENEINT <= 0){
startToMove();
};
break;
case MOVEL:
moveLeft();
break;
case MOVER:
moveRight();
break;
};
}
public function specialShot(){
}
public function moveLeft(){
V = (V + MOVESPEED);
if (V > VMAX){
V = VMAX;
};
setYandScale();
this.x = (this.x + MOVESPEEDX);
if (((!(ATTACKING)) && (ALIVE2))){
if ((((this.x <= (700 - FIRESCOPE))) && ((this.x < 700)))){
startAttack();
};
};
if (ATTACKING){
if ((((this.x <= FIRESCOPE)) || ((this.x < 0)))){
endAttack();
};
};
if (this.x < -200){
CSTATE = OUTOFSCENE;
if (ATTACKING){
endAttack();
};
setNextInterval();
};
}
public function tryExplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
if ((((this.x >= _arg1)) && ((this.x <= _arg2)))){
if ((((this.V >= _arg3)) && ((this.V <= _arg4)))){
explode((_arg4 - _arg3));
};
};
}
public function createDriverDie(){
var _local1:MovieClip;
var _local2:Number;
var _local3:Number;
var _local4:Point;
_local1 = new diecardriverA();
_local2 = (Math.pow(V, VP) / VPMAX);
if (_local2 > 1){
_local2 = 1;
};
glo.bal.SCRIPT.SCENE.addChild(_local1);
_local4 = DIEPT.localToGlobal(new Point(0, 0));
_local1.x = _local4.x;
_local1.y = _local4.y;
_local3 = (0.4 + (_local2 * 0.7));
_local1.scaleX = _local3;
_local1.scaleY = _local3;
_local1.gotoAndPlay(2);
}
public function hitdamage1(_arg1:Number){
if (!ALIVE1){
return;
};
HEALTH1 = (HEALTH1 - _arg1);
if (HEALTH1 > 0){
HEALTHBAR1.setHealth(HEALTH1);
DAMAGEVISUAL1.damage(_arg1);
} else {
HEALTHBAR1.visible = false;
DAMAGEVISUAL1.damage(_arg1);
death1();
};
bleed(1);
}
public function hitdamage2(_arg1:Number){
if (!ALIVE2){
return;
};
HEALTH2 = (HEALTH2 - _arg1);
if (HEALTH2 > 0){
HEALTHBAR2.setHealth(HEALTH2);
DAMAGEVISUAL2.damage(_arg1);
} else {
HEALTHBAR2.visible = false;
DAMAGEVISUAL2.damage(_arg1);
death2();
};
bleed(2);
}
public function startToMove(){
if (this.y < 270){
MOVESPEEDX = 4;
} else {
if (this.y < 320){
MOVESPEEDX = 5;
} else {
if (this.y < 370){
MOVESPEEDX = 6;
} else {
MOVESPEEDX = 7;
};
};
};
if (this.x > 700){
MOVESPEEDX = -(MOVESPEEDX);
CSTATE = MOVEL;
BODY.showLeft();
} else {
CSTATE = MOVER;
BODY.showRight();
};
if (this.y <= 240){
MOVESPEED = Math.round((Math.random() * 2));
} else {
if (this.y >= 320){
MOVESPEED = Math.round((Math.random() * -2));
} else {
if (Math.random() > 0.5){
MOVESPEED = Math.round((Math.random() * 2));
} else {
MOVESPEED = Math.round((Math.random() * -2));
};
};
};
}
public function destroy(_arg1:Object=null){
ALIVE = false;
HZ_HEAD1 = null;
HZ_CHEST1 = null;
HZ_HEAD2 = null;
HZ_CHEST2 = null;
this.visible = false;
unitKill();
glo.bal.SCRIPT.removeUnit(this);
glo.bal.SCRIPT.removeUnit2(this);
parent.removeChild(this);
}
}
}//package
Section 245
//aiKamikaze (aiKamikaze)
package {
import flash.display.*;
public class aiKamikaze extends MovieClip {
public var HEALTHBAR:MovieClip;
public var ID:Number;
public var MOVESPEEDX:Number;
public var VMAX:Number;
public var V:Number;
public var HEALTH:Number;
public var CHEST_FACTOR:Number;
public var FCOUNT:Number;
public var DAMAGEVISUAL:MovieClip;
public var VPMAX:Number;
public var SWAPPED:Boolean;
public var HZ_CHEST:MovieClip;
public var DAMAGE:Number;
public var TYPE:String;
public var BODY:MovieClip;
public var ALIVE:Boolean;
public var EXPLODEV:Number;
public var VP:Number;
public var SCRIPT:GameScript;
public var GAME:GameInstance;
public var MOVESPEED:Number;
public var BLOODMC:MovieClip;
public static var COUNTUNITS:Number = 0;
public function aiKamikaze(){
ID = aiUnit.COUNTUNITS++;
MOVESPEED = 15;
MOVESPEEDX = 0;
V = 0;
VMAX = 1400;
VP = 2;
VPMAX = Math.pow(VMAX, VP);
ALIVE = true;
HEALTH = 100;
GAME = glo.bal.GAME;
SCRIPT = glo.bal.SCRIPT;
FCOUNT = 0;
}
public function destroy(_arg1:Object=null){
ALIVE = false;
HZ_HEAD1 = null;
HZ_CHEST1 = null;
HZ_HEAD2 = null;
HZ_CHEST2 = null;
this.visible = false;
unitKill();
glo.bal.SCRIPT.removeUnit(this);
glo.bal.SCRIPT.removeUnit2(this);
parent.removeChild(this);
}
public function resumePlay(){
}
public function unitKill(){
}
public function hitDetection(_arg1:Object):Number{
var _local2:Number;
var _local3:Number;
if (!ALIVE){
return (0);
};
_local2 = 0;
if (HZ_CHEST){
if (HZ_CHEST.hitTestObject(_arg1.area)){
_local2 = 100;
};
};
_local3 = (Math.pow(V, VP) / VPMAX);
if (_local3 > 1){
_local3 = 1;
};
_local2 = (_local2 * (1 + (_local3 * 0.6)));
if ((((HEALTH == 100)) && ((_local2 >= 100)))){
if (V < 300){
glo.bal.PLAYER.points(100);
glo.bal.BONUSNOTICE.longRangeCleanShot();
} else {
glo.bal.PLAYER.points(30);
glo.bal.BONUSNOTICE.cleanShot();
};
hitExplosion();
};
return (_local2);
}
public function fadeOutAlpha(_arg1:Number, _arg2:Number){
this.alpha = (1 - (_arg1 / _arg2));
}
public function fadeOut(_arg1:Object=null){
GAME.animation(this, (16 * 2), fadeOutAlpha);
GAME.evt((16 * 2), destroy, this);
}
public function pausePlay(){
}
public function nextState(){
if (!ALIVE){
return;
};
moveForward();
FCOUNT++;
if (FCOUNT <= 33){
this.alpha = (FCOUNT * 0.03);
};
}
public function tryExplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
if ((((this.x >= _arg1)) && ((this.x <= _arg2)))){
if ((((this.V >= _arg3)) && ((this.V <= _arg4)))){
explode((_arg4 - _arg3));
};
};
}
public function explodeOnPlayer(){
if (!ALIVE){
return;
};
glo.bal.PLAYER.kamikazeExplosion(DAMAGE, this);
death();
}
public function moveForward(){
V = (V + MOVESPEED);
if (V > VMAX){
V = VMAX;
};
setYandScale();
this.x = (this.x + MOVESPEEDX);
if (this.V >= EXPLODEV){
explodeOnPlayer();
};
}
public function hitExplosion(){
if (!ALIVE){
return;
};
death();
}
public function death(){
if (!ALIVE){
return;
};
ALIVE = false;
BODY.gotoAndStop(2);
SCRIPT.explodeKamikaze(this, this.x, V);
GAME.evt(60, fadeOut, this);
glo.bal.SCRIPT.removeUnit(this);
}
public function explode(_arg1:Number):Number{
if (!ALIVE){
return;
};
death();
return (100);
}
public function setYandScale(){
var _local1:Number;
var _local2:Number;
_local1 = (Math.pow(V, VP) / VPMAX);
if (_local1 > 1){
_local1 = 1;
};
this.y = (220 + (_local1 * 230));
_local2 = (0.3 + (_local1 * 0.7));
this.scaleX = _local2;
this.scaleY = _local2;
}
}
}//package
Section 246
//aiPlayer (aiPlayer)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class aiPlayer extends MovieClip {
public var LAYER_SPLATTER:MovieClip;
public var WEAPON:Number;
public var SHAKING:Boolean;
public var STATS_CLEANINAROW:Number;
public var SHAKECOUNTER:Number;
public var HEALTH:Number;
public var SNIPERIND:Number;
public var MOUSEY:Number;
public var RELOADHELPER:Number;
public var MOUSEX:Number;
public var REGENINT:Number;
public var AMMO_TOTAL:Array;
public var ALIVE:Boolean;
public var NATURALSHIELD:Number;
public var SPLATTER:MovieClip;
public var SCRIPT:GameScript;
public var STATS_SHOTS:Number;
public var STATS_HITS:Number;
public var AMMO_CHAMBER:Array;
public var INTERFACE:MovieClip;
public var FIREDAMAGE:Array;
public var STATS_CLEANBONUS:Number;
public var WHEELDELTA:Number;
public var DAMAGE:Number;
public var FIRING:Boolean;
public var AMMO_FULL:Array;
public var RELOADING:Boolean;
public var FIREFX:MovieClip;
public var BODY:MovieClip;
public var HIDDEN:Boolean;
public var HITRADIUS:Number;
public var TRANSHIDE:Boolean;
public var SCOPEMODE:Boolean;
public var GAME:GameInstance;
public function aiPlayer(){
addFrameScript(0, frame1);
ME = this;
glo.bal.PLAYER = this;
GAME = glo.bal.GAME;
SCRIPT = glo.bal.SCRIPT;
}
public function tryUnhideHero(){
if (((HIDDEN) && (!(TRANSHIDE)))){
unhideHero();
};
}
public function ammoDisplay(){
var _local1:Number;
var _local2:Number;
_local1 = 1;
while (_local1 < 5) {
_local2 = Math.ceil((AMMO_TOTAL[(_local1 - 1)] / AMMO_FULL[(_local1 - 1)]));
glo.bal.WEAPONS.setAmmo(_local1, AMMO_TOTAL[(_local1 - 1)]);
_local1++;
};
_local2 = Math.ceil((AMMO_TOTAL[(WEAPON - 1)] / AMMO_FULL[(WEAPON - 1)]));
glo.bal.AMMO.setWeapon(WEAPON);
glo.bal.AMMO.setAmmo(_local2, AMMO_CHAMBER[(WEAPON - 1)], AMMO_TOTAL[(WEAPON - 1)]);
}
public function stopShake(_arg1:Object=null){
SHAKING = false;
this.gotoAndStop(1);
}
public function evtSpaceDown(_arg1:Object=null){
if (SNIPERIND != WEAPON){
return;
};
changeScopeMode();
}
public function evtKey1(_arg1:Object=null){
if (!ALIVE){
return;
};
if (glo.bal.CGAME.BOMBS.length <= 0){
return;
};
explodeBomb(0);
}
public function evtKey3(_arg1:Object=null){
if (!ALIVE){
return;
};
if (glo.bal.CGAME.BOMBS.length <= 2){
return;
};
explodeBomb(2);
}
public function evtKey4(_arg1:Object=null){
if (!ALIVE){
return;
};
if (glo.bal.CGAME.BOMBS.length <= 3){
return;
};
explodeBomb(3);
}
public function evtMouseDown(_arg1:Number, _arg2:Number){
if (!ALIVE){
return;
};
if (TRANSHIDE){
return;
};
if (HIDDEN){
return;
};
if (glo.bal.INTERFACE.GAMEPAUSED){
return;
};
beginFire();
}
public function evtKey2(_arg1:Object=null){
if (!ALIVE){
return;
};
if (glo.bal.CGAME.BOMBS.length <= 1){
return;
};
explodeBomb(1);
}
public function evtKey5(_arg1:Object=null){
if (!ALIVE){
return;
};
if (glo.bal.CGAME.BOMBS.length <= 4){
return;
};
explodeBomb(4);
}
public function evtKey6(_arg1:Object=null){
if (!ALIVE){
return;
};
}
public function nextLevel(){
var _local1:Number;
returnToNormalMode();
glo.bal.CGAME.CLEVEL++;
if (glo.bal.CGAME.CLEVEL == 7){
glo.bal.GAMEMENU.gotoAndStop("finalHistory");
return;
};
switch (glo.bal.CGAME.CLEVEL){
case 2:
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + Math.ceil((200 * glo.bal.CGAME.NEGOTIATION)));
break;
case 3:
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + Math.ceil((200 * glo.bal.CGAME.NEGOTIATION)));
break;
case 4:
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + Math.ceil((200 * glo.bal.CGAME.NEGOTIATION)));
break;
case 5:
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + Math.ceil((200 * glo.bal.CGAME.NEGOTIATION)));
break;
case 6:
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + Math.ceil((200 * glo.bal.CGAME.NEGOTIATION)));
break;
};
_local1 = (glo.bal.CGAME.AWEIGHT % 5);
if (_local1 > 0){
glo.bal.CGAME.AWEIGHT = (glo.bal.CGAME.AWEIGHT + 5);
};
saveGame();
glo.bal.GAMEMENU.gotoAndStop("shop");
}
public function pausePlay(){
this.visible = false;
}
public function changeScopeMode(){
var _local1:Number;
var _local2:Number;
if (!ALIVE){
return;
};
if (TRANSHIDE){
return;
};
if (HIDDEN){
return;
};
_local1 = GAME.mouseX;
_local2 = GAME.mouseY;
if (SCOPEMODE){
returnToNormalMode();
} else {
GAME.scaleX = 2;
GAME.scaleY = 2;
SCOPEMODE = true;
glo.bal.ScopeMask.gotoAndStop(2);
BODY.visible = false;
};
}
public function hideHero(){
if (!ALIVE){
return;
};
if (TRANSHIDE){
return;
};
TRANSHIDE = true;
if (FIRING){
stopFire();
};
reload();
SCRIPT.hideScene();
glo.bal.Aim.visible = false;
this.visible = false;
GAME.showMouse();
}
public function quit(){
var _local1:*;
glo.bal.GAMES = gameData.getGames();
_local1 = 0;
while (_local1 < glo.bal.GAMES.length) {
if (glo.bal.CGAME.PLAYERID == glo.bal.GAMES[_local1].PLAYERID){
glo.bal.CGAME = glo.bal.GAMES[_local1];
};
_local1++;
};
returnToNormalMode();
glo.bal.INTERFACE.quit();
glo.bal.GAMEMENU.gotoAndStop("menu");
}
public function doneReloading(_arg1:Object=null){
if (!ALIVE){
return;
};
RELOADING = false;
if (!isOnHiddenMode()){
this.visible = true;
};
glo.bal.RELOAD.done();
ammoDisplay();
}
public function evtShowCSheet(_arg1:Object=null){
if (!ALIVE){
return;
};
glo.bal.INTERFACE.showCharacterSheet();
}
function frame1(){
stop();
}
public function beginFire(){
if (!ALIVE){
return;
};
if (RELOADING){
return;
};
if (FIRING){
return;
};
if (AMMO_CHAMBER[(WEAPON - 1)] < 1){
glo.bal.JUKEBOX.dryFire();
RELOADHELPER--;
if (RELOADHELPER < 0){
reload();
};
return;
};
switch (WEAPON){
case 1:
glo.bal.JUKEBOX.pistol();
FIREFX.fire();
fireNow();
break;
case 2:
glo.bal.JUKEBOX.finisher();
FIREFX.fire();
fireNow();
break;
case 3:
glo.bal.JUKEBOX.playGunLoop();
FIREFX.fire();
fireNow();
FIRING = true;
break;
case 4:
glo.bal.JUKEBOX.hellrazor();
FIREFX.fire();
fireNow();
break;
};
SCRIPT.shake();
shake();
SHAKECOUNTER = 5;
}
public function decreaseHealth(_arg1:Number, _arg2:MovieClip){
if (_arg2.TYPE == "kamikazeA"){
glo.bal.HEROHIT2.x = 350;
glo.bal.HEROHIT2.y = 250;
glo.bal.HEROHIT2.showSplatter();
} else {
glo.bal.HEROHIT.x = _arg2.x;
glo.bal.HEROHIT.y = (_arg2.y - 100);
glo.bal.HEROHIT.showSplatter();
};
HEALTH = (HEALTH - Math.round((_arg1 * NATURALSHIELD)));
if ((HEALTH / glo.bal.CGAME.RESISTANCE) <= 20){
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.playHeartbeat2();
} else {
if ((HEALTH / glo.bal.CGAME.RESISTANCE) <= 40){
glo.bal.JUKEBOX.stopHeartbeat2();
glo.bal.JUKEBOX.playHeartbeat1();
} else {
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
};
};
if (HEALTH <= 0){
HEALTH = 0;
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
};
glo.bal.HEALTHBAR.setHealth(HEALTH, (glo.bal.CGAME.RESISTANCE * 100));
if (HEALTH == 0){
BODY.visible = false;
ALIVE = false;
if (FIRING){
glo.bal.JUKEBOX.stopGunLoop();
};
glo.bal.INTERFACE.gameOver();
};
}
public function evtPauseGame(_arg1:Object=null){
if (!ALIVE){
return;
};
glo.bal.INTERFACE.pauseResumePlay();
}
public function evtMouseUp(_arg1:Number, _arg2:Number){
if (FIRING){
stopFire();
};
}
public function fireNow(){
var _local1:Object;
var _local2:Number;
if (AMMO_CHAMBER[(WEAPON - 1)] < 1){
stopFire();
return;
};
_local1 = {area:glo.bal.Aim.getAimDot(), damage:FIREDAMAGE[(WEAPON - 1)]};
_local2 = SCRIPT.hitDetection(_local1);
points(Math.round((_local2 / 3)));
STATS_SHOTS++;
if (_local2 > 0){
if (_local2 > 20){
STATS_HITS++;
};
if (_local2 < 100){
STATS_CLEANINAROW = 0;
STATS_CLEANBONUS = 5;
} else {
STATS_CLEANINAROW++;
if (STATS_CLEANINAROW == STATS_CLEANBONUS){
points((STATS_CLEANBONUS * 30));
glo.bal.BONUSNOTICE.bonus(STATS_CLEANBONUS);
STATS_CLEANBONUS = (STATS_CLEANBONUS + 5);
};
};
} else {
STATS_CLEANINAROW = 0;
STATS_CLEANBONUS = 5;
};
var _local3 = AMMO_CHAMBER;
var _local4 = (WEAPON - 1);
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
_local3 = AMMO_TOTAL;
_local4 = (WEAPON - 1);
_local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
ammoDisplay();
}
public function doneReloading2(_arg1:Object=null){
if (!ALIVE){
return;
};
glo.bal.JUKEBOX.reload1();
RELOADING = false;
glo.bal.RELOAD.done();
ammoDisplay();
}
public function setXP(){
if (glo.bal.CGAME.XPLEVEL == 0){
if (glo.bal.CGAME.POINTS >= 6000){
glo.bal.CGAME.XPLEVEL++;
glo.bal.CGAME.XP = 30;
glo.bal.XPBAR.levelUp();
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, 6000, 12000);
} else {
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, 0, 6000);
};
} else {
if (glo.bal.CGAME.XPLEVEL == 1){
if (glo.bal.CGAME.POINTS >= 12000){
glo.bal.CGAME.XPLEVEL++;
glo.bal.CGAME.XP = (glo.bal.CGAME.XP + 50);
glo.bal.XPBAR.levelUp();
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, 12000, 18000);
} else {
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, 6000, 12000);
};
} else {
if (glo.bal.CGAME.POINTS >= (glo.bal.CGAME.XPLEVEL * 9000)){
glo.bal.CGAME.XP = (glo.bal.CGAME.XP + (30 + (glo.bal.CGAME.XPLEVEL * 20)));
glo.bal.CGAME.XPLEVEL++;
glo.bal.XPBAR.levelUp();
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, (glo.bal.CGAME.XPLEVEL * 9000), ((glo.bal.CGAME.XPLEVEL + 1) * 9000));
} else {
glo.bal.XPBAR.setXP(glo.bal.CGAME.POINTS, ((glo.bal.CGAME.XPLEVEL - 1) * 9000), (glo.bal.CGAME.XPLEVEL * 9000));
};
};
};
}
public function kamikazeExplosion(_arg1:Number, _arg2:MovieClip){
if (!ALIVE){
return;
};
if (((TRANSHIDE) || (HIDDEN))){
_arg1 = (_arg1 / 2);
};
decreaseHealth(_arg1, _arg2);
}
public function points(_arg1:Number){
if (glo.bal.CGAME.DIFFICULTY == 1){
_arg1 = (_arg1 * 0.75);
};
if (glo.bal.CGAME.DIFFICULTY == 2){
_arg1 = (_arg1 * 1);
};
if (glo.bal.CGAME.DIFFICULTY == 3){
_arg1 = (_arg1 * 1.25);
};
glo.bal.CGAME.POINTS = (glo.bal.CGAME.POINTS + Math.round(_arg1));
setXP();
}
public function resumePlay(){
if (!isOnHiddenMode()){
this.visible = true;
};
}
public function onMouseWheel(_arg1:Number){
var _local2:Number;
WHEELDELTA = (WHEELDELTA + _arg1);
_local2 = WEAPON;
if (WHEELDELTA > 3){
WHEELDELTA = 0;
_local2++;
if (_local2 > 5){
_local2 = 1;
};
while (AMMO_TOTAL[(_local2 - 1)] < 1) {
_local2++;
if (_local2 > 5){
_local2 = 1;
};
};
setWeapon(_local2);
};
if (WHEELDELTA < -3){
WHEELDELTA = 0;
_local2--;
if (_local2 < 1){
_local2 = 5;
};
while (AMMO_TOTAL[(_local2 - 1)] < 1) {
_local2--;
if (_local2 < 1){
_local2 = 5;
};
};
setWeapon(_local2);
};
}
public function shake(){
SHAKING = true;
this.gotoAndPlay(5);
GAME.evt(5, stopShake, this);
}
public function init(){
var _local1:Number;
ALIVE = true;
RELOADING = false;
FIRING = false;
HEALTH = (glo.bal.CGAME.RESISTANCE * 100);
TRANSHIDE = false;
HIDDEN = false;
SCOPEMODE = false;
SHAKING = false;
WHEELDELTA = 0;
AMMO_TOTAL = util.copyArray(glo.bal.CGAME.AMMO_TOTAL);
AMMO_CHAMBER = [18, 8, 60, 10];
AMMO_FULL = [18, 8, 60, 10];
_local1 = 0;
while (_local1 < 4) {
if (AMMO_CHAMBER[_local1] > AMMO_TOTAL[_local1]){
AMMO_CHAMBER[_local1] = AMMO_TOTAL[_local1];
};
_local1++;
};
RELOADHELPER = 0;
NATURALSHIELD = 1;
switch (glo.bal.CGAME.DIFFICULTY){
case 1:
NATURALSHIELD = 0.5;
break;
case 2:
NATURALSHIELD = 0.7;
break;
case 3:
NATURALSHIELD = 1;
break;
};
trace(("Difficulty : " + glo.bal.CGAME.DIFFICULTY));
trace(("Natural Shield : " + NATURALSHIELD));
WEAPON = 0;
FIREDAMAGE = [50, 85, 50, 100];
SNIPERIND = 4;
STATS_SHOTS = 0;
STATS_HITS = 0;
STATS_CLEANINAROW = 0;
STATS_CLEANBONUS = 5;
ammoDisplay();
glo.bal.ScopeMask.gotoAndStop(1);
setWeapon(1);
GAME.keyDownHandler(Keyboard.SPACE, evtSpaceDown, this);
GAME.keyDownHandler(67, evtShowCSheet, this);
GAME.keyDownHandler(80, evtPauseGame, this);
GAME.keyDownHandler(82, evtReload, this);
GAME.keyDownHandler(49, evtKey1, this);
GAME.keyDownHandler(97, evtKey1, this);
GAME.keyDownHandler(50, evtKey2, this);
GAME.keyDownHandler(98, evtKey2, this);
GAME.keyDownHandler(51, evtKey3, this);
GAME.keyDownHandler(99, evtKey3, this);
GAME.keyDownHandler(52, evtKey4, this);
GAME.keyDownHandler(100, evtKey4, this);
GAME.keyDownHandler(53, evtKey5, this);
GAME.keyDownHandler(101, evtKey5, this);
GAME.keyDownHandler(54, evtKey6, this);
GAME.keyDownHandler(102, evtKey6, this);
REGENINT = Math.round(((3 * 16) / glo.bal.CGAME.REGENERATION));
GAME.evt(REGENINT, regenerateHealth, this);
}
public function setWeapon(_arg1:Number){
if (AMMO_TOTAL[(_arg1 - 1)] < 1){
return;
};
if (WEAPON == _arg1){
return;
};
WEAPON = _arg1;
if (((!((SNIPERIND == WEAPON))) && (SCOPEMODE))){
changeScopeMode();
};
ammoDisplay();
switch (WEAPON){
case 1:
BODY.pistol();
HITRADIUS = 12;
break;
case 2:
BODY.shotgun();
HITRADIUS = 20;
break;
case 3:
BODY.rifle();
HITRADIUS = 12;
break;
case 4:
BODY.sniper();
HITRADIUS = 5;
break;
};
glo.bal.Aim.setWeapon(WEAPON);
}
public function tryAgain(){
var _local1:*;
glo.bal.GAMES = gameData.getGames();
_local1 = 0;
while (_local1 < glo.bal.GAMES.length) {
if (glo.bal.CGAME.PLAYERID == glo.bal.GAMES[_local1].PLAYERID){
glo.bal.CGAME = new gameData("playerName", 1);
gameData.copyGame(glo.bal.GAMES[_local1], glo.bal.CGAME);
break;
};
_local1++;
};
returnToNormalMode();
glo.bal.GAMEMENU.gotoAndStop("shop");
}
public function explodeBomb(_arg1:Number){
if (!ALIVE){
return;
};
glo.bal.SCRIPT.explodeBomb(_arg1);
}
public function refreshRegenInterval(){
REGENINT = Math.round(((3 * 16) / glo.bal.CGAME.REGENERATION));
}
public function levelCompleted(){
glo.bal.STATS_ACCURACY = Math.round(((100 * STATS_HITS) / STATS_SHOTS));
glo.bal.STATS_DAMAGETAKEN = Math.round((100 - HEALTH));
glo.bal.CGAME.TOTALTIMEELAPSED = (glo.bal.CGAME.TOTALTIMEELAPSED + Math.round((glo.bal.LEVEL_TOTALTIME / 24)));
}
public function reward(_arg1:Number){
glo.bal.CGAME.MONEY = (glo.bal.CGAME.MONEY + _arg1);
glo.bal.CASH.reward(_arg1);
}
public function saveGame(){
var _local1:*;
glo.bal.CGAME.AMMO_TOTAL = util.copyArray(AMMO_TOTAL);
_local1 = 0;
while (_local1 < glo.bal.GAMES.length) {
if (glo.bal.CGAME.PLAYERID == glo.bal.GAMES[_local1].PLAYERID){
gameData.copyGame(glo.bal.CGAME, glo.bal.GAMES[_local1]);
break;
};
_local1++;
};
gameData.saveGames(glo.bal.GAMES);
}
public function regenerateHealth(_arg1:Object=null){
var _local2:Number;
if (!ALIVE){
return;
};
if (!glo.bal.INTERFACE.ALIVE){
return;
};
_local2 = 2;
HEALTH = (HEALTH + _local2);
if (HEALTH > (glo.bal.CGAME.RESISTANCE * 100)){
HEALTH = (glo.bal.CGAME.RESISTANCE * 100);
};
glo.bal.HEALTHBAR.setHealth(HEALTH, (glo.bal.CGAME.RESISTANCE * 100));
if ((HEALTH / glo.bal.CGAME.RESISTANCE) <= 20){
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.playHeartbeat2();
} else {
if ((HEALTH / glo.bal.CGAME.RESISTANCE) <= 40){
glo.bal.JUKEBOX.stopHeartbeat2();
glo.bal.JUKEBOX.playHeartbeat1();
} else {
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
};
};
GAME.evt(REGENINT, regenerateHealth, this);
}
public function tryHideHero(){
if (((!(HIDDEN)) && (!(TRANSHIDE)))){
if (SCOPEMODE){
returnToNormalMode();
};
hideHero();
};
}
public function returnToNormalMode(){
GAME.scaleX = 1;
GAME.scaleY = 1;
GAME.x = 0;
GAME.y = 25;
glo.bal.ScopeMask.x = 0;
glo.bal.ScopeMask.y = 0;
glo.bal.ScopeMask.gotoAndStop(1);
SCOPEMODE = false;
BODY.visible = true;
}
public function stopFire(){
if (!FIRING){
return;
};
FIRING = false;
FIREFX.stopFire();
glo.bal.JUKEBOX.stopGunLoop();
}
public function evtReload(_arg1:Object=null){
reload(2);
}
public function nextState(_arg1:Number, _arg2:Number){
if (!ALIVE){
return;
};
MOUSEX = glo.bal.INTERFACE.mouseX;
MOUSEY = glo.bal.INTERFACE.mouseY;
if (!SHAKING){
this.x = (MOUSEX * 0.8);
this.y = ((MOUSEY * 0.7) + 25);
};
if (this.y < 100){
this.y = 100;
};
glo.bal.Aim.x = MOUSEX;
glo.bal.Aim.y = (MOUSEY + 25);
glo.bal.Aim.nextState();
if (SCOPEMODE){
GAME.x = -(MOUSEX);
GAME.y = -(MOUSEY);
glo.bal.ScopeMask.x = MOUSEX;
glo.bal.ScopeMask.y = (MOUSEY + 25);
};
if ((((WEAPON == 3)) && (FIRING))){
continueFire();
};
}
public function gameDead(){
trace("aiPlayer->gameDead");
ALIVE = false;
glo.bal.Aim.visible = false;
Mouse.show();
}
public function continueFire(){
fireNow();
SHAKECOUNTER--;
if (SHAKECOUNTER < 1){
SCRIPT.shake();
shake();
SHAKECOUNTER = 5;
};
}
public function unhidden(){
if (!ALIVE){
return;
};
TRANSHIDE = false;
HIDDEN = false;
}
public function reload(_arg1:Number=0){
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (RELOADING){
return;
};
if ((((AMMO_TOTAL[(WEAPON - 1)] < 1)) || ((AMMO_TOTAL[(WEAPON - 1)] <= AMMO_CHAMBER[(WEAPON - 1)])))){
return;
};
if (AMMO_CHAMBER[(WEAPON - 1)] == AMMO_FULL[(WEAPON - 1)]){
return;
};
glo.bal.JUKEBOX.reload1();
RELOADING = true;
if (!isOnHiddenMode()){
this.visible = false;
};
_local2 = 20;
if (AMMO_CHAMBER[(WEAPON - 1)] > 0){
_local3 = Math.min(AMMO_FULL[(WEAPON - 1)], AMMO_TOTAL[(WEAPON - 1)]);
_local4 = (_local3 - AMMO_CHAMBER[(WEAPON - 1)]);
_local2 = Math.round(((_local2 * _local4) / _local3));
};
glo.bal.RELOAD.reload(WEAPON, _local2);
glo.bal.AMMO.reloading();
if (AMMO_TOTAL[(WEAPON - 1)] < AMMO_FULL[(WEAPON - 1)]){
AMMO_CHAMBER[(WEAPON - 1)] = AMMO_TOTAL[(WEAPON - 1)];
} else {
AMMO_CHAMBER[(WEAPON - 1)] = AMMO_FULL[(WEAPON - 1)];
};
RELOADHELPER = 0;
GAME.evt(_local2, doneReloading, this);
}
public function hit(_arg1:Number, _arg2:MovieClip){
if (!ALIVE){
return;
};
if (TRANSHIDE){
return;
};
if (HIDDEN){
return;
};
decreaseHealth(_arg1, _arg2);
}
public function hidden(){
if (!ALIVE){
return;
};
TRANSHIDE = false;
HIDDEN = true;
}
public function addCartridge(_arg1:Number){
AMMO_TOTAL[(_arg1 - 1)] = (AMMO_TOTAL[(_arg1 - 1)] + AMMO_FULL[(_arg1 - 1)]);
}
public function unhideHero(){
if (!ALIVE){
return;
};
if (TRANSHIDE){
return;
};
TRANSHIDE = true;
if (FIRING){
stopFire();
};
SCRIPT.showScene();
}
public function isOnHiddenMode(){
if (TRANSHIDE){
return (true);
};
if (HIDDEN){
return (true);
};
return (false);
}
}
}//package
Section 247
//aiUnit (aiUnit)
package {
import flash.display.*;
public class aiUnit extends MovieClip {
public var CSTATE:Number;
public var HEALTHBAR:MovieClip;
public var MOVESPEEDX:Number;
public var SHOOTR_MIN:Number;
public var ATTACK:Number;
public var VPMAX:Number;
public var V:Number;
public var HEALTH:Number;
public var FCOUNT:Number;
public var CHEST_FACTOR:Number;
public var HZ_SPECIAL:MovieClip;
public var SWAPPED:Boolean;
public var PRECISION:Number;
public var HEAD_FACTOR:Number;
public var LEGS_FACTOR:Number;
public var ALIVE:Boolean;
public var VP:Number;
public var SCRIPT:GameScript;
public var FIREX:Number;
public var HZ_HEAD:MovieClip;
public var MOVESPEED:Number;
public var BLOODMC:MovieClip;
public var ID:Number;
public var VMAX:Number;
public var NECK_FACTOR:Number;
public var HZ_LEGS:MovieClip;
public var SHOOTR_MAX:Number;
public var TYPE:String;
public var RUNF:Number;
public var F_CHANGEACTION:Number;
public var AGGRESSION:Number;
public var RUNR:Number;
public var RUNL:Number;
public var RUNLSY:Number;
public var DAMAGEVISUAL:MovieClip;
public var SHOOTINT:Array;
public var HZ_NECK:MovieClip;
public var WAIT:Number;
public var DAMAGE:Number;
public var HZ_CHEST:MovieClip;
public var HITTED:Number;
public var BODY:MovieClip;
public var RUNRSY:Number;
public var MOVELIST:Array;
public var GAME:GameInstance;
public var HITHERO:Boolean;
public static var COUNTUNITS:Number = 0;
public function aiUnit(){
var _local1:Number;
super();
ID = aiUnit.COUNTUNITS++;
MOVESPEED = 6;
MOVESPEEDX = 0;
V = 0;
VMAX = 1400;
VP = 2;
VPMAX = Math.pow(VMAX, VP);
ALIVE = true;
HEALTH = 100;
GAME = glo.bal.GAME;
SCRIPT = glo.bal.SCRIPT;
FCOUNT = 0;
HITHERO = false;
_local1 = 0;
var _temp1 = _local1;
_local1 = (_local1 + 1);
IDLE = _temp1;
var _temp2 = _local1;
_local1 = (_local1 + 1);
WAIT = _temp2;
var _temp3 = _local1;
_local1 = (_local1 + 1);
RUNF = _temp3;
var _temp4 = _local1;
_local1 = (_local1 + 1);
RUNL = _temp4;
var _temp5 = _local1;
_local1 = (_local1 + 1);
RUNR = _temp5;
var _temp6 = _local1;
_local1 = (_local1 + 1);
RUNLSY = _temp6;
var _temp7 = _local1;
_local1 = (_local1 + 1);
RUNRSY = _temp7;
var _temp8 = _local1;
_local1 = (_local1 + 1);
ATTACK = _temp8;
var _temp9 = _local1;
_local1 = (_local1 + 1);
HITTED = _temp9;
CSTATE = IDLE;
this.visible = false;
}
public function hitDetection(_arg1:Object):Number{
var _local2:Number;
var _local3:Number;
if (!ALIVE){
return (0);
};
_local2 = 0;
if (HZ_NECK){
if (HZ_NECK.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * NECK_FACTOR));
};
};
if (HZ_HEAD){
if (HZ_HEAD.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * HEAD_FACTOR));
};
};
if (HZ_CHEST){
if (HZ_CHEST.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * CHEST_FACTOR));
};
};
if (HZ_LEGS){
if (HZ_LEGS.hitTestObject(_arg1.area)){
_local2 = (_local2 + (_arg1.damage * LEGS_FACTOR));
};
};
_local3 = (Math.pow(V, VP) / VPMAX);
if (_local3 > 1){
_local3 = 1;
};
_local2 = (_local2 * (1 + (_local3 * 0.6)));
if ((((HEALTH == 100)) && ((_local2 >= 100)))){
if (V < 300){
glo.bal.PLAYER.points(100);
glo.bal.BONUSNOTICE.longRangeCleanShot();
} else {
glo.bal.PLAYER.points(30);
glo.bal.BONUSNOTICE.cleanShot();
};
};
if (_local2 > 0){
hitdamage(_local2);
};
return (_local2);
}
public function fire(){
if (!ALIVE){
return;
};
if ((((this.x < 0)) || ((this.x > 700)))){
return;
};
if (!this.visible){
return;
};
if ((((Math.random() <= PRECISION)) && (!(HITHERO)))){
HITHERO = true;
glo.bal.PLAYER.hit(DAMAGE, this);
};
}
public function pausePlay(){
if (BODY){
if (BODY.MC){
BODY.MC.stop();
};
};
}
public function death(){
if (!ALIVE){
return;
};
ALIVE = false;
glo.bal.PLAYER.points(50);
glo.bal.SCRIPT.removeUnit(this);
if ((((((CSTATE == RUNF)) || ((CSTATE == RUNR)))) || ((CSTATE == RUNL)))){
BODY.dieB();
} else {
BODY.dieA();
};
GAME.evt(70, fadeOut, this);
}
public function backFromHit(){
BODY.walk();
MOVESPEED = 6;
CSTATE = IDLE;
chooseAction();
}
public function hitdamage(_arg1:Number){
if (!ALIVE){
return;
};
HEALTH = (HEALTH - _arg1);
if (HEALTH > 0){
CSTATE = HITTED;
BODY.hit();
MOVESPEED = -2;
MOVESPEEDX = 0;
HEALTHBAR.setHealth(HEALTH);
DAMAGEVISUAL.damage(_arg1);
} else {
HEALTHBAR.visible = false;
DAMAGEVISUAL.damage(_arg1);
death();
};
bleed();
}
public function chooseInitAction(){
var _local1:Number;
_local1 = Math.round((Math.random() * MOVELIST.length));
if (_local1 == MOVELIST.length){
_local1 = 0;
};
setYandScale();
this.visible = true;
F_CHANGEACTION = ((16 * 4) - ((16 * 3) * AGGRESSION));
switch (MOVELIST[_local1]){
case "runFront":
CSTATE = RUNF;
MOVESPEEDX = 0;
BODY.runFront();
break;
case "runLeft":
CSTATE = RUNL;
MOVESPEEDX = -4;
BODY.runLeft();
break;
case "runRight":
CSTATE = RUNR;
MOVESPEEDX = 4;
BODY.runRight();
break;
};
}
public function explode(_arg1:Number):Number{
if (!ALIVE){
return;
};
ALIVE = false;
glo.bal.PLAYER.points(50);
HEALTHBAR.visible = false;
glo.bal.SCRIPT.removeUnit(this);
if (_arg1 > this.V){
BODY.explodeBack();
} else {
BODY.explodeFront();
};
GAME.evt(70, fadeOut, this);
return (100);
}
public function setYandScale(){
var _local1:Number;
var _local2:Number;
_local1 = (Math.pow(V, VP) / VPMAX);
if (_local1 > 1){
_local1 = 1;
};
this.y = (220 + (_local1 * 230));
_local2 = (0.4 + (_local1 * 0.8));
this.scaleX = _local2;
this.scaleY = _local2;
}
public function resumePlay(){
if (BODY){
if (BODY.MC){
BODY.MC.play();
};
};
}
public function unitKill(){
}
public function endAttack(){
HITHERO = false;
chooseAction();
}
public function chooseAction(){
var _local1:Number;
var _local2:String;
if (!ALIVE){
return;
};
if (CSTATE == HITTED){
return;
};
_local1 = Math.round((Math.random() * MOVELIST.length));
if (_local1 == MOVELIST.length){
_local1 = 0;
};
_local2 = MOVELIST[_local1];
F_CHANGEACTION = ((16 * 4) - ((16 * 3) * AGGRESSION));
if (this.V >= SHOOTR_MIN){
if (this.x > 650){
_local2 = "runLeftSameY";
} else {
if (this.x < 50){
_local2 = "runRightSameY";
} else {
F_CHANGEACTION = Math.round((F_CHANGEACTION / 2));
_local2 = "wait";
};
};
} else {
if (this.V >= (SHOOTR_MIN - 100)){
if ((((this.x > 400)) && ((_local2 == "runRight")))){
_local2 = "runLeft";
} else {
if ((((this.x < 300)) && ((_local2 == "runLeft")))){
_local2 = "runRight";
};
};
} else {
if (this.x > 750){
_local2 = "runLeft";
} else {
if (this.x < -50){
_local2 = "runRight";
};
};
};
};
switch (_local2){
case "wait":
CSTATE = WAIT;
MOVESPEED = 0;
MOVESPEEDX = 0;
BODY.wait();
break;
case "runFront":
CSTATE = RUNF;
MOVESPEED = 6;
MOVESPEEDX = 0;
BODY.runFront();
break;
case "runLeft":
CSTATE = RUNL;
MOVESPEED = 6;
MOVESPEEDX = -4;
BODY.runLeft();
break;
case "runLeftSameY":
CSTATE = RUNLSY;
MOVESPEED = 0;
MOVESPEEDX = -4;
BODY.runLeft();
break;
case "runRight":
CSTATE = RUNR;
MOVESPEED = 6;
MOVESPEEDX = 4;
BODY.runRight();
break;
case "runRightSameY":
CSTATE = RUNRSY;
MOVESPEED = 0;
MOVESPEEDX = 4;
BODY.runRight();
break;
};
}
public function fadeOut(_arg1:Object=null){
GAME.animation(this, (16 * 2), fadeOutAlpha);
GAME.evt((16 * 2), destroy, this);
}
public function bleed(){
BLOODMC.gotoAndPlay(2);
}
public function fadeOutAlpha(_arg1:Number, _arg2:Number){
this.alpha = (1 - (_arg1 / _arg2));
}
public function specialShot(){
}
public function startAttack(){
if (!ALIVE){
return;
};
if (CSTATE == ATTACK){
return;
};
if (this.V < SHOOTR_MAX){
chooseAction();
return;
};
if ((((this.x < 30)) || ((this.x > 670)))){
chooseAction();
return;
};
HITHERO = false;
FIREX = (SHOOTINT[0] + Math.round(((SHOOTINT[1] - SHOOTINT[0]) * Math.random())));
CSTATE = ATTACK;
BODY.shoot(FIREX);
}
public function nextMove(){
V = (V + MOVESPEED);
if (V > VMAX){
V = VMAX;
};
setYandScale();
this.x = (this.x + MOVESPEEDX);
if ((((((((((this.V >= SHOOTR_MIN)) && (!((CSTATE == WAIT))))) && (!((CSTATE == HITTED))))) && (!((CSTATE == RUNRSY))))) && (!((CSTATE == RUNLSY))))){
startAttack();
} else {
if ((((this.x > 710)) || ((this.x < -10)))){
chooseAction();
};
};
}
public function nextState(){
if (!ALIVE){
return;
};
switch (CSTATE){
case WAIT:
case RUNF:
case RUNL:
case RUNR:
case RUNLSY:
case RUNRSY:
F_CHANGEACTION--;
if (F_CHANGEACTION <= 0){
startAttack();
} else {
nextMove();
};
break;
case HITTED:
nextMove();
break;
};
FCOUNT++;
if (FCOUNT <= 33){
this.alpha = (FCOUNT * 0.03);
};
}
public function tryExplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
if ((((this.x >= _arg1)) && ((this.x <= _arg2)))){
if ((((this.V >= _arg3)) && ((this.V <= _arg4)))){
explode((_arg4 - _arg3));
};
};
}
public function hitted(){
}
public function destroy(_arg1:Object=null){
ALIVE = false;
HZ_HEAD = null;
HZ_CHEST = null;
this.visible = false;
unitKill();
glo.bal.SCRIPT.removeUnit(this);
glo.bal.SCRIPT.removeUnit2(this);
parent.removeChild(this);
}
}
}//package
Section 248
//bombbutton (bombbutton)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bombbutton extends MovieClip {
public var activate_btn:SimpleButton;
public var bomb_txt:TextField;
public var control_txt:TextField;
public var units_txt:TextField;
public var IND:Number;
public var skull_mc:MovieClip;
public var bg_mc:MovieClip;
public function bombbutton(){
addFrameScript(0, frame1);
}
public function setBomb(_arg1:Number, _arg2:Number, _arg3:Number){
IND = _arg1;
bomb_txt.text = ("MINE " + String((IND + 1)));
control_txt.text = ("PRESS " + String((IND + 1)));
units_txt.text = String(_arg2);
if (_arg2 > 0){
skull_mc.flashSkull();
} else {
skull_mc.stopFlashSkull();
};
bg_mc.gotoAndStop(_arg3);
}
public function btnActivate(_arg1:Event){
glo.bal.JUKEBOX.btnClick();
parent.parent.explode(IND);
}
function frame1(){
stop();
bomb_txt.antiAliasType = "advanced";
bomb_txt.embedFonts = true;
bomb_txt.setTextFormat(glo.bal.FORMAT04);
control_txt.antiAliasType = "advanced";
control_txt.embedFonts = true;
control_txt.setTextFormat(glo.bal.FORMAT04);
units_txt.antiAliasType = "advanced";
units_txt.embedFonts = true;
units_txt.setTextFormat(glo.bal.FORMAT04);
activate_btn.addEventListener("click", btnActivate);
}
}
}//package
Section 249
//bombExplosion (bombExplosion)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bombExplosion extends MovieClip {
public function bombExplosion(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
glo.bal.SCRIPT.removeBombExplosion(this);
}
}
}//package
Section 250
//bombIcon (bombIcon)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class bombIcon extends MovieClip {
public var label_txt:TextField;
public function bombIcon(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
label_txt.antiAliasType = "advanced";
label_txt.embedFonts = true;
label_txt.setTextFormat(glo.bal.FORMAT04);
label_txt.text = "B";
}
}
}//package
Section 251
//bubblebox_score (bubblebox_score)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
public dynamic class bubblebox_score extends MovieClip {
public var loader:URLLoader;
public var loadingStatus:String;
public var hexChars:String;
public var score:Number;
public var gameID:Number;
public var insertname:TextField;
public function bubblebox_score(){
addFrameScript(0, frame1);
}
public function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (tr(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
public function removeListeners():void{
loader.removeEventListener(Event.COMPLETE, completeHandler);
loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
public function clicked(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:URLVariables;
var _local7:URLRequest;
if (loadingStatus == "insertName"){
if (((((!((_arg1.target.name == "insertName"))) && (!((this.insertname.text == "YOUR NAME"))))) && ((this.insertname.text.length > 0)))){
_local2 = this.insertname.text;
_local3 = ((((gameID + "_") + score) + "_") + _local2);
_local4 = ((((((((((gameID + "_") + "4234232143214421") + "_") + score) + "_") + "2537625476251") + "_") + _local2) + "_") + "desleutelistessa");
_local5 = hash(_local4);
_local6 = new URLVariables();
_local6.datastring = _local3;
_local6.hashstring = _local5;
_local7 = new URLRequest("http://www.bubblebox.com/scripts/insertscore2008.php");
_local7.data = _local6;
_local7.method = URLRequestMethod.POST;
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, completeHandler, false, 0, true);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler, false, 0, true);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler, false, 0, true);
loader.load(_local7);
this.gotoAndStop(2);
loadingStatus = "sending";
};
} else {
if (loadingStatus == "sending"){
} else {
if (loadingStatus == "completed"){
navigateToURL(new URLRequest((("http://www.bubblebox.com/highscores/" + gameID) + ".htm")), "_blank");
} else {
if (loadingStatus == "failed"){
loadingStatus = "insertName";
this.gotoAndStop(1);
};
};
};
};
}
public function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (tr(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public function failed():void{
loadingStatus = "failed";
removeListeners();
this.gotoAndStop(4);
}
public function setScore(_arg1:Number, _arg2:Number):void{
score = _arg1;
gameID = _arg2;
}
public function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
public function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
function frame1(){
hexChars = "0123456789abcdef";
this.stage.focus = this.insertname;
this.insertname.setSelection(0, this.insertname.text.length);
loader = new URLLoader();
loadingStatus = "insertName";
this.addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
stop();
}
public function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
public function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
public function ioErrorHandler(_arg1:IOErrorEvent):void{
trace("ioError");
failed();
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
trace("securityError");
failed();
}
public function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public function hashBinary(_arg1:ByteArray):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((toHex(_local2) + toHex(_local3)) + toHex(_local4)) + toHex(_local5)));
}
public function tr(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((rol(_local9, _arg7) + _arg3));
}
public function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public function completeHandler(_arg1:Event):void{
loadingStatus = "completed";
removeListeners();
this.gotoAndStop(3);
}
public function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (tr(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (tr(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package
Section 252
//carShooterA (carShooterA)
package {
import flash.display.*;
public class carShooterA extends aiCarShooter {
public var damage1_mc:MovieClip;
public var damage2_mc:MovieClip;
public var bar1_mc:MovieClip;
public var bar2_mc:MovieClip;
public var body_mc:MovieClip;
public var blood1_mc:MovieClip;
public var blood2_mc:MovieClip;
public static var MAXUNITS:Number;
public static var COUNT:Number;
public function carShooterA(){
addFrameScript(0, frame1, 1, frame2);
super();
TYPE = "carShooterA";
HEAD_FACTOR = 2;
CHEST_FACTOR = 0.15;
if (!carShooterA.COUNT){
carShooterA.COUNT = 0;
};
carShooterA.COUNT++;
}
public function stopPlay(){
body_mc.stopPlay();
}
function frame1(){
BODY = this;
HEALTHBAR1 = bar1_mc;
HEALTHBAR2 = bar2_mc;
DAMAGEVISUAL1 = damage1_mc;
DAMAGEVISUAL2 = damage2_mc;
BLOODMC1 = blood1_mc;
BLOODMC2 = blood2_mc;
}
public function continuePlay(){
if (ATTACKING){
body_mc.resumePlay();
};
}
function frame2(){
stop();
showSide();
bar1_mc.setHealth(HEALTH1);
bar2_mc.setHealth(HEALTH2);
}
public function explodeLeft(){
body_mc.explodeLeft();
}
public function showLeft(){
body_mc.showLeft();
bar1_mc.x = -52.5;
bar1_mc.y = -19;
bar2_mc.x = 99;
bar2_mc.y = -230;
damage1_mc.x = -11.5;
damage1_mc.y = -174;
damage2_mc.x = 118;
damage2_mc.y = -240;
blood1_mc.x = -10.5;
blood1_mc.y = -110;
blood2_mc.x = 118;
blood2_mc.y = -196;
}
override public function unitKill(){
carShooterA.COUNT--;
}
public function showRight(){
body_mc.showRight();
bar1_mc.x = 5.5;
bar1_mc.y = -15;
bar2_mc.x = -150;
bar2_mc.y = -229;
damage1_mc.x = -2.5;
damage1_mc.y = -174;
damage2_mc.x = -132;
damage2_mc.y = -231;
blood1_mc.x = -1.5;
blood1_mc.y = -109;
blood2_mc.x = -131;
blood2_mc.y = -193;
}
public function stopShooting(){
body_mc.stopShooting();
}
public function die1(){
body_mc.die1();
}
public function die2(){
body_mc.die2();
}
public function explodeRight(){
body_mc.explodeRight();
}
public function startShooting(){
body_mc.startShooting();
}
}
}//package
Section 253
//CheckBox_disabledIcon (CheckBox_disabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_disabledIcon extends MovieClip {
}
}//package
Section 254
//CheckBox_downIcon (CheckBox_downIcon)
package {
import flash.display.*;
public dynamic class CheckBox_downIcon extends MovieClip {
}
}//package
Section 255
//CheckBox_overIcon (CheckBox_overIcon)
package {
import flash.display.*;
public dynamic class CheckBox_overIcon extends MovieClip {
}
}//package
Section 256
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDisabledIcon extends MovieClip {
}
}//package
Section 257
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDownIcon extends MovieClip {
}
}//package
Section 258
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedOverIcon extends MovieClip {
}
}//package
Section 259
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedUpIcon extends MovieClip {
}
}//package
Section 260
//CheckBox_upIcon (CheckBox_upIcon)
package {
import flash.display.*;
public dynamic class CheckBox_upIcon extends MovieClip {
}
}//package
Section 261
//diecardriverA (diecardriverA)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class diecardriverA extends MovieClip {
public function diecardriverA(){
addFrameScript(0, frame1, 47, frame48);
}
function frame1(){
stop();
}
function frame48(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 262
//enemyrises (enemyrises)
package {
import flash.media.*;
public dynamic class enemyrises extends Sound {
}
}//package
Section 263
//FlashEff (FlashEff)
package {
import flash.display.*;
import com.jumpeye.flashEff.core.interfaces.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import fl.core.*;
import flash.utils.*;
import com.jumpeye.utils.*;
import com.jumpeye.Events.*;
import com.jumpeye.flashEff.text.defaultFade.*;
import com.jumpeye.core.*;
import com.jumpeye.flashEff.text.*;
import flash.net.*;
public dynamic class FlashEff extends JUIComponent implements IFlashEff {
protected var tepA:IFlashEffCommand;
protected var tepF:IFlashEffFilter;
protected var tepS:FeTDefaultFade;
protected var _initialTargetTransform:Transform;
private var _isTargetVisibleAtEnd:Boolean;// = false
private var _drawAfterFilters:Boolean;// = true
protected var beforeDrawButtonTarget:Sprite;
protected var lastTransitionPattern:IFlashEffSymbolText;
protected var eventsDispatched:Number;// = 0
private var __showDelay:Number;// = 0
private var _partialTable:FeTable;
protected var afterDrawButtonTarget:Sprite;
private var __hideAutoPlay:Boolean;// = true
protected var maxEndEvents:Number;// = 0
private var __targetInstanceName:String;// = ""
protected var _partialTextOwnerClip:Sprite;
private var _buttonOwner:Sprite;
protected var isDragOut:Boolean;// = false
private var _rollOutCommands:Array;
private var __xmlPath:String;// = ""
private var _absCustom:Array;
protected var setNewTarget:Boolean;// = false
protected var filterAsoc:Array;
private var _doubleClickCommands:Array;
private var _textTable:FeTable;
protected var _buttonEffect:IFlashEffButtonEffect;
private var _absMatrix:Array;
protected var partialInterval:Number;
private var _releaseCommands:Array;
private var __hideDelay:Number;// = 2
private var forceAutoPlay;// = null
private var _filterList:Array;
protected var showPattern:IFlashEffSymbolText;
protected var drawCalled:Boolean;// = false
private var _targetOwner:MovieClip;
protected var beforeDrawButtonTargetOwner:Sprite;
private var _pressCommands:Array;
protected var isButtonEffectApplyed:Boolean;// = false
private var _firstLevelOwner:Sprite;
protected var transitionType:String;// = "show"
protected var hitAreaClip:Sprite;
private var _ideDataHolder:String;// = ""
protected var showTimer:Timer;
private var _highestOwner:Sprite;
private var _textField:TextField;
protected var nextTarget:DisplayObject;
private var __partialPattern:String;// = "com.jumpeye.flashEff.text.defaultFade.FeTDefaultFade"
private var _target:DisplayObject;
private var _absWords:Array;
protected var partialPattern:IFlashEffSymbol;
protected var tempTransformSprite:Sprite;
protected var _buttonEffectName:String;
private var _rollOverCommands:Array;
private var _absLines:Array;
protected var hideTimer:Timer;
protected var _isTransitioning:Boolean;// = false
protected var textChangeDelayInterval:Number;
private var __xmlString:String;// = ""
private var _isMouseTriggered:Boolean;// = true
protected var buttonTarget:Sprite;
private var __targetVisibility:Boolean;// = true
private var __showAutoPlay:Boolean;// = true
private var _useHandCursor:Boolean;// = false
protected var afterDrawButtonTargetOwner:Sprite;
protected var firstInDepth:Sprite;
protected var hidePattern:IFlashEffSymbolText;
protected var _textOwnerClip:Sprite;
private var _absChars:Array;
protected static var eventTypeAsoc:Array = [];
private static var targetPaths:Array;
public function FlashEff(){
_isTransitioning = false;
isButtonEffectApplyed = false;
drawCalled = false;
isDragOut = false;
setNewTarget = false;
maxEndEvents = 0;
eventsDispatched = 0;
transitionType = "show";
forceAutoPlay = null;
__showAutoPlay = true;
__hideAutoPlay = true;
__targetVisibility = true;
__showDelay = 0;
__hideDelay = 2;
__targetInstanceName = "";
__xmlPath = "";
__partialPattern = "com.jumpeye.flashEff.text.defaultFade.FeTDefaultFade";
_ideDataHolder = "";
__xmlString = "";
_isTargetVisibleAtEnd = false;
_isMouseTriggered = true;
_drawAfterFilters = true;
_useHandCursor = false;
super();
init();
}
public function removeAllCommands():void{
var _local1:*;
for (_local1 in _slot1.eventTypeAsoc) {
this.removeAllCommandsByEventType(_local1);
};
}
public function buttonPress():void{
pressButtonHandler(null, true);
}
public function get showTransition():IFlashEffSymbolText{
return (this.showPattern);
}
protected function pressButtonHandler(_arg1:MouseEvent=null, _arg2:Boolean=false):void{
this.isDragOut = true;
if ((((_arg2 == true)) || ((this.isMouseTriggered == true)))){
if (this._isTransitioning == false){
if (this.buttonEffect != null){
this.buttonEffect.buttonPress();
};
};
};
if (_arg1 != null){
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.MOUSE_DOWN));
};
}
public function get filterList():Array{
return (this._filterList);
}
public function get hideTransition():IFlashEffSymbolText{
return (this.hidePattern);
}
public function buttonRollOver():void{
rollOverButtonHandler(null, true);
}
protected function rollOverButtonHandler(_arg1:MouseEvent=null, _arg2:Boolean=false):void{
if ((((_arg2 == true)) || ((this.isMouseTriggered == true)))){
if (this._isTransitioning == false){
if (this.buttonEffect != null){
this.buttonEffect.buttonRollOver();
};
};
};
if (_arg1 != null){
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.ROLL_OVER));
};
}
public function setXML(_arg1):void{
this.setProperties(_arg1);
}
public function get firstLevelOwner():Sprite{
return (this._firstLevelOwner);
}
public function addFilterByName(_arg1:String, _arg2:Object=null):IFlashEffFilter{
var filter:IFlashEffFilter;
var filterReference:Class;
var i:*;
var filterName = _arg1;
var initObj = _arg2;
try {
filterReference = (getDefinitionByName(filterName) as Class);
} catch(e:ReferenceError) {
trace((("FLASHEFF ERROR: The filter pattern '" + filterName) + "' is missing from library."));
return (null);
};
filter = IFlashEffFilter(new filterReference(this));
if (initObj != null){
for (i in initObj) {
filter[i] = initObj[i];
};
};
this.addFilter(filter);
return (filter);
}
public function set showTransition(_arg1:IFlashEffSymbolText):void{
if (_arg1 != null){
if (this.showPattern != null){
this.showPattern.remove();
};
this.showPattern = _arg1;
this._showTransitionName = String(getQualifiedClassName(_arg1)).replace("::", ".");
};
}
public function set filterList(_arg1:Array):void{
var _local2:*;
this.removeAllFilters();
if (_arg1 != null){
for (_local2 in _arg1) {
this.addFilter(_arg1[_local2]);
};
};
}
protected function setButtonEvents(){
this.highestOwner.addEventListener(MouseEvent.ROLL_OVER, this.rollOverButtonHandler);
this.highestOwner.addEventListener(MouseEvent.ROLL_OUT, this.rollOutButtonHandler);
this.highestOwner.addEventListener(MouseEvent.MOUSE_DOWN, this.pressButtonHandler);
this.highestOwner.addEventListener(MouseEvent.MOUSE_UP, this.releaseButtonHandler);
isButtonEffectApplyed = true;
}
public function set hideTransition(_arg1:IFlashEffSymbolText):void{
if (_arg1 != null){
if (this.hidePattern != null){
this.hidePattern.remove();
};
this.hidePattern = _arg1;
this._hideTransitionName = String(getQualifiedClassName(_arg1)).replace("::", ".");
};
}
public function buttonRelease():void{
releaseButtonHandler(null, true);
}
public function get highestOwner():Sprite{
return (this._highestOwner);
}
public function get showDelay():Number{
return (__showDelay);
}
protected function showCallerWeak(_arg1:TimerEvent):void{
trace("here");
this.show(false);
}
public function removeCommandByName(_arg1:String):void{
var _local2:*;
var _local3:Array;
var _local4:uint;
for (_local2 in _slot1.eventTypeAsoc) {
_local3 = this[(("_" + _local2) + "Commands")];
if (_local3 != null){
_local4 = 0;
while (_local4 < _local3.length) {
if (String(getQualifiedClassName(_local3[_local4])).replace("::", ".") == _arg1){
_local3.splice(_local4, 1);
};
_local4++;
};
this.setCommands(_local2);
};
};
}
public function get buttonEffectName():String{
return (this._buttonEffectName);
}
public function set ideDataHolder(_arg1:String){
this._ideDataHolder = _arg1;
}
public function get ideDataHolder():String{
return (this._ideDataHolder);
}
protected function getPath(_arg1:DisplayObject):String{
var _local2:DisplayObject;
var _local3:String;
_local2 = _arg1.parent;
_local3 = _arg1.name;
while (((!((_local2 is Stage))) && (!((_local2 == null))))) {
_local3 = ((_local2.name + ".") + _local3);
_local2 = _local2.parent;
};
return (_local3);
}
public function getShowPattern():IFlashEffSymbolText{
return (this.showPattern);
}
protected function pressCommandHandler(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:*;
_local2 = this._pressCommands.length;
_local3 = 0;
while (_local3 < _local2) {
IFlashEffCommand(this._pressCommands[_local3]).run();
_local3++;
};
}
function setDrawTime(){
if ((((this.showAutoPlay == true)) || ((this.hideAutoPlay == true)))){
if ((this.target is DisplayObject)){
if (this.target.stage == null){
this.target.addEventListener(Event.ADDED_TO_STAGE, this.targetOnAdd);
} else {
if (drawCalled == false){
drawCalled = true;
targetOnAdd(new Event(Event.ADDED_TO_STAGE));
};
};
};
};
}
private function callDraw(_arg1:Event){
this.draw();
}
public function get xmlPath():String{
return (__xmlPath);
}
public function get hideAutoPlay():Boolean{
return (__hideAutoPlay);
}
protected function getCommandsNumber():Number{
var _local1:Number;
var _local2:*;
_local1 = 0;
for (_local2 in _slot1.eventTypeAsoc) {
_local1 = (_local1 + this[(("_" + _slot1.eventTypeAsoc[_local2]) + "Commands")].length);
};
return (_local1);
}
protected function showCaller(_arg1:TimerEvent):void{
this.show();
}
public function removeAllCommandsByEventType(_arg1:String):void{
var _local2:Array;
_local2 = this[(("_" + _arg1) + "Commands")];
if (_local2 != null){
if (_local2.length > 0){
this[(("_" + _arg1) + "Commands")] = [];
this.setCommands(_arg1);
};
};
}
public function get initialTargetTransform():Transform{
return (this._initialTargetTransform);
}
protected function removedFromStage(_arg1:Event):void{
this.removeEffect(true);
this.removeAllCommands();
this.removeAllFilters();
this.removeButtonEffect();
}
protected function init():void{
JInstantiateClass.initClasses();
this._targetOwner = new MovieClip();
this._firstLevelOwner = new Sprite();
this._highestOwner = new Sprite();
this.beforeDrawButtonTargetOwner = new Sprite();
this.beforeDrawButtonTarget = new Sprite();
this.afterDrawButtonTarget = new Sprite();
this.afterDrawButtonTargetOwner = new Sprite();
this.afterDrawButtonTarget.addChild(this.firstLevelOwner);
this.afterDrawButtonTargetOwner.addChild(this.afterDrawButtonTarget);
this.highestOwner.addChild(this.afterDrawButtonTargetOwner);
this.addChild(this.highestOwner);
this.beforeDrawButtonTarget.addChild(this.targetOwner);
this.beforeDrawButtonTargetOwner.addChild(beforeDrawButtonTarget);
this.firstLevelOwner.addChild(this.beforeDrawButtonTargetOwner);
this.buttonTarget = this.afterDrawButtonTarget;
this.firstInDepth = this.beforeDrawButtonTargetOwner;
this.hitAreaClip = new Sprite();
this.addChild(this.hitAreaClip);
this.highestOwner.hitArea = this.hitAreaClip;
this.hitAreaClip.mouseEnabled = false;
this.hitAreaClip.visible = false;
this.hitAreaClip.graphics.beginFill(0);
this.hitAreaClip.graphics.drawRect(0, 0, 100, 100);
this.hitAreaClip.graphics.endFill();
this._textOwnerClip = new Sprite();
this._partialTextOwnerClip = new Sprite();
this.targetOwner.addChild(this._textOwnerClip);
this.targetOwner.addChild(this._partialTextOwnerClip);
this._textTable = new FeTable();
this._partialTable = new FeTable();
this._textOwnerClip.addChild(DisplayObject(this.textTable));
this._partialTextOwnerClip.addChild(DisplayObject(this.partialTable));
tempTransformSprite = new Sprite();
this._buttonOwner = new Sprite();
this.afterDrawButtonTargetOwner.addChild(this.buttonOwner);
this.resetArrays();
this._filterList = [];
this._rollOverCommands = [];
this._rollOutCommands = [];
this._pressCommands = [];
this._releaseCommands = [];
this._doubleClickCommands = [];
this.filterAsoc = [];
if (_slot1.targetPaths == null){
_slot1.targetPaths = [];
};
this.showTimer = new Timer((this.showDelay * 1000), 1);
this.hideTimer = new Timer((this.hideDelay * 1000), 1);
this.partialPatternName = this.__partialPattern;
this.addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
protected function setCommands(_arg1:String):void{
var eventType = _arg1;
try {
if (((!((this[(("_" + eventType) + "Commands")] == null))) && ((this[(("_" + eventType) + "Commands")].length > 0)))){
this.highestOwner.addEventListener(MouseEvent[_slot1.eventTypeAsoc[eventType]], this[(eventType + "CommandHandler")]);
} else {
this.highestOwner.removeEventListener(MouseEvent[_slot1.eventTypeAsoc[eventType]], this[(eventType + "CommandHandler")]);
};
} catch(e:Error) {
trace("FLASHEFF ERROR: Unknown eventType. Available events are: rollOver, rollOut, press and release.");
};
if (this.highestOwner.hasEventListener("doubleClick")){
this.highestOwner.doubleClickEnabled = true;
this.highestOwner.mouseChildren = false;
} else {
this.highestOwner.doubleClickEnabled = false;
this.highestOwner.mouseChildren = true;
};
}
public function set showDelay(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 0;
} else {
if (_arg1 <= 0){
_arg1 = 0;
};
};
this.__showDelay = _arg1;
if (_arg1 < 1E-6){
_arg1 = 1E-6;
};
this.showTimer.delay = (_arg1 * 1000);
}
public function get isMouseTriggered():Boolean{
return (_isMouseTriggered);
}
public function removeFilter(_arg1:IFlashEffFilter):Boolean{
var _local2:*;
var _local3:uint;
if (_arg1 != null){
_arg1.remove();
for (_local2 in this.filterList) {
if (this.filterList[_local2] == _arg1){
if (_arg1.target == this.firstInDepth){
this.firstInDepth = this.filterAsoc[_arg1.target.name];
};
if (this.filterList.length > (_local2 + 1)){
this.filterAsoc[this.filterList[(_local2 + 1)].target.name] = this.filterAsoc[_arg1.target.name];
};
this.filterList.splice(_local2, 1);
_local3 = 0;
while (_local2 < _arg1.target.numChildren) {
_arg1.target.parent.addChild(_arg1.target.getChildAt(_local3));
_local3++;
};
_arg1.target.parent.removeChild(_arg1.target);
return (true);
};
};
};
return (false);
}
public function set buttonEffectName(_arg1:String):void{
var btnEff:Class;
var arg = _arg1;
if (arg != ""){
try {
btnEff = (getDefinitionByName(arg) as Class);
this.buttonEffect = IFlashEffButtonEffect(new btnEff(this));
} catch(e:Error) {
};
this._buttonEffectName = arg;
};
}
protected function startPartialEffect():void{
if (this.partialPattern != null){
try {
this.partialPattern["partialBlurAmount"] = IFlashEffText(this.lastTransitionPattern).partialBlurAmount;
this.partialPattern["partialStart"] = IFlashEffText(this.lastTransitionPattern).partialStart;
this.partialPattern.tweenDuration = IFlashEffText(this.lastTransitionPattern).tweenDuration;
this.partialPattern.tweenType = IFlashEffText(this.lastTransitionPattern).tweenType;
this.partialPattern.easeType = IFlashEffText(this.lastTransitionPattern).easeType;
} catch(e:Error) {
trace("FLASHEFF ERROR: an error ocured when trying to set partialBlurAmount, partialStart, tweenDuration,tweenType and easeType on the partialPattern.");
};
var _local2 = this.partialPattern;
_local2[this.transitionType]();
};
clearInterval(this.partialInterval);
}
protected function resetChildDisplayList(_arg1:DisplayObject):void{
var _local2:Array;
var _local3:*;
var _local4:Object;
_local2 = _slot1.targetPaths;
for (_local3 in _local2) {
_local4 = _local2[_local3];
if (_local4 != null){
if (_local4.target == _arg1){
if (_local4.displayList.getChildByName(_arg1.name) == null){
_local4.displayList.addChild(_arg1);
_arg1.x = _local4.x;
_arg1.y = _local4.y;
_arg1.rotation = _local4.rotation;
};
_slot1.targetPaths[_local3] = null;
return;
};
};
};
}
override protected function draw():void{
var _local1:Boolean;
var _local2:*;
var _local3:Timer;
if (this.isInvalid(InvalidationType.ALL)){
if (this.target != null){
_local1 = false;
if (this.showPattern != null){
this.transitionType = "show";
_local1 = true;
} else {
if (this.hidePattern != null){
_local1 = true;
this.transitionType = "hide";
};
};
if (this.target.parent != this.targetOwner){
if ((((((_local1 == true)) || ((this.filterList.length > 0)))) || ((this.getCommandsNumber() > 0)))){
this.target = this.target;
};
};
this.target.visible = this.targetVisibility;
if (((_local1) || (this.fi))){
if (_local1){
if (this[(this.transitionType + "AutoPlay")] == true){
_local3 = this[(this.transitionType + "Timer")];
if (this[(this.transitionType + "Delay")] > 0){
_local3.reset();
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, this[(this.transitionType + "Caller")]);
} else {
this.transitionEffect(this.transitionType);
};
};
};
};
for (_local2 in this.filterList) {
IFlashEffFilter(this.filterList[_local2]).remove();
IFlashEffFilter(this.filterList[_local2]).apply();
};
};
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.INIT));
super.draw();
};
}
public function hide():void{
this.showTimer.stop();
this.hideTimer.stop();
this.transitionType = "hide";
this.transitionEffect(this.transitionType);
}
public function get absWords():Array{
return (this._absWords.concat());
}
public function changeTarget(_arg1:DisplayObject):void{
var _local2:Timer;
this.nextTarget = _arg1;
if (this.target != null){
this.setNewTarget = true;
_local2 = this.hideTimer;
if (this.hideDelay > 0){
_local2.reset();
_local2.start();
_local2.addEventListener(TimerEvent.TIMER, this.hideCaller);
} else {
this.hide();
};
} else {
this.target = _arg1;
this.show(false);
};
}
public function get isTransitioning():Boolean{
return (this._isTransitioning);
}
protected function charSplit(_arg1:String, _arg2:uint):Array{
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:Rectangle;
_local3 = String(_arg1).split("");
_local4 = [];
_local5 = _local3.length;
_local6 = 0;
_local7 = 0;
while (_local7 < _local5) {
_local8 = this.textField.getCharBoundaries((_arg2 + _local7));
if (_local3[_local7] != " "){
if (!isNaN(String(_local3[_local7]).charCodeAt(0))){
if (_local8 != null){
_local4[(_local7 - _local6)] = {};
_local4[(_local7 - _local6)].id = (_arg2 + _local7);
_local4[(_local7 - _local6)].bounds = _local8;
_local4[(_local7 - _local6)].text = _local3[_local7];
} else {
_local6++;
};
};
} else {
_local6++;
};
_local7++;
};
return (_local4);
}
public function get isTargetVisibleAtEnd():Boolean{
return (_isTargetVisibleAtEnd);
}
protected function releaseCommandHandler(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:*;
_local2 = this._releaseCommands.length;
_local3 = 0;
while (_local3 < _local2) {
IFlashEffCommand(this._releaseCommands[_local3]).run();
_local3++;
};
}
protected function rollOutCommandHandler(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:*;
_local2 = this._rollOutCommands.length;
_local3 = 0;
while (_local3 < _local2) {
IFlashEffCommand(this._rollOutCommands[_local3]).run();
_local3++;
};
}
public function get hideDelay():Number{
return (__hideDelay);
}
override public function get useHandCursor():Boolean{
return (_useHandCursor);
}
protected function removeButtonEvents(){
this.highestOwner.removeEventListener(MouseEvent.ROLL_OVER, this.rollOverButtonHandler);
this.highestOwner.removeEventListener(MouseEvent.ROLL_OUT, this.rollOutButtonHandler);
this.highestOwner.removeEventListener(MouseEvent.MOUSE_DOWN, this.pressButtonHandler);
this.highestOwner.removeEventListener(MouseEvent.MOUSE_UP, this.releaseButtonHandler);
isButtonEffectApplyed = false;
}
public function get target():DisplayObject{
return (this._target);
}
protected function doubleClickCommandHandler(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:*;
_local2 = this._doubleClickCommands.length;
_local3 = 0;
while (_local3 < _local2) {
IFlashEffCommand(this._doubleClickCommands[_local3]).run();
_local3++;
};
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.DOUBLE_CLICK));
}
protected function rollOutButtonHandler(_arg1:MouseEvent=null, _arg2:Boolean=false):void{
if ((((_arg2 == true)) || ((this.isMouseTriggered == true)))){
if (this._isTransitioning == false){
if (this.buttonEffect != null){
this.buttonEffect.buttonRollOut();
};
};
};
this.isDragOut = false;
if (_arg1 != null){
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.ROLL_OUT));
};
}
public function get absLines():Array{
return (this._absLines.concat());
}
public function drawTextTable(_arg1:String, _arg2:String, _arg3:Number, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Array=null):Boolean{
var _local8:Object;
var _local9:Array;
var _local10:Array;
var _local11:Array;
var _local12:Boolean;
var _local13:Boolean;
var _local14:*;
var _local15:*;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:String;
var _local22:String;
var _local23:Array;
var _local24:Array;
var _local25:uint;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Object;
var _local30:*;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
this.textTable.removeChilds();
this.partialTable.removeChilds();
this.resetArrays();
this.maxEndEvents = 0;
_local8 = this.textTable;
_local12 = false;
_local13 = false;
_local17 = 1;
_local18 = 1;
_local20 = 0;
_local21 = _arg1;
_local22 = _arg1;
_local10 = this.linesSplit();
_local17 = _local10.length;
_local23 = [];
_local24 = [];
if (_arg2 == "lines"){
this.filterArray(_local10, _arg2, _arg3, _arg4);
};
_local14 = 0;
while (_local14 < _local17) {
if (_local22 == "custom"){
_local9 = (_local10[_local14].childs = this.customSplit(_local10[_local14].text, _local10[_local14].id, _arg7[_local10[_local14].lineId]));
_arg1 = "words";
_local21 = _arg1;
} else {
_local9 = (_local10[_local14].childs = this.wordsSplit(_local10[_local14].text, _local10[_local14].id));
};
_local10[_local14].owner = this.textTable;
_local18 = _local9.length;
_local15 = 0;
while (_local15 < _local18) {
_local23.push(_local9[_local15]);
_local9[_local15].passed = _local10[_local14].passed;
_local9[_local15].owner = this.textTable;
_local11 = (_local9[_local15].childs = this.charSplit(_local9[_local15].text, _local9[_local15].id));
_local19 = _local11.length;
_local16 = 0;
while (_local16 < _local19) {
_local11[_local16].passed = _local9[_local15].passed;
_local24.push(_local11[_local16]);
_local16++;
};
_local15++;
};
_local14++;
};
if ((((_arg3 < 100)) || ((_arg2 == "selectedStrings")))){
if (_arg2 == "words"){
this.filterArray(_local23, _arg2, _arg3, _arg4);
} else {
if ((((_arg2 == "letters")) || ((_arg2 == "selectedStrings")))){
this.filterArray(_local24, _arg2, _arg3, _arg4);
};
};
_local28 = (_arg5 * 10);
if (this.transitionType == "hide"){
_local28 = 0;
this._partialTextOwnerClip.alpha = 1;
} else {
this._partialTextOwnerClip.alpha = 0;
};
clearInterval(this.partialInterval);
this.partialInterval = setInterval(this.startPartialEffect, (_local28 * ((this.lastTransitionPattern.tweenDuration) || (0))));
maxEndEvents++;
};
switch (_arg1.toLocaleLowerCase()){
case "lines":
_local17 = _local10.length;
_local8 = this.textTable;
_local15 = 0;
while (_local15 < _local17) {
_local29 = _local8;
if (_local10[_local15].passed == false){
_local29 = this.partialTable;
};
_local30 = _local29.pushChild({type:"FeGroup", x:_local10[_local15].bounds.x, y:_local10[_local15].bounds.y, text:_local10[_local15].text, bounds:_local10[_local15].bounds, id:_local10[_local15].id});
_local10[_local15].owner = _local30;
_absLines.push(_local30);
_local15++;
};
_arg1 = "words";
case "words":
_local17 = _local10.length;
_local14 = 0;
while (_local14 < _local17) {
_local31 = _local10[_local14].owner.x;
_local32 = _local10[_local14].owner.y;
_local8 = _local10[_local14].owner;
_local9 = _local10[_local14].childs;
_local18 = _local9.length;
_local15 = 0;
while (_local15 < _local18) {
_local29 = _local8;
_local33 = _local31;
_local34 = _local32;
if ((((_local9[_local15].passed == false)) && ((((_local21 == "words")) || ((_arg2 == "words")))))){
_local29 = this.partialTable;
_local33 = 0;
_local34 = 0;
} else {
if (_local9[_local15].passed == false){
_local33 = 0;
_local34 = 0;
};
};
_local30 = _local29.pushChild({type:"FeGroup", x:(_local9[_local15].bounds.x - _local33), y:(_local9[_local15].bounds.y - _local34), text:_local9[_local15].text, bounds:_local9[_local15].bounds, id:_local9[_local15].id});
_local9[_local15].owner = _local30;
_absWords.push(_local30);
if (_local22 == "custom"){
_absCustom.push(_local30);
};
_local15++;
};
_local14++;
};
_arg1 = "chars";
case "chars":
_local14 = 0;
while (_local14 < _local17) {
_local9 = _local10[_local14].childs;
_local18 = _local9.length;
_local15 = 0;
while (_local15 < _local18) {
_local11 = _local9[_local15].childs;
_local8 = _local9[_local15].owner;
_local31 = (_local8.x + _local10[_local14].owner.x);
_local32 = (_local8.y + _local10[_local14].owner.y);
_local19 = _local11.length;
_local16 = 0;
while (_local16 < _local19) {
_local29 = _local8;
_local33 = _local31;
_local34 = _local32;
if (_local11[_local16].passed != false){
_local11[_local16].passed = _local9[_local15].passed;
};
if (_local11[_local16].passed == false){
if ((((_local21 == "chars")) || ((((_arg2 == "letters")) || ((_arg2 == "selectedStrings")))))){
_local29 = this.partialTable;
_local33 = 0;
_local34 = 0;
} else {
if (_arg2 == "words"){
_local33 = _local8.x;
_local34 = _local8.y;
};
};
};
_local30 = _local29.pushChild({type:"FeChar", x:((_local11[_local16].bounds.x - 2) - _local33), y:((_local11[_local16].bounds.y - 2) - _local34), text:_local11[_local16].text, bounds:_local11[_local16].bounds, id:_local11[_local16].id});
_local20 = this.textField.getLineIndexOfChar(_local30.id);
_local30.bottomPosition = this.textField.getLineMetrics(_local20).ascent;
_local30.applyTextFormat(this.textField.getTextFormat(_local30.id, (_local30.id + 1)));
_absChars.push(_local30);
_local16++;
};
_local15++;
};
_local14++;
};
break;
};
this.textTable.cleanMe();
_local25 = this.textTable.childs.length;
_local20 = 0;
_local26 = -1;
_local27 = 0;
if (_local25 > 0){
maxEndEvents++;
_absMatrix[_local20] = [];
};
_local14 = 0;
while (_local14 < _local25) {
_local30 = this.textTable.childs[_local14];
_local20 = this.textField.getLineIndexOfChar(_local30.id);
if (_local20 != _local26){
_local26 = _local20;
_local27 = _absMatrix.push([]);
};
_absMatrix[(_local27 - 1)].push(_local30);
_local14++;
};
_local14 = 0;
while (_local14 < _absMatrix.length) {
if (_absMatrix[_local14].length == 0){
_absMatrix.splice(_local14, 1);
_local14--;
};
_local14++;
};
this._textOwnerClip.visible = true;
DisplayObject(this.textTable).visible = true;
DisplayObject(this._partialTextOwnerClip).visible = true;
this.textField.visible = false;
return (true);
}
protected function filterArray(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Array):void{
var _local5:uint;
var _local6:uint;
var _local7:Array;
var _local8:*;
var _local9:uint;
var _local10:Number;
var _local11:String;
var _local12:Object;
var _local13:int;
var _local14:String;
var _local15:int;
var _local16:int;
var _local17:RegExp;
var _local18:String;
var _local19:uint;
var _local20:*;
_local5 = _arg1.length;
if (_arg2 != "selectedStrings"){
_local6 = _local5;
_local7 = new Array(_local5);
_local8 = 0;
while (_local8 < _local5) {
_local7[_local8] = _local8;
_local8++;
};
while (((_local6 / _local5) * 100) > _arg3) {
_local9 = Math.floor((Math.random() * _local7.length));
_arg1[_local7[_local9]].passed = false;
_local6--;
_local7.splice(_local9, 1);
};
} else {
_local10 = _arg4.length;
_local11 = this.textField.text;
_local12 = {};
_local8 = 0;
while (_local8 < _local5) {
_arg1[_local8].passed = false;
_local12[_arg1[_local8].id] = _local8;
_local8++;
};
_local8 = 0;
while (_local8 < _local10) {
_local13 = 0;
_local14 = this.selectedStrings[_local8];
_local15 = _local11.indexOf(_local14, _local13);
_local16 = _local14.length;
_local17 = / /g;
_local18 = _local14.replace(_local17, "");
_local19 = _local18.length;
while (_local15 != -1) {
_local20 = _local15;
while (_local20 < (_local15 + _local16)) {
if (_local12[_local20] != undefined){
_arg1[_local12[_local20]].passed = true;
};
_local20++;
};
_local13 = (_local15 + _local16);
_local15 = _local11.indexOf(_local14, _local13);
};
_local8++;
};
};
}
public function set hideAutoPlay(_arg1:Boolean):void{
__hideAutoPlay = _arg1;
this.invalidate();
setDrawTime();
}
public function set xmlPath(_arg1:String):void{
if (_arg1 != ""){
this.__xmlPath = _arg1;
setProperties(this.__xmlPath);
};
}
public function removeShowTransition():void{
if (this.showPattern != null){
this.showPattern.remove();
this.showPattern = null;
};
}
public function removeHideTransition():void{
if (this.hidePattern != null){
this.hidePattern.remove();
this.hidePattern = null;
};
}
public function get showTransitionName():String{
return (this._showTransitionName);
}
public function get drawAfterFilters():Boolean{
return (this._drawAfterFilters);
}
public function applyButtonEffect():void{
this.setButtonEvents();
this.isButtonEffectApplyed = true;
}
public function get partialTextOwnerClip():Sprite{
return (_partialTextOwnerClip);
}
public function get textOwnerClip():Sprite{
return (_textOwnerClip);
}
public function get partialPatternName():String{
return (__partialPattern);
}
protected function wordsSplit(_arg1:String, _arg2:uint):Array{
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:*;
var _local9:Rectangle;
var _local10:Boolean;
var _local11:uint;
var _local12:*;
_local3 = _arg1.split(" ");
_local4 = [];
_local5 = _local3.length;
_local6 = 0;
_local7 = 0;
_local8 = 0;
while (_local8 < _local5) {
_local9 = this.textField.getCharBoundaries(((_arg2 + _local6) + _local8));
_local10 = false;
if (_local9 == null){
_local10 = true;
_local11 = _local3[_local8].length;
if (_local11 > 0){
_local12 = 0;
while (_local12 < _local11) {
_local9 = this.textField.getCharBoundaries((((_arg2 + _local6) + _local8) + _local12));
if (_local9 != null){
_local10 = false;
break;
};
_local12++;
};
};
};
if (_local10 == false){
_local4[_local7] = {};
_local4[_local7].id = ((_arg2 + _local8) + _local6);
_local4[_local7].bounds = _local9;
_local4[_local7].text = _local3[_local8];
_local6 = (_local6 + String(_local4[_local7].text).length);
_local7++;
} else {
_local6 = (_local6 + _local3[_local8].length);
};
_local8++;
};
return (_local4);
}
public function buttonRollOut():void{
rollOutButtonHandler(null, true);
}
public function removeButtonEffect():void{
if (this.buttonEffect != null){
this.buttonEffect.remove();
};
this.removeButtonEvents();
this.isButtonEffectApplyed = false;
}
public function set xmlString(_arg1:String):void{
var _local2:XML;
if (_arg1 != ""){
this.__xmlString = _arg1;
_local2 = new XML(_arg1);
setProperties(_local2);
};
}
public function set isMouseTriggered(_arg1:Boolean):void{
this._isMouseTriggered = _arg1;
}
protected function customSplit(_arg1:String, _arg2:uint, _arg3):Array{
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:*;
var _local9:String;
var _local10:Rectangle;
var _local11:Boolean;
var _local12:uint;
var _local13:*;
_local4 = [];
_local5 = _arg3.length;
_local6 = 0;
_local7 = 0;
_local8 = 0;
while (_local8 < _local5) {
_local9 = this.textField.text.substr((_arg2 + _local6), _arg3[_local8]);
_local10 = this.textField.getCharBoundaries((_arg2 + _local6));
_local11 = false;
if (_local10 == null){
_local11 = true;
_local12 = _local9.length;
if (_local12 > 0){
_local13 = 0;
while (_local13 < _local12) {
_local10 = this.textField.getCharBoundaries(((_arg2 + _local6) + _local13));
if (_local10 != null){
_local11 = false;
break;
};
_local13++;
};
};
};
if (_local11 == false){
_local4[_local7] = {};
_local4[_local7].id = (_arg2 + _local6);
_local4[_local7].bounds = _local10;
_local4[_local7].text = _local9;
_local6 = (_local6 + _arg3[_local8]);
_local7++;
} else {
_local6 = (_local6 + _arg3[_local8]);
};
_local8++;
};
return (_local4);
}
public function removeCommand(_arg1:IFlashEffCommand):void{
var _local2:*;
var _local3:Array;
var _local4:uint;
for (_local2 in _slot1.eventTypeAsoc) {
_local3 = this[(("_" + _local2) + "Commands")];
if (_local3 != null){
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4] == _arg1){
_local3.splice(_local4, 1);
};
_local4++;
};
this.setCommands(_local2);
};
};
}
override public function dispatchEvent(_arg1:Event):Boolean{
var _local2:Boolean;
var _local3:*;
var _local4:Boolean;
var _local5:Point;
var _local6:DisplayObject;
var _local7:Timer;
_local2 = true;
if ((((_arg1.type == FLASHEFFEvents.TRANSITION_END)) || ((_arg1.type == "defaultPatternFinish")))){
eventsDispatched++;
if (eventsDispatched == maxEndEvents){
if (isTargetVisibleAtEnd == true){
if (this.transitionType == "show"){
this.target.visible = true;
};
this._textOwnerClip.visible = false;
this._partialTextOwnerClip.visible = false;
};
_local2 = true;
_isTransitioning = false;
if (this.transitionType == "show"){
if (isButtonEffectApplyed == true){
_local5 = new Point(this.mouseX, this.mouseY);
_local5 = this.localToGlobal(_local5);
if (this.highestOwner.hitTestPoint(_local5.x, _local5.y, true)){
this.rollOverButtonHandler(null, true);
};
};
};
_local3 = new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END);
_local4 = false;
if (this.transitionType == "show"){
if (this.hidePattern != null){
if ((((((this.hideAutoPlay == true)) && (!((this.forceAutoPlay == false))))) || ((this.forceAutoPlay == true)))){
this.hideTimer.reset();
this.hideTimer.start();
this.forceAutoPlay = null;
this.hideTimer.addEventListener(TimerEvent.TIMER, this.hideCaller);
};
};
} else {
if (this.setNewTarget == true){
this.hideTimer.stop();
this.showTimer.stop();
_local6 = this.target;
this.target = this.nextTarget;
if (_local6 != null){
_local6.visible = false;
};
this.setNewTarget = false;
this.nextTarget = null;
_local4 = super.dispatchEvent(_local3);
_local7 = new Timer(this.showDelay, 1);
if (this.showDelay > 0){
_local7.start();
_local7.addEventListener(TimerEvent.TIMER, this.showCallerWeak);
} else {
this.show(false);
};
return (_local4);
};
};
_local4 = super.dispatchEvent(_local3);
return (_local4);
} else {
_local2 = false;
};
};
if (_local2 == true){
return (super.dispatchEvent(_arg1));
};
return (true);
}
public function getFilter(_arg1:String):IFlashEffFilter{
var _local2:*;
for (_local2 in this.filterList) {
if (String(getQualifiedClassName(this.filterList[_local2])).replace("::", ".") == _arg1){
return (this.filterList[_local2]);
};
};
return (null);
}
public function get absCustom():Array{
return (this._absCustom.concat());
}
public function removeAll():void{
this.removeEffect(true, this.showPattern);
this.removeEffect(true, this.hidePattern);
this.removeAllCommands();
this.removeAllFilters();
this.removeButtonEffect();
this.showTimer.stop();
this.hideTimer.stop();
this.showPattern = null;
this.hidePattern = null;
if (this.target != null){
this.target.visible = true;
this.resetChildDisplayList(this.target);
};
}
public function get commands():Array{
return (this._rollOverCommands.concat(this._rollOutCommands, this._pressCommands, this._releaseCommands));
}
public function get textTable():IFeTable{
return (this._textTable);
}
public function set isTargetVisibleAtEnd(_arg1:Boolean):void{
this._isTargetVisibleAtEnd = _arg1;
}
public function get absChars():Array{
return (this._absChars.concat());
}
public function getHidePattern():IFlashEffSymbolText{
return (this.hidePattern);
}
public function removeAllFilters():void{
var _local1:*;
var _local2:Boolean;
if (this.filterList != null){
_local1 = 0;
while (_local1 < this.filterList.length) {
_local2 = this.removeFilter(this.filterList[_local1]);
_local1 = (_local1 - Number(_local2));
_local1++;
};
};
this.filterAsoc = [];
}
public function set hideDelay(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 2;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
this.__hideDelay = _arg1;
if (_arg1 < 1E-6){
_arg1 = 1E-6;
};
this.hideTimer.delay = (_arg1 * 1000);
}
public function set hideTransitionName(_arg1:String):void{
var patternClass:Class;
var arg = _arg1;
if (arg != ""){
try {
patternClass = (getDefinitionByName(arg) as Class);
if (this.hidePattern != null){
this.hidePattern.remove();
};
this.hidePattern = new patternClass(this);
} catch(e:ReferenceError) {
throw ((("FLASHEFF ERROR: The pattern '" + arg) + "' is missing from library."));
};
this._hideTransitionName = arg;
};
}
protected function rollOverCommandHandler(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:*;
_local2 = this._rollOverCommands.length;
_local3 = 0;
while (_local3 < _local2) {
IFlashEffCommand(this._rollOverCommands[_local3]).run();
_local3++;
};
}
public function get absMatrix():Array{
return (this._absMatrix.concat());
}
public function get partialTable():IFeTable{
return (this._partialTable);
}
public function set buttonEffect(_arg1:IFlashEffButtonEffect):void{
if (this.buttonEffect != null){
this.buttonEffect.remove();
};
if (_arg1 != null){
this.setButtonEvents();
this._buttonEffect = _arg1;
this._buttonEffect.target = this.buttonTarget;
this._buttonEffect.component = this;
this._buttonEffect.apply();
this._buttonEffectName = String(getQualifiedClassName(_arg1).replace("::", "."));
} else {
this.removeButtonEvents();
this._buttonEffect = null;
};
}
protected function setProp(_arg1:XMLList, _arg2:Object){
var child:XML;
var propType:String;
var propValue:String;
var propName:String;
var arg = _arg1;
var refObj = _arg2;
if (refObj != null){
for each (child in arg.children()) {
propType = child.type;
propValue = child.value;
propName = child.name().localName;
try {
switch (propType){
case "String":
refObj[propName] = String(propValue);
break;
case "Number":
refObj[propName] = Number(String(propValue));
break;
case "uint":
refObj[propName] = uint(String(propValue));
break;
case "int":
refObj[propName] = int(String(propValue));
break;
case "Boolean":
refObj[propName] = (String(propValue) == "true");
break;
case "Array":
refObj[propName] = String(propValue).split(",");
break;
};
} catch(e:Error) {
trace(((((("FLASHEFF ERROR: While trying to set the " + propName) + " on ") + refObj) + ",this error came:") + e.message));
};
};
};
}
public function get buttonOwner():Sprite{
return (this._buttonOwner);
}
protected function releaseButtonHandler(_arg1:MouseEvent=null, _arg2:Boolean=false):void{
if (this.isDragOut == true){
if ((((_arg2 == true)) || ((this.isMouseTriggered == true)))){
if (this._isTransitioning == false){
if (this.buttonEffect != null){
this.buttonEffect.buttonRelease();
};
};
};
};
if (_arg1 != null){
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.MOUSE_UP));
};
}
public function show(_arg1=null):void{
this.forceAutoPlay = _arg1;
this.showTimer.stop();
this.hideTimer.stop();
this.transitionType = "show";
this.transitionEffect(this.transitionType);
}
public function set targetVisibility(_arg1:Boolean):void{
__targetVisibility = _arg1;
}
public function get xmlString():String{
return (__xmlString);
}
override public function set useHandCursor(_arg1:Boolean):void{
this._useHandCursor = _arg1;
this.highestOwner.buttonMode = _arg1;
this.highestOwner.useHandCursor = _arg1;
}
public function set _targetInstanceName(_arg1:String):void{
var _local2:DisplayObject;
var _local3:String;
var _local4:Object;
if (_arg1 != ""){
if ((this.parent is DisplayObject)){
_local2 = this.parent.getChildByName(_arg1);
if (_local2 == null){
_local3 = this.getPath(this.parent);
_local4 = _slot1.targetPaths[((_local3 + ".") + _arg1)];
if (_local4 != null){
_local2 = _local4.target;
};
};
this.target = _local2;
} else {
trace("[FLASHEFF ERROR] Please add the component to the display list, before setting the _targetInstanceName property.");
};
this.__targetInstanceName = _arg1;
};
}
public function set target(_arg1:DisplayObject):void{
var point:Point;
var bounds:Rectangle;
var arg = _arg1;
if (this._target != null){
if (this.showPattern != null){
try {
this.showPattern.remove();
this.showPattern["target"] = null;
} catch(e:Error) {
};
};
if (this.hidePattern != null){
try {
this.hidePattern.remove();
this.hidePattern["target"] = null;
} catch(e:Error) {
};
};
this._target.visible = true;
this.resetChildDisplayList(this._target);
};
if (arg != null){
if (arg.parent != null){
resetChildDisplayList(arg);
this._target = arg;
if (this._targetInstanceName == ""){
this.invalidate();
this.setDrawTime();
};
this.__targetInstanceName = arg.name;
point = new Point(0, 0);
if ((arg is TextField)){
point = new Point(-2, -2);
this._textField = TextField(arg);
this.textField.visible = false;
this._partialTextOwnerClip.scaleX = (this._textOwnerClip.scaleX = this.textField.scaleX);
this._partialTextOwnerClip.scaleY = (this._textOwnerClip.scaleY = this.textField.scaleY);
clearInterval(this.textChangeDelayInterval);
};
bounds = arg.getBounds(arg);
this.hitAreaClip.width = (bounds.width * this.target.scaleX);
this.hitAreaClip.height = (bounds.height * this.target.scaleY);
this.hitAreaClip.x = (bounds.x * target.scaleX);
this.hitAreaClip.y = (bounds.y * target.scaleY);
point = arg.localToGlobal(point);
point = this.parent.globalToLocal(point);
_slot1.targetPaths[this.getPath(arg)] = {target:arg, displayList:target.parent, x:arg.x, y:arg.y, rotation:arg.rotation};
this.targetOwner.addChild(arg);
this.x = (this.x + (point.x - this.x));
this.y = (this.y + (point.y - this.y));
this.rotation = this.target.rotation;
this.target.x = 0;
this.target.y = 0;
this.target.rotation = 0;
tempTransformSprite.transform = arg.transform;
this._initialTargetTransform = tempTransformSprite.transform;
} else {
trace("[FLASHEFF ERROR] Please add the target to the display list, before setting the _targetInstanceName|target property on FlashEff.");
};
} else {
trace("[FLASHEFF ERROR] You must set a non-null DisplayObject.");
};
}
protected function targetOnAdd(_arg1:Event){
if ((this.target.parent is MovieClip)){
if (MovieClip(this.target.parent).currentFrame <= 1){
this.target.visible = false;
};
};
this.target.stage.invalidate();
this.firstLevelOwner.addEventListener(Event.RENDER, callDraw);
}
public function setProperties(_arg1):void{
var child:XML;
var command:IFlashEffCommand;
var filter:IFlashEffFilter;
var me:*;
var urlLdr:URLLoader;
var xmlArg = _arg1;
if ((xmlArg is XML)){
this.invalidate();
this.removeEffect(true);
this.removeAllCommands();
this.removeAllFilters();
this.removeButtonEffect();
if (xmlArg.params.children().length() > 0){
this.setProp(xmlArg.params, this);
};
for each (child in xmlArg.patterns.children()) {
switch (String(child.type)){
case "command":
command = this.addCommandByName(String(child.name), String(child.event));
this.setProp(child.params, command);
break;
case "filter":
filter = this.addFilterByName(String(child.name));
this.setProp(child.params, filter);
break;
case "buttonEffect":
this.buttonEffectName = String(child.name);
this.setProp(child.params, this.buttonEffect);
break;
case "hide":
this.hideTransitionName = String(child.name);
this.setProp(child.params, this.hidePattern);
break;
case "show":
this.showTransitionName = String(child.name);
this.setProp(child.params, this.showPattern);
break;
};
};
drawCalled = false;
this.setDrawTime();
} else {
me = this;
urlLdr = new URLLoader();
urlLdr.dataFormat = URLLoaderDataFormat.TEXT;
urlLdr.addEventListener(Event.COMPLETE, function (_arg1:Event){
var _local2:FLASHEFFEvents;
var _local3:XML;
_local2 = new FLASHEFFEvents(FLASHEFFEvents.COMPLETE);
_local2.data = urlLdr.data;
me.dispatchEvent(_local2);
_local3 = XML(urlLdr.data);
if (String(_local3.params.xmlPath.value) == xmlArg){
_local3.params.xmlPath.value = "";
};
me.setProperties(_local3);
});
urlLdr.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent){
trace("FLASHEFF ERROR: There was an IO_ERROR problem loading the xml. Please check the xmlPath.");
me.dispatchEvent(_arg1);
});
urlLdr.load(new URLRequest(xmlArg));
};
}
public function set showAutoPlay(_arg1:Boolean):void{
__showAutoPlay = _arg1;
this.invalidate();
setDrawTime();
}
public function getFilterAt(_arg1:uint):IFlashEffFilter{
if (_arg1 < this.filterList.length){
return (this.filterList[_arg1]);
};
return (null);
}
public function removeEffect(_arg1:Boolean=false, _arg2:IFlashEffSymbolText=null):void{
if (_arg2 == null){
_arg2 = this.lastTransitionPattern;
};
if (_arg2 != null){
_arg2.remove();
};
if (this.partialPattern != null){
this.partialPattern.remove();
};
if (this.textTable != null){
this.textTable.removeChilds();
};
if (this.partialTable != null){
this.partialTable.removeChilds();
};
if (_arg1 == false){
if (_isTransitioning == true){
eventsDispatched = 0;
maxEndEvents = 1;
this.dispatchEvent(new FLASHEFFEvents(FLASHEFFEvents.TRANSITION_END));
};
};
if (this.isTargetVisibleAtEnd == true){
this.target.visible = true;
};
}
public function transitionEffect(_arg1:String="show"):void{
var transt = _arg1;
this.validate();
this.removeEffect(true);
this.maxEndEvents = 1;
if (this.target != null){
if (this.targetOwner.getChildByName(this.target.name) != this.target){
this.target = this.target;
};
try {
eventsDispatched = 0;
this.lastTransitionPattern = this[(transt + "Pattern")];
if (this.lastTransitionPattern != null){
if (this.target.parent != this.targetOwner){
this.target = this.target;
};
this.target.visible = true;
this.lastTransitionPattern.component = this;
try {
this.lastTransitionPattern["target"] = this.target;
} catch(e:TypeError) {
trace("FLASHEFF ERROR: You have placed a text pattern over a symbol. Please use a symbol pattern instead!");
return;
};
_isTransitioning = true;
if (this.isButtonEffectApplyed == true){
if (this.buttonEffect != null){
this.buttonEffect.remove();
};
};
var _local3 = this.lastTransitionPattern;
_local3[transt]();
} else {
trace((("FLASHEFF WARNING: The " + transt) + "Transition pattern is null. The transition will not be applied."));
};
} catch(e:ReferenceError) {
throw (("FLASHEFF ERROR: " + e));
};
} else {
trace("FLASHEFF WARNING: Please set the target or _targetInstanceName property before applying an effect.");
};
}
public function get hideTransitionName():String{
return (this._hideTransitionName);
}
protected function resetArrays():void{
_absChars = [];
_absWords = [];
_absLines = [];
_absMatrix = [];
_absCustom = [];
}
protected function hideCaller(_arg1:TimerEvent):void{
this.hide();
}
public function addCommand(_arg1:IFlashEffCommand, _arg2:String):IFlashEffCommand{
var command = _arg1;
var eventType = _arg2;
if (command != null){
try {
this[(("_" + eventType) + "Commands")].push(command);
command.component = this;
command.target = this.target;
this.setCommands(eventType);
} catch(e:Error) {
trace("FLASHEFF ERROR: Unknown eventType. Available events are: rollOver, rollOut, press and release.");
};
};
return (command);
}
public function get buttonEffect():IFlashEffButtonEffect{
return (this._buttonEffect);
}
protected function linesSplit():Array{
var _local1:Array;
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:Number;
var _local6:uint;
var _local7:*;
var _local8:String;
var _local9:Boolean;
var _local10:uint;
var _local11:*;
_local1 = [];
_local2 = [];
_local3 = this.textField.numLines;
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < _local3) {
_local7 = this.textField.getCharBoundaries(_local4);
_local8 = this.textField.getLineText(_local6);
_local9 = false;
if (_local7 == null){
_local9 = true;
_local10 = _local8.length;
if (_local10 > 0){
_local11 = 0;
while (_local11 < _local10) {
_local7 = this.textField.getCharBoundaries((_local4 + _local11));
if (_local7 != null){
_local9 = false;
break;
};
_local11++;
};
};
};
if (_local9 == false){
_local2[(_local6 - _local5)] = {};
_local2[(_local6 - _local5)].id = _local4;
_local2[(_local6 - _local5)].bounds = _local7;
_local2[(_local6 - _local5)].lineId = _local6;
_local2[(_local6 - _local5)].text = _local8;
_local4 = (_local4 + String(_local2[(_local6 - _local5)].text).length);
} else {
_local5++;
_local4 = (_local4 + _local8.length);
};
_local6++;
};
return (_local2);
}
public function addFilter(_arg1:IFlashEffFilter):void{
var _local2:DisplayObject;
var _local3:Boolean;
if (_arg1 != null){
_local2 = this.firstInDepth;
this.firstInDepth = new Sprite();
this.firstLevelOwner.addChild(this.firstInDepth);
this.firstInDepth.addChild(_local2);
_arg1.component = this;
_arg1.target = this.firstInDepth;
this.filterAsoc[_arg1.target.name] = _local2;
if (!this.isInvalid(InvalidationType.ALL)){
_local3 = this.target.visible;
this.target.visible = true;
_arg1.apply();
this.target.visible = _local3;
};
this.filterList.push(_arg1);
};
}
public function get targetVisibility():Boolean{
return (__targetVisibility);
}
public function get _targetInstanceName():String{
return (this.__targetInstanceName);
}
public function addCommandByName(_arg1:String, _arg2:String, _arg3:Object=null):IFlashEffCommand{
var commandRef:Class;
var command:IFlashEffCommand;
var i:*;
var commandName = _arg1;
var eventType = _arg2;
var initObj = _arg3;
try {
commandRef = (getDefinitionByName(commandName) as Class);
command = IFlashEffCommand(new commandRef(this));
if (initObj != null){
for (i in initObj) {
command[i] = initObj[i];
};
};
} catch(e:ReferenceError) {
trace((("FLASHEFF ERROR: FLASHEFF ERROR: The command pattern '" + commandName) + "' is missing from library."));
return (null);
};
return (this.addCommand(command, eventType));
}
public function get showAutoPlay():Boolean{
return (__showAutoPlay);
}
public function get targetOwner():MovieClip{
return (this._targetOwner);
}
public function set showTransitionName(_arg1:String):void{
var patternClass:Class;
var arg = _arg1;
if (arg != ""){
try {
patternClass = (getDefinitionByName(arg) as Class);
if (this.showPattern != null){
this.showPattern.remove();
};
this.showPattern = IFlashEffSymbolText(new patternClass(this));
} catch(e:ReferenceError) {
throw ((("FLASHEFF ERROR: The pattern '" + arg) + "' is missing from library."));
};
this._showTransitionName = arg;
};
}
public function get textField():TextField{
return (this._textField);
}
public function set drawAfterFilters(_arg1:Boolean):void{
if (_arg1 != this.drawAfterFilters){
if (_arg1 == true){
buttonTarget = this.afterDrawButtonTarget;
afterDrawButtonTargetOwner.addChild(this.buttonOwner);
} else {
buttonTarget = this.beforeDrawButtonTarget;
this.beforeDrawButtonTargetOwner.addChild(this.buttonOwner);
};
if (this.buttonEffect != null){
this.buttonEffect.target = this.buttonTarget;
};
};
this._drawAfterFilters = _arg1;
}
public function set partialPatternName(_arg1:String):void{
var patternReference:Class;
var arg = _arg1;
if (arg != ""){
try {
patternReference = (getDefinitionByName(arg) as Class);
} catch(e:ReferenceError) {
throw ((("FLASHEFF ERROR: The Pattern:" + arg) + " is unavailable."));
};
};
if (patternReference != null){
this.partialPattern = new patternReference(this);
this.partialPattern.target = this._partialTextOwnerClip;
};
__partialPattern = arg;
}
eventTypeAsoc["rollOver"] = "ROLL_OVER";
eventTypeAsoc["rollOut"] = "ROLL_OUT";
eventTypeAsoc["press"] = "MOUSE_DOWN";
eventTypeAsoc["release"] = "MOUSE_UP";
eventTypeAsoc["doubleClick"] = "DOUBLE_CLICK";
}
}//package
Section 264
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 265
//gameData (gameData)
package {
import flash.net.*;
public class gameData {
public var XPLEVEL:Number;
public var CLEVEL:Number;
public var TOTALTIMEELAPSED:Number;
public var NEGOTIATION:Number;
public var RESISTANCE:Number;
public var REGENERATION:Number;
public var HPLEVEL:Number;
public var BCOLORPOOL:Array;
public var PRECISION:Number;
public var LASTMODIFIED:Date;
public var AMMO_FULL:Array;
public var POINTS:Number;
public var PLAYERNAME:String;
public var BOMBS:Array;
public var AMMO_TOTAL:Array;
public var AWEIGHT:Number;
public var A_BOMBS:Number;
public var DIFFICULTY:Number;
public var PLAYERID:String;
public var XP:Number;
public static var GAMEID:String = "qigames_desertrifle_V1_06";
public function gameData(_arg1:String, _arg2:Number=2){
var _local3:Date;
super();
_local3 = new Date();
PLAYERID = String(_local3.getTime());
PLAYERID = (PLAYERID + String(Math.round((Math.random() * 99999))));
PLAYERNAME = _arg1;
LASTMODIFIED = new Date();
DIFFICULTY = _arg2;
CLEVEL = 1;
AMMO_TOTAL = [99999, 0, 0, 0];
AMMO_FULL = [18, 8, 60, 10];
AWEIGHT = 50;
POINTS = 0;
BOMBS = [];
A_BOMBS = 1;
XPLEVEL = 0;
XP = 0;
PRECISION = 1;
RESISTANCE = 1;
NEGOTIATION = 1;
REGENERATION = 1;
HPLEVEL = 1;
BCOLORPOOL = [1, 2, 3, 4, 5];
}
public function getObjData(_arg1:String){
var _local2:*;
for (_local2 in OBJDATA) {
if (OBJDATA[_local2].id == _arg1){
return (OBJDATA[_local2]);
};
};
OBJDATA.push({id:_arg1});
}
public static function saveGames(_arg1:Array){
var _local2:SharedObject;
_local2 = SharedObject.getLocal(gameData.GAMEID, "/");
_local2.data.GAMES = _arg1;
_local2.flush();
}
public static function copyGame(_arg1:Object, _arg2:Object){
_arg2.PLAYERID = _arg1.PLAYERID;
_arg2.PLAYERNAME = _arg1.PLAYERNAME;
_arg2.LASTMODIFIED = _arg1.LASTMODIFIED;
_arg2.DIFFICULTY = _arg1.DIFFICULTY;
_arg2.CLEVEL = _arg1.CLEVEL;
_arg2.AMMO_TOTAL = util.copyArray(_arg1.AMMO_TOTAL);
_arg2.AMMO_FULL = util.copyArray(_arg1.AMMO_FULL);
_arg2.AWEIGHT = _arg1.AWEIGHT;
_arg2.POINTS = _arg1.POINTS;
_arg2.BOMBS = util.copyArray(_arg1.BOMBS);
_arg2.A_BOMBS = _arg1.A_BOMBS;
_arg2.XPLEVEL = _arg1.XPLEVEL;
_arg2.XP = _arg1.XP;
_arg2.PRECISION = _arg1.PRECISION;
_arg2.RESISTANCE = _arg1.RESISTANCE;
_arg2.NEGOTIATION = _arg1.NEGOTIATION;
_arg2.REGENERATION = _arg1.REGENERATION;
_arg2.HPLEVEL = _arg1.HPLEVEL;
_arg2.BCOLORPOOL = util.copyArray(_arg1.BCOLORPOOL);
}
public static function newGame(_arg1:String, _arg2:Number){
var _local3:SharedObject;
var _local4:Array;
var _local5:gameData;
_local3 = SharedObject.getLocal(gameData.GAMEID, "/");
_local4 = _local3.data.GAMES;
if (_local3.data.GAMES == undefined){
_local3.data.GAMES = new Array();
};
_local5 = new gameData(_arg1, _arg2, _local4.length);
_local3.data.GAMES.push(_local5);
_local3.flush();
}
public static function getGames(){
var _local1:SharedObject;
var _local2:Array;
_local1 = SharedObject.getLocal(gameData.GAMEID, "/");
_local2 = _local1.data.GAMES;
if (_local1.data.GAMES == undefined){
_local1.data.GAMES = [];
_local1.flush();
};
return (_local1.data.GAMES);
}
public static function deleteGame(_arg1:Number){
var _local2:SharedObject;
var _local3:Array;
_local2 = SharedObject.getLocal(gameData.GAMEID, "/");
_local3 = _local2.data.GAMES;
if (_arg1 < 0){
return;
};
if (_arg1 > (_local3.length - 1)){
return;
};
_local3.splice(_arg1, 1);
_local2.flush();
}
public static function saveGame(_arg1:gameData){
_global.CGAME.LASTMODIFIED = new Date();
gameData.saveGames(_global.GAMES);
}
}
}//package
Section 266
//GameInstance (GameInstance)
package {
import flash.display.*;
import gdk.arcade.*;
public class GameInstance extends gGame {
public var DAYMC:MovieClip;
public var day_mc:MovieClip;
public var SCRIPT:GameScript;
public function GameInstance(){
addFrameScript(0, frame1);
trace("Unique game instance created");
glo.bal.GAME = this;
super(700, 450);
SCRIPT = new GameScript();
}
public function init(_arg1:Object=null){
if (!glo.bal.GAME_AUTH){
return;
};
PLAYER = glo.bal.PLAYER;
SCRIPT.init();
gotoAndStop(glo.bal.CGAME.CLEVEL);
}
override protected function onDestroy(){
trace("GameInstance->onDestroy");
glo.bal.JUKEBOX.stopGunLoop();
glo.bal.INTERFACE.destroy();
glo.bal.SCRIPT.destroy();
gotoAndStop(1);
}
override protected function nextState(){
SCRIPT.nextState();
}
function frame1(){
stop();
DAYMC = day_mc;
}
}
}//package
Section 267
//GameInterface (GameInterface)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class GameInterface extends MovieClip {
public var wdummy_mc:MovieClip;
public var cursor_mc:MovieClip;
public var LEVELCOMPLETED:Boolean;
public var menu_btn:SimpleButton;
public var MOUSEOUTSIDE:Boolean;
public var GAMEPAUSED:Boolean;
public var ALIVE:Boolean;
public var MOUSEDOWN:Boolean;
public var GAMEOVER:Boolean;
public var PLAYER:aiPlayer;
public var cSheet_mc:MovieClip;
public function GameInterface(){
addFrameScript(0, frame1);
trace("Unique game interface instance created");
glo.bal.INTERFACE = this;
ALIVE = false;
MOUSEOUTSIDE = false;
GAMEPAUSED = false;
LEVELCOMPLETED = false;
GAMEOVER = false;
MOUSEDOWN = false;
addEventListener(Event.ENTER_FRAME, evtEnterFrame);
addEventListener(MouseEvent.MOUSE_DOWN, evtMouseDown);
addEventListener(MouseEvent.MOUSE_UP, evtMouseUp);
addEventListener(MouseEvent.MOUSE_WHEEL, evtMouseWheel);
addEventListener(MouseEvent.MOUSE_OUT, evtMouseOut);
addEventListener(MouseEvent.ROLL_OUT, evtMouseRollOut);
addEventListener("focusOut", evtFocusOut);
menu_btn.addEventListener("click", btnMenu);
}
public function evtMouseWheel(_arg1:MouseEvent){
}
public function destroy(){
ALIVE = false;
glo.bal.BARS.backToNormal();
glo.bal.BOMBBUTTONS.destroy();
glo.bal.RELOAD.done();
MOUSEOUTSIDE = false;
GAMEPAUSED = false;
LEVELCOMPLETED = false;
GAMEOVER = false;
MOUSEDOWN = false;
}
public function init(){
ALIVE = true;
PLAYER = glo.bal.PLAYER;
Mouse.hide();
glo.bal.Aim.visible = true;
glo.bal.BOMBSUI.createBombs();
glo.bal.HEALTHBAR.init();
glo.bal.HEALTHBAR.setHealth((glo.bal.CGAME.RESISTANCE * 100), (glo.bal.CGAME.RESISTANCE * 100));
glo.bal.PLAYER.setXP();
glo.bal.MissionCompleted.gotoAndStop(1);
glo.bal.BOMBBUTTONS.createInitialBombs();
glo.bal.TIMERUI.resetTimer();
glo.bal.PAUSEMENU.deactivate();
if (glo.bal.HEROHIT){
glo.bal.HEROHIT.gotoAndStop(1);
};
glo.bal.CSHEET.visible = false;
}
public function victory(){
if (GAMEOVER){
return;
};
LEVELCOMPLETED = true;
ALIVE = false;
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
glo.bal.MissionCompleted.activate();
glo.bal.GAMECOMPLETED = false;
glo.bal.PLAYER.levelCompleted();
}
public function showCharacterSheet(){
pausePlay();
glo.bal.CSHEET.activate();
}
public function resumePlay(){
GAMEPAUSED = false;
if (glo.bal.GAME != null){
glo.bal.GAME.resumePlay();
};
glo.bal.SCRIPT.resumePlay();
if (!glo.bal.PLAYER.isOnHiddenMode()){
Mouse.hide();
glo.bal.Aim.visible = true;
};
glo.bal.WEAPONS.visible = true;
glo.bal.BOMBSUI.visible = true;
menu_btn.visible = true;
glo.bal.PLAYER.resumePlay();
}
public function evtMouseDown(_arg1:MouseEvent){
if (PLAYER){
if (this.mouseY >= 115){
PLAYER.evtMouseDown(mouseX, mouseY);
};
};
}
function frame1(){
stop();
glo.bal.CSHEET = cSheet_mc;
}
public function evtFocusOut(_arg1:Event){
}
public function pausePlay(){
GAMEPAUSED = true;
if (glo.bal.GAME){
glo.bal.GAME.pausePlay();
};
glo.bal.SCRIPT.pausePlay();
Mouse.show();
glo.bal.Aim.visible = false;
glo.bal.WEAPONS.visible = false;
glo.bal.BOMBSUI.visible = false;
menu_btn.visible = false;
glo.bal.PLAYER.pausePlay();
}
public function evtMouseOut(_arg1:MouseEvent){
}
public function backFromCharSheet(){
glo.bal.JUKEBOX.btnClick();
glo.bal.INTERFACE.resumePlay();
glo.bal.XPBAR.backToNormal();
cSheet_mc.visible = false;
}
public function hideWeaponsDummy(){
wdummy_mc.visible = false;
}
function pauseResumePlay(){
if (GAMEPAUSED){
glo.bal.PAUSEMENU.deactivate();
} else {
glo.bal.PAUSEMENU.activate();
pausePlay();
};
}
function btnMap(_arg1:Event=null){
if (!ALIVE){
return;
};
glo.bal.LEVELMAP.activate();
pausePlay();
}
public function evtMouseRollOut(_arg1:MouseEvent){
}
public function showWeaponsDummy(){
wdummy_mc.visible = true;
}
public function evtMouseUp(_arg1:MouseEvent){
if (PLAYER){
PLAYER.evtMouseUp(mouseX, mouseY);
};
}
public function evtEnterFrame(_arg1:Event){
if (!ALIVE){
return;
};
if (GAMEPAUSED){
return;
};
if (PLAYER.HIDDEN){
if (this.mouseY < 300){
PLAYER.tryUnhideHero();
glo.bal.GAME.hideMouse();
glo.bal.Aim.visible = true;
glo.bal.PLAYER.visible = true;
};
if (this.mouseY < 120){
glo.bal.Aim.visible = false;
glo.bal.GAME.showMouse();
};
} else {
if (this.mouseY > 375){
PLAYER.tryHideHero();
} else {
if (this.mouseY < 120){
glo.bal.Aim.visible = false;
glo.bal.GAME.showMouse();
} else {
PLAYER.tryUnhideHero();
glo.bal.GAME.hideMouse();
if (!glo.bal.PLAYER.RELOADING){
glo.bal.Aim.visible = true;
glo.bal.PLAYER.visible = true;
};
};
};
};
glo.bal.TIMERUI.refreshTimer();
glo.bal.BARS.nextState();
}
public function quit(){
ALIVE = false;
glo.bal.PLAYER.gameDead();
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
}
function btnMenu(_arg1:Event=null){
if (!ALIVE){
return;
};
glo.bal.JUKEBOX.btnClick();
glo.bal.PAUSEMENU.activate();
pausePlay();
}
public function gameOver(){
if (GAMEOVER){
return;
};
GAMEOVER = true;
ALIVE = false;
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
glo.bal.MissionFailed.activate();
glo.bal.GAMECOMPLETED = false;
}
public function missionFailed(){
ALIVE = false;
glo.bal.JUKEBOX.stopHeartbeat1();
glo.bal.JUKEBOX.stopHeartbeat2();
Mouse.show();
glo.bal.Aim.visible = false;
}
}
}//package
Section 268
//GameScript (GameScript)
package {
import flash.display.*;
class GameScript {
public var TOTTIME:Number;
public var SCDELTAY:Number;// = 0
public var WAVESELECTION:RandomSelection;
public var WAVECOUNT:Number;
public var ITEMDISTRIBUTION:RandomSelection;
public var SETUP_WAVESIZE:Array;
public var SETUP_TOTALTIME:Number;
public var SHAKING:Boolean;
public var DEPTHCOUNT:Number;
public var SETUP_MAXUNITS:Number;
public var WAVESPREAD:Number;
public var BOMBRADIUS:Number;
public var WAVESPOTS:Array;
public var BOMBEXP:Array;
public var WAVEINTERVAL:Number;
public var UNITS2:Array;
public var GAMEOVER:Boolean;
public var FRAMECOUNT:Number;
public var VPMAX:Number;
public var SETUP_WAVESPREAD:Array;
public var UNITS:Array;
public var VMAX:Number;
public var NEXTWAVEEVT:Object;
public var SETUP_WAVEINTERVAL:Array;
public var PLAYER:aiPlayer;
public var ENDOFDAY:Boolean;
public var SCENE:MovieClip;
public var GAME:GameInstance;
public var SETUP_UNITTYPES:Array;
public var VICTORY:Boolean;
public var WAVESIZE:Number;
function GameScript(){
SCDELTAY = 0;
super();
reset();
glo.bal.SCRIPT = this;
FRAMECOUNT = 0;
GAME = glo.bal.GAME;
BOMBRADIUS = 50;
SHAKING = false;
BOMBEXP = [];
VMAX = 1400;
VPMAX = Math.pow(VMAX, 2);
}
public function wavesSetup(){
setupUnitTypes();
SETUP_WAVESIZE = [0, 0];
SETUP_WAVESIZE[0] = (1 + Math.round(((1 * glo.bal.CGAME.CLEVEL) / 6)));
SETUP_WAVESIZE[1] = (2 + Math.round(((1 * glo.bal.CGAME.CLEVEL) / 6)));
SETUP_WAVEINTERVAL = [0, 0];
SETUP_WAVEINTERVAL[0] = Math.round((1 * 16));
SETUP_WAVEINTERVAL[1] = Math.round((1 * 16));
SETUP_WAVESPREAD = [(2 * 16), (2 * 16)];
switch (glo.bal.CGAME.CLEVEL){
case 1:
SETUP_MAXUNITS = 5;
break;
case 2:
SETUP_MAXUNITS = 4;
break;
case 3:
SETUP_MAXUNITS = 4;
break;
case 4:
SETUP_MAXUNITS = 5;
break;
case 5:
SETUP_MAXUNITS = 5;
break;
case 6:
SETUP_MAXUNITS = 6;
break;
};
switch (glo.bal.CGAME.DIFFICULTY){
case 1:
trace("wavesSetup : EASY");
SETUP_WAVEINTERVAL[0] = Math.round((SETUP_WAVEINTERVAL[0] * 1.25));
SETUP_WAVEINTERVAL[1] = Math.round((SETUP_WAVEINTERVAL[1] * 1.25));
break;
case 2:
trace("wavesSetup : MEDIUM");
SETUP_MAXUNITS = (SETUP_MAXUNITS + 1);
break;
case 3:
trace("wavesSetup : HARD");
SETUP_MAXUNITS = (SETUP_MAXUNITS + 3);
SETUP_WAVEINTERVAL[0] = Math.round((SETUP_WAVEINTERVAL[0] * 0.75));
SETUP_WAVEINTERVAL[1] = Math.round((SETUP_WAVEINTERVAL[1] * 0.75));
break;
};
}
public function setupUnitTypes(){
SETUP_UNITTYPES = [];
switch (glo.bal.CGAME.CLEVEL){
case 1:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
break;
case 2:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
SETUP_UNITTYPES.push([soldierB, 100, 100, 4]);
soldierB.COUNT = 0;
soldierB.MAXUNITS = 4;
break;
case 3:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
SETUP_UNITTYPES.push([soldierB, 100, 100, 4]);
soldierB.COUNT = 0;
soldierB.MAXUNITS = 4;
SETUP_UNITTYPES.push([carShooterA, 100, 100, 1]);
carShooterA.COUNT = 0;
carShooterA.MAXUNITS = 1;
break;
case 4:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
SETUP_UNITTYPES.push([soldierB, 100, 100, 6]);
soldierB.COUNT = 0;
soldierB.MAXUNITS = 6;
SETUP_UNITTYPES.push([carShooterA, 100, 100, 1]);
carShooterA.COUNT = 0;
carShooterA.MAXUNITS = 1;
SETUP_UNITTYPES.push([soldierC, 100, 100, 3]);
soldierB.COUNT = 0;
soldierC.MAXUNITS = 3;
break;
case 5:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
SETUP_UNITTYPES.push([soldierB, 100, 100, 6]);
soldierB.COUNT = 0;
soldierB.MAXUNITS = 6;
SETUP_UNITTYPES.push([carShooterA, 100, 100, 1]);
carShooterA.COUNT = 0;
carShooterA.MAXUNITS = 1;
SETUP_UNITTYPES.push([soldierC, 100, 100, 4]);
soldierB.COUNT = 0;
soldierC.MAXUNITS = 4;
SETUP_UNITTYPES.push([kamikazeA, 100, 100, 1]);
kamikazeA.COUNT = 0;
kamikazeA.MAXUNITS = 1;
break;
case 6:
SETUP_UNITTYPES.push([soldierA, 100, 100, 6]);
soldierA.COUNT = 0;
soldierA.MAXUNITS = 6;
SETUP_UNITTYPES.push([soldierB, 100, 100, 6]);
soldierB.COUNT = 0;
soldierB.MAXUNITS = 6;
SETUP_UNITTYPES.push([carShooterA, 100, 100, 1]);
carShooterA.COUNT = 0;
carShooterA.MAXUNITS = 1;
SETUP_UNITTYPES.push([soldierC, 100, 100, 4]);
soldierB.COUNT = 0;
soldierC.MAXUNITS = 4;
SETUP_UNITTYPES.push([kamikazeA, 100, 100, 1]);
kamikazeA.COUNT = 0;
kamikazeA.MAXUNITS = 1;
break;
};
}
public function resumePlay(){
var _local1:Number;
for (_local1 in UNITS) {
UNITS[_local1].resumePlay();
};
}
public function destroy(){
var _local1:Array;
var _local2:Number;
ENDOFDAY = false;
VICTORY = false;
GAMEOVER = false;
FRAMECOUNT = 0;
glo.bal.HIDINGPANEL.hideHidingPanel();
glo.bal.WEAPONSANIM.hideWeapons();
GAME.y = 0;
_local1 = [];
_local2 = 0;
while (_local2 < UNITS2.length) {
_local1.push(UNITS2[_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].destroy();
_local2++;
};
UNITS2 = [];
UNITS = [];
}
public function removeUnit2(_arg1:Object){
var _local2:Number;
_local2 = UNITS2.indexOf(_arg1);
if (_local2 != -1){
UNITS2.splice(_local2, 1);
};
}
public function init(){
PLAYER = glo.bal.PLAYER;
}
public function shake(){
if (SHAKING){
return;
};
SHAKING = true;
GAME.animation(this, 5, shakeTick);
}
public function sceneShowing(_arg1:Number, _arg2:Number){
GAME.y = (40 - (_arg1 * 4));
if (_arg1 == _arg2){
glo.bal.PLAYER.unhidden();
GAME.y = 0;
};
}
public function sortD(_arg1:MovieClip, _arg2:MovieClip){
if (SCENE.getChildIndex(_arg1) > SCENE.getChildIndex(_arg2)){
return (-1);
};
if (SCENE.getChildIndex(_arg1) < SCENE.getChildIndex(_arg2)){
return (1);
};
return (0);
}
public function createUnit(_arg1:Object=null){
var _local2:Class;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Object;
var _local9:Number;
if (ENDOFDAY){
return;
};
if (GAMEOVER){
return;
};
if (UNITS.length >= SETUP_MAXUNITS){
return;
};
_local3 = 0;
while (_local3 < 10) {
_local2 = WAVESELECTION.choose();
if (_local2.COUNT < _local2.MAXUNITS){
break;
} else {
_local2 = null;
};
_local3++;
};
if (!_local2){
return;
};
_local3 = Math.floor((Math.random() * WAVESPOTS.length));
if (_local3 == WAVESPOTS.length){
_local3--;
};
_local4 = WAVESPOTS.splice(_local3, 1)[0];
if ((((((_local2 == soldierA)) || ((_local2 == soldierB)))) || ((_local2 == soldierC)))){
_local5 = ((50 + (_local4 * 100)) + Math.round((Math.random() * 80)));
_local6 = 200;
_local7 = 0;
} else {
if (_local2 == carShooterA){
if (Math.random() > 0.5){
_local5 = 900;
} else {
_local5 = -200;
};
_local7 = (400 + Math.round((Math.random() * 400)));
_local9 = (Math.pow(_local7, 2) / Math.pow(1400, 2));
if (_local9 > 1){
_local9 = 1;
};
_local6 = (220 + (_local9 * 230));
} else {
if (_local2 == kamikazeA){
_local5 = ((50 + (_local4 * 100)) + Math.round((Math.random() * 80)));
_local6 = 200;
_local7 = 0;
};
};
};
_local8 = new (_local2);
UNITS.push(_local8);
UNITS2.push(_local8);
_local8.x = _local5;
_local8.y = _local6;
_local8.V = _local7;
setUnitParameters(_local8);
SCENE.addChild(_local8);
glo.bal.BOMBSUI.addUnit(_local8);
DEPTHCOUNT--;
}
public function explodeKamikaze(_arg1:MovieClip, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Array;
if (glo.bal.INTERFACE.GAMEPAUSED){
return;
};
_local5 = (_arg2 - 250);
_local6 = (_arg2 + 250);
_local7 = (_arg3 - 250);
_local8 = (_arg3 + 250);
_local9 = [];
_local4 = 0;
while (_local4 < UNITS.length) {
if (_arg1 != UNITS[_local4]){
_local9.push(UNITS[_local4]);
};
_local4++;
};
_local4 = 0;
while (_local4 < _local9.length) {
_local9[_local4].tryExplosion(_local5, _local6, _local7, _local8);
_local4++;
};
glo.bal.JUKEBOX.explosion();
}
public function nextWave(_arg1:Object=null){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (ENDOFDAY){
return;
};
if (GAMEOVER){
return;
};
WAVECOUNT++;
_local6 = (FRAMECOUNT / TOTTIME);
_local2 = (SETUP_WAVESIZE[1] - SETUP_WAVESIZE[0]);
WAVESIZE = (SETUP_WAVESIZE[0] + (_local2 * _local6));
WAVESIZE = Math.round(WAVESIZE);
_local2 = (SETUP_WAVESPREAD[1] - SETUP_WAVESPREAD[0]);
WAVESPREAD = (SETUP_WAVESPREAD[0] + (_local2 * _local6));
WAVESPREAD = Math.round(WAVESPREAD);
_local2 = (SETUP_WAVEINTERVAL[1] - SETUP_WAVEINTERVAL[0]);
WAVEINTERVAL = (SETUP_WAVEINTERVAL[0] + (_local2 * _local6));
WAVEINTERVAL = Math.round(WAVEINTERVAL);
WAVESELECTION = new RandomSelection();
for (_local3 in SETUP_UNITTYPES) {
if (SETUP_UNITTYPES[_local3][1] > 0){
_local2 = (SETUP_UNITTYPES[_local3][2] - SETUP_UNITTYPES[_local3][1]);
_local4 = (SETUP_UNITTYPES[_local3][1] + (_local2 * _local6));
WAVESELECTION.choice(SETUP_UNITTYPES[_local3][0], _local4);
};
};
WAVESPOTS = [0, 1, 2, 3, 4];
_local3 = 0;
while (_local3 < WAVESIZE) {
_local5 = Math.round((Math.random() * WAVESPREAD));
GAME.evt(_local5, createUnit, this);
_local3++;
};
NEXTWAVEEVT = GAME.evt(WAVEINTERVAL, nextWave, this);
}
public function showScene(){
glo.bal.HIDINGPANEL.hideHidingPanel();
glo.bal.WEAPONSANIM.hideWeapons();
glo.bal.INTERFACE.showWeaponsDummy();
GAME.animation(this, 10, sceneShowing);
}
public function setUnitParameters(_arg1:Object){
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round(((_local2 * glo.bal.CGAME.DIFFICULTY) * glo.bal.CGAME.CLEVEL));
switch (_arg1.TYPE){
case "soldierA":
_arg1.SHOOTR_MAX = Math.round((600 - (Math.random() * 300)));
_arg1.SHOOTR_MIN = Math.round((1100 - (Math.random() * 300)));
if (_local2 < 0.3333){
_arg1.MOVELIST = ["runFront"];
} else {
if (_local2 < 0.66666){
_arg1.MOVELIST = ["runLeft", "runRight"];
} else {
_arg1.MOVELIST = ["runFront", "runLeft", "runRight"];
};
};
_arg1.PRECISION = ((0.3 + (0.4 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.2 * _local2));
_arg1.AGGRESSION = ((0.45 + (0.35 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.2 * _local3));
_arg1.DAMAGE = 10;
_arg1.SHOOTINT = [2, 5];
break;
case "soldierB":
_arg1.SHOOTR_MAX = Math.round((600 - (Math.random() * 300)));
_arg1.SHOOTR_MIN = Math.round((1100 - (Math.random() * 300)));
if (_local2 < 0.3333){
_arg1.MOVELIST = ["runFront"];
} else {
if (_local2 < 0.66666){
_arg1.MOVELIST = ["runLeft", "runRight"];
} else {
_arg1.MOVELIST = ["runFront", "runLeft", "runRight"];
};
};
_arg1.PRECISION = ((0.4 + (0.4 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.2 * _local2));
_arg1.AGGRESSION = ((0.55 + (0.35 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.1 * _local3));
_arg1.DAMAGE = 15;
_arg1.SHOOTINT = [3, 6];
break;
case "soldierC":
_arg1.SHOOTR_MAX = Math.round((600 - (Math.random() * 300)));
_arg1.SHOOTR_MIN = Math.round((1100 - (Math.random() * 300)));
if (_local2 < 0.3333){
_arg1.MOVELIST = ["runFront"];
} else {
if (_local2 < 0.66666){
_arg1.MOVELIST = ["runLeft", "runRight"];
} else {
_arg1.MOVELIST = ["runFront", "runLeft", "runRight"];
};
};
_arg1.PRECISION = ((0.4 + (0.4 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.2 * _local2));
_arg1.AGGRESSION = ((0.6 + (0.3 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.1 * _local3));
_arg1.DAMAGE = 15;
_arg1.SHOOTINT = [4, 7];
break;
case "carShooterA":
_arg1.FIRESCOPE = (250 - (_local4 * 5));
trace(("_UNIT.FIRESCOPE " + _arg1.FIRESCOPE));
_arg1.PRECISION = ((0.1 + (0.4 * ((glo.bal.CGAME.DIFFICULTY * glo.bal.CGAME.CLEVEL) / 18))) + (0.1 * _local2));
_arg1.DAMAGE = 15;
_arg1.MININSCENEINT = Math.round(((7 - (((5 * glo.bal.CGAME.DIFFICULTY) * glo.bal.CGAME.CLEVEL) / 18)) * 16));
_arg1.CURINSCENEINT = _arg1.MININSCENEINT;
break;
case "kamikazeA":
_arg1.EXPLODEV = 1360;
_arg1.DAMAGE = 40;
break;
};
}
public function removeUnit(_arg1:Object){
var _local2:Number;
glo.bal.BOMBSUI.removeUnit(_arg1);
_local2 = UNITS.indexOf(_arg1);
if (_local2 != -1){
UNITS.splice(_local2, 1);
};
}
public function hitDetection(_arg1:Object){
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local4 = 0;
for (_local2 in UNITS) {
_local3 = UNITS[_local2].hitDetection(_arg1);
if (_local3 > _local4){
_local4 = _local3;
};
};
return (_local4);
}
public function getRemainingTime(){
return ((TOTTIME - FRAMECOUNT));
}
public function endTheDay(){
ENDOFDAY = true;
}
public function pausePlay(){
var _local1:Number;
for (_local1 in UNITS) {
UNITS[_local1].pausePlay();
};
}
public function shakeTick(_arg1:Number, _arg2:Number){
var _local3:Number;
var _local4:Number;
_local3 = 0;
_local4 = 0;
if (_arg1 < 3){
GAME.x = (0 - ((_arg1 / 1) * 5));
GAME.y = (0 - ((_arg1 / 1) * 7));
} else {
GAME.x = (0 - (((5 - _arg1) / 1) * 5));
GAME.y = (0 - (((5 - _arg1) / 1) * 7));
};
if (_arg2 >= 5){
SHAKING = false;
};
}
public function sceneHidding(_arg1:Number, _arg2:Number){
GAME.y = (_arg1 * 4);
if (_arg1 == _arg2){
glo.bal.PLAYER.hidden();
GAME.y = 40;
};
}
public function reset(){
DEPTHCOUNT = 1000;
if (NEXTWAVEEVT){
NEXTWAVEEVT.cancel = true;
};
UNITS = [];
UNITS2 = [];
}
public function nextState(){
var _local1:Number;
var _local2:Number;
var _local3:Array;
var _local4:Object;
if (!glo.bal.INTERFACE.ALIVE){
return;
};
_local2 = UNITS.length;
_local3 = [];
if (!PLAYER.HIDDEN){
FRAMECOUNT++;
};
for each (_local4 in UNITS) {
_local4.nextState();
};
if (((((!(VICTORY)) && (ENDOFDAY))) && (!(GAMEOVER)))){
if (UNITS.length == 0){
VICTORY = true;
glo.bal.INTERFACE.victory();
};
};
glo.bal.BOMBSUI.refreshUnits();
setDayNightShade();
depthManagement();
}
public function explodeBomb(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (glo.bal.INTERFACE.GAMEPAUSED){
return;
};
_local3 = 300;
_local4 = (glo.bal.CGAME.BOMBS[_arg1][0] - _local3);
_local5 = (glo.bal.CGAME.BOMBS[_arg1][0] + _local3);
_local6 = (glo.bal.CGAME.BOMBS[_arg1][1] - _local3);
_local7 = (glo.bal.CGAME.BOMBS[_arg1][1] + _local3);
_local8 = [];
_local2 = 0;
while (_local2 < UNITS.length) {
_local8.push(UNITS[_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < _local8.length) {
_local8[_local2].tryExplosion(_local4, _local5, _local6, _local7);
_local2++;
};
createBombExplosion(_arg1);
glo.bal.JUKEBOX.explosion();
glo.bal.BOMBSUI.removeBomb(_arg1);
}
public function startTheDay(){
reset();
FRAMECOUNT = 0;
TOTTIME = Math.ceil((90 * 16));
switch (glo.bal.CGAME.DIFFICULTY){
case 1:
TOTTIME = Math.ceil((90 * 16));
break;
case 2:
TOTTIME = Math.ceil((100 * 16));
break;
case 3:
TOTTIME = Math.ceil((110 * 16));
break;
};
SCENE = glo.bal.UNITSLAYER;
wavesSetup();
ENDOFDAY = false;
VICTORY = false;
GAMEOVER = false;
WAVECOUNT = 0;
NEXTWAVEEVT = GAME.evt((4 * 16), nextWave, this);
SCDELTAY = 0;
}
public function setDayNightShade(){
var _local1:Number;
_local1 = (1 - ((TOTTIME - FRAMECOUNT) / TOTTIME));
if (_local1 > 0.5){
_local1 = 0.5;
};
GAME.DAYMC.alpha = _local1;
}
public function hideScene(){
glo.bal.HIDINGPANEL.showHidingPanel();
glo.bal.WEAPONSANIM.showWeapons();
glo.bal.INTERFACE.hideWeaponsDummy();
GAME.animation(this, 10, sceneHidding);
}
public function gameOver(){
GAMEOVER = true;
glo.bal.CGAME.MONEY = glo.bal.GAMEOVER_MONEY;
glo.bal.CGAME.AMMO_TOTAL = util.copyArray(glo.bal.GAMEOVER_AMMO);
glo.bal.CGAME.POINTS = glo.bal.GAMEOVER_POINTS;
}
public function removeBombExplosion(_arg1:MovieClip){
var _local2:Number;
_local2 = BOMBEXP.indexOf(_arg1);
if (_local2 != -1){
BOMBEXP.splice(_local2, 1);
};
SCENE.removeChild(_arg1);
}
public function createBombExplosion(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:MovieClip;
_local4 = new bombExplosion();
SCENE.addChild(_local4);
BOMBEXP.push(_local4);
_local2 = (Math.pow(glo.bal.CGAME.BOMBS[_arg1][1], 2) / VPMAX);
if (_local2 > 1){
_local2 = 1;
};
_local4.y = (200 + (_local2 * 250));
_local3 = (0.6 + (_local2 * 0.7));
_local4.scaleX = _local3;
_local4.scaleY = _local3;
_local4.x = glo.bal.CGAME.BOMBS[_arg1][0];
}
public function sortV(_arg1:MovieClip, _arg2:MovieClip){
if (_arg1.V > _arg2.V){
return (-1);
};
if (_arg1.V < _arg2.V){
return (1);
};
return (0);
}
public function getTotalTime(){
return (TOTTIME);
}
public function depthManagement(){
var _local1:Number;
var _local2:Number;
var _local3:Array;
var _local4:Array;
var _local5:Object;
var _local6:*;
var _local7:Object;
_local3 = util.copyArray(UNITS);
_local3.sort(sortV);
_local4 = util.copyArray(UNITS);
_local4.sort(sortD);
for each (_local5 in UNITS) {
_local5.SWAPPED = false;
};
_local2 = UNITS.length;
_local1 = 0;
while (_local1 < _local2) {
_local6 = _local3[_local1];
_local7 = _local4[_local1];
if (_local6 != _local7){
if (((!(_local6.SWAPPED)) && (!(_local7.SWAPPED)))){
SCENE.swapChildren(_local6, _local7);
_local6.SWAPPED = true;
_local7.SWAPPED = true;
};
};
_local1++;
};
UNITS = _local3;
}
}
}//package
Section 269
//glo (glo)
package {
public class glo {
public static var bal:Object = new Object();
}
}//package
Section 270
//gungsuh (gungsuh)
package {
import flash.text.*;
public dynamic class gungsuh extends Font {
}
}//package
Section 271
//gunplay (gunplay)
package {
import flash.text.*;
public dynamic class gunplay extends Font {
}
}//package
Section 272
//haunted (haunted)
package {
import flash.media.*;
public dynamic class haunted extends Sound {
}
}//package
Section 273
//Jukebox (Jukebox)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Jukebox extends MovieClip {
public var SCORE2:Sound;
public var SCORE3:Sound;
public var StingerFailed:Sound;
public var SFX1_CHANNEL:SoundChannel;
public var SCORE_CHANNEL:SoundChannel;
public var SCORE4:Sound;
private var P_HEARTBEAT1:Boolean;
private var P_HEARTBEAT2:Boolean;
public var MUTE_MUSIC:Boolean;
public var CHANNEL_GUNLOOP:SoundChannel;
public var VOLUME_SFX1:Number;
public var VOLUME_SFX3:Number;
public var VOLUME_SFX2:Number;
public var TrackStory:Sound;
public var cTrack:Sound;
public var VOLUME_SCORE1:Number;
public var VOLUME_SCORE2:Number;
public var VOLUME_SCORE3:Number;
public var OPT_VOLUME_MUSIC:Number;
public var OPT_VOLUME_SFX:Number;
public var SFX_HEARTBEAT1:Sound;
public var SFX_HEARTBEAT2:Sound;
public var SFX2_CHANNEL:SoundChannel;
public var TrackMenu:Sound;
public var MUTE_SFX:Boolean;
private var STOPGUNLOOP:Boolean;
public var CHANNEL_HEARTBEAT1:SoundChannel;
public var CHANNEL_HEARTBEAT2:SoundChannel;
public var StingerSuccess:Sound;
public var SFX_GUNLOOP:Sound;
public var SCORE1:Sound;
public function Jukebox(){
glo.bal.JUKEBOX = this;
glo.bal.JukeBox = this;
MUTE_MUSIC = false;
MUTE_SFX = false;
VOLUME_SFX1 = 0.6;
VOLUME_SFX2 = 0.6;
VOLUME_SFX3 = 0.6;
VOLUME_SCORE1 = 0.5;
VOLUME_SCORE2 = 0.6;
VOLUME_SCORE3 = 0.6;
OPT_VOLUME_MUSIC = 0.5;
OPT_VOLUME_SFX = 0.5;
STOPGUNLOOP = false;
P_HEARTBEAT1 = false;
P_HEARTBEAT2 = false;
}
public function nextTrack(_arg1:Event){
var _local2:Number;
stopScore();
SCOREi++;
if (SCOREi > 3){
SCOREi = 1;
};
_local2 = 1;
switch (SCOREi){
case 1:
SCORE_CHANNEL = SCORE1.play(0);
_local2 = 1;
break;
case 2:
SCORE_CHANNEL = SCORE2.play(0);
_local2 = 1.5;
break;
case 3:
SCORE_CHANNEL = SCORE3.play(0);
_local2 = 1.2;
break;
};
if (MUTE_MUSIC){
setChannelVolume(SCORE_CHANNEL, 0);
} else {
setChannelVolume(SCORE_CHANNEL, (((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2) * _local2));
};
SCORE_CHANNEL.addEventListener("soundComplete", nextTrack);
}
public function missionCompleted(){
stopScore();
playSfx(StingerSuccess, VOLUME_SCORE1);
}
public function typewriter(){
playSfx1(new sfxTypewriter(), VOLUME_SFX1);
}
public function playGunLoop(){
if (MUTE_SFX){
return;
};
STOPGUNLOOP = false;
if (CHANNEL_GUNLOOP != null){
CHANNEL_GUNLOOP.stop();
};
CHANNEL_GUNLOOP = SFX_GUNLOOP.play(0, 200);
setChannelVolume(CHANNEL_GUNLOOP, ((VOLUME_SFX3 * OPT_VOLUME_SFX) * 2));
}
public function hellrazor(){
playSfx(new sfxHellrazor(), VOLUME_SFX1);
}
public function fillerLoop(_arg1:Event){
SCORE_CHANNEL.removeEventListener("soundComplete", fillerLoop);
stopScore();
SCORE_CHANNEL = SCORE4.play(0, 999);
score_inc = 1.2;
if (MUTE_MUSIC){
setChannelVolume(SCORE_CHANNEL, 0);
} else {
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
}
public function stopHeartbeat1(){
if (CHANNEL_HEARTBEAT1 != null){
CHANNEL_HEARTBEAT1.stop();
};
P_HEARTBEAT1 = false;
}
public function stopHeartbeat2(){
if (CHANNEL_HEARTBEAT2 != null){
CHANNEL_HEARTBEAT2.stop();
};
P_HEARTBEAT2 = false;
}
public function finisher(){
playSfx(new sfxFinisher(), VOLUME_SFX1);
}
public function btnClick(){
playSfx(new sfxToggle(), VOLUME_SFX1);
}
public function dryFire(){
playSfx(new sfxDryfire(), (VOLUME_SFX1 * 3));
}
public function menuScore(){
if (cTrack == TrackMenu){
return;
};
stopScore();
cTrack = TrackMenu;
SCORE_CHANNEL = cTrack.play(0, 999);
if (MUTE_MUSIC){
setChannelVolume(SCORE_CHANNEL, 0);
} else {
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
}
public function storyScore(){
if (cTrack == TrackStory){
return;
};
stopScore();
cTrack = TrackStory;
SCORE_CHANNEL = cTrack.play(0, 999);
if (MUTE_MUSIC){
setChannelVolume(SCORE_CHANNEL, 0);
} else {
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
}
public function signal(){
playSfx2(new sfxSignal(), VOLUME_SFX1);
}
public function sfxOff(){
MUTE_SFX = true;
}
public function playSfx(_arg1:Sound, _arg2:Number){
if (MUTE_SFX){
return;
};
setChannelVolume(_arg1.play(), ((_arg2 * OPT_VOLUME_SFX) * 2));
}
public function setChannelVolume(_arg1:SoundChannel, _arg2:Number){
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
}
public function animate(_arg1:Number, _arg2:Number){
var _local3:Number;
if (!STOPGUNLOOP){
return;
};
if (CHANNEL_GUNLOOP == null){
return;
};
_local3 = (_arg1 / _arg2);
if (_local3 < 1){
setChannelVolume(CHANNEL_GUNLOOP, (VOLUME_SFX3 * (1 - _local3)));
} else {
CHANNEL_GUNLOOP.stop();
};
}
public function musicOn(){
MUTE_MUSIC = false;
if (SCORE_CHANNEL != null){
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
}
public function missionFailed(){
stopScore();
playSfx(StingerFailed, VOLUME_SCORE1);
}
public function playHeartbeat1(){
if (MUTE_SFX){
return;
};
if (P_HEARTBEAT1){
return;
};
if (CHANNEL_HEARTBEAT1 != null){
CHANNEL_HEARTBEAT1.stop();
};
CHANNEL_HEARTBEAT1 = SFX_HEARTBEAT1.play(0, 200);
setChannelVolume(CHANNEL_HEARTBEAT1, ((VOLUME_SFX3 * OPT_VOLUME_SFX) * 2));
P_HEARTBEAT1 = true;
}
public function init(){
cTrack = null;
TrackMenu = new enemyrises();
TrackStory = new shorthunt();
SCORE3 = new massivewitchhunt();
SCORE4 = new haunted();
StingerSuccess = new sfxStinger2();
StingerFailed = new sfxStinger1();
SFX_GUNLOOP = new sfxGunLoop01();
SFX_HEARTBEAT1 = new sfxHeartbeat1();
SFX_HEARTBEAT2 = new sfxHeartbeat2();
}
public function explosion(){
playSfx(new sfxExplosion(), VOLUME_SFX1);
}
public function musicOff(){
MUTE_MUSIC = true;
if (SCORE_CHANNEL != null){
setChannelVolume(SCORE_CHANNEL, 0);
};
}
public function playHeartbeat2(){
if (MUTE_SFX){
return;
};
if (P_HEARTBEAT2){
return;
};
if (CHANNEL_HEARTBEAT2 != null){
CHANNEL_HEARTBEAT2.stop();
};
CHANNEL_HEARTBEAT2 = SFX_HEARTBEAT2.play(0, 200);
setChannelVolume(CHANNEL_HEARTBEAT2, ((VOLUME_SFX3 * OPT_VOLUME_SFX) * 2));
P_HEARTBEAT2 = true;
}
public function loading(){
stopScore();
playSfx(new sfxLoadingStinger(), VOLUME_SCORE1);
}
public function sfxOn(){
MUTE_SFX = false;
}
public function toggle(){
playSfx(new sfxToggle(), VOLUME_SFX1);
}
public function stopSfx1(){
if (SFX1_CHANNEL != null){
SFX1_CHANNEL.stop();
};
SFX1_CHANNEL = null;
}
public function stopSfx2(){
if (SFX2_CHANNEL != null){
SFX2_CHANNEL.stop();
};
SFX2_CHANNEL = null;
}
public function pistol(){
playSfx(new sfxPistol(), VOLUME_SFX1);
}
public function playSfx1(_arg1:Sound, _arg2:Number){
if (MUTE_SFX){
return;
};
SFX1_CHANNEL = _arg1.play();
setChannelVolume(SFX1_CHANNEL, ((_arg2 * OPT_VOLUME_SFX) * 2));
}
public function playSfx2(_arg1:Sound, _arg2:Number){
if (MUTE_SFX){
return;
};
SFX2_CHANNEL = _arg1.play();
setChannelVolume(SFX2_CHANNEL, ((_arg2 * OPT_VOLUME_SFX) * 2));
}
public function stopGunLoop(){
STOPGUNLOOP = true;
glo.bal.GAME.animation(this, 3);
}
public function stopScore(){
if (SCORE_CHANNEL != null){
SCORE_CHANNEL.stop();
SCORE_CHANNEL.removeEventListener("soundComplete", nextTrack);
};
SCORE_CHANNEL = null;
cTrack = null;
}
public function sfxnoise(){
playSfx(new sfxNoise(), VOLUME_SFX1);
}
public function setSfxVolume(_arg1:Number){
OPT_VOLUME_SFX = _arg1;
}
public function gameScore(){
stopScore();
SCORE_CHANNEL = SCORE3.play(0);
score_inc = 1.2;
if (MUTE_MUSIC){
setChannelVolume(SCORE_CHANNEL, 0);
} else {
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
SCORE_CHANNEL.addEventListener("soundComplete", fillerLoop);
}
public function reload1(){
playSfx(new sfxReload1(), VOLUME_SFX1);
}
public function setMusicVolume(_arg1:Number){
OPT_VOLUME_MUSIC = _arg1;
if (SCORE_CHANNEL != null){
setChannelVolume(SCORE_CHANNEL, ((VOLUME_SCORE1 * OPT_VOLUME_MUSIC) * 2));
};
}
}
}//package
Section 274
//kamikazeA (kamikazeA)
package {
import flash.display.*;
public class kamikazeA extends aiKamikaze {
public var body_mc:MovieClip;
public static var MAXUNITS:Number;
public static var COUNT:Number;
public function kamikazeA(){
addFrameScript(0, frame1);
super();
TYPE = "kamikazeA";
CHEST_FACTOR = 1;
if (!kamikazeA.COUNT){
kamikazeA.COUNT = 0;
};
kamikazeA.COUNT++;
}
override public function unitKill(){
kamikazeA.COUNT--;
}
function frame1(){
stop();
BODY = body_mc;
}
}
}//package
Section 275
//main (main)
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import com.jumpeye.flashEff.symbol.waves.*;
import flash.system.*;
import flash.ui.*;
public dynamic class main extends MovieClip {
public var myPattern:FESWaves;
public var myEffect:FlashEff;
public var loader_mc:MovieClip;
var flcLoader:URLLoader;
public function main(){
var _local1:TextFormat;
var _local2:TextFormat;
var _local3:TextFormat;
var _local4:TextFormat;
var _local5:ContextMenu;
var _local6:*;
var _local7:*;
var _local8:ContextMenuItem;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 19, frame20, 29, frame30, 39, frame40, 59, frame60);
glo.bal.GAMEID = "desertrifle";
glo.bal.GAME_ID = "desertrifle";
glo.bal.FRAMERATE = 16;
glo.bal.FrameRate = 16;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
glo.bal.LC = new LocalConnection();
glo.bal.DOMAIN = glo.bal.LC.domain;
glo.bal.GAME_AUTH = false;
glo.bal.GAME_AUTH = true;
liveConnect(glo.bal.DOMAIN);
glo.bal.URLREQ_QIGAMES = new URLRequest("http://www.qigames.com/index.php?refgame=desertrifle&");
glo.bal.URLREQ_MOREGAMES = new URLRequest("http://www.qigames.com/index.php?refgame=desertrifle&");
glo.bal.URLREQ_VIEWSCORES = new URLRequest("http://www.qigames.com/highscores.php?refgame=desertrifle&");
glo.bal.URLREQ_PLAY = new URLRequest("http://www.qigames.com/game.php?id=desertrifle&");
glo.bal.URLREQ_FREECONTENT = new URLRequest("http://www.qigames.com/freesitecontent.php");
glo.bal.URLREQ_SHOOTING = new URLRequest("http://www.qigames.com/category.php?id=shooting&refgame=desertrifle&");
glo.bal.URLREQ_FLASH = new URLRequest("http://www.adobe.com/go/getflashplayer");
glo.bal.URLREQ_BUBBLEBOX_SPLASH = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1229&subid=splash&");
glo.bal.URLREQ_BUBBLEBOX_MENU = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1229&subid=loaderandmenu&");
glo.bal.URLREQ_BUBBLEBOX_MOREGAMES = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1229&subid=moregames&");
glo.bal.URLREQ_BUBBLEBOX_GAMEOVER = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1229&subid=gameover&");
glo.bal.URLREQ_BUBBLEBOX_VIEWSCORES = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1229&subid=viewscores&action=viewscores&");
glo.bal.URLREQ_MOREGAMES = glo.bal.URLREQ_BUBBLEBOX_MOREGAMES;
_local1 = new TextFormat("gungsuh");
_local1.bold = true;
glo.bal.FORMAT01 = _local1;
_local2 = new TextFormat("gungsuh");
glo.bal.FORMAT02 = _local2;
_local3 = new TextFormat("gungsuh");
glo.bal.FORMAT03 = _local3;
_local4 = new TextFormat("gunplay");
glo.bal.FORMAT04 = _local4;
_local5 = new ContextMenu();
_local5.hideBuiltInItems();
contextMenu = _local5;
_local6 = new ContextMenuItem("Desert Rifle");
_local7 = new ContextMenuItem("A Game by QiGames.com");
_local7.separatorBefore = true;
_local8 = new ContextMenuItem("v1.01 // bbox");
_local8.separatorBefore = true;
ITEM4 = new ContextMenuItem("Copyright QiGames.com 2009");
_local5.customItems.push(_local6);
_local5.customItems.push(_local7);
_local5.customItems.push(_local8);
_local5.customItems.push(ITEM4);
glo.bal.GAMES = gameData.getGames();
glo.bal.GAMES.sort(orderGames);
}
public function orderGames(_arg1:Object, _arg2:Object):Number{
if (_arg1.LASTMODIFIED > _arg2.LASTMODIFIED){
return (-1);
};
if (_arg1.LASTMODIFIED < _arg2.LASTMODIFIED){
return (1);
};
return (0);
}
function frame3(){
stop();
myPattern = new FESWaves();
myEffect = new FlashEff();
myEffect.hideTransition = myPattern;
myEffect.hideDelay = 0;
myEffect.hideAutoPlay = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "loader_mc";
myEffect.hide();
}
function frame1(){
MochiBot.track(this, "193aa665");
}
private function liveConnect(_arg1:String){
var VARS:*;
var REQ:*;
var domain = _arg1;
trace(("main->liveConnect : domain = " + domain));
glo.bal.flcAd = "";
domain = domain.toLowerCase();
if (domain.indexOf("mochiads") != -1){
glo.bal.flcAd = "mochiads";
glo.bal.AdUnit.serveAd();
return;
};
if (domain.indexOf("cpmstar") != -1){
glo.bal.flcAd = "cpmstar";
glo.bal.AdUnit.serveAd();
return;
};
trace("main->liveConnect : connect to flash.qigames.com");
VARS = new URLVariables();
VARS.HOST = escape(domain);
REQ = new URLRequest("http://flash.qigames.com/game/desertrifle/gameplay.php");
REQ.data = VARS;
REQ.method = "POST";
flcLoader = new URLLoader();
flcLoader.dataFormat = "variables";
flcLoader.addEventListener("complete", evtCompleted);
flcLoader.addEventListener("securityError", evtError);
flcLoader.addEventListener("ioError", evtError);
try {
flcLoader.load(REQ);
} catch(err:Error) {
evtError();
};
}
function frame4(){
stop();
removeChild(myEffect);
gotoAndStop("dummy");
}
function frame20(){
glo.bal.JukeBox.init();
gotoAndStop("splash1");
}
function frame2(){
glo.bal.PreRoll.cancel();
stop();
}
function frame30(){
stage.frameRate = 24;
}
function evtCompleted(_arg1:Event=null){
var e = _arg1;
try {
glo.bal.flcAd = flcLoader.data.flcad;
glo.bal.flcAdUrl = flcLoader.data.flcadurl;
trace("Response from LiveConnect ...");
trace(("flcAd = " + glo.bal.flcAd));
trace(("flcAdUrl = " + glo.bal.flcAdUrl));
} catch(err:Error) {
trace("Error retrieving response from LiveConnect -> continue with defaults ...");
glo.bal.flcAd = "default";
};
glo.bal.AdUnit.serveAd();
}
function frame40(){
stage.frameRate = 16;
}
function evtError(_arg1:Event=null){
trace("No response from LiveConnect -> continue with defaults ...");
glo.bal.flcAd = "default";
glo.bal.AdUnit.serveAd();
}
function frame60(){
stage.frameRate = 16;
}
}
}//package
Section 276
//massivewitchhunt (massivewitchhunt)
package {
import flash.media.*;
public dynamic class massivewitchhunt extends Sound {
}
}//package
Section 277
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 278
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function onError(_arg1:Event){
}
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local8.contentLoaderInfo.addEventListener("ioError", onError);
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 279
//numbers (numbers)
package {
public class numbers {
public static function formatSeconds(_arg1:Number){
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:Number;
_local2 = "";
_local5 = (_arg1 / 60);
_local5 = Math.floor(_local5);
_local3 = (_local5 + ":");
if (_local3.length == 2){
_local3 = ("0" + _local3);
};
_local2 = (_local2 + _local3);
_arg1 = (_arg1 - (_local5 * 60));
_local4 = String(_arg1);
if (_local4.length == 1){
_local4 = ("0" + _local4);
};
_local2 = (_local2 + _local4);
return (_local2);
}
public static function format(_arg1:Number){
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:Number;
var _local7:Number;
_local2 = "";
_local6 = (_arg1 / 1000000);
_local6 = Math.floor(_local6);
if (_local6 > 0){
_local3 = (_local6 + ",");
if (_local3.length == 2){
_local3 = ("00" + _local3);
};
if (_local3.length == 3){
_local3 = ("0" + _local3);
};
_local2 = (_local2 + _local3);
_arg1 = (_arg1 - (_local6 * 1000000));
};
_local7 = (_arg1 / 1000);
_local7 = Math.floor(_local7);
if ((((_local7 > 0)) || ((_local6 > 0)))){
_local4 = (_local7 + ",");
if (_local2.length > 0){
if (_local4.length == 2){
_local4 = ("00" + _local4);
};
if (_local4.length == 3){
_local4 = ("0" + _local4);
};
};
_local2 = (_local2 + _local4);
_arg1 = (_arg1 - (_local7 * 1000));
};
_local5 = String(Math.round(_arg1));
if (_local2.length > 0){
if (_local5.length == 1){
_local5 = ("00" + _local5);
};
if (_local5.length == 2){
_local5 = ("0" + _local5);
};
};
_local2 = (_local2 + _local5);
return (_local2);
}
}
}//package
Section 280
//pbIcon (pbIcon)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class pbIcon extends MovieClip {
public function pbIcon(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 281
//PlaceBombField (PlaceBombField)
package {
import flash.display.*;
import flash.events.*;
public class PlaceBombField extends MovieClip {
public var icon_mc:pbIcon;
public var MAPBOMBS:MovieClip;
public var BOMBOVER:MovieClip;
public var BOMBOVERIND:Number;
public var fieldZone_mc:SimpleButton;
public var BOMBS:Array;
public function PlaceBombField(){
BOMBS = [];
super();
addEventListener(Event.ENTER_FRAME, evtEnterFrame);
fieldZone_mc.addEventListener("click", btnClickField);
BOMBOVERIND = 0;
init();
}
public function createBombIcons(){
var _local1:Number;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < BOMBS.length) {
MAPBOMBS.removeChild(BOMBS[_local1]);
_local1++;
};
BOMBS = [];
_local1 = 0;
while (_local1 < glo.bal.CGAME.BOMBS.length) {
_local2 = new pbIcon();
MAPBOMBS.addChild(_local2);
BOMBS.push(_local2);
_local2.x = (glo.bal.CGAME.BOMBS[_local1][0] / 4);
_local2.y = (glo.bal.CGAME.BOMBS[_local1][1] / 4);
_local2.gotoAndStop(glo.bal.CGAME.BOMBS[_local1][2]);
_local1++;
};
}
public function init(){
if ((((glo.bal.CGAME.A_BOMBS > 0)) && (!(isMouseOut())))){
icon_mc.visible = true;
} else {
icon_mc.visible = false;
};
parent.refreshAvailableBombs();
createBombIcons();
}
public function removeBomb(){
glo.bal.CGAME.BCOLORPOOL.push(glo.bal.CGAME.BOMBS[BOMBOVERIND][2]);
glo.bal.CGAME.BOMBS.splice(BOMBOVERIND, 1);
BOMBS.splice(BOMBOVERIND, 1);
MAPBOMBS.removeChild(BOMBOVER);
glo.bal.CGAME.A_BOMBS++;
parent.refreshAvailableBombs();
if (glo.bal.CGAME.A_BOMBS > 0){
icon_mc.visible = true;
} else {
icon_mc.visible = false;
};
}
public function isMouseOut(){
if ((((((((this.mouseX < 0)) || ((this.mouseX > 175)))) || ((this.mouseY < 0)))) || ((this.mouseY > 275)))){
return (true);
};
return (false);
}
public function createBomb(_arg1:Number, _arg2:Number){
var _local3:Number;
var _local4:MovieClip;
_local3 = glo.bal.CGAME.BCOLORPOOL.shift();
glo.bal.CGAME.BOMBS.push([Math.round((_arg1 * 4)), Math.round((_arg2 * 4)), _local3]);
glo.bal.CGAME.A_BOMBS--;
parent.refreshAvailableBombs();
if (glo.bal.CGAME.A_BOMBS > 0){
icon_mc.visible = true;
} else {
icon_mc.visible = false;
};
_local4 = new pbIcon();
MAPBOMBS.addChild(_local4);
BOMBS.push(_local4);
_local4.x = _arg1;
_local4.y = _arg2;
_local4.gotoAndStop(_local3);
}
function btnClickField(_arg1:Event=null){
glo.bal.JUKEBOX.btnClick();
if (isOverBomb(this.mouseX, this.mouseY)){
removeBomb();
} else {
if (glo.bal.CGAME.A_BOMBS > 0){
createBomb(this.mouseX, this.mouseY);
};
};
}
public function evtEnterFrame(_arg1:Event){
if (((((isOverBomb(this.mouseX, this.mouseY)) || ((glo.bal.CGAME.A_BOMBS <= 0)))) || (isMouseOut()))){
icon_mc.visible = false;
} else {
icon_mc.x = this.mouseX;
icon_mc.y = this.mouseY;
icon_mc.visible = true;
};
}
public function isOverBomb(_arg1:Number, _arg2:Number){
var _local3:Boolean;
var _local4:MovieClip;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:*;
_local3 = false;
_local9 = 0;
while (_local9 < BOMBS.length) {
_local4 = BOMBS[_local9];
_local5 = (_local4.x + 15);
_local6 = (_local4.x - 15);
_local7 = (_local4.y + 15);
_local8 = (_local4.y - 15);
if ((((_local5 >= _arg1)) && ((_local6 <= _arg1)))){
if ((((_local7 >= _arg2)) && ((_local8 <= _arg2)))){
BOMBOVER = _local4;
BOMBOVERIND = _local9;
_local3 = true;
break;
};
};
_local9++;
};
return (_local3);
}
}
}//package
Section 282
//RandomSelection (RandomSelection)
package {
public class RandomSelection {
private var C:Number;
private var i:Number;
private var TWEIGHT:Number;
private var INDEX:Number;
private var OPTIONS:Array;
public function RandomSelection(){
reset();
}
public function choice(_arg1:Object, _arg2:Number){
TWEIGHT = (TWEIGHT + _arg2);
OPTIONS.push([_arg1, TWEIGHT]);
}
public function reset(){
OPTIONS = [];
TWEIGHT = 0;
}
public function choose(){
INDEX = Math.round((Math.random() * TWEIGHT));
C = OPTIONS.length;
i = 0;
while (i < C) {
if (INDEX <= OPTIONS[i][1]){
return (OPTIONS[i][0]);
};
i++;
};
trace("RandomSelection->choose() : Invalid index ???");
return (OPTIONS[0][0]);
}
}
}//package
Section 283
//sfxDryfire (sfxDryfire)
package {
import flash.media.*;
public dynamic class sfxDryfire extends Sound {
}
}//package
Section 284
//sfxExplosion (sfxExplosion)
package {
import flash.media.*;
public dynamic class sfxExplosion extends Sound {
}
}//package
Section 285
//sfxFinisher (sfxFinisher)
package {
import flash.media.*;
public dynamic class sfxFinisher extends Sound {
}
}//package
Section 286
//sfxGunLoop01 (sfxGunLoop01)
package {
import flash.media.*;
public dynamic class sfxGunLoop01 extends Sound {
}
}//package
Section 287
//sfxHeartbeat1 (sfxHeartbeat1)
package {
import flash.media.*;
public dynamic class sfxHeartbeat1 extends Sound {
}
}//package
Section 288
//sfxHeartbeat2 (sfxHeartbeat2)
package {
import flash.media.*;
public dynamic class sfxHeartbeat2 extends Sound {
}
}//package
Section 289
//sfxHellrazor (sfxHellrazor)
package {
import flash.media.*;
public dynamic class sfxHellrazor extends Sound {
}
}//package
Section 290
//sfxLoadingStinger (sfxLoadingStinger)
package {
import flash.media.*;
public dynamic class sfxLoadingStinger extends Sound {
}
}//package
Section 291
//sfxNoise (sfxNoise)
package {
import flash.media.*;
public dynamic class sfxNoise extends Sound {
}
}//package
Section 292
//sfxPistol (sfxPistol)
package {
import flash.media.*;
public dynamic class sfxPistol extends Sound {
}
}//package
Section 293
//sfxReload1 (sfxReload1)
package {
import flash.media.*;
public dynamic class sfxReload1 extends Sound {
}
}//package
Section 294
//sfxSignal (sfxSignal)
package {
import flash.media.*;
public dynamic class sfxSignal extends Sound {
}
}//package
Section 295
//sfxStinger1 (sfxStinger1)
package {
import flash.media.*;
public dynamic class sfxStinger1 extends Sound {
}
}//package
Section 296
//sfxStinger2 (sfxStinger2)
package {
import flash.media.*;
public dynamic class sfxStinger2 extends Sound {
}
}//package
Section 297
//sfxToggle (sfxToggle)
package {
import flash.media.*;
public dynamic class sfxToggle extends Sound {
}
}//package
Section 298
//sfxTypewriter (sfxTypewriter)
package {
import flash.media.*;
public dynamic class sfxTypewriter extends Sound {
}
}//package
Section 299
//shorthunt (shorthunt)
package {
import flash.media.*;
public dynamic class shorthunt extends Sound {
}
}//package
Section 300
//soldierA (soldierA)
package {
import flash.display.*;
public class soldierA extends aiUnit {
public var blood_mc:MovieClip;
public var damage_mc:MovieClip;
public var bar_mc:MovieClip;
public var body_mc:MovieClip;
public static var MAXUNITS:Number;
public static var COUNT:Number;
public function soldierA(){
addFrameScript(0, frame1, 1, frame2);
super();
TYPE = "soldierA";
HEAD_FACTOR = 2;
NECK_FACTOR = 2;
CHEST_FACTOR = 1;
LEGS_FACTOR = 0.15;
if (!soldierA.COUNT){
soldierA.COUNT = 0;
};
soldierA.COUNT++;
}
function frame1(){
BODY = body_mc;
HEALTHBAR = bar_mc;
DAMAGEVISUAL = damage_mc;
BLOODMC = blood_mc;
}
function frame2(){
stop();
bar_mc.setHealth(HEALTH);
chooseInitAction();
}
override public function unitKill(){
soldierA.COUNT--;
}
}
}//package
Section 301
//soldierB (soldierB)
package {
import flash.display.*;
public class soldierB extends aiUnit {
public var blood_mc:MovieClip;
public var damage_mc:MovieClip;
public var bar_mc:MovieClip;
public var body_mc:MovieClip;
public static var MAXUNITS:Number;
public static var COUNT:Number;
public function soldierB(){
addFrameScript(0, frame1, 1, frame2);
super();
TYPE = "soldierB";
HEAD_FACTOR = 2;
NECK_FACTOR = 2;
CHEST_FACTOR = 0.2;
LEGS_FACTOR = 0.15;
if (!soldierB.COUNT){
soldierB.COUNT = 0;
};
soldierB.COUNT++;
}
function frame1(){
BODY = body_mc;
HEALTHBAR = bar_mc;
DAMAGEVISUAL = damage_mc;
BLOODMC = blood_mc;
}
function frame2(){
stop();
bar_mc.setHealth(HEALTH);
chooseInitAction();
}
override public function unitKill(){
soldierB.COUNT--;
}
}
}//package
Section 302
//soldierC (soldierC)
package {
import flash.display.*;
public class soldierC extends aiUnit {
public var blood_mc:MovieClip;
public var damage_mc:MovieClip;
public var bar_mc:MovieClip;
public var body_mc:MovieClip;
public static var MAXUNITS:Number;
public static var COUNT:Number;
public function soldierC(){
addFrameScript(0, frame1, 1, frame2);
super();
TYPE = "soldierC";
HEAD_FACTOR = 0.4;
NECK_FACTOR = 2;
CHEST_FACTOR = 0.2;
LEGS_FACTOR = 0.15;
if (!soldierC.COUNT){
soldierC.COUNT = 0;
};
soldierC.COUNT++;
}
function frame1(){
BODY = body_mc;
HEALTHBAR = bar_mc;
DAMAGEVISUAL = damage_mc;
BLOODMC = blood_mc;
}
function frame2(){
stop();
bar_mc.setHealth(HEALTH);
chooseInitAction();
}
override public function unitKill(){
soldierC.COUNT--;
}
}
}//package
Section 303
//TvFuzzEffectAS3 (TvFuzzEffectAS3)
package {
import net.flashfilter.as3.effects.*;
public class TvFuzzEffectAS3 extends E03_tv {
public static var ANIMATION_DONE:String = "filter_animation_done";
public function TvFuzzEffectAS3():void{
}
}
}//package
Section 304
//unitIcon (unitIcon)
package {
import flash.display.*;
public dynamic class unitIcon extends MovieClip {
}
}//package
Section 305
//util (util)
package {
public class util {
public static var D2R:Number = 0.0174532925199433;
public static var R2D:Number = 57.2957795130823;
public static var TWO_PI:Number = 6.28318530717959;
public static function copyArray(_arg1:Array):Array{
var _local2:Number;
var _local3:Number;
var _local4:Array;
_local3 = _arg1.length;
_local4 = [];
_local2 = 0;
while (_local2 < _local3) {
_local4.push(_arg1[_local2]);
_local2++;
};
return (_local4);
}
public static function resolveQuadratic(_arg1:Number, _arg2:Number, _arg3:Number):Array{
var _local4:Array;
var _local5:Number;
var _local6:Number;
_local4 = [0, 0];
_local5 = ((_arg2 * _arg2) - ((4 * _arg1) * _arg3));
if (_local5 < 0){
return (undefined);
};
_local6 = Math.sqrt(_local5);
_local4[0] = ((-(_arg2) - _local6) / (2 * _arg1));
_local4[1] = ((-(_arg2) + _local6) / (2 * _arg1));
return (_local4);
}
}
}//package