Section 1
//AGteaser_mc_2 (cult_fla.AGteaser_mc_2)
package cult_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.filters.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class AGteaser_mc_2 extends MovieClip {
public var AGpresented_mc:MovieClip;
public var AGlogo_mc:MovieClip;
public var timer:Timer;
public var AGskip_btn:SimpleButton;
public var p_in;
public var smash:Smash;
public var AGclick_btn:SimpleButton;
public function AGteaser_mc_2(){
addFrameScript(0, frame1);
}
public function loadAG(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.addictinggames.com");
navigateToURL(_local2, "_blank");
}
public function done(_arg1:Event){
play();
}
public function logo(_arg1:TweenEvent){
var crunch:Function;
var event = _arg1;
crunch = function (_arg1:TweenEvent){
smash.play();
AGclick_btn.visible = true;
new Tween(AGlogo_mc, "y", Bounce.easeOut, 60, 85, 6, false);
new Tween(AGlogo_mc, "x", Bounce.easeOut, 30, 50, 6, false);
new Tween(AGpresented_mc, "y", Bounce.easeOut, 15, 25, 6, false);
new Tween(AGpresented_mc, "x", Bounce.easeOut, 110, 100, 6, false);
};
var logo_in:* = new Tween(AGlogo_mc, "y", Strong.easeIn, -75, 85, 12, false);
logo_in.addEventListener(TweenEvent.MOTION_FINISH, crunch);
}
function frame1(){
stop();
smash = new Smash();
AGpresented_mc.alpha = 0;
AGclick_btn.visible = false;
AGlogo_mc.y = -70;
timer = new Timer(4000);
timer.addEventListener(TimerEvent.TIMER, done);
timer.start();
p_in = new Tween(AGpresented_mc, "alpha", Strong.easeIn, 0, 100, 12, false);
p_in.addEventListener(TweenEvent.MOTION_FINISH, logo);
AGskip_btn.addEventListener(MouseEvent.CLICK, done);
AGclick_btn.addEventListener(MouseEvent.CLICK, loadAG);
}
}
}//package cult_fla
Section 2
//Color (fl.motion.Color)
package fl.motion {
import flash.geom.*;
import flash.display.*;
public class Color extends ColorTransform {
private var _tintColor:Number;// = 0
private var _tintMultiplier:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
private function deriveTintColor():uint{
var _local1:Number = (1 / this.tintMultiplier);
var _local2:uint = Math.round((this.redOffset * _local1));
var _local3:uint = Math.round((this.greenOffset * _local1));
var _local4:uint = Math.round((this.blueOffset * _local1));
var _local5:uint = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function set brightness(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
var _local2:Number = (1 - Math.abs(_arg1));
var _local3:Number = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
private function parseXML(_arg1:XML=null):Color{
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
var _local2:XML = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function setTint(_arg1:uint, _arg2:Number):void{
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
var _local3:uint = ((_arg1 >> 16) & 0xFF);
var _local4:uint = ((_arg1 >> 8) & 0xFF);
var _local5:uint = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = ((_arg1 >> 24) & 0xFF);
var _local6:uint = ((_arg1 >> 16) & 0xFF);
var _local7:uint = ((_arg1 >> 8) & 0xFF);
var _local8:uint = (_arg1 & 0xFF);
var _local9:uint = ((_arg2 >> 24) & 0xFF);
var _local10:uint = ((_arg2 >> 16) & 0xFF);
var _local11:uint = ((_arg2 >> 8) & 0xFF);
var _local12:uint = (_arg2 & 0xFF);
var _local13:uint = ((_local5 * _local4) + (_local9 * _arg3));
var _local14:uint = ((_local6 * _local4) + (_local10 * _arg3));
var _local15:uint = ((_local7 * _local4) + (_local11 * _arg3));
var _local16:uint = ((_local8 * _local4) + (_local12 * _arg3));
var _local17:uint = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number = (1 - _arg3);
var _local5:ColorTransform = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 3
//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 4
//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 5
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
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
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change: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){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
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();
}
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 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 = 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 stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
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();
};
};
}
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 get position():Number{
return (this.getPosition(this._time));
}
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 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 6
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time: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){
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 7
//TweenEvent (gs.events.TweenEvent)
package gs.events {
import flash.events.*;
public class TweenEvent extends Event {
public var info:Object;
public static const UPDATE:String = "update";
public static const START:String = "start";
public static const version:Number = 0.9;
public static const COMPLETE:String = "complete";
public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.info = _arg2;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable));
}
}
}//package gs.events
Section 8
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 9
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BevelFilterPlugin(){
this.propName = "bevelFilter";
this.overwriteProps = ["bevelFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BevelFilter;
initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2))));
return (true);
}
}
}//package gs.plugins
Section 10
//BezierPlugin (gs.plugins.BezierPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _target:Object;
protected var _beziers:Object;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local5:int;
var _local6:String;
_target = _arg1.target;
if (_arg1.exposedVars.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0]];
_orient = true;
} else {
if ((_arg1.exposedVars.orientToBezier is Array)){
_orientData = _arg1.exposedVars.orientToBezier;
_orient = true;
};
};
var _local4:Object = {};
_local5 = 0;
while (_local5 < _arg2.length) {
for (_local6 in _arg2[_local5]) {
if (_local4[_local6] == undefined){
_local4[_local6] = [_arg1.target[_local6]];
};
if (typeof(_arg2[_local5][_local6]) == "number"){
_local4[_local6].push(_arg2[_local5][_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6])));
};
};
_local5++;
};
for (_local6 in _local4) {
this.overwriteProps[this.overwriteProps.length] = _local6;
if (_arg1.exposedVars[_local6] != undefined){
if (typeof(_arg1.exposedVars[_local6]) == "number"){
_local4[_local6].push(_arg1.exposedVars[_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6])));
};
delete _arg1.exposedVars[_local6];
_local5 = (_arg1.tweens.length - 1);
while (_local5 > -1) {
if (_arg1.tweens[_local5].name == _local6){
_arg1.tweens.splice(_local5, 1);
};
_local5--;
};
};
};
_beziers = parseBeziers(_local4, _arg3);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:int;
var _local9:Object;
var _local10:Boolean;
var _local11:Number;
var _local12:Number;
var _local13:Array;
var _local14:Number;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_local8 = ((_local7)<0) ? -1 : 1;
_target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7);
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local9 = _target;
_local10 = this.round;
_target = _future;
this.round = false;
_orient = false;
this.changeFactor = (_arg1 + 0.01);
_target = _local9;
this.round = _local10;
_orient = true;
_local2 = 0;
while (_local2 < _orientData.length) {
_local13 = _orientData[_local2];
_local14 = ((_local13[3]) || (0));
_local11 = (_future[_local13[0]] - _target[_local13[0]]);
_local12 = (_future[_local13[1]] - _target[_local13[1]]);
_target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14);
_local2++;
};
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package gs.plugins
Section 11
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin)
package gs.plugins {
import gs.*;
public class BezierThroughPlugin extends BezierPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BezierThroughPlugin(){
this.propName = "bezierThrough";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), true);
return (true);
}
}
}//package gs.plugins
Section 12
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function BlurFilterPlugin(){
this.propName = "blurFilter";
this.overwriteProps = ["blurFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BlurFilter;
initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2))));
return (true);
}
}
}//package gs.plugins
Section 13
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
public static const VERSION:Number = 1.01;
protected static var _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = ColorMatrixFilter;
var _local4:Object = _arg2;
initFilter({}, new ColorMatrixFilter(_idMatrix.slice()));
_matrix = ColorMatrixFilter(_filter).matrix;
var _local5:Array = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
}
}//package gs.plugins
Section 14
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function DropShadowFilterPlugin(){
this.propName = "dropShadowFilter";
this.overwriteProps = ["dropShadowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = DropShadowFilter;
initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject));
return (true);
}
}
}//package gs.plugins
Section 15
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
}
}//package gs.plugins
Section 16
//FilterPlugin (gs.plugins.FilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
import gs.utils.tween.*;
public class FilterPlugin extends TweenPlugin {
protected var _remove:Boolean;
protected var _target:Object;
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function onCompleteTween():void{
var _local1:int;
var _local2:Array;
if (_remove){
_local2 = _target.filters;
if (!(_local2[_index] is _type)){
_local1 = (_local2.length - 1);
while (_local1 > -1) {
if ((_local2[_local1] is _type)){
_local2.splice(_local1, 1);
break;
};
_local1--;
};
} else {
_local2.splice(_index, 1);
};
_target.filters = _local2;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{
var _local4:String;
var _local5:int;
var _local6:HexColorsPlugin;
var _local3:Array = _target.filters;
_index = -1;
if (_arg1.index != null){
_index = _arg1.index;
} else {
_local5 = (_local3.length - 1);
while (_local5 > -1) {
if ((_local3[_local5] is _type)){
_index = _local5;
break;
};
_local5--;
};
};
if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){
_index = ((_arg1.index)!=null) ? _arg1.index : _local3.length;
_local3[_index] = _arg2;
_target.filters = _local3;
};
_filter = _local3[_index];
_remove = Boolean((_arg1.remove == true));
if (_remove){
this.onComplete = onCompleteTween;
};
var _local7:Object = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1;
for (_local4 in _local7) {
if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){
} else {
if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){
_local6 = new HexColorsPlugin();
_local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]);
_tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false);
} else {
if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){
_filter[_local4] = _local7[_local4];
} else {
addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4);
};
};
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Array = _target.filters;
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
if (!(_local4[_index] is _type)){
_index = (_local4.length - 1);
_local2 = (_local4.length - 1);
while (_local2 > -1) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
_local2--;
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package gs.plugins
Section 17
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
addTween(this, "frame", _target.currentFrame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package gs.plugins
Section 18
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.filters.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function GlowFilterPlugin(){
this.propName = "glowFilter";
this.overwriteProps = ["glowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = GlowFilter;
initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout));
return (true);
}
}
}//package gs.plugins
Section 19
//HexColorsPlugin (gs.plugins.HexColorsPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function killProps(_arg1:Object):void{
var _local2:int = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
_local2--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
}
}//package gs.plugins
Section 20
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 21
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class RoundPropsPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = [];
this.round = true;
}
public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package gs.plugins
Section 22
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function ShortRotationPlugin(){
this.propName = "shortRotation";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
if (typeof(_arg2) == "number"){
trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})");
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]);
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number = ((_arg4 - _arg3) % 360);
if (((_arg4 - _arg3) % 360) != (_local5 % 180)){
_local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360);
};
addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package gs.plugins
Section 23
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import gs.*;
import flash.geom.*;
import flash.display.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _target:DisplayObject;
protected var _ct:ColorTransform;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
if (((!((_arg3.exposedVars.alpha == undefined))) || (!((_arg3.exposedVars.autoAlpha == undefined))))){
_local4.alphaMultiplier = ((_arg3.exposedVars.alpha)!=undefined) ? _arg3.exposedVars.alpha : _arg3.exposedVars.autoAlpha;
_arg3.killVars({alpha:1, autoAlpha:1});
} else {
_local4.alphaMultiplier = _arg1.alpha;
};
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.transform.colorTransform = _ct;
}
}
}//package gs.plugins
Section 24
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var propName:String;
public var onComplete:Function;
public var round:Boolean;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 25
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 26
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (Boolean(!((_tweens.length == 0))));
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package gs.plugins
Section 27
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 28
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 29
//OverwriteManager (gs.OverwriteManager)
package gs {
import gs.utils.tween.*;
import flash.utils.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL:int = 1;
public static const NONE:int = 0;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static const version:Number = 3.12;
public static var mode:int;
public static var enabled:Boolean;
public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{
var _local4:int;
var _local5:String;
var _local6:TweenInfo;
_local4 = (_arg3.length - 1);
while (_local4 > -1) {
_local6 = _arg3[_local4];
if ((_local6.name in _arg1)){
_arg3.splice(_local4, 1);
} else {
if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){
_local6.target.killProps(_arg1);
if (_local6.target.overwriteProps.length == 0){
_arg3.splice(_local4, 1);
};
};
};
_local4--;
};
for (_local5 in _arg1) {
delete _arg2[_local5];
};
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{
var _local7:int;
var _local8:TweenLite;
var _local10:Array;
var _local11:Object;
var _local12:int;
var _local13:TweenInfo;
var _local14:Array;
var _local3:Object = _arg1.vars;
var _local4:int = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite);
if ((((_local4 < 2)) || ((_arg2 == null)))){
return;
};
var _local5:Number = _arg1.startTime;
var _local6:Array = [];
var _local9 = -1;
_local7 = (_arg2.length - 1);
while (_local7 > -1) {
_local8 = _arg2[_local7];
if (_local8 == _arg1){
_local9 = _local7;
} else {
if ((((((_local7 < _local9)) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){
_local6[_local6.length] = _local8;
};
};
_local7--;
};
if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){
return;
};
if (_local4 == AUTO){
_local10 = _arg1.tweens;
_local11 = {};
_local7 = (_local10.length - 1);
while (_local7 > -1) {
_local13 = _local10[_local7];
if (_local13.isPlugin){
if (_local13.name == "_MULTIPLE_"){
_local14 = _local13.target.overwriteProps;
_local12 = (_local14.length - 1);
while (_local12 > -1) {
_local11[_local14[_local12]] = true;
_local12--;
};
} else {
_local11[_local13.name] = true;
};
_local11[_local13.target.propName] = true;
} else {
_local11[_local13.name] = true;
};
_local7--;
};
_local7 = (_local6.length - 1);
while (_local7 > -1) {
killVars(_local11, _local6[_local7].exposedVars, _local6[_local7].tweens);
_local7--;
};
} else {
_local7 = (_local6.length - 1);
while (_local7 > -1) {
_local6[_local7].enabled = false;
_local7--;
};
};
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 10.09){
trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com.");
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 30
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import gs.utils.tween.*;
import gs.plugins.*;
import flash.utils.*;
public class TweenLite {
public var started:Boolean;
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var tweens:Array;
public var vars:Object;
public var ease:Function;
public var exposedVars:Object;
public var initTime:Number;
public var combinedTimeScale:Number;
public static const version:Number = 10.09;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && ((this.target is TweenLite)))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 31
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import gs.utils.tween.*;
import gs.plugins.*;
import gs.events.*;
import flash.utils.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
public var pauseTime:Number;
protected var _repeatCount:Number;
protected var _timeScale:Number;
public static const version:Number = 10.09;
public static var removeTween:Function = TweenLite.removeTween;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init();
;
protected static var _pausedTweens:Dictionary = new Dictionary(false);
protected static var _globalTimeScale:Number = 1;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]);
private static var _versionCheck:Boolean = ((TweenLite.version)<10.09) ? trace("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.") : true;
;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){
_timeScale = 1;
this.combinedTimeScale = _globalTimeScale;
} else {
_timeScale = this.combinedTimeScale;
this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale);
};
if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
if ((((_arg2 == 0)) && ((this.delay == 0)))){
onUpdateDispatcher();
onCompleteDispatcher();
};
};
_repeatCount = 0;
if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){
this.vars.persist = true;
};
}
public function dispatchEvent(_arg1:Event):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.dispatchEvent(_arg1));
}
public function get reversed():Boolean{
return ((this.ease == reverseEase));
}
public function set reversed(_arg1:Boolean):void{
if (this.reversed != _arg1){
reverse();
};
}
public function get progress():Number{
var _local1:Number = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime;
var _local2:Number = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale);
if (_local2 > 1){
return (1);
};
if (_local2 < 0){
return (0);
};
return (_local2);
}
override public function set enabled(_arg1:Boolean):void{
if (!_arg1){
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
super.enabled = _arg1;
if (_arg1){
this.combinedTimeScale = (_timeScale * _globalTimeScale);
};
}
protected function onStartDispatcher(... _args):void{
if (_callbacks.onStart != null){
_callbacks.onStart.apply(null, this.vars.onStartParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local5:int;
var _local6:Object;
var _local7:Array;
var _local8:Boolean;
var _local9:Array;
var _local10:Object;
var _local11:int;
var _local12:Array;
var _local4:Number = this.progress;
if (this.initted){
if (((!(_arg3)) && (!((_local4 == 0))))){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].name == _arg1){
this.tweens[_local5].target[this.tweens[_local5].property] = this.tweens[_local5].start;
};
_local5--;
};
};
_local6 = this.vars;
_local7 = this.tweens;
_local8 = _hasPlugins;
this.tweens = [];
this.vars = (this.exposedVars = {});
this.vars[_arg1] = _arg2;
initTweenVals();
if (((!((this.ease == reverseEase))) && ((_local6.ease is Function)))){
this.ease = _local6.ease;
};
if (((_arg3) && (!((_local4 == 0))))){
adjustStartValues();
};
_local9 = this.tweens;
this.vars = _local6;
this.tweens = _local7;
_local10 = {};
_local5 = (_local9.length - 1);
while (_local5 > -1) {
if (_local9[_local5].name == "_MULTIPLE_"){
_local12 = _local9[_local5].target.overwriteProps;
_local11 = (_local12.length - 1);
while (_local11 > -1) {
_local10[_local12[_local11]] = true;
_local11--;
};
} else {
_local10[_local9[_local5].name] = true;
};
_local5--;
};
killVars(_local10);
this.tweens = this.tweens.concat(_local9);
_hasPlugins = Boolean(((_local8) || (_hasPlugins)));
};
this.vars[_arg1] = _arg2;
}
override public function initTweenVals():void{
var _local1:int;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:TweenInfo;
if (this.exposedVars.startAt != null){
this.exposedVars.startAt.overwrite = 0;
new TweenMax(this.target, 0, this.exposedVars.startAt);
};
super.initTweenVals();
if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){
_local5 = this.exposedVars.roundProps;
_local1 = (_local5.length - 1);
while (_local1 > -1) {
_local3 = _local5[_local1];
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local7 = this.tweens[_local2];
if (_local7.name == _local3){
if (_local7.isPlugin){
_local7.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
_hasPlugins = true;
this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true);
} else {
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
this.tweens.splice(_local2, 1);
};
};
} else {
if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){
_local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local7.target.round = true;
};
};
};
_local2--;
};
_local1--;
};
};
}
public function restart(_arg1:Boolean=false):void{
if (_arg1){
this.initTime = currentTime;
this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale)));
} else {
this.startTime = currentTime;
this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale)));
};
_repeatCount = 0;
if (this.target != this.vars.onComplete){
render(this.startTime);
};
this.pauseTime = NaN;
_pausedTweens[this] = null;
delete _pausedTweens[this];
this.enabled = true;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher != null){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
protected function adjustStartValues():void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:TweenInfo;
var _local6:int;
var _local1:Number = this.progress;
if (_local1 != 0){
_local2 = this.ease(_local1, 0, 1, 1);
_local3 = (1 / (1 - _local2));
_local6 = (this.tweens.length - 1);
while (_local6 > -1) {
_local5 = this.tweens[_local6];
_local4 = (_local5.start + _local5.change);
if (_local5.isPlugin){
_local5.change = ((_local4 - _local2) * _local3);
} else {
_local5.change = ((_local4 - _local5.target[_local5.property]) * _local3);
};
_local5.start = (_local4 - _local5.change);
_local6--;
};
};
}
override public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function initDispatcher():void{
var _local1:Object;
var _local2:String;
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
_callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete};
if (this.vars.isTV == true){
this.vars = this.vars.clone();
} else {
_local1 = {};
for (_local2 in this.vars) {
_local1[_local2] = this.vars[_local2];
};
this.vars = _local1;
};
this.vars.onStart = onStartDispatcher;
this.vars.onComplete = onCompleteDispatcher;
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
};
}
public function willTrigger(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.willTrigger(_arg1));
}
public function set progress(_arg1:Number):void{
this.startTime = (currentTime - ((this.duration * _arg1) * 1000));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
if (!this.started){
activate();
};
render(currentTime);
if (!isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.active = false;
};
}
public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
var _local3:Number = this.progress;
if (((_arg1) && ((_local3 > 0)))){
this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
};
if (_arg2 != false){
if (_local3 < 1){
resume();
} else {
restart();
};
};
}
protected function onUpdateDispatcher(... _args):void{
if (_callbacks.onUpdate != null){
_callbacks.onUpdate.apply(null, this.vars.onUpdateParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
pause();
} else {
resume();
};
}
public function resume():void{
this.enabled = true;
if (!isNaN(this.pauseTime)){
this.initTime = (this.initTime + (currentTime - this.pauseTime));
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
this.pauseTime = NaN;
if (((!(this.started)) && ((currentTime >= this.startTime)))){
activate();
} else {
this.active = this.started;
};
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
}
public function get paused():Boolean{
return (!(isNaN(this.pauseTime)));
}
public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4));
}
public function killProperties(_arg1:Array):void{
var _local3:int;
var _local2:Object = {};
_local3 = (_arg1.length - 1);
while (_local3 > -1) {
_local2[_arg1[_local3]] = true;
_local3--;
};
killVars(_local2);
}
public function hasEventListener(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.hasEventListener(_arg1));
}
public function pause():void{
if (isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.enabled = false;
_pausedTweens[this] = this;
};
}
override public function complete(_arg1:Boolean=false):void{
if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){
_repeatCount++;
if (!isNaN(this.vars.yoyo)){
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
};
this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime;
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
} else {
if (this.vars.persist == true){
pause();
};
};
super.complete(_arg1);
}
public function set timeScale(_arg1:Number):void{
if (_arg1 < 1E-5){
_arg1 = (_timeScale = 1E-5);
} else {
_timeScale = _arg1;
_arg1 = (_arg1 * _globalTimeScale);
};
this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1)));
if (this.startTime != 999999999999999){
this.startTime = (this.initTime + (this.delay * (1000 / _arg1)));
};
this.combinedTimeScale = _arg1;
}
public function invalidate(_arg1:Boolean=true):void{
var _local2:Number;
if (this.initted){
_local2 = this.progress;
if (((!(_arg1)) && (!((_local2 == 0))))){
this.progress = 0;
};
this.tweens = [];
_hasPlugins = false;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
initTweenVals();
_timeScale = ((this.vars.timeScale) || (1));
this.combinedTimeScale = (_timeScale * _globalTimeScale);
this.delay = ((this.vars.delay) || (0));
if (isNaN(this.pauseTime)){
this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
if (_dispatcher != null){
this.vars.onStart = _callbacks.onStart;
this.vars.onUpdate = _callbacks.onUpdate;
this.vars.onComplete = _callbacks.onComplete;
_dispatcher = null;
};
initDispatcher();
};
if (_local2 != 0){
if (_arg1){
adjustStartValues();
} else {
this.progress = _local2;
};
};
};
}
public function get timeScale():Number{
return (_timeScale);
}
protected function onCompleteDispatcher(... _args):void{
if (_callbacks.onComplete != null){
_callbacks.onComplete.apply(null, this.vars.onCompleteParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
}
public static function set globalTimeScale(_arg1:Number):void{
setGlobalTimeScale(_arg1);
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(true, _arg1, _arg2);
}
public static function killAllDelayedCalls(_arg1:Boolean=false):void{
killAll(_arg1, false, true);
}
public static function setGlobalTimeScale(_arg1:Number):void{
var _local3:int;
var _local4:Array;
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
var _local2:Dictionary = masterList;
_globalTimeScale = _arg1;
for each (_local4 in _local2) {
_local3 = (_local4.length - 1);
while (_local3 > -1) {
if ((_local4[_local3] is TweenMax)){
_local4[_local3].timeScale = (_local4[_local3].timeScale * 1);
};
_local3--;
};
};
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
public static function getTweensOf(_arg1:Object):Array{
var _local4:TweenLite;
var _local5:int;
var _local2:Array = masterList[_arg1];
var _local3:Array = [];
if (_local2 != null){
_local5 = (_local2.length - 1);
while (_local5 > -1) {
if (!_local2[_local5].gc){
_local3[_local3.length] = _local2[_local5];
};
_local5--;
};
};
for each (_local4 in _pausedTweens) {
if (_local4.target == _arg1){
_local3[_local3.length] = _local4;
};
};
return (_local3);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array = getTweensOf(_arg1);
var _local3:int = (_local2.length - 1);
while (_local3 > -1) {
if (((((_local2[_local3].active) || ((_local2[_local3].startTime == currentTime)))) && (!(_local2[_local3].gc)))){
return (true);
};
_local3--;
};
return (false);
}
public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = (_local4.length - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){
_local4[_local6].paused = _arg1;
};
_local6--;
};
}
public static function killAllTweens(_arg1:Boolean=false):void{
killAll(_arg1, true, false);
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local5:Boolean;
var _local6:int;
var _local4:Array = getAllTweens();
_local6 = (_local4.length - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
_local4[_local6].clear();
} else {
TweenLite.removeTween(_local4[_local6], true);
};
};
_local6--;
};
}
public static function getAllTweens():Array{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
var _local1:Dictionary = masterList;
var _local2:Array = [];
for each (_local3 in _local1) {
_local4 = (_local3.length - 1);
while (_local4 > -1) {
if (!_local3[_local4].gc){
_local2[_local2.length] = _local3[_local4];
};
_local4--;
};
};
for each (_local5 in _pausedTweens) {
_local2[_local2.length] = _local5;
};
return (_local2);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 32
//gridDisp_mc (gridDisp_mc)
package {
import flash.events.*;
import fl.motion.*;
import flash.display.*;
public class gridDisp_mc extends MovieClip {
public var braCount:Number;
public var lawCount:Number;
public var touchedCells:Array;
public var population:Number;
public var intel:Number;
public var demCount:Number;
public var isSelected:Boolean;
public var dooCount:Number;
public var wealth:Number;
public var convert:Number;
public var social:Number;
public var fear:Number;
public var misCount:Number;
public var gulli:Number;
public var feaCount:Number;
public var relig:Number;
public var wealthPer:Number;
public function gridDisp_mc(){
touchedCells = [];
super();
lawCount = 0;
dooCount = 0;
misCount = 0;
demCount = 0;
feaCount = 0;
braCount = 0;
wealthPer = 0;
addEventListener(Event.ENTER_FRAME, statusManager);
}
public function statusManager(_arg1:Event){
var _local2:Color;
if ((((convert > 0)) && ((wealth > 0)))){
if (wealth > 1000){
wealthPer = (((wealth * convert) * 0.15) / population);
} else {
wealthPer = wealth;
};
} else {
if (wealth < 0){
wealth = 0;
};
};
if (isSelected == false){
_local2 = new Color();
_local2.setTint(0xFF0000, (convert / population));
transform.colorTransform = _local2;
};
}
}
}//package
Section 33
//main (main)
package {
import gs.*;
import flash.events.*;
import fl.motion.*;
import flash.geom.*;
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import gs.plugins.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import gs.easing.*;
import mochi.as3.*;
public class main extends MovieClip {
public var butter:MovieClip;
public var bustedWon:Boolean;
public var doomSelect:Boolean;
public var cultD:TextField;
public var pauseWin:MovieClip;
public var clock:MovieClip;
public var bra_down:SimpleButton;
public var totalWealth:Number;
public var loader:MovieClip;
public var nextTurn;
public var skullWon:Boolean;
public var s1;
public var demBox:TextField;
public var atfAggro:Number;
public var totalBra:Number;
public var totalDem:Number;
public var doomWon:Boolean;
public var fire:MovieClip;
public var nextLoop:Timer;
public var cellCounter:Number;
public var backB:SimpleButton;
public var timeCount:Number;
public var totalOn:Boolean;
public var sun:MovieClip;
public var pop:TextField;
public var expenseBox:TextField;
public var achieve:SimpleButton;
public var snakeSelect:Boolean;
public var sBox:TextField;
public var cashFactor:Number;
public var d:Date;
public var law_up:SimpleButton;
public var sunSelect:Boolean;
public var totalPop:Number;
public var feaCost:Number;
public var incomeFactor:Number;
public var intro:MovieClip;
public var instruc:SimpleButton;
public var demFactor:Number;
public var nBox:TextField;
public var fea_up:SimpleButton;
public var atfBar:MovieClip;
public var move2:Timer;
public var buyOffCost:Number;
public var loseWin:MovieClip;
public var currentCell:MovieClip;
public var totalMis:Number;
public var misFactor:Number;
public var move1:Timer;
public var newAchieve:Boolean;
public var lawCount:Number;
public var lawCost:Number;
public var crow:MovieClip;
public var infilCounter:Number;
public var crowWon:Boolean;
public var sunWon:Boolean;
public var fireWon:Boolean;
public var butterWon:Boolean;
public var antiAggro:Number;
public var doo_down:SimpleButton;
public var money:MovieClip;
public var braFactor:Number;
public var lawBox:TextField;
public var adLink:SimpleButton;
public var misCost:Number;
public var intel:TextField;
public var initWealth:Number;
public var player:SimpleButton;
public var wealthUpdate:Boolean;
public var descrip:TextField;
public var feaBox:TextField;
public var gull:TextField;
public var reli:TextField;
public var dem_down:SimpleButton;
public var lifeScore:Number;
public var snakeC:SimpleButton;
public var diffi:SimpleButton;
public var buyOff:SimpleButton;
public var lastCon:Number;
public var light:MovieClip;
public var expenses:Number;
public var law_down:SimpleButton;
public var subForm:MovieClip;
public var fear:TextField;
public var dooCost:Number;
public var cash:Number;
public var snakeWon:Boolean;
public var pauser:SimpleButton;
public var upExpense:Number;
public var fea_down:SimpleButton;
public var nextDate:Timer;
public var speedMod:Number;
public var grid:gridDisp_mc;
public var diffDisp:TextField;
public var mapTotal:SimpleButton;
public var skull:MovieClip;
public var totalDoo:Number;
public var incomeBox:TextField;
public var buyBox:TextField;
public var initScore:Number;
public var feaFactor:Number;
public var doo_up:SimpleButton;
public var sunC:SimpleButton;
public var braCost:Number;
public var diffiToggle:Number;
public var mis_up:SimpleButton;
public var bra_up:SimpleButton;
public var mis_down:SimpleButton;
public var scorerBox:TextField;
public var lawFactor:Number;
public var busted:MovieClip;
public var cashBox:TextField;
public var speed_down:SimpleButton;
public var startNode:Number;
public var firstTime:Boolean;
public var totalCon:Number;
public var sunCWon:Boolean;
public var lightWon:Boolean;
public var speed_up:SimpleButton;
public var convFactor:Number;
public var totalFea:Number;
public var atfChance:Number;
public var clockWon:Boolean;
public var income:Number;
public var wealth:TextField;
public var dem_up:SimpleButton;
public var nextB:SimpleButton;
public var convert:TextField;
public var moneyWon:Boolean;
public var totalLaw:Number;
public var doomC:SimpleButton;
public var soci:TextField;
public var touchedCells:Array;
public var dooFactor:Number;
public var musicToggle:Boolean;
public var kongregate;
public var dooBox:TextField;
public var misBox:TextField;
public var newsBox:TextField;
public var demCost:Number;
public var braBox:TextField;
public static var lawyerCost = 2000;
public static var timeMax = 500;
public static var dateTimer = 50;
public static var staffCost = 1000;
public function main(){
touchedCells = [];
d = new Date();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
var _local1 = "023f8b8942f31566";
firstTime = true;
bustedWon = false;
fireWon = false;
butterWon = false;
clockWon = false;
crowWon = false;
lightWon = false;
moneyWon = false;
skullWon = false;
sunWon = false;
snakeWon = false;
sunCWon = false;
doomWon = false;
totalOn = false;
income = 0;
atfAggro = 0;
totalPop = 0;
totalCon = 0;
totalLaw = 0;
totalMis = 0;
totalDoo = 0;
totalDem = 0;
totalFea = 0;
totalBra = 0;
totalWealth = 0;
lifeScore = 0;
atfChance = 0.0045;
cash = 100000;
expenses = 0;
income = 0;
antiAggro = 0.5;
wealthUpdate = false;
}
public function updateTotal(){
var _local2:*;
totalPop = 0;
totalWealth = 0;
totalCon = 0;
var _local1 = 1;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if (_local2.name == "grid"){
totalPop = (totalPop + _local2.population);
totalWealth = (totalWealth + _local2.wealth);
totalCon = (totalCon + _local2.convert);
};
_local1++;
};
totalOn = true;
pop.text = String(totalPop);
wealth.text = String(totalWealth);
convert.text = String(totalCon);
reli.text = "";
fear.text = "";
intel.text = "";
soci.text = "";
gull.text = "";
}
public function Game(_arg1:TimerEvent){
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:int;
var _local17:*;
var _local18:int;
var _local19:*;
var _local20:*;
var _local21:*;
timeCount = (timeCount + 1);
lifeScore = (((Math.round(((totalCon / totalPop) * 10000)) + Math.round(((cash / initWealth) * 10000))) * diffiToggle) - initScore);
scorerBox.text = String(lifeScore);
if (atfAggro > 73){
if (bustedWon == false){
newAchieve = true;
};
bustedWon = true;
loseGame();
};
if (cash < 0){
if (moneyWon == false){
newAchieve = true;
};
moneyWon = true;
loseGame();
};
if (totalPop == totalCon){
winGame();
};
if (Math.random() > 0.999){
_local10 = String(Math.round((cash * 0.1)));
cash = (cash + Math.round((-(cash) * 0.1)));
newsBox.text = (("IRS audit takes $" + _local10) + ".");
_local19 = String(cash);
cashBox.text = ("$" + _local19);
};
var _local2:* = 0;
income = 0;
totalPop = 0;
totalWealth = 0;
totalCon = 0;
var _local3:* = 0;
var _local4:* = atfAggro;
trace(infilCounter, cellCounter);
var _local5 = 1;
while (_local5 < numChildren) {
_local11 = getChildAt(_local5);
if (_local11.name == "grid"){
if ((((_local11.convert > 10)) && ((cellCounter > (infilCounter + 10))))){
if (_local3 == 0){
infilCounter = 0;
_local3 = 1;
};
infilCounter = (infilCounter + 1);
if (Math.random() > 0.999){
_local13 = String(Math.round((_local11.convert * 0.25)));
_local11.convert = (_local11.convert + Math.round((-(_local11.convert) * 0.25)));
newsBox.text = (("ATF bust nets " + _local13) + " converts.");
};
if (Math.random() > 0.9999){
_local14 = String(Math.round((_local11.convert * 0.5)));
_local11.convert = (_local11.convert + Math.round((-(_local11.convert) * 0.5)));
newsBox.text = (("A failed prophecy loses " + _local14) + " converts.");
};
if (Math.random() > 0.999){
_local15 = String(Math.round((_local11.convert * 0.1)));
_local11.convert = (_local11.convert + Math.round((-(_local11.convert) * 0.1)));
newsBox.text = (("A rival cult steals " + _local15) + " converts.");
};
};
totalPop = (totalPop + _local11.population);
totalWealth = (totalWealth + _local11.wealth);
totalCon = (totalCon + _local11.convert);
income = (income + Math.round((_local11.wealthPer * incomeFactor)));
_local12 = String(income);
incomeBox.text = ("$" + _local12);
if ((_local11.convert / _local11.population) > 0.5){
_local11.touchedCells = [];
updateTouched(_local11);
_local16 = 0;
while (_local16 < numChildren) {
_local17 = getChildAt(_local16);
if (((((_local11.hitTestObject(_local17)) && ((_local17.name == "grid")))) && (!((getChildIndex(_local17) == getChildIndex(_local11)))))){
if (_local11.dooCount > 0){
_local18 = 0;
while (_local18 < _local11.dooCount) {
if ((Math.random() * 100) < (_local17.gulli / dooFactor)){
_local17.convert = (_local17.convert + ((1 + Math.round((_local17.gulli / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local17.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local17.convert > _local17.population){
_local17.convert = _local17.population;
};
};
_local18++;
};
};
if (_local11.misCount > 0){
_local18 = 0;
while (_local18 < _local11.misCount) {
if ((Math.random() * 100) < (_local17.relig / misFactor)){
_local17.convert = (_local17.convert + ((1 + Math.round((_local17.relig / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local17.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local17.convert > _local17.population){
_local17.convert = _local17.population;
};
};
_local18++;
};
};
if (_local11.demCount > 0){
_local18 = 0;
while (_local18 < _local11.demCount) {
if ((Math.random() * 100) < (_local17.social / demFactor)){
_local17.convert = (_local17.convert + ((1 + Math.round((_local17.social / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local17.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local17.convert > _local17.population){
_local17.convert = _local17.population;
};
};
_local18++;
};
};
if (_local11.feaCount > 0){
_local18 = 0;
while (_local18 < _local11.feaCount) {
if ((Math.random() * 100) < (_local17.fear / feaFactor)){
_local17.convert = (_local17.convert + ((1 + Math.round((_local17.fear / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local17.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local17.convert > _local17.population){
_local17.convert = _local17.population;
};
};
_local18++;
};
};
if (_local11.braCount > 0){
_local18 = 0;
while (_local18 < _local11.braCount) {
if ((Math.random() * 100) < (_local17.intel / braFactor)){
_local17.convert = (_local17.convert + ((1 + Math.round((_local17.intel / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local17.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local17.convert > _local17.population){
_local17.convert = _local17.population;
};
};
_local18++;
};
};
};
_local16++;
};
};
if (_local11.convert < _local11.population){
if (_local11.dooCount > 0){
_local18 = 0;
while (_local18 < _local11.dooCount) {
if ((Math.random() * 100) < (_local11.gulli / dooFactor)){
_local11.convert = (_local11.convert + ((1 + Math.round((_local11.gulli / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local11.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local11.convert > _local11.population){
_local11.convert = _local11.population;
};
};
_local18++;
};
};
if (_local11.misCount > 0){
_local18 = 0;
while (_local18 < _local11.misCount) {
if ((Math.random() * 100) < (_local11.relig / misFactor)){
_local11.convert = (_local11.convert + ((1 + Math.round((_local11.relig / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local11.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local11.convert > _local11.population){
_local11.convert = _local11.population;
};
};
_local18++;
};
};
if (_local11.demCount > 0){
_local18 = 0;
while (_local18 < _local11.demCount) {
if ((Math.random() * 100) < (_local11.social / demFactor)){
_local11.convert = (_local11.convert + ((1 + Math.round((_local11.social / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local11.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local11.convert > _local11.population){
_local11.convert = _local11.population;
};
};
_local18++;
};
};
if (_local11.feaCount > 0){
_local18 = 0;
while (_local18 < _local11.feaCount) {
if ((Math.random() * 100) < (_local11.fear / feaFactor)){
_local11.convert = (_local11.convert + ((1 + Math.round((_local11.fear / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local11.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local11.convert > _local11.population){
_local11.convert = _local11.population;
};
};
_local18++;
};
};
if (_local11.braCount > 0){
_local18 = 0;
while (_local18 < _local11.braCount) {
if ((Math.random() * 100) < (_local11.intel / braFactor)){
_local11.convert = (_local11.convert + ((1 + Math.round((_local11.intel / 5))) * convFactor));
atfAggro = (atfAggro + (atfChance / ((_local11.lawCount * lawFactor) + 1)));
_local2 = (_local2 + 1);
if (_local11.convert > _local11.population){
_local11.convert = _local11.population;
};
};
_local18++;
};
};
};
if (wealthUpdate == true){
_local11.wealth = (_local11.wealth + -(Math.round((_local11.wealthPer * incomeFactor))));
};
};
_local5++;
};
if (wealthUpdate == true){
wealthUpdate = false;
};
var _local6:* = (-(((totalLaw * lawFactor) * antiAggro)) / Math.sqrt(_local2));
if (((atfAggro - _local4) + _local6) > 0){
atfAggro = (atfAggro + (-(((totalLaw * lawFactor) * antiAggro)) / Math.sqrt(_local2)));
} else {
if (((atfAggro - _local4) + _local6) < 0){
atfAggro = _local4;
};
};
if (atfAggro < 0){
atfAggro = 0;
};
nextTurn = (nextTurn + -1);
expenses = (expenses + (upExpense / timeMax));
var _local7:* = Math.round((expenses + ((upExpense * nextTurn) / timeMax)));
var _local8:* = String(_local7);
expenseBox.text = ("$" + _local8);
buyOffCost = Math.round((200000 + (((atfAggro * 2000) * 100) / 72)));
var _local9:* = String(buyOffCost);
buyBox.text = ("$" + _local9);
if (nextTurn == 0){
cash = (cash + (income - Math.round(expenses)));
_local19 = String(cash);
nextTurn = timeMax;
expenses = 0;
cashBox.text = ("$" + _local19);
wealthUpdate = true;
newestTotals();
_local20 = String((totalCon - lastCon));
_local21 = String((income - expenses));
newsBox.text = (((("New converts: " + _local20) + ". Cash flow: $") + _local21) + ".");
};
nBox.text = String(nextTurn);
atfBar.scaleY = (atfAggro / 100);
if (totalOn == false){
updateCell(currentCell);
} else {
if (totalOn == true){
updateTotal();
};
};
}
public function snakeClick(_arg1:MouseEvent){
var _local2:Tween;
var _local4:Tween;
TweenMax.to(snakeC, 1, {glowFilter:{remove:true}});
TweenMax.to(sunC, 1, {glowFilter:{remove:true}});
TweenMax.to(doomC, 1, {glowFilter:{remove:true}});
if (doomSelect == true){
_local4 = new Tween(doomC, "y", Strong.easeOut, 325, 95.4, 3, true);
};
if (sunSelect == true){
_local2 = new Tween(sunC, "x", Strong.easeOut, 350, 62, 3, true);
_local2 = new Tween(sunC, "y", Strong.easeOut, 325, 424, 3, true);
};
if (snakeSelect == true){
_local2 = new Tween(snakeC, "x", Strong.easeOut, 350, 650, 3, true);
_local2 = new Tween(snakeC, "y", Strong.easeOut, 325, 424, 3, true);
};
TweenMax.to(snakeC, 1, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:30, blurY:30}});
sunSelect = false;
doomSelect = false;
snakeSelect = true;
_local2 = new Tween(snakeC, "x", Strong.easeOut, 650, 350, 3, true);
var _local3:Tween = new Tween(snakeC, "y", Strong.easeOut, 424, 325, 3, true);
cultD.text = "Snake cults have much more effective lawyers and cheaper brainwashers.";
nextB.addEventListener(MouseEvent.CLICK, nextClick);
}
public function callResume(_arg1:MouseEvent){
pauseWin.visible = false;
nextDate.start();
}
public function callPause(_arg1:MouseEvent){
pauseWin.visible = true;
pauseWin.resume.addEventListener(MouseEvent.CLICK, callResume);
pauseWin.returner.addEventListener(MouseEvent.CLICK, callReturner);
pauseWin.music.addEventListener(MouseEvent.CLICK, callMusic);
totalOn = true;
nextDate.stop();
updateTotal();
}
public function loseWinConfirm(_arg1:MouseEvent){
loseWin.okay.removeEventListener(MouseEvent.CLICK, loseWinConfirm);
loseWin.visible = false;
if (newAchieve == true){
achieve.visible = true;
achieve.addEventListener(MouseEvent.CLICK, achieveConfirm);
} else {
gotoAndStop(2);
};
}
public function showTotal(_arg1:MouseEvent){
TweenLite.to(currentCell, 0, {removeTint:true});
newestTotals();
totalOn = true;
pop.text = String(totalPop);
wealth.text = String(totalWealth);
convert.text = String(totalCon);
reli.text = "";
fear.text = "";
intel.text = "";
soci.text = "";
gull.text = "";
}
public function hideIntro(_arg1:TimerEvent){
intro.visible = false;
}
public function nextClick(_arg1:MouseEvent){
TweenMax.to(snakeC, 0, {glowFilter:{remove:true}});
TweenMax.to(sunC, 0, {glowFilter:{remove:true}});
TweenMax.to(doomC, 0, {glowFilter:{remove:true}});
if (diffiToggle == 1){
gotoAndStop(4);
} else {
if (diffiToggle == 2){
gotoAndStop(5);
};
};
}
public function callReturner(_arg1:MouseEvent){
gotoAndStop(2);
}
function frame2(){
stop();
diffDisp.text = "Easy";
diffiToggle = 1;
if (firstTime == true){
move1 = new Timer((240 * 30), 1);
move1.addEventListener(TimerEvent.TIMER, hideIntro);
move1.start();
} else {
intro.visible = false;
};
firstTime = false;
diffi.addEventListener(MouseEvent.CLICK, changeDiffi);
achieve.addEventListener(MouseEvent.CLICK, gotoAchieve);
adLink.addEventListener(MouseEvent.CLICK, gotoWebsite);
player.addEventListener(MouseEvent.CLICK, startGame);
instruc.addEventListener(MouseEvent.CLICK, gotoInstruc);
}
function frame7(){
backB.addEventListener(MouseEvent.CLICK, goToMain);
}
public function soundLoop(_arg1:TimerEvent){
if (musicToggle == true){
SoundMixer.stopAll();
s1.play();
};
}
public function subDisplay(_arg1:MouseEvent){
otherPause();
subForm.visible = true;
subForm.okayer.addEventListener(MouseEvent.CLICK, submitter);
}
function frame3(){
sunC.addEventListener(MouseEvent.CLICK, sunClick);
doomC.addEventListener(MouseEvent.CLICK, doomClick);
snakeC.addEventListener(MouseEvent.CLICK, snakeClick);
cultD.wordWrap = true;
backB.addEventListener(MouseEvent.CLICK, backClick);
nextB.addEventListener(MouseEvent.CLICK, nextClick);
}
function frame5(){
achieve.visible = false;
loseWin.visible = false;
subForm.visible = false;
initGame();
pauseWin.visible = false;
pauser.addEventListener(MouseEvent.CLICK, callPause);
musicToggle = true;
pauseWin.musicToggler.text = "On";
buyOff.addEventListener(MouseEvent.CLICK, callBuy);
mapTotal.addEventListener(MouseEvent.CLICK, showTotal);
law_up.addEventListener(MouseEvent.CLICK, staffUpdate);
mis_up.addEventListener(MouseEvent.CLICK, staffUpdate);
dem_up.addEventListener(MouseEvent.CLICK, staffUpdate);
fea_up.addEventListener(MouseEvent.CLICK, staffUpdate);
doo_up.addEventListener(MouseEvent.CLICK, staffUpdate);
bra_up.addEventListener(MouseEvent.CLICK, staffUpdate);
law_down.addEventListener(MouseEvent.CLICK, staffUpdate);
mis_down.addEventListener(MouseEvent.CLICK, staffUpdate);
dem_down.addEventListener(MouseEvent.CLICK, staffUpdate);
fea_down.addEventListener(MouseEvent.CLICK, staffUpdate);
doo_down.addEventListener(MouseEvent.CLICK, staffUpdate);
bra_down.addEventListener(MouseEvent.CLICK, staffUpdate);
law_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
mis_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
dem_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
fea_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
doo_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
bra_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
law_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
mis_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
dem_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
fea_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
doo_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
bra_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
speed_down.addEventListener(MouseEvent.CLICK, speedChange);
speed_up.addEventListener(MouseEvent.CLICK, speedChange);
}
public function adComplete(_arg1:TimerEvent){
gotoAndStop(2);
}
public function sunClick(_arg1:MouseEvent){
var _local2:Tween;
var _local3:Tween;
TweenMax.to(snakeC, 1, {glowFilter:{remove:true}});
TweenMax.to(sunC, 1, {glowFilter:{remove:true}});
TweenMax.to(doomC, 1, {glowFilter:{remove:true}});
if (doomSelect == true){
_local3 = new Tween(doomC, "y", Strong.easeOut, 325, 95.4, 3, true);
};
if (sunSelect == true){
_local2 = new Tween(sunC, "x", Strong.easeOut, 350, 62, 3, true);
_local2 = new Tween(sunC, "y", Strong.easeOut, 325, 424, 3, true);
};
if (snakeSelect == true){
_local2 = new Tween(snakeC, "x", Strong.easeOut, 350, 650, 3, true);
_local2 = new Tween(snakeC, "y", Strong.easeOut, 325, 424, 3, true);
};
TweenMax.to(sunC, 1, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:30, blurY:30}});
sunSelect = true;
doomSelect = false;
snakeSelect = false;
_local2 = new Tween(sunC, "x", Strong.easeOut, 62, 350, 3, true);
_local2 = new Tween(sunC, "y", Strong.easeOut, 424, 325, 3, true);
cultD.text = "Sun cults start with more money, have cheaper and more effective missionaries, and convert faster.";
nextB.addEventListener(MouseEvent.CLICK, nextClick);
}
function frame1(){
stop();
move2 = new Timer(10000, 1);
move2.addEventListener(TimerEvent.TIMER, adComplete);
move2.start();
}
public function glowCell(_arg1:MouseEvent){
var _local2:* = _arg1.target;
}
public function callMusic(_arg1:MouseEvent){
if (musicToggle == true){
musicToggle = false;
pauseWin.musicToggler.text = "Off";
SoundMixer.stopAll();
} else {
if (musicToggle == false){
musicToggle = true;
pauseWin.musicToggler.text = "On";
s1.play();
};
};
}
public function loseGame(){
nextDate.stop();
loseWin.visible = true;
loseWin.displayer.text = "You lose!";
loseWin.okay.addEventListener(MouseEvent.CLICK, loseWinConfirm);
}
function frame4(){
achieve.visible = false;
loseWin.visible = false;
subForm.visible = false;
initGame();
pauseWin.visible = false;
pauser.addEventListener(MouseEvent.CLICK, callPause);
musicToggle = true;
pauseWin.musicToggler.text = "On";
buyOff.addEventListener(MouseEvent.CLICK, callBuy);
mapTotal.addEventListener(MouseEvent.CLICK, showTotal);
law_up.addEventListener(MouseEvent.CLICK, staffUpdate);
mis_up.addEventListener(MouseEvent.CLICK, staffUpdate);
dem_up.addEventListener(MouseEvent.CLICK, staffUpdate);
fea_up.addEventListener(MouseEvent.CLICK, staffUpdate);
doo_up.addEventListener(MouseEvent.CLICK, staffUpdate);
bra_up.addEventListener(MouseEvent.CLICK, staffUpdate);
law_down.addEventListener(MouseEvent.CLICK, staffUpdate);
mis_down.addEventListener(MouseEvent.CLICK, staffUpdate);
dem_down.addEventListener(MouseEvent.CLICK, staffUpdate);
fea_down.addEventListener(MouseEvent.CLICK, staffUpdate);
doo_down.addEventListener(MouseEvent.CLICK, staffUpdate);
bra_down.addEventListener(MouseEvent.CLICK, staffUpdate);
law_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
mis_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
dem_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
fea_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
doo_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
bra_up.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
law_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
mis_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
dem_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
fea_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
doo_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
bra_down.addEventListener(MouseEvent.MOUSE_OVER, newsUpdate);
speed_down.addEventListener(MouseEvent.CLICK, speedChange);
speed_up.addEventListener(MouseEvent.CLICK, speedChange);
}
public function otherPause(){
totalOn = true;
nextDate.stop();
updateTotal();
}
public function speedChange(_arg1:MouseEvent){
var _local2:* = _arg1.target;
nextDate.removeEventListener(TimerEvent.TIMER, Game);
if (_local2.name == "speed_down"){
if (speedMod != 1){
speedMod = (speedMod + -1);
};
} else {
if (_local2.name == "speed_up"){
if (speedMod != 5){
speedMod = (speedMod + 1);
};
};
};
nextDate = new Timer(((dateTimer * 5) / speedMod), 0);
nextDate.addEventListener(TimerEvent.TIMER, Game);
nextDate.start();
sBox.text = String(speedMod);
}
function frame6(){
busted.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
fire.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
butter.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
clock.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
crow.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
light.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
money.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
skull.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
sun.addEventListener(MouseEvent.MOUSE_OVER, awardDescrip);
backB.addEventListener(MouseEvent.CLICK, goToMain);
busted.visible = false;
fire.visible = false;
butter.visible = false;
clock.visible = false;
crow.visible = false;
light.visible = false;
money.visible = false;
skull.visible = false;
sun.visible = false;
if (bustedWon == true){
busted.visible = true;
};
if (fireWon == true){
fire.visible = true;
};
if (butterWon == true){
butter.visible = true;
};
if (clockWon == true){
clock.visible = true;
};
if (crowWon == true){
crow.visible = true;
};
if (lightWon == true){
light.visible = true;
};
if (moneyWon == true){
money.visible = true;
};
if (skullWon == true){
skull.visible = true;
};
if (sunWon == true){
sun.visible = true;
};
}
public function backClick(_arg1:MouseEvent){
sunSelect = false;
doomSelect = false;
snakeSelect = false;
gotoAndStop(2);
}
public function submitter(_arg1:MouseEvent){
}
public function updateTouched(_arg1:MovieClip){
var _local3:*;
var _local2 = 1;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if (((((_arg1.hitTestObject(_local3)) && ((_local3.name == "grid")))) && (!((getChildIndex(_local3) == getChildIndex(_arg1)))))){
_arg1.touchedCells.push(_local2);
};
_local2++;
};
}
public function updateSelect(_arg1:MouseEvent){
totalOn = false;
var _local2:* = _arg1.target;
TweenLite.to(currentCell, 0, {removeTint:true});
currentCell.isSelected = false;
currentCell = _local2;
currentCell.isSelected = true;
TweenMax.to(_local2, 0.5, {tint:0xFFFF00, persist:true, yoyo:0});
pop.text = _local2.population;
wealth.text = _local2.wealth;
convert.text = _local2.convert;
reli.text = _local2.relig;
fear.text = _local2.fear;
intel.text = _local2.intel;
soci.text = _local2.social;
gull.text = _local2.gulli;
lawBox.text = _local2.lawCount;
dooBox.text = _local2.dooCount;
misBox.text = _local2.misCount;
demBox.text = _local2.demCount;
feaBox.text = _local2.feaCount;
braBox.text = _local2.braCount;
}
public function achieveConfirm(_arg1:MouseEvent){
achieve.removeEventListener(MouseEvent.CLICK, achieveConfirm);
gotoAndStop(2);
}
public function newestTotals(){
var _local2:*;
totalPop = 0;
totalWealth = 0;
totalCon = 0;
var _local1 = 1;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if (_local2.name == "grid"){
totalPop = (totalPop + _local2.population);
totalWealth = (totalWealth + _local2.wealth);
totalCon = (totalCon + _local2.convert);
};
_local1++;
};
}
public function tracker(_arg1:Event){
var _local3:*;
var _local4:*;
income = 0;
var _local2 = 1;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if (_local3.name == "grid"){
income = (income + Math.round(_local3.wealthPer));
_local4 = String(income);
incomeBox.text = ("$" + _local4);
};
_local2++;
};
}
public function changeDiffi(_arg1:MouseEvent){
if (diffiToggle == 1){
diffiToggle = 2;
diffDisp.text = "Hard";
} else {
if (diffiToggle == 2){
diffiToggle = 1;
diffDisp.text = "Easy";
};
};
}
public function initGame(){
var _local3:*;
nextTurn = timeMax;
newAchieve = false;
timeCount = 0;
totalOn = false;
income = 0;
upExpense = 0;
atfAggro = 0;
totalPop = 0;
totalCon = 0;
totalLaw = 0;
totalMis = 0;
totalDoo = 0;
totalDem = 0;
totalFea = 0;
totalBra = 0;
totalWealth = 0;
initWealth = 0;
expenses = 0;
cellCounter = 0;
infilCounter = 0;
speedMod = 5;
sBox.text = String(speedMod);
atfChance = (0.015 * diffiToggle);
cash = (100000 / diffiToggle);
expenses = 0;
income = 0;
antiAggro = 3;
wealthUpdate = false;
nBox.text = String(nextTurn);
nextDate = new Timer(dateTimer, 0);
nextDate.addEventListener(TimerEvent.TIMER, Game);
nextDate.start();
nextLoop = new Timer(60000, 0);
nextLoop.addEventListener(TimerEvent.TIMER, soundLoop);
nextLoop.start();
s1 = new Very_Scary_2();
s1.play();
atfBar.scaleY = (atfAggro / 100);
startNode = Math.round((Math.random() * 80));
while (getChildAt(startNode).name != "grid") {
startNode = (startNode + 1);
};
var _local1 = 1;
while (_local1 < numChildren) {
_local3 = getChildAt(_local1);
if (_local3.name == "grid"){
cellCounter = (cellCounter + 1);
_local3.addEventListener(MouseEvent.CLICK, updateSelect);
_local3.addEventListener(MouseEvent.ROLL_OVER, glowCell);
_local3.population = Math.round((Math.random() * 100000));
totalPop = (totalPop + _local3.population);
_local3.wealth = Math.round((Math.random() * 150000));
totalWealth = (totalWealth + _local3.wealth);
initWealth = (initWealth + _local3.wealth);
if (_local1 == startNode){
_local3.convert = _local3.population;
totalCon = _local3.convert;
lastCon = totalCon;
currentCell = _local3;
updateTouched(_local3);
} else {
_local3.convert = 0;
};
_local3.relig = Math.round((100 * Math.random()));
_local3.fear = Math.round((100 * Math.random()));
_local3.intel = Math.round((100 * Math.random()));
_local3.social = Math.round((100 * Math.random()));
_local3.gulli = Math.round((100 * Math.random()));
};
_local1++;
};
updateCell(currentCell);
if (sunSelect == true){
cashFactor = 1.4;
incomeFactor = 1;
convFactor = 2;
lawFactor = 1;
dooFactor = 1;
misFactor = 1.1;
demFactor = 1;
feaFactor = 1;
braFactor = 1;
cash = (cash * cashFactor);
} else {
if (doomSelect == true){
cashFactor = 1;
incomeFactor = 1.2;
convFactor = 1;
lawFactor = 1;
dooFactor = 1.2;
misFactor = 1;
demFactor = 1;
feaFactor = 1.2;
braFactor = 1;
} else {
if (snakeSelect == true){
cashFactor = 1;
incomeFactor = 1;
convFactor = 1;
lawFactor = 2;
dooFactor = 1;
misFactor = 1;
demFactor = 1;
feaFactor = 1;
braFactor = 1.2;
};
};
};
var _local2:* = String(cash);
cashBox.text = ("$" + _local2);
lawCost = (lawyerCost / lawFactor);
dooCost = (staffCost / dooFactor);
misCost = (staffCost / misFactor);
demCost = (staffCost / demFactor);
feaCost = (staffCost / feaFactor);
braCost = (staffCost / braFactor);
initScore = ((Math.round(((totalCon / totalPop) * 10000)) + Math.round(((cash / initWealth) * 10000))) * diffiToggle);
}
public function callBuy(_arg1:MouseEvent){
var _local2:*;
if (buyOffCost < cash){
cash = (cash + -(buyOffCost));
atfAggro = 0;
_local2 = String(cash);
cashBox.text = ("$" + _local2);
};
}
public function doomClick(_arg1:MouseEvent){
var _local2:Tween;
var _local3:Tween;
TweenMax.to(snakeC, 1, {glowFilter:{remove:true}});
TweenMax.to(sunC, 1, {glowFilter:{remove:true}});
TweenMax.to(doomC, 1, {glowFilter:{remove:true}});
if (doomSelect == true){
_local2 = new Tween(doomC, "y", Strong.easeOut, 325, 95.4, 3, true);
};
if (sunSelect == true){
_local3 = new Tween(sunC, "x", Strong.easeOut, 350, 62, 3, true);
_local3 = new Tween(sunC, "y", Strong.easeOut, 325, 424, 3, true);
};
if (snakeSelect == true){
_local3 = new Tween(snakeC, "x", Strong.easeOut, 350, 650, 3, true);
_local3 = new Tween(snakeC, "y", Strong.easeOut, 325, 424, 3, true);
};
TweenMax.to(doomC, 1, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:30, blurY:30}});
sunSelect = false;
doomSelect = true;
snakeSelect = false;
_local2 = new Tween(doomC, "y", Strong.easeOut, 95.4, 325, 3, true);
cultD.text = "Doomsday cults absorb wealth from communities faster, they also recieve more powerful doomsayers and fear mongers.";
nextB.addEventListener(MouseEvent.CLICK, nextClick);
}
public function gotoAchieve(_arg1:MouseEvent){
gotoAndStop(6);
}
public function startGame(_arg1:MouseEvent){
gotoAndStop(3);
}
public function newsUpdate(_arg1:MouseEvent){
var _local2:* = _arg1.target;
var _local3:* = _local2.name;
if (_local3 == "law_up"){
newsBox.text = (("Lawyers prevent ATF detection. Cost: $" + Math.round((lawyerCost / lawFactor))) + " per turn");
};
if ((((_local3 == "law_down")) && (!((currentCell.lawCount == 0))))){
newsBox.text = (("Lawyers prevent ATF detection. Cost: $" + Math.round((lawyerCost / lawFactor))) + " per turn");
};
if (_local3 == "doo_up"){
newsBox.text = (("Doomsayers exploit gullibility. Cost: $" + Math.round((staffCost / dooFactor))) + " per turn");
};
if ((((_local3 == "doo_down")) && (!((currentCell.dooCount == 0))))){
newsBox.text = (("Doomsayers exploit gullibility. Cost: $" + Math.round((staffCost / dooFactor))) + " per turn");
};
if (_local3 == "mis_up"){
newsBox.text = (("Missionaries exploit religiosity. Cost: $" + Math.round((staffCost / misFactor))) + " per turn");
};
if ((((_local3 == "mis_down")) && (!((currentCell.misCount == 0))))){
newsBox.text = (("Missionaries exploit religiosity. Cost: $" + Math.round((staffCost / misFactor))) + " per turn");
};
if (_local3 == "dem_up"){
newsBox.text = (("Demonstrators exploit sociability. Cost: $" + Math.round((staffCost / demFactor))) + " per turn");
};
if ((((_local3 == "dem_down")) && (!((currentCell.demCount == 0))))){
newsBox.text = (("Demonstrators exploit sociability. Cost: $" + Math.round((staffCost / demFactor))) + " per turn");
};
if (_local3 == "fea_up"){
newsBox.text = (("Fear Mongers exploit fear. Cost: $" + Math.round((staffCost / feaFactor))) + " per turn");
};
if ((((_local3 == "fea_down")) && (!((currentCell.feaCount == 0))))){
newsBox.text = (("Fear Mongers exploit fear. Cost: $" + Math.round((staffCost / feaFactor))) + " per turn");
};
if (_local3 == "bra_up"){
newsBox.text = (("Brainwashers exploit intellegence. Cost: $" + Math.round((staffCost / braFactor))) + " per turn");
};
if ((((_local3 == "bra_down")) && (!((currentCell.braCount == 0))))){
newsBox.text = (("Brainwashers exploit intellegence. Cost: $" + Math.round((staffCost / braFactor))) + " per turn");
};
}
public function gotoInstruc(_arg1:MouseEvent){
gotoAndStop(7);
}
public function gotoWebsite(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.addictinggames.com");
navigateToURL(_local2, "_blank");
}
public function awardDescrip(_arg1:MouseEvent){
var _local2:* = _arg1.target;
if (_local2.name == "busted"){
descrip.text = "Busted: You lost by getting busted by the ATF.";
};
if (_local2.name == "fire"){
descrip.text = "Blazing Fast: You beat the game in under minutes.";
};
if (_local2.name == "butter"){
descrip.text = "Buying Pretty Things: You absorbed all the wealth.";
};
if (_local2.name == "clock"){
descrip.text = "Beat the Clock: You won in under twenty minutes.";
};
if (_local2.name == "crow"){
descrip.text = "Cult Master: You beat the game on easy.";
};
if (_local2.name == "light"){
descrip.text = "Guardian: Win with each of the cults.";
};
if (_local2.name == "money"){
descrip.text = "Learn2Save: You lost by running out of cash.";
};
if (_local2.name == "skull"){
descrip.text = "Apocalypse: You won using only Doomsayers.";
};
if (_local2.name == "sun"){
descrip.text = "Illuminated: You won on hard.";
};
}
public function staffUpdate(_arg1:MouseEvent){
var _local2:* = _arg1.target;
var _local3:* = _local2.name;
if ((((totalOn == false)) && ((currentCell.convert > 1)))){
if (_local3 == "law_up"){
currentCell.lawCount = (currentCell.lawCount + 1);
totalLaw = (totalLaw + 1);
};
if ((((_local3 == "law_down")) && (!((currentCell.lawCount == 0))))){
currentCell.lawCount = (currentCell.lawCount + -1);
totalLaw = (totalLaw + -1);
};
if (_local3 == "doo_up"){
currentCell.dooCount = (currentCell.dooCount + 1);
totalDoo = (totalDoo + 1);
};
if ((((_local3 == "doo_down")) && (!((currentCell.dooCount == 0))))){
currentCell.dooCount = (currentCell.dooCount + -1);
totalDoo = (totalDoo + -1);
};
if (_local3 == "mis_up"){
currentCell.misCount = (currentCell.misCount + 1);
totalMis = (totalMis + 1);
};
if ((((_local3 == "mis_down")) && (!((currentCell.misCount == 0))))){
currentCell.misCount = (currentCell.misCount + -1);
totalMis = (totalMis + -1);
};
if (_local3 == "dem_up"){
currentCell.demCount = (currentCell.demCount + 1);
totalDem = (totalDem + 1);
};
if ((((_local3 == "dem_down")) && (!((currentCell.demCount == 0))))){
currentCell.demCount = (currentCell.demCount + -1);
totalDem = (totalDem + -1);
};
if (_local3 == "fea_up"){
currentCell.feaCount = (currentCell.feaCount + 1);
totalFea = (totalFea + 1);
};
if ((((_local3 == "fea_down")) && (!((currentCell.feaCount == 0))))){
currentCell.feaCount = (currentCell.feaCount + -1);
totalFea = (totalFea + -1);
};
if (_local3 == "bra_up"){
currentCell.braCount = (currentCell.braCount + 1);
totalBra = (totalBra + 1);
};
if ((((_local3 == "bra_down")) && (!((currentCell.braCount == 0))))){
currentCell.braCount = (currentCell.braCount + -1);
totalBra = (totalBra + -1);
};
upExpense = Math.round(((((((totalBra * braCost) + (totalFea * feaCost)) + (totalDem * demCost)) + (totalMis * misCost)) + (totalDoo * dooCost)) + (totalLaw * lawCost)));
updateCell(currentCell);
};
}
public function updateCell(_arg1:MovieClip){
pop.text = _arg1.population;
wealth.text = _arg1.wealth;
convert.text = _arg1.convert;
reli.text = _arg1.relig;
fear.text = _arg1.fear;
intel.text = _arg1.intel;
soci.text = _arg1.social;
gull.text = _arg1.gulli;
lawBox.text = _arg1.lawCount;
dooBox.text = _arg1.dooCount;
misBox.text = _arg1.misCount;
demBox.text = _arg1.demCount;
feaBox.text = _arg1.feaCount;
braBox.text = _arg1.braCount;
}
public function goToMain(_arg1:MouseEvent){
gotoAndStop(2);
}
public function winGame(){
var _local3:*;
nextDate.stop();
var _local1:* = 0;
var _local2 = 1;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if (_local3.name == "grid"){
_local1 = (_local1 + _local3.braCount);
_local1 = (_local1 + _local3.misCount);
_local1 = (_local1 + _local3.demCount);
_local1 = (_local1 + _local3.feaCount);
};
_local2++;
};
if (_local1 == 0){
if (skullWon == false){
newAchieve = true;
};
skullWon = true;
};
if (diffiToggle == 1){
if (crowWon == false){
newAchieve = true;
};
crowWon = true;
};
if (diffiToggle == 2){
if (sunWon == false){
newAchieve = true;
};
sunWon = true;
};
if (totalWealth == 0){
if (butterWon == false){
newAchieve = true;
};
butterWon = true;
};
if ((timeCount * dateTimer) < ((1000 * 60) * 10)){
if (fireWon == false){
newAchieve = true;
};
fireWon = true;
};
if ((timeCount * dateTimer) < ((1000 * 60) * 20)){
if (clockWon == false){
newAchieve = true;
};
clockWon = true;
};
if (doomSelect == true){
sunWon = true;
};
if (snakeSelect == true){
snakeWon = true;
};
if (sunSelect == true){
sunCWon = true;
};
if ((((((sunCWon == true)) && ((snakeWon == true)))) && ((doomWon == true)))){
if (lightWon == false){
newAchieve = true;
};
lightWon = true;
};
loseWin.visible = true;
loseWin.displayer.text = "You win!";
loseWin.okay.addEventListener(MouseEvent.CLICK, loseWinConfirm);
}
}
}//package
Section 34
//Smash (Smash)
package {
import flash.media.*;
public dynamic class Smash extends Sound {
}
}//package
Section 35
//Very_Scary_2 (Very_Scary_2)
package {
import flash.media.*;
public dynamic class Very_Scary_2 extends Sound {
}
}//package