Section 1
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 2
//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 3
//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 4
//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.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package gs.plugins
Section 5
//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 6
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _target:DisplayObject;
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
public static const VERSION:Number = 1.1;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
}
}//package gs.plugins
Section 7
//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 8
//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 9
//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.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package gs.plugins
Section 10
//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 11
//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 12
//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.091;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 13
//Splash_NON_NG2_30 (puzzle_fla.Splash_NON_NG2_30)
package puzzle_fla {
import flash.display.*;
public dynamic class Splash_NON_NG2_30 extends MovieClip {
public function Splash_NON_NG2_30(){
addFrameScript(64, frame65);
}
function frame65(){
stop();
}
}
}//package puzzle_fla
Section 14
//title_m_5 (puzzle_fla.title_m_5)
package puzzle_fla {
import flash.display.*;
public dynamic class title_m_5 extends MovieClip {
public var loops:MovieClip;
public function title_m_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
loops.gotoAndStop((1 + int((Math.random() * 5))));
}
}
}//package puzzle_fla
Section 15
//click_snd (click_snd)
package {
import flash.media.*;
public dynamic class click_snd extends Sound {
}
}//package
Section 16
//configManager (configManager)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class configManager extends MovieClip {
var showonload:String;// = null
var popupurl:String;// = ""
var areas:Dictionary;
public var values:Array;
var gid:String;
var ver:uint;
var areacontent:Dictionary;
var configXML:XML;
public function configManager(_arg1:String, _arg2:uint, _arg3:Stage):void{
var ioErrorHandler:Function;
var loadXML:Function;
var gameid = _arg1;
var version = _arg2;
var st = _arg3;
configXML = <config></config>
;
areas = new Dictionary(true);
areacontent = new Dictionary(true);
values = [];
super();
ioErrorHandler = function (_arg1:Event):void{
trace("config fail");
};
loadXML = function (_arg1:Event):void{
var k:uint;
var tmpfn:Function;
var e = _arg1;
configXML = new XML(e.target.data);
var i:uint;
while (i < configXML.stages.stage.length()) {
k = 0;
while (k < configXML.stages.stage[i].banners.banner.length()) {
if (configXML.stages.stage[i].banners.banner[k].@autoload == "true"){
trace(((("get content " + configXML.stages.stage[i].@name) + " loc:") + configXML.stages.stage[i].banners.banner[k].@location));
getContent(configXML.stages.stage[i].@name, k, configXML.stages.stage[i].banners.banner[k].@location, configXML.stages.stage[i].banners.banner[k].@x, configXML.stages.stage[i].banners.banner[k].@y, configXML.stages.stage[i].banners.banner[k].@href);
};
if (configXML.stages.stage[i].@name == "popup"){
tmpfn = function (_arg1:Event):void{
if (popupurl != ""){
navigateToURL(new URLRequest(popupurl), "_blank");
};
st.removeEventListener(MouseEvent.CLICK, tmpfn);
};
st.addEventListener(MouseEvent.CLICK, tmpfn);
popupurl = configXML.stages.stage[i].banners.banner[k].@href;
};
k = (k + 1);
};
i = (i + 1);
};
i = 0;
while (i < configXML.values.value.length()) {
if (String(configXML.values.value[i].@stagename).length > 0){
values[configXML.values.value[i].@name] = [configXML.values.value[i].@stagename, configXML.values.value[i].@text];
} else {
values[String(configXML.values.value[i].@name)] = String(configXML.values.value[i].@value);
};
i = (i + 1);
};
dispatchEvent(new Event("CONFIGLOADED"));
trace("config loaded\n\n");
};
gid = gameid;
ver = version;
var loader:URLLoader = new URLLoader();
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ioErrorHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.addEventListener(Event.COMPLETE, loadXML);
loader.load(new URLRequest(((((("http://config.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&player=") + Capabilities.version)));
}
public function addArea(_arg1:String, _arg2:MovieClip):void{
var bannerid:uint;
var i:uint;
var k:uint;
var id = _arg1;
var area = _arg2;
if (areas[id] == undefined){
areas[id] = area;
if (areacontent[id] == undefined){
areacontent[id] = [];
i = 0;
while (i < configXML.stages.stage.length()) {
if (String(configXML.stages.stage[i].@name) == id){
k = 0;
while (k < configXML.stages.stage[i].banners.banner.length()) {
getContent(configXML.stages.stage[i].@name, k, configXML.stages.stage[i].banners.banner[k].@location, configXML.stages.stage[i].banners.banner[k].@x, configXML.stages.stage[i].banners.banner[k].@y, configXML.stages.stage[i].banners.banner[k].@href);
k = (k + 1);
};
};
i = (i + 1);
};
};
};
bannerid = int((Math.random() * areacontent[id].length));
if (((((!((areacontent[id][bannerid] == null))) && (!((areacontent[id][bannerid] == undefined))))) && (!(area.contains(areacontent[id][bannerid]))))){
area.addChild(areacontent[id][bannerid]);
dispatchEvent(new Event(("LOADED_" + id)));
if (areacontent[id][bannerid].href != ""){
areacontent[id][bannerid].addEventListener(MouseEvent.CLICK, function (_arg1:Event):void{
navigateToURL(new URLRequest(areacontent[id][bannerid].href), "_blank");
});
};
} else {
showonload = id;
};
trace((("start " + id) + " area"));
}
function getContent(_arg1:String, _arg2:uint, _arg3:String, _arg4:Number, _arg5:Number, _arg6:String):void{
var loadcontent:Function;
var id = _arg1;
var arrid = _arg2;
var loc = _arg3;
var x = _arg4;
var y = _arg5;
var href = _arg6;
loadcontent = function (_arg1:Event):void{
var bannerid:uint;
var e = _arg1;
if (areacontent[id] == undefined){
areacontent[id] = [];
};
e.target.content.x = x;
e.target.content.y = y;
e.target.content.href = href;
e.target.content.gameid = gid;
e.target.content.version = ver;
areacontent[id][arrid] = e.target.content;
if (showonload == id){
bannerid = int((Math.random() * areacontent[id].length));
areas[id].addChild(areacontent[id][bannerid]);
if (areacontent[id][bannerid].href != ""){
areacontent[id][bannerid].addEventListener(MouseEvent.CLICK, function (_arg1:Event):void{
navigateToURL(new URLRequest(areacontent[id][bannerid].href), "_blank");
});
};
};
trace("content loaded");
trace(("LOADED_" + id));
dispatchEvent(new Event(("LOADED_" + id)));
};
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadcontent);
loader.load(new URLRequest(loc));
}
}
}//package
Section 17
//FX1 (FX1)
package {
import flash.events.*;
import flash.display.*;
public dynamic class FX1 extends MovieClip {
public var b:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var l:MovieClip;
public function FX1(){
addFrameScript(14, frame15);
}
function frame15(){
dispatchEvent(new Event("DONE"));
}
}
}//package
Section 18
//game_snd (game_snd)
package {
import flash.media.*;
public dynamic class game_snd extends Sound {
}
}//package
Section 19
//grid_easy (grid_easy)
package {
import flash.display.*;
public dynamic class grid_easy extends MovieClip {
}
}//package
Section 20
//grid_normal (grid_normal)
package {
import flash.display.*;
public dynamic class grid_normal extends MovieClip {
}
}//package
Section 21
//item (item)
package {
import flash.display.*;
public class item extends MovieClip {
public var goodPlace:Boolean;// = false
public var pmask:MovieClip;
public var bg:MovieClip;
public var goodi;
public var goodk:uint;
}
}//package
Section 22
//menu_snd (menu_snd)
package {
import flash.media.*;
public dynamic class menu_snd extends Sound {
}
}//package
Section 23
//puzzleGame (puzzleGame)
package {
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import gs.easing.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
public class puzzleGame extends MovieClip {
public var easyBtn:MovieClip;
public var easy:Boolean;
public var achBtn2:MovieClip;
var activePeace:MovieClip;
public var backBtn:MovieClip;
var rotatingMc:MovieClip;
var bgid:uint;// = 1
var rotateCounter:uint;// = 0
public var movie:MovieClip;
var puzzle:Array;
public var zz:uint;
public var config:configManager;
var grid:MovieClip;
var clickCounter:uint;// = 0
public var btn1:MovieClip;
public var btn2:MovieClip;
public var btn3:MovieClip;
public var btn4:MovieClip;
public var btn5:MovieClip;
public var spl1:MovieClip;
public var spl2:MovieClip;
public var preloader:MovieClip;
public var done:MovieClip;
var cellSize:uint;// = 110
public var gameid:String;
var mcs:Array;
public var spl:MovieClip;
public var bonusAvalible;
public var adv:MovieClip;
public var ng:Boolean;
public var defaultValues:Array;
public var bgSound:SoundChannel;
public var btn2d:MovieClip;
var gridSizeX;
var gridSizeY:uint;
public var defaultKeys:Array;
public var nglist:Array;
public var version:uint;
public var normalBtn:MovieClip;
public var achBtn1:MovieClip;
public var select:MovieClip;
public var achBtn3:MovieClip;
public var achBtn4:MovieClip;
public var achBtn5:MovieClip;
public function puzzleGame():void{
puzzle = [];
mcs = [];
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
addEventListener(MouseEvent.CLICK, function (_arg1:Event){
new click_snd().play();
});
}
public function btnMO(_arg1:Event):void{
select.visible = true;
select.y = (_arg1.target.y + 7);
if (btn2d){
btn2d.visible = false;
};
}
public function comp(_arg1:Event):void{
gotoAndStop(1, "Menu");
}
public function btnMOU(_arg1:Event):void{
if (select){
select.visible = false;
};
}
public function makebtn1(_arg1:MovieClip):void{
_arg1.useHandCursor = true;
_arg1.buttonMode = true;
_arg1.addEventListener(MouseEvent.CLICK, achBtnCL);
}
function chkDone():void{
var _local2:*;
var _local3:uint;
var _local1:Boolean;
_local2 = 0;
while (_local2 < mcs.length) {
_local3 = 0;
while (_local3 < mcs[_local2].length) {
if ((((((mcs[_local2][_local3].rotation == 0)) && ((Math.floor((mcs[_local2][_local3].x / cellSize)) == mcs[_local2][_local3].goodk)))) && ((Math.floor((mcs[_local2][_local3].y / cellSize)) == mcs[_local2][_local3].goodi)))){
} else {
_local1 = false;
};
_local3++;
};
_local2++;
};
if (_local1){
trace("done!!!");
done.alpha = 0;
done.visible = true;
TweenLite.to(done, 1, {alpha:1, ease:Back.easeInOut});
};
}
function Play():void{
bgid = 1;
done.visible = false;
done.useHandCursor = true;
done.buttonMode = true;
done.addEventListener(MouseEvent.CLICK, doneFNC);
if (easy){
grid = new grid_easy();
grid.x = 27.5;
gridSizeX = 3;
gridSizeY = 2;
cellSize = 165;
} else {
grid = new grid_normal();
gridSizeX = 5;
gridSizeY = 3;
cellSize = 110;
};
addChild(grid);
makePuzzle(gridSizeX, gridSizeY);
stage.addEventListener(Event.ENTER_FRAME, EF);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MM);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
}
function frame1(){
gameid = "cndp-1";
version = 1;
bonusAvalible = false;
easy = false;
config = new configManager(gameid, version, stage);
config.addEventListener("CONFIGLOADED", cfgLoaded);
defaultKeys = ["vote", "pills"];
defaultValues = [];
defaultValues["vote"] = 0;
defaultValues["pills"] = 0;
ng = false;
nglist = ["ungrounded.net", "newgrounds.com"];
zz = 0;
while (zz < nglist.length) {
if (loaderInfo.loaderURL.indexOf(nglist[zz]) > 0){
ng = true;
};
zz++;
};
stage.showDefaultContextMenu = false;
loaderInfo.addEventListener(Event.COMPLETE, comp);
}
function frame2(){
preloader.stop();
stop();
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
config.addArea("preloader", adv);
}
function frame4(){
config.addArea("ach", adv);
makebtn1(achBtn1);
makebtn1(achBtn2);
makebtn1(achBtn3);
makebtn1(achBtn4);
makebtn1(achBtn5);
movie.gotoAndStop(6);
movie.visible = false;
backBtn.useHandCursor = true;
backBtn.buttonMode = true;
backBtn.addEventListener(MouseEvent.CLICK, bBtnCL);
}
function frame5(){
stop();
if (bgSound){
bgSound.stop();
};
bgSound = new menu_snd().play(0, int.MAX_VALUE);
config.addArea("menu", adv);
if (defaultValues["pills"] == 0){
btn5.visible = false;
};
select.visible = false;
btn2d.visible = false;
makebtn(btn1);
makebtn(btn2);
makebtn(btn3);
makebtn(btn4);
makebtn(btn5);
}
function magnet(_arg1:MovieClip):void{
var fx:MovieClip;
var m = _arg1;
var deltaPix:uint = 15;
var deltaPix21:uint = 55;
var deltaPix22:uint = 55;
var deltaPix3:uint = 5;
if (easy){
deltaPix = 80;
deltaPix21 = (82.5 + 27.5);
deltaPix22 = 82.5;
deltaPix3 = 12;
};
var nx:uint = ((Math.floor((m.x / cellSize)) * cellSize) + deltaPix21);
var ny:uint = ((Math.floor((m.y / cellSize)) * cellSize) + deltaPix22);
if ((((Math.floor((m.x / cellSize)) == m.goodk)) && ((Math.floor((m.y / cellSize)) == m.goodi)))){
if ((((m.rotation == 0)) && ((((Math.abs((nx - m.x)) < deltaPix)) || ((Math.abs((ny - m.y)) < deltaPix)))))){
var re:Function = function (_arg1:Event):void{
if (((fx) && (contains(fx)))){
removeChild(fx);
};
if (fx){
fx = null;
};
};
m.x = nx;
m.y = ny;
new set_snd().play();
fx = new FX1();
fx.x = (nx - (cellSize / 2));
fx.y = (ny - (cellSize / 2));
fx.width = cellSize;
fx.height = cellSize;
addChild(fx);
fx.addEventListener("DONE", re);
chkDone();
};
} else {
if ((((Math.abs((nx - m.x)) < deltaPix3)) || ((Math.abs((ny - m.y)) < deltaPix3)))){
m.x = nx;
m.y = ny;
};
};
}
function frame8(){
stop();
spl1.useHandCursor = true;
spl1.buttonMode = true;
spl1.addEventListener(MouseEvent.CLICK, voteCL1);
}
function frame9(){
stop();
spl2.useHandCursor = true;
spl2.buttonMode = true;
spl2.addEventListener(MouseEvent.CLICK, voteCL2);
}
function frame3(){
easyBtn.alpha = 0;
normalBtn.alpha = 0;
TweenLite.to(easyBtn, 0.35, {alpha:1, ease:Back.easeInOut});
TweenLite.to(normalBtn, 0.35, {alpha:1, ease:Back.easeInOut});
easyBtn.useHandCursor = true;
easyBtn.buttonMode = true;
easyBtn.addEventListener(MouseEvent.CLICK, function (_arg1:Event){
easy = true;
gotoAndStop(1, "Game");
});
normalBtn.useHandCursor = true;
normalBtn.buttonMode = true;
normalBtn.addEventListener(MouseEvent.CLICK, function (_arg1:Event){
easy = false;
gotoAndStop(1, "Game");
});
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 32)) && (done.visible))){
doneFNC(null);
};
}
function frame7(){
stop();
spl.useHandCursor = true;
spl.buttonMode = true;
spl.addEventListener(MouseEvent.CLICK, voteCL);
}
function frame6(){
config.addArea("game", adv);
if (bgSound){
bgSound.stop();
};
bgSound = new game_snd().play(0, int.MAX_VALUE);
Play();
}
public function bBtnCL(_arg1:Event):void{
if (movie.visible){
movie.gotoAndStop(6);
movie.visible = false;
} else {
gotoAndStop(1, "Menu");
};
}
public function cfgLoaded(_arg1:Event):void{
var _local2:uint;
while (_local2 < defaultKeys.length) {
if (config.values[defaultKeys[_local2]]){
defaultValues[defaultKeys[_local2]] = config.values[defaultKeys[_local2]];
};
_local2++;
};
}
function MD(_arg1:Event):void{
var i:*;
var k:uint;
var e = _arg1;
if (((rotatingMc) || (done.visible))){
return;
};
clickCounter = 0;
i = 0;
while (i < mcs.length) {
k = 0;
while (k < mcs[i].length) {
mcs[i][k].filters = [];
k = (k + 1);
};
i = (i + 1);
};
var m:MovieClip = (e.target.parent.parent as MovieClip);
if (!(((m is puzzleItem)) || ((m is puzzleItem2)))){
return;
};
if (m == null){
return;
};
if (!contains(m)){
return;
};
try {
setChildIndex(m, (numChildren - 1));
setChildIndex(adv, (numChildren - 1));
} catch(e:Error) {
};
activePeace = m;
m.startDrag(false, new Rectangle(0, 0, 550, 400));
m.filters = [new GlowFilter(0, 1, 5, 5, 1, BitmapFilterQuality.LOW, false, false)];
}
function MM(_arg1:Event){
var onFinishTween:Function;
var e = _arg1;
onFinishTween = function ():void{
if (activePeace){
activePeace.filters = [];
};
};
if (activePeace == null){
return;
};
if ((((activePeace.y > 330)) && ((activePeace.scaleX == 1)))){
activePeace.filters = [new BlurFilter(1.25, 1.25, BitmapFilterQuality.HIGH)];
TweenLite.to(activePeace, 0.35, {scaleX:0.5, scaleY:0.5, ease:Back.easeInOut, onComplete:onFinishTween});
};
if ((((activePeace.y < 330)) && ((activePeace.scaleX == 0.5)))){
activePeace.filters = [new BlurFilter(1.25, 1.25, BitmapFilterQuality.HIGH)];
TweenLite.to(activePeace, 0.35, {scaleX:1, scaleY:1, ease:Back.easeInOut, onComplete:onFinishTween});
};
}
function EF(_arg1:Event){
clickCounter++;
if (rotatingMc){
rotatingMc.filters = [new BlurFilter(((2 * Math.abs((3 - rotateCounter))) + 1), ((2 * Math.abs((3 - rotateCounter))) + 1), BitmapFilterQuality.LOW)];
rotateCounter++;
rotatingMc.rotation = (rotatingMc.rotation + 18);
if (rotateCounter == 5){
rotatingMc.filters = [];
magnet(rotatingMc);
chkDone();
rotatingMc = null;
};
};
}
public function makebtn(_arg1:MovieClip):void{
_arg1.useHandCursor = true;
_arg1.buttonMode = true;
_arg1.addEventListener(MouseEvent.MOUSE_OVER, btnMO);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, btnMOU);
_arg1.addEventListener(MouseEvent.CLICK, btnCL);
}
public function voteCL1(_arg1:Event):void{
spl1.removeEventListener(MouseEvent.CLICK, voteCL1);
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=splash")), "_blank");
gotoAndStop(1, "PROCEED");
}
public function voteCL2(_arg1:Event):void{
spl2.removeEventListener(MouseEvent.CLICK, voteCL2);
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=proceed")), "_blank");
gotoAndStop(1, "Menu");
}
public function btnCL(_arg1:Event):void{
switch (_arg1.target.name){
case "btn1":
gotoAndStop(1, "Menu1");
break;
case "btn2":
if (bonusAvalible){
gotoAndStop(1, "Menu2");
} else {
btn2d.visible = true;
};
break;
case "btn3":
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=more-girls")), "_blank");
break;
case "btn4":
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=best-of-hentai")), "_blank");
break;
case "btn5":
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=pills")), "_blank");
break;
};
}
function doneFNC(_arg1:Event):void{
var _local2:*;
var _local3:uint;
bgid++;
_local2 = 0;
while (_local2 < mcs.length) {
_local3 = 0;
while (_local3 < mcs[_local2].length) {
removeChild(mcs[_local2][_local3]);
mcs[_local2][_local3] = null;
_local3++;
};
_local2++;
};
done.visible = false;
if (bgid == 6){
bonusAvalible = true;
removeChild(grid);
if ((((defaultValues["vote"] == 1)) && ((ng == 1)))){
gotoAndStop(1, "NG");
} else {
gotoAndStop(1, "NNG");
};
return;
};
makePuzzle(gridSizeX, gridSizeY);
}
public function update(_arg1:ProgressEvent):void{
preloader.gotoAndStop((1 + int((Math.floor(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal)) / 4))));
}
function makePuzzle(_arg1, _arg2:uint):void{
var _local5:uint;
var _local6:Object;
var _local7:MovieClip;
var _local3:Array = [0, 3, 4, 1, 2];
var _local4:uint;
while (_local4 < _arg2) {
_local5 = 0;
while (_local5 < _arg1) {
if (_local5 == 0){
puzzle[_local4] = [];
};
_local6 = {};
_local6.top = null;
_local6.bottom = null;
_local6.left = null;
_local6.right = null;
if (_local5 == 0){
_local6.left = 0;
};
if (_local5 == (_arg1 - 1)){
_local6.right = 0;
};
if (_local4 == 0){
_local6.top = 0;
};
if (_local4 == (_arg2 - 1)){
_local6.bottom = 0;
};
puzzle[_local4][_local5] = _local6;
_local5++;
};
_local4++;
};
if (!easy){
_local4 = 0;
while (_local4 < _arg2) {
_local5 = 0;
while (_local5 < _arg1) {
if (puzzle[_local4][_local5].right == null){
puzzle[_local4][_local5].right = (int((Math.random() * 4)) + 1);
puzzle[_local4][(_local5 + 1)].left = _local3[puzzle[_local4][_local5].right];
};
if (puzzle[_local4][_local5].bottom == null){
puzzle[_local4][_local5].bottom = (int((Math.random() * 4)) + 1);
puzzle[(_local4 + 1)][_local5].top = _local3[puzzle[_local4][_local5].bottom];
};
_local5++;
};
_local4++;
};
};
_local4 = 0;
while (_local4 < _arg2) {
_local5 = 0;
while (_local5 < _arg1) {
if (easy){
_local7 = new puzzleItem2();
} else {
_local7 = new puzzleItem();
};
_local7.pmask.t.gotoAndStop((puzzle[_local4][_local5].top + 1));
_local7.pmask.r.gotoAndStop((puzzle[_local4][_local5].right + 1));
_local7.pmask.l.gotoAndStop((puzzle[_local4][_local5].left + 1));
_local7.pmask.bo.gotoAndStop((puzzle[_local4][_local5].bottom + 1));
_local7.pmask.cacheAsBitmap = true;
_local7.pmask.l.cacheAsBitmap = true;
_local7.pmask.r.cacheAsBitmap = true;
_local7.pmask.t.cacheAsBitmap = true;
_local7.pmask.bo.cacheAsBitmap = true;
_local7.pmask.cacheAsBitmap = true;
_local7.pmask.x = -((25 + (cellSize / 2)));
_local7.pmask.y = -((25 + (cellSize / 2)));
_local7.x = (((_local5 * cellSize) - 25) + (25 + (cellSize / 2)));
_local7.y = (((_local4 * cellSize) - 25) + (25 + (cellSize / 2)));
_local7.bg.gotoAndStop(bgid);
_local7.bg.x = -((((_local5 * cellSize) - 25) + (25 + (cellSize / 2))));
_local7.bg.y = -((((_local4 * cellSize) - 25) + (25 + (cellSize / 2))));
addChild(_local7);
if (_local5 == 0){
mcs[_local4] = [];
};
mcs[_local4][_local5] = _local7;
_local7.useHandCUrsor = true;
_local7.buttonMode = true;
_local7.addEventListener(MouseEvent.MOUSE_DOWN, MD);
_local7.addEventListener(MouseEvent.MOUSE_UP, MU);
_local7.x = (Math.random() * 500);
_local7.y = ((Math.random() * 50) + 330);
_local7.rotation = (int((Math.random() * 3)) * 90);
_local7.goodk = _local5;
_local7.goodi = _local4;
_local7.scaleX = 0.5;
_local7.scaleY = 0.5;
_local5++;
};
_local4++;
};
}
public function voteCL(_arg1:Event):void{
spl.removeEventListener(MouseEvent.CLICK, voteCL);
navigateToURL(new URLRequest((((("http://tds.mutanky.com/?gameid=" + gameid) + "&version=") + version) + "&action=vote")), "_blank");
gotoAndStop(1, "PROCEED");
}
public function achBtnCL(_arg1:Event):void{
movie.visible = true;
movie.gotoAndStop(_arg1.target.name.substr(6, 1));
}
function MU(_arg1:Event):void{
var _local2:*;
var _local3:uint;
if (activePeace == null){
return;
};
_arg1.target.parent.parent.stopDrag();
_local2 = 0;
while (_local2 < mcs.length) {
_local3 = 0;
while (_local3 < mcs[_local2].length) {
mcs[_local2][_local3].filters = [];
_local3++;
};
_local2++;
};
if (clickCounter < 6){
rotatingMc = _arg1.target.parent.parent;
rotateCounter = 0;
activePeace = null;
return;
};
if ((((activePeace.x < 550)) && ((activePeace.y < 330)))){
magnet(activePeace);
};
activePeace = null;
}
}
}//package
Section 24
//puzzleItem (puzzleItem)
package {
public dynamic class puzzleItem extends item {
}
}//package
Section 25
//puzzleItem2 (puzzleItem2)
package {
import flash.display.*;
public dynamic class puzzleItem2 extends MovieClip {
public var pmask:MovieClip;
public var bg:MovieClip;
}
}//package
Section 26
//set_snd (set_snd)
package {
import flash.media.*;
public dynamic class set_snd extends Sound {
}
}//package