Section 1
//_assets_1 (christmas_fla._assets_1)
package christmas_fla {
import flash.display.*;
public dynamic class _assets_1 extends MovieClip {
public function _assets_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package christmas_fla
Section 2
//boiler_bubbles_127 (christmas_fla.boiler_bubbles_127)
package christmas_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class boiler_bubbles_127 extends MovieClip {
public var child;
public var i:int;
public var mc_bubble:MovieClip;
public var frame:int;
public function boiler_bubbles_127(){
addFrameScript(0, frame1);
}
function frame1(){
i = this.numChildren;
while (i--) {
child = this.getChildAt(i);
frame = (Math.floor((Math.random() * child.totalFrames)) + 1);
child.gotoAndPlay(frame);
};
}
}
}//package christmas_fla
Section 3
//btn_menu_gen_49 (christmas_fla.btn_menu_gen_49)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_menu_gen_49 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 4
//btn_play_48 (christmas_fla.btn_play_48)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_play_48 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 5
//btn_sound_72 (christmas_fla.btn_sound_72)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_sound_72 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 6
//btn_submit_8 (christmas_fla.btn_submit_8)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_submit_8 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 7
//btn_tamba_73 (christmas_fla.btn_tamba_73)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_tamba_73 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 8
//game_bg_desc_84 (christmas_fla.game_bg_desc_84)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_bg_desc_84 extends MovieClip {
public var text_desc:TextField;
}
}//package christmas_fla
Section 9
//game_item_battery_132 (christmas_fla.game_item_battery_132)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_battery_132 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_battery_132(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 10
//game_item_boiler_126 (christmas_fla.game_item_boiler_126)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_boiler_126 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_boiler_126(){
addFrameScript(89, frame90);
}
function frame90(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 11
//game_item_bulb_123 (christmas_fla.game_item_bulb_123)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_bulb_123 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_bulb_123(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 12
//game_item_circuit_121 (christmas_fla.game_item_circuit_121)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_circuit_121 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_circuit_121(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 13
//game_item_fan_118 (christmas_fla.game_item_fan_118)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_fan_118 extends MovieClip {
public var mc_attach:MovieClip;
}
}//package christmas_fla
Section 14
//game_item_fuse_116 (christmas_fla.game_item_fuse_116)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_fuse_116 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_fuse_116(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 15
//game_item_generator_114 (christmas_fla.game_item_generator_114)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_generator_114 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_generator_114(){
addFrameScript(9, frame10);
}
function frame10(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 16
//game_item_solar_112 (christmas_fla.game_item_solar_112)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_solar_112 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_solar_112(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 17
//game_item_steam_108 (christmas_fla.game_item_steam_108)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_steam_108 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_steam_108(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 18
//game_item_torch_106 (christmas_fla.game_item_torch_106)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_torch_106 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_torch_106(){
addFrameScript(59, frame60);
}
function frame60(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 19
//game_item_transformer_104 (christmas_fla.game_item_transformer_104)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_transformer_104 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_transformer_104(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay("animate");
}
}
}//package christmas_fla
Section 20
//game_item_turbine_100 (christmas_fla.game_item_turbine_100)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_turbine_100 extends MovieClip {
public var mc_attach:MovieClip;
public var mc_head:MovieClip;
public function game_item_turbine_100(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
mc_head.gotoAndStop(1);
}
function frame2(){
stop();
mc_head.gotoAndPlay(2);
}
}
}//package christmas_fla
Section 21
//game_item_wire_134 (christmas_fla.game_item_wire_134)
package christmas_fla {
import flash.display.*;
public dynamic class game_item_wire_134 extends MovieClip {
public var mc_attach:MovieClip;
public function game_item_wire_134(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package christmas_fla
Section 22
//game_tree_bauble_92 (christmas_fla.game_tree_bauble_92)
package christmas_fla {
import flash.display.*;
public dynamic class game_tree_bauble_92 extends MovieClip {
public var mc_body:MovieClip;
}
}//package christmas_fla
Section 23
//mc_bookmarks_74 (christmas_fla.mc_bookmarks_74)
package christmas_fla {
import flash.display.*;
public dynamic class mc_bookmarks_74 extends MovieClip {
public var btn_delicious:MovieClip;
public var btn_facebook:MovieClip;
public var btn_stumbleupon:MovieClip;
public var btn_digg:MovieClip;
public var btn_google:MovieClip;
public var btn_twitter:MovieClip;
public var btn_yahoo:MovieClip;
public var btn_reddit:MovieClip;
}
}//package christmas_fla
Section 24
//penguin_34 (christmas_fla.penguin_34)
package christmas_fla {
import flash.display.*;
public dynamic class penguin_34 extends MovieClip {
public var mc_inner:MovieClip;
public var frame:int;
public function penguin_34(){
addFrameScript(0, frame1, 49, frame50);
}
function frame1(){
frame = Math.floor(((Math.random() * this.totalFrames) + 1));
if (frame == 1){
frame = 2;
};
this.gotoAndPlay(frame);
}
function frame50(){
gotoAndPlay(2);
}
}
}//package christmas_fla
Section 25
//penguin_eyenbrow_40 (christmas_fla.penguin_eyenbrow_40)
package christmas_fla {
import flash.display.*;
public dynamic class penguin_eyenbrow_40 extends MovieClip {
public var mc_eyelid:MovieClip;
}
}//package christmas_fla
Section 26
//penguin_feet_36 (christmas_fla.penguin_feet_36)
package christmas_fla {
import flash.display.*;
public dynamic class penguin_feet_36 extends MovieClip {
public function penguin_feet_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package christmas_fla
Section 27
//penguin_inner_35 (christmas_fla.penguin_inner_35)
package christmas_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class penguin_inner_35 extends MovieClip {
public var tmp:Array;
public var mc_scarf:MovieClip;
public var frame:int;
public var mc_feet:MovieClip;
public var mc_eye_1:MovieClip;
public var mc_eye_2:MovieClip;
public function penguin_inner_35(){
addFrameScript(0, frame1);
}
function frame1(){
frame = Math.floor(((Math.random() * mc_eye_1.mc_eyelid.totalFrames) + 1));
mc_eye_1.mc_eyelid.gotoAndPlay(frame);
mc_eye_2.mc_eyelid.gotoAndPlay(frame);
tmp = parent.name.split("_");
mc_scarf.gotoAndStop(tmp[2]);
mc_feet.gotoAndStop(tmp[3]);
}
}
}//package christmas_fla
Section 28
//penguin_scarf_38 (christmas_fla.penguin_scarf_38)
package christmas_fla {
import flash.display.*;
public dynamic class penguin_scarf_38 extends MovieClip {
public function penguin_scarf_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package christmas_fla
Section 29
//polarbear_24 (christmas_fla.polarbear_24)
package christmas_fla {
import flash.display.*;
public dynamic class polarbear_24 extends MovieClip {
public var mc_sign:MovieClip;
}
}//package christmas_fla
Section 30
//polarbear_sign_29 (christmas_fla.polarbear_sign_29)
package christmas_fla {
import flash.display.*;
public dynamic class polarbear_sign_29 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package christmas_fla
Section 31
//polarbear_sign_inner_30 (christmas_fla.polarbear_sign_inner_30)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class polarbear_sign_inner_30 extends MovieClip {
public var text_label:TextField;
}
}//package christmas_fla
Section 32
//preloader_pct_142 (christmas_fla.preloader_pct_142)
package christmas_fla {
import flash.display.*;
import flash.text.*;
public dynamic class preloader_pct_142 extends MovieClip {
public var text_pct:TextField;
}
}//package christmas_fla
Section 33
//ui_bg_bauble_46 (christmas_fla.ui_bg_bauble_46)
package christmas_fla {
import flash.display.*;
public dynamic class ui_bg_bauble_46 extends MovieClip {
public var frame:int;
public function ui_bg_bauble_46(){
addFrameScript(0, frame1, 176, frame177);
}
function frame177(){
gotoAndPlay(2);
}
function frame1(){
frame = Math.floor(((Math.random() * this.totalFrames) + 1));
if (frame == 1){
frame = 2;
};
this.gotoAndPlay(frame);
}
}
}//package christmas_fla
Section 34
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 35
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 36
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var start:Number;
public var name:String;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var priority:int;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 37
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:TweenCore;
var _local5:Number;
var _local6:TweenCore;
_local4 = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){
if (!_local4.cachedReversed){
_local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration;
_local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false);
};
};
_local4 = _local6;
};
}
public function addChild(_arg1:TweenCore):void{
if (((!(_arg1.gc)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
};
_arg1.nextNode = _firstChild;
_firstChild = _arg1;
_arg1.prevNode = null;
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (((!(_arg1.gc)) && (!(_arg2)))){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
}
}
}//package com.greensock.core
Section 38
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
public var cachedTime:Number;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var data;
public var timeline:SimpleTimeline;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.13;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
var _local3:SimpleTimeline;
_rawPrevTime = -1;
super();
this.vars = ((_arg2) || ({}));
this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0)));
_delay = ((this.vars.delay) || (0));
this.cachedTimeScale = ((this.vars.timeScale) || (1));
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
_local3 = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean;
_local2 = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function invalidate():void{
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.cachedTotalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore;
_local2 = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setTotalTime(this.cachedTotalTime, false);
this.setEnabled(true, false);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.gc))){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (!_arg2){
this.timeline.remove(this, true);
};
};
this.gc = !(_arg1);
return (false);
}
}
}//package com.greensock.core
Section 39
//Back (com.greensock.easing.Back)
package com.greensock.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 * 0.5));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 * 0.5) * ((_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 com.greensock.easing
Section 40
//Strong (com.greensock.easing.Strong)
package com.greensock.easing {
public class Strong {
public static const power:uint = 4;
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 * 0.5));
if (_arg1 < 1){
return ((((((((_arg3 * 0.5) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 41
//TweenEvent (com.greensock.events.TweenEvent)
package com.greensock.events {
import flash.events.*;
public class TweenEvent extends Event {
public static const COMPLETE:String = "complete";
public static const START:String = "init";
public static const UPDATE:String = "change";
public static const REVERSE_COMPLETE:String = "reverseComplete";
public static const VERSION:Number = 1;
public static const REPEAT:String = "repeat";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new TweenEvent(this.type, this.bubbles, this.cancelable));
}
}
}//package com.greensock.events
Section 42
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _ignoreVisible:Boolean;
protected var _target:Object;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package com.greensock.plugins
Section 43
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "highlightColor", "highlightAlpha", "shadowColor", "shadowAlpha", "blurX", "blurY", "strength", "quality"];
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))), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 44
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orientData:Array;
protected var _orient:Boolean;
protected var _beziers:Object;
protected var _target:Object;
public static const API:Number = 1;
protected static const _RAD2DEG:Number = 57.2957795130823;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
_local4 = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars;
if (_local4.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0, 0.01]];
_orient = true;
} else {
if ((_local4.orientToBezier is Array)){
_orientData = _local4.orientToBezier;
_orient = true;
};
};
_local5 = {};
_local6 = 0;
while (_local6 < _arg2.length) {
for (_local7 in _arg2[_local6]) {
if (_local5[_local7] == undefined){
_local5[_local7] = [_arg1.target[_local7]];
};
if (typeof(_arg2[_local6][_local7]) == "number"){
_local5[_local7].push(_arg2[_local6][_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7])));
};
};
_local6++;
};
for (_local7 in _local5) {
this.overwriteProps[this.overwriteProps.length] = _local7;
if (_local4[_local7] != undefined){
if (typeof(_local4[_local7]) == "number"){
_local5[_local7].push(_local4[_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7])));
};
_local8 = {};
_local8[_local7] = true;
_arg1.killVars(_local8, false);
delete _local4[_local7];
};
};
_beziers = parseBeziers(_local5, _arg3);
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:Object;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Object;
var _local14:Boolean;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5));
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local2 = _orientData.length;
_local8 = {};
while (_local2--) {
_local11 = _orientData[_local2];
_local8[_local11[0]] = _target[_local11[0]];
_local8[_local11[1]] = _target[_local11[1]];
};
_local13 = _target;
_local14 = this.round;
_target = _future;
this.round = false;
_orient = false;
_local2 = _orientData.length;
while (_local2--) {
_local11 = _orientData[_local2];
this.changeFactor = (_arg1 + ((_local11[4]) || (0.01)));
_local12 = ((_local11[3]) || (0));
_local9 = (_future[_local11[0]] - _local8[_local11[0]]);
_local10 = (_future[_local11[1]] - _local8[_local11[1]]);
_local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12);
};
_target = _local13;
this.round = _local14;
_orient = true;
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local7 = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package com.greensock.plugins
Section 45
//BezierThroughPlugin (com.greensock.plugins.BezierThroughPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class BezierThroughPlugin extends BezierPlugin {
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 com.greensock.plugins
Section 46
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["blurX", "blurY", "quality"];
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))), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 47
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
private static var _propNames:Array = [];
protected static var _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:Object;
var _local5:Array;
_target = _arg1;
_type = ColorMatrixFilter;
_local4 = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
_local5 = [];
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);
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_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{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
}
}//package com.greensock.plugins
Section 48
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.geom.*;
public class ColorTransformPlugin extends TintPlugin {
public static const API:Number = 1;
public function ColorTransformPlugin(){
this.propName = "colorTransform";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:ColorTransform;
var _local5:String;
var _local6:Number;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = _arg1.transform.colorTransform;
for (_local5 in _arg2) {
if ((((_local5 == "tint")) || ((_local5 == "color")))){
if (_arg2[_local5] != null){
_local4.color = int(_arg2[_local5]);
};
} else {
if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){
} else {
_local4[_local5] = _arg2[_local5];
};
};
};
if (!isNaN(_arg2.tintAmount)){
_local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3)));
_local4.redOffset = (_local4.redOffset * _local6);
_local4.greenOffset = (_local4.greenOffset * _local6);
_local4.blueOffset = (_local4.blueOffset * _local6);
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount)));
} else {
if (!isNaN(_arg2.exposure)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1));
} else {
if (!isNaN(_arg2.brightness)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1)))));
};
};
};
_ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined))));
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package com.greensock.plugins
Section 49
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout", "hideObject"];
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), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 50
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _info:Array;
protected var _a:Array;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
var _local3:int;
_a = _arg1;
_local3 = _arg2.length;
while (_local3--) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
_local2 = _info.length;
if (this.round){
while (_local2--) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package com.greensock.plugins
class ArrayTweenInfo {
public var change:Number;
public var index:uint;
public var start:Number;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 51
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.core.*;
import com.greensock.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
protected var _remove:Boolean;
protected var _target:Object;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
public function onCompleteTween():void{
var _local1:Array;
var _local2:int;
if (_remove){
_local1 = _target.filters;
if (!(_local1[_index] is _type)){
_local2 = _local1.length;
while (_local2--) {
if ((_local1[_local2] is _type)){
_local1.splice(_local2, 1);
break;
};
};
} else {
_local1.splice(_index, 1);
};
_target.filters = _local1;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{
var _local4:Array;
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local8:Object;
_local4 = _target.filters;
_local8 = ((_arg1 is BitmapFilter)) ? {} : _arg1;
_index = -1;
if (_local8.index != null){
_index = _local8.index;
} else {
_local6 = _local4.length;
while (_local6--) {
if ((_local4[_local6] is _type)){
_index = _local6;
break;
};
};
};
if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){
_index = ((_local8.index)!=null) ? _local8.index : _local4.length;
_local4[_index] = _arg2;
_target.filters = _local4;
};
_filter = _local4[_index];
if (_local8.remove == true){
_remove = true;
this.onComplete = onCompleteTween;
};
_local6 = _arg3.length;
while (_local6--) {
_local5 = _arg3[_local6];
if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){
if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){
_local7 = new HexColorsPlugin();
_local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]);
_tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false);
} else {
if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){
_filter[_local5] = _arg1[_local5];
} else {
addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5);
};
};
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:PropTween;
var _local4:Array;
_local2 = _tweens.length;
_local4 = _target.filters;
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
if (!(_local4[_index] is _type)){
_local2 = (_index = _local4.length);
while (_local2--) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package com.greensock.plugins
Section 52
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FrameLabelPlugin extends FramePlugin {
public static const API:Number = 1;
public function FrameLabelPlugin(){
this.propName = "frameLabel";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:Array;
var _local5:String;
var _local6:int;
var _local7:int;
if ((!(_arg3.target) is MovieClip)){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
_local4 = _target.currentLabels;
_local5 = _arg2;
_local6 = _target.currentFrame;
_local7 = _local4.length;
while (_local7--) {
if (_local4[_local7].name == _local5){
_local6 = _local4[_local7].frame;
break;
};
};
if (this.frame != _local6){
addTween(this, "frame", this.frame, _local6, "frame");
};
return (true);
}
}
}//package com.greensock.plugins
Section 53
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame", "frameLabel"];
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 com.greensock.plugins
Section 54
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout"];
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), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 55
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function 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);
}
override public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (_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--;
};
}
}
}//package com.greensock.plugins
Section 56
//RemoveTintPlugin (com.greensock.plugins.RemoveTintPlugin)
package com.greensock.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package com.greensock.plugins
Section 57
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
public class RoundPropsPlugin extends TweenPlugin {
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 com.greensock.plugins
Section 58
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class ShortRotationPlugin extends TweenPlugin {
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"){
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], ((typeof(_arg2[_local4]))=="number") ? Number(_arg2[_local4]) : (_arg1[_local4] + Number(_arg2[_local4])));
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number;
_local5 = ((_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 com.greensock.plugins
Section 59
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.core.*;
import com.greensock.*;
import flash.geom.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _transform:Transform;
protected var _ignoreAlpha:Boolean;
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"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:ColorTransform;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_transform = _arg1.transform;
_ct = _transform.colorTransform;
_local3 = _props.length;
while (_local3--) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_transform.colorTransform = _ct;
}
}
}//package com.greensock.plugins
Section 60
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class TweenPlugin {
public var activeDisable:Boolean;
public var onEnable:Function;
public var round:Boolean;
public var onDisable:Function;
public var propName:String;
protected var _tweens:Array;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
priority = 0;
_tweens = [];
_changeFactor = 0;
super();
}
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") ? (Number(_arg4) - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:PropTween;
var _local4:Number;
_local2 = _tweens.length;
if (this.round){
while (_local2--) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
public function 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 function killProps(_arg1:Object):void{
var _local2:int;
_local2 = this.overwriteProps.length;
while (_local2--) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (_local2--) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
_local2 = _arg1.length;
while (_local2--) {
if (_arg1[_local2].hasOwnProperty("API")){
_local3 = new ((_arg1[_local2] as Class));
TweenLite.plugins[_local3.propName] = _arg1[_local2];
};
};
return (true);
}
private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{
var _local3:PropTween;
var _local4:Boolean;
var _local5:Array;
var _local6:int;
_local3 = _arg2.cachedPT1;
if (_arg1 == "onInit"){
_local5 = [];
while (_local3) {
_local5[_local5.length] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
_local6 = _local5.length;
while (_local6--) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_arg2.cachedPT1 = _local5[0];
} else {
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
var _local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
};
return (_local4);
}
}
}//package com.greensock.plugins
Section 61
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
protected var _initVal:Boolean;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_initVal = _target.visible;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if ((((_arg1 == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){
_target.visible = _visible;
} else {
_target.visible = _initVal;
};
}
}
}//package com.greensock.plugins
Section 62
//VolumePlugin (com.greensock.plugins.VolumePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _st:SoundTransform;
protected var _target:Object;
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 com.greensock.plugins
Section 63
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
public class OverwriteManager {
public static const ALL_ONSTART:int = 4;
public static const CONCURRENT:int = 3;
public static const ALL_IMMEDIATE:int = 1;
public static const PREEXISTING:int = 5;
public static const AUTO:int = 2;
public static const version:Number = 6;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
while (_arg1) {
if (_arg1.cachedPaused){
return (true);
};
_arg1 = _arg1.timeline;
};
return (false);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.099994){
throw (new Error("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);
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:uint):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local8:Number;
var _local9:Array;
var _local10:Array;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:Number;
var _local15:Number;
var _local16:TweenCore;
var _local17:Number;
var _local18:SimpleTimeline;
if (_arg4 >= 4){
_local13 = _arg3.length;
_local5 = 0;
while (_local5 < _local13) {
_local7 = _arg3[_local5];
if (_local7 != _arg1){
if (_local7.setEnabled(false, false)){
_local6 = true;
};
} else {
if (_arg4 == 5){
break;
};
};
_local5++;
};
return (_local6);
};
_local8 = _arg1.startTime;
_local9 = [];
_local10 = [];
_local11 = 0;
_local12 = 0;
_local5 = _arg3.length;
while (_local5--) {
_local7 = _arg3[_local5];
if ((((_local7 == _arg1)) || (_local7.gc))){
} else {
if (_local7.timeline != _arg1.timeline){
if (!getGlobalPaused(_local7)){
var _temp1 = _local11;
_local11 = (_local11 + 1);
var _local19 = _temp1;
_local10[_local19] = _local7;
};
} else {
if ((((((_local7.startTime <= _local8)) && (((_local7.startTime + _local7.totalDuration) > _local8)))) && (!(getGlobalPaused(_local7))))){
var _temp2 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp2;
_local9[_local19] = _local7;
};
};
};
};
if (_local11 != 0){
_local14 = _arg1.cachedTimeScale;
_local15 = _local8;
_local18 = _arg1.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local8 = (_local14 * _local15);
_local5 = _local11;
while (_local5--) {
_local16 = _local10[_local5];
_local14 = _local16.cachedTimeScale;
_local15 = _local16.startTime;
_local18 = _local16.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local17 = (_local14 * _local15);
if ((((_local17 <= _local8)) && (((((_local17 + (_local16.totalDuration * _local14)) > _local8)) || ((_local16.cachedDuration == 0)))))){
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp3;
_local9[_local19] = _local16;
};
};
};
if (_local12 == 0){
return (_local6);
};
_local5 = _local12;
if (_arg4 == 2){
while (_local5--) {
_local7 = _local9[_local5];
if (_local7.killVars(_arg2)){
_local6 = true;
};
if ((((_local7.cachedPT1 == null)) && (_local7.initted))){
_local7.setEnabled(false, false);
};
};
} else {
while (_local5--) {
if (TweenLite(_local9[_local5]).setEnabled(false, false)){
_local6 = true;
};
};
};
return (_local6);
}
}
}//package com.greensock
Section 64
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
public var target:Object;
protected var _overwrite:uint;
public var ratio:Number;// = 0
protected var _notifyPluginsOfEnabled:Boolean;
protected var _hasPlugins:Boolean;
public var cachedPT1:PropTween;
protected var _overwrittenProps:Object;
public var propTweenLookup:Object;
protected var _ease:Function;
public static const version:Number = 11.131;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:Array;
var _local5:TweenLite;
ratio = 0;
super(_arg2, _arg3);
this.target = _arg1;
if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
_local4 = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number;
var _local6:PropTween;
_local5 = this.cachedTime;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local4 = true;
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
_local6 = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local4){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (_local2--) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInit", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (_arg2){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
return (false);
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
if ((_arg1 in masterList)){
_local3 = masterList[_arg1];
_local4 = _local3.length;
while (_local4--) {
if (!TweenLite(_local3[_local4]).gc){
if (_arg2){
TweenLite(_local3[_local4]).complete(false, false);
} else {
TweenLite(_local3[_local4]).setEnabled(false, false);
};
};
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame++;
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (_local5--) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 65
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _easePower:uint;
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _easeType:uint;
public var yoyo:Boolean;
protected var _repeat:int;// = 0
protected var _cyclesComplete:uint;// = 0
protected var _repeatDelay:Number;// = 0
public static const version:Number = 11.131;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
_repeat = 0;
_repeatDelay = 0;
_cyclesComplete = 0;
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 11.1){
throw (new Error("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."));
};
this.yoyo = Boolean(this.vars.yoyo);
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
this.cacheIsDirty = true;
if (((((((((this.vars.onCompleteListener) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){
initDispatcher();
if ((((_arg2 == 0)) && ((_delay == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
};
};
if (((("timeScale" in this.vars)) && (!((this.target is TweenCore))))){
this.cachedTimeScale = this.vars.timeScale;
};
}
override protected function init():void{
var _local1:TweenMax;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:PropTween;
var _local8:PropTween;
var _local9:int;
if (this.vars.startAt){
this.vars.startAt.overwrite = 0;
this.vars.startAt.immediateRender = true;
_local1 = new TweenMax(this.target, 0, this.vars.startAt);
};
super.init();
if ((_ease in fastEaseLookup)){
_easeType = fastEaseLookup[_ease][0];
_easePower = fastEaseLookup[_ease][1];
};
if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){
_local5 = this.vars.roundProps;
_local9 = _local5.length;
while (_local9--) {
_local3 = _local5[_local9];
_local8 = this.cachedPT1;
while (_local8) {
if (_local8.name == _local3){
if (_local8.isPlugin){
_local8.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
_hasPlugins = true;
_local7 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1);
this.cachedPT1 = _local7;
} else {
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
};
this.removePropTween(_local8);
this.propTweenLookup[_local3] = _local7;
};
} else {
if (((((_local8.isPlugin) && ((_local8.name == "_MULTIPLE_")))) && (!(_local8.target.round)))){
_local4 = ((" " + _local8.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local8.target.round = true;
};
};
};
_local8 = _local8.nextNode;
};
};
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:PropTween;
var _local3:Number;
if (this.cachedTime != 0){
_local1 = (1 / (1 - this.ratio));
_local2 = this.cachedPT1;
while (_local2) {
if (!_local2.isPlugin){
_local3 = (_local2.start + _local2.change);
_local2.change = ((_local3 - _local2.target[_local2.property]) * _local1);
_local2.start = (_local3 - _local2.change);
_local2 = _local2.nextNode;
};
};
};
}
protected function updateTo(_arg1:Object, _arg2:Boolean=true):void{
var _local3:PropTween;
var _local4:Number;
var _local5:String;
var _local6:Object;
var _local7:Boolean;
var _local8:Object;
var _local9:int;
_local3 = this.cachedPT1;
_local4 = this.cachedTotalTime;
if (this.initted){
if (!_arg2){
this.totalTime = 0;
};
killVars(_arg1, false);
for (_local5 in _arg1) {
if ((_local5 in _reservedProps)){
} else {
if ((((_local5 in plugins)) && (new ((plugins[_local5] as Class)).onInitTween(this.target, _arg1[_local5], this)))){
_local8 = {};
_local9 = _local6.overwriteProps.length;
while (_local9--) {
_local8[_local6.overwriteProps[_local9]] = true;
};
killVars(_local8, false);
this.cachedPT1 = insertPropTween(_local6, "changeFactor", 0, 1, ((_local6.overwriteProps.length)==1) ? _local6.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
_hasPlugins = true;
if (_local6.priority){
this.cachedPT1.priority = _local6.priority;
_local7 = true;
};
} else {
this.cachedPT1 = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, this.cachedPT1);
};
};
this.vars[_local5] = _arg1[_local5];
};
if (_local7){
onPluginEvent("onInit", this);
};
if (((_arg2) && (this.cachedTotalTime))){
adjustStartValues();
};
} else {
for (_local5 in _arg1) {
this.vars[_local5] = _arg1[_local5];
};
};
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
super.complete(_arg1, _arg2);
if (((!(_arg2)) && (_dispatcher))){
if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
} else {
if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
};
};
};
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
override public function invalidate():void{
this.yoyo = Boolean((this.vars.yoyo == true));
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
_hasUpdateListener = false;
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
};
setDirtyCache(true);
super.invalidate();
}
public function killProperties(_arg1:Array):void{
var _local2:Object;
var _local3:int;
_local2 = {};
_local3 = _arg1.length;
while (_local3--) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{
var _local8:PropTween;
var _local9:Array;
var _local10:int;
_local8 = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7);
if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){
_local9 = _arg1.overwriteProps;
_local10 = _local9.length;
while (_local10--) {
this.propTweenLookup[_local9[_local10]] = _local8;
};
} else {
this.propTweenLookup[_arg5] = _local8;
};
return (_local8);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Object;
_local4 = {};
_local4[_arg1] = _arg2;
updateTo(_local4, _arg3);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
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){
_hasUpdateListener = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:PropTween;
var _local10:Number;
var _local11:uint;
var _local12:Number;
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
_local5 = this.cachedTime;
if (_arg1 >= _local4){
this.cachedTotalTime = _local4;
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local6 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local6 = true;
};
_rawPrevTime = _arg1;
};
};
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local6 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
_local8 = true;
};
};
if (_repeat != 0){
_local10 = (this.cachedDuration + _repeatDelay);
if (_local6){
if (((this.yoyo) && ((_repeat % 2)))){
this.cachedTime = (this.ratio = 0);
};
} else {
if (_arg1 > 0){
if (_cyclesComplete != (_cyclesComplete = int((this.cachedTotalTime / _local10)))){
_local7 = true;
};
this.cachedTime = (((this.cachedTotalTime / _local10) - _cyclesComplete) * _local10);
if (((this.yoyo) && ((_cyclesComplete % 2)))){
this.cachedTime = (this.cachedDuration - this.cachedTime);
} else {
if (this.cachedTime >= this.cachedDuration){
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local8 = false;
};
};
if (this.cachedTime <= 0){
this.cachedTime = (this.ratio = 0);
_local8 = false;
};
};
};
};
if ((((_local5 == this.cachedTime)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
};
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if (_local8){
if (_easeType){
_local11 = _easePower;
_local12 = (this.cachedTime / this.cachedDuration);
if (_easeType == 2){
_local12 = (1 - _local12);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - this.ratio);
} else {
if (_easeType == 1){
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
} else {
if (_local12 < 0.5){
_local12 = (_local12 * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (this.ratio * 0.5);
} else {
_local12 = ((1 - _local12) * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - (0.5 * this.ratio));
};
};
};
} else {
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){
if (this.vars.onStart){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
};
};
_local9 = this.cachedPT1;
while (_local9) {
_local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change));
_local9 = _local9.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_hasUpdateListener) && (!(_arg2)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
};
if (_local6){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
} else {
if (((_local7) && (!(_arg2)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
};
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
public function set currentProgress(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime((this.duration * _arg1), false);
} else {
setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false);
};
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
protected function removePropTween(_arg1:PropTween):Boolean{
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (this.cachedPT1 == _arg1){
this.cachedPT1 = _arg1.nextNode;
};
};
if (((_arg1.isPlugin) && (_arg1.target.onDisable))){
_arg1.target.onDisable();
if (_arg1.target.activeDisable){
return (true);
};
};
return (false);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
public function get repeat():int{
return (_repeat);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
override public function set currentTime(_arg1:Number):void{
if (_cyclesComplete == 0){
} else {
if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){
_arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay)));
} else {
_arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay)));
};
};
setTotalTime(_arg1, false);
}
protected function initDispatcher():void{
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
};
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);
_hasUpdateListener = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
if ((this.vars.onRepeatListener is Function)){
_dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
};
if ((this.vars.onReverseCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
};
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
override public function get totalDuration():Number{
if (this.cacheIsDirty){
this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat));
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function set timeScale(_arg1:Number):void{
var _local2:Number;
if (_arg1 == 0){
_arg1 = 0.0001;
};
_local2 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public static function set globalTimeScale(_arg1:Number):void{
var _local2:SimpleTimeline;
var _local3:Number;
if (_arg1 == 0){
_arg1 = 0.0001;
};
if (TweenLite.rootTimeline == null){
TweenLite.to({}, 0, {});
};
_local2 = TweenLite.rootTimeline;
_local3 = (getTimer() * 0.001);
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
_local2 = TweenLite.rootFramesTimeline;
_local3 = TweenLite.rootFrame;
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1);
}
public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg4));
}
public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7));
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:uint;
_local2 = masterList[_arg1];
_local3 = [];
if (_local2){
_local4 = _local2.length;
_local5 = 0;
while (_local4--) {
if (!_local2[_local4].gc){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local6 = _temp1;
_local3[_local6] = _local2[_local4];
};
};
};
return (_local3);
}
public static function get globalTimeScale():Number{
return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale);
}
public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:Object;
var _local5:DisplayObjectContainer;
var _local6:int;
_local3 = getAllTweens();
_local6 = _local3.length;
while (_local6--) {
_local4 = _local3[_local6].target;
if ((_local4 is DisplayObject)){
_local5 = _local4.parent;
while (_local5) {
if (_local5 == _arg1){
if (_arg2){
_local3[_local6].complete(false);
} else {
_local3[_local6].setEnabled(false, false);
};
};
_local5 = _local5.parent;
};
};
};
}
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, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array;
var _local3:int;
var _local4:TweenLite;
_local2 = getTweensOf(_arg1);
_local3 = _local2.length;
while (_local3--) {
_local4 = _local2[_local3];
if (((_local4.active) || ((((_local4.cachedStartTime == _local4.timeline.cachedTime)) && (_local4.timeline.active))))){
return (true);
};
};
return (false);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = _local4.length;
while (_local6--) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
} else {
_local4[_local6].setEnabled(false, false);
};
};
};
}
private static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = _local4.length;
while (_local6--) {
_local5 = (TweenLite(_local4[_local6]).target == TweenLite(_local4[_local6]).vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
TweenCore(_local4[_local6]).paused = _arg1;
};
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public static function getAllTweens():Array{
var _local1:Dictionary;
var _local2:uint;
var _local3:Array;
var _local4:Array;
var _local5:int;
_local1 = masterList;
_local2 = 0;
_local3 = [];
for each (_local4 in _local1) {
_local5 = _local4.length;
while (_local5--) {
if (!TweenLite(_local4[_local5]).gc){
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp1;
_local3[_local8] = _local4[_local5];
};
};
};
return (_local3);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
var i:int;
var varsDup:Object;
var p:String;
var l:uint;
var a:Array;
var curDelay:Number;
var onCompleteProxy:Function;
var onCompleteParamsProxy:Array;
var lastIndex:int;
var targets = _arg1;
var duration = _arg2;
var vars = _arg3;
var stagger = _arg4;
var onCompleteAll = _arg5;
var onCompleteAllParams = _arg6;
l = targets.length;
a = [];
curDelay = ((vars.delay) || (0));
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
lastIndex = ((stagger)<=0) ? 0 : (l - 1);
i = 0;
while (i < l) {
varsDup = {};
for (p in vars) {
varsDup[p] = vars[p];
};
varsDup.delay = curDelay;
if ((((i == lastIndex)) && (!((onCompleteAll == null))))){
varsDup.onComplete = function ():void{
if (onCompleteProxy != null){
onCompleteProxy.apply(null, onCompleteParamsProxy);
};
onCompleteAll.apply(null, onCompleteAllParams);
};
};
a[a.length] = new TweenMax(targets[i], duration, varsDup);
curDelay = (curDelay + stagger);
i = (i + 1);
};
return (a);
}
TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]);
}
}//package com.greensock
Section 66
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class Tracker {
public static const ORI_DOM:String = "ori_dom";
public static const LOCALHOST:String = "localhost";
private static const MAX_ATTEMPTS:int = 3;
public static const LOCAL:String = "Local";
private static const ERROR_URL:String = "http://error.distralytics.com/comms/";
public static const TRACKER_PATH:String = "/node/tracking/trackerAS3.swf";
private static var ori_dom:String;
private static var lurl:String;
private static var _isReady:Boolean = false;
private static var _isInited:Boolean = false;
public static var c:uint;
public static var d:String = "";
public static var a:uint = 0;
public static var root:DisplayObject;
public static var mcEvent:Function;
public static var fpv:String = "";
private static var l:Loader;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static var tracker:MovieClip;
private static function loadComplete(_arg1:Event):void{
var e = _arg1;
try {
tracker = e.target.content;
tracker.init(Tracker, root);
} catch(e:Error) {
trace("Memecounter error: unable to access tracker object due to security sandbox.");
};
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(("*" + da[_local3]));
Security.allowDomain(da[_local3]);
Security.allowDomain(((c + ".c.") + da[_local3]));
Security.allowDomain(("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty(ORI_DOM)) ? root.loaderInfo.parameters[ORI_DOM] : "";
d = ((ori_dom)!="") ? ori_dom : ((new LocalConnection().domain.indexOf(LOCALHOST))==-1) ? new LocalConnection().domain : LOCAL;
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = (((((((((TRACKER_PATH + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
mcEvent = kvEvent;
};
}
public static function trackerReady():void{
_isReady = true;
}
public static function get isReady():Boolean{
return (_isReady);
}
public static function mcClick(_arg1:String, _arg2:String=null):void{
if (_isReady){
tracker.mcClick(_arg1, _arg2);
};
}
private static function loadError(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLRequest;
var _local4:URLVariables;
a++;
if (a < MAX_ATTEMPTS){
lc();
} else {
_local2 = new URLLoader();
_local3 = new URLRequest(ERROR_URL);
_local4 = new URLVariables();
_local3.method = URLRequestMethod.GET;
_local3.data = _local4;
_local4.error = "Unable to load SWF";
_local4.c = c;
_local4.fd = root.loaderInfo.loaderURL;
_local4.p = fpv;
_local4.mv = "3.3.x";
_local4.r = Math.random();
_local2.load(_local3);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
tracker.kvClick(_arg1);
};
}
public static function kvEvent(_arg1):void{
if (_isReady){
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
var _local2:String;
_local2 = da[(a % da.length)];
if (_local2.charAt(0) === "."){
_local1 = (("http://" + _local2.substr(1, (_local2.length - 1))) + lurl);
} else {
_local1 = (((("http://" + c) + ".c.") + _local2) + lurl);
};
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
}
}//package com.memecounter
Section 67
//StageMask (tamba.display.StageMask)
package tamba.display {
import flash.display.*;
public class StageMask extends Sprite {
public function StageMask(_arg1:uint, _arg2:uint):void{
this.graphics.beginFill(0xFF0000);
this.graphics.drawRect(0, 0, _arg1, _arg2);
this.graphics.endFill();
}
}
}//package tamba.display
Section 68
//EventWithParams (tamba.events.EventWithParams)
package tamba.events {
import flash.events.*;
public class EventWithParams extends Event {
private var _eventParams:Object;
private var _eventType:String;// = "onCustomEvent"
public function EventWithParams(_arg1:String, _arg2:Object=null){
_eventType = "onCustomEvent";
_eventParams = {};
super(_arg1, true, true);
_eventType = _arg1;
_eventParams = _arg2;
}
public function get params():Object{
return (_eventParams);
}
override public function get type():String{
return (_eventType);
}
}
}//package tamba.events
Section 69
//Preloader (tamba.events.Preloader)
package tamba.events {
import flash.display.*;
import flash.events.*;
public class Preloader extends Sprite {
private var preloaderParent;
public static const COMPLETE:String = "onPreloaderComplete";
public static const PROGRESS:String = "onPreloaderProgress";
public function Preloader(_arg1):void{
preloaderParent = _arg1;
}
public function start():void{
if (preloaderParent.loaderInfo.bytesLoaded >= preloaderParent.loaderInfo.bytesTotal){
onPreloaderComplete();
} else {
preloaderParent.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onPreloaderProgress, false, 0, true);
preloaderParent.loaderInfo.addEventListener(Event.COMPLETE, onPreloaderComplete, false, 0, true);
};
}
private function onPreloaderProgress(_arg1:ProgressEvent):void{
dispatchEvent(new EventWithParams(PROGRESS, {progress:(_arg1.bytesLoaded / _arg1.bytesTotal)}));
}
private function onPreloaderComplete(_arg1:Event=null):void{
dispatchEvent(new EventWithParams(COMPLETE));
}
}
}//package tamba.events
Section 70
//Leaderboard (tamba.game.Leaderboard)
package tamba.game {
import flash.display.*;
import flash.utils.*;
import tamba.events.*;
import tamba.net.*;
import tamba.ui.*;
public class Leaderboard extends MovieClip {
private var trackLinkage:String;
private var lineLinkage:String;
private var remoting:Remoting;
private var gatewayURL:String;
private var faceLinkage:String;
private var boardHeight:uint;
private var serviceName:String;
public function Leaderboard(_arg1:String, _arg2:String, _arg3:uint, _arg4:String, _arg5:String, _arg6:String){
gatewayURL = _arg1;
serviceName = _arg2;
boardHeight = _arg3;
lineLinkage = _arg4;
trackLinkage = _arg5;
faceLinkage = _arg6;
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
var _local2:MovieClip;
var _local3:Array;
var _local4:uint;
var _local5:uint;
var _local6:ScrollBar;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:String;
_local2 = new MovieClip();
_local3 = _arg1.params.data;
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local8 = new (getDefinitionByName(lineLinkage));
for (_local9 in _local3[_local5]) {
if (_local8[_local9] != null){
_local8[_local9].text = _local3[_local5][_local9];
};
};
_local8.y = (_local5 * _local8.height);
onLineAdded(_local8, _local3[_local5]);
_local2.addChild(_local8);
_local5++;
};
_local6 = new ScrollBar(_local2, (_local2.width + 10), boardHeight, trackLinkage, faceLinkage);
_local7 = new MovieClip();
_local7.addChild(_local2);
_local7.addChild(_local6);
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_local7}));
}
protected function onLineAdded(_arg1:MovieClip, _arg2:Object):void{
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("remoting"));
}
public function makeLeaderboard(_arg1:int=20):void{
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("getHighScores", _arg1);
}
private function dispatchError(_arg1):void{
}
}
}//package tamba.game
Section 71
//SendToFriend (tamba.game.SendToFriend)
package tamba.game {
import flash.display.*;
import tamba.events.*;
import tamba.net.*;
public class SendToFriend extends Sprite {
private var language:String;// = "en"
private var senderName:String;
private var senderEmail:String;
private var errorMessages:Object;
private var remoting:Remoting;
private var country:String;// = "uk"
private var gatewayURL:String;
private var recipients:Array;
private var serviceName:String;
public function SendToFriend(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Array, _arg6:String, _arg7:String){
language = "en";
country = "uk";
errorMessages = {error_yourname:"Please enter your name", error_youremail:"Please enter a valid email address", error_recipients:"Please enter some recipients", error_friendname:"One of your recipients has a missing name", error_friendemail:"One of your recipients has an invalid email address", error_server:"Could not connect to the server"};
super();
gatewayURL = _arg1;
serviceName = _arg2;
senderName = _arg3;
senderEmail = _arg4;
recipients = _arg5;
language = _arg6;
country = _arg7;
}
private function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
private function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_arg1 = trim(_arg1);
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
if ((((_arg1.length <= 1)) || (!(_local2.test(_arg1))))){
return (false);
};
return (true);
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_arg1.params.data}));
}
public function send():void{
var _local1:uint;
var _local2:uint;
if (!validateName(senderName)){
dispatchError(new Error("error_yourname"));
return;
};
if (!validateEmail(senderEmail)){
dispatchError(new Error("error_youremail"));
return;
};
if (recipients.length <= 0){
dispatchError(new Error("error_recipients"));
return;
};
_local1 = recipients.length;
_local2 = 0;
while (_local2 < _local1) {
if (!validateName(recipients[_local2][0])){
dispatchError(new Error("error_friendname"));
return;
};
if (!validateEmail(recipients[_local2][1])){
dispatchError(new Error("error_friendemail"));
return;
};
_local2++;
};
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("sendToFriend", senderName, senderEmail, recipients, language, country);
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("error_server"));
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onError", {name:_arg1.message, message:errorMessages[_arg1.message]}));
}
private function validateName(_arg1:String=null):Boolean{
_arg1 = trim(_arg1);
if (_arg1.length <= 0){
return (false);
};
return (true);
}
}
}//package tamba.game
Section 72
//SubmitScore (tamba.game.SubmitScore)
package tamba.game {
import flash.display.*;
import tamba.events.*;
import com.adobe.crypto.*;
import tamba.net.*;
public class SubmitScore extends Sprite {
private var playerName:String;
private var playerScore:int;
private var playerEmail:String;
private var errorMessages:Object;
private var optin:int;// = 0
private var remoting:Remoting;
private var hashSalt:String;
private var gatewayURL:String;
private var serviceName:String;
public function SubmitScore(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:int, _arg7:uint=0){
optin = 0;
errorMessages = {error_yourname:"Please enter your name", error_youremail:"Please enter a valid email address", error_server:"Could not connect to the server"};
super();
gatewayURL = _arg1;
serviceName = _arg2;
hashSalt = _arg3;
playerName = _arg4;
playerEmail = _arg5;
playerScore = _arg6;
optin = _arg7;
}
private function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
private function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_arg1 = trim(_arg1);
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
if ((((_arg1.length <= 1)) || (!(_local2.test(_arg1))))){
return (false);
};
return (true);
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_arg1.params.data}));
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("error_server"));
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onError", {name:_arg1.message, message:errorMessages[_arg1.message]}));
}
public function submit():void{
var _local1:String;
if (!validateName(playerName)){
dispatchError(new Error("error_yourname"));
return;
};
if (!validateEmail(playerEmail)){
dispatchError(new Error("error_youremail"));
return;
};
_local1 = MD5.hash(((((((((("client=" + hashSalt) + "&username=") + playerName) + "&email=") + playerEmail) + "&score=") + playerScore) + "&optin=") + optin));
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("setHighScore", playerName, playerEmail, playerScore, optin, _local1);
}
private function validateName(_arg1:String=null):Boolean{
_arg1 = trim(_arg1);
if (_arg1.length <= 0){
return (false);
};
return (true);
}
}
}//package tamba.game
Section 73
//Audio (tamba.media.Audio)
package tamba.media {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class Audio extends Sprite {
private static var effectsList:Array = [];
private static var fadeStartVolume:Number = 0;
private static var _musicVolume:Number = 1;
private static var effectsChannel:SoundChannel;
private static var musicChannel:SoundChannel;
private static var fadeTimer:Timer;
private static var fadeTimerMs:int = 50;
private static var fadeEndVolume:Number = 0;
private static var fadeRate:Number = 0.05;
private static var _effectsVolume:Number = 1;
public static function get effectsVolume():Number{
return (_effectsVolume);
}
public static function fadeMusic(_arg1:Number=0, _arg2:Number=1, _arg3:Number=1):void{
_musicVolume = (fadeStartVolume = _arg1);
fadeEndVolume = _arg2;
fadeRate = (Math.abs((fadeEndVolume - fadeStartVolume)) / ((_arg3 / fadeTimerMs) * 1000));
fadeTimer = new Timer(fadeTimerMs);
fadeTimer.addEventListener("timer", onFadeTimer, false, 0, true);
fadeTimer.start();
}
public static function stopMusic():void{
if (musicChannel != null){
musicChannel.stop();
};
}
public static function playMusic(_arg1:String):void{
var linkage = _arg1;
try {
musicChannel = new (getDefinitionByName(linkage)).play(0, 999);
trace(musicVolume);
applyMusicVolume();
} catch(error:Error) {
trace("playMusic: Invalid linkage >", linkage);
};
}
private static function onFadeTimer(_arg1:Event):void{
if (fadeEndVolume > fadeStartVolume){
musicVolume = (musicVolume + fadeRate);
} else {
musicVolume = (musicVolume - fadeRate);
};
if ((((((fadeEndVolume > fadeStartVolume)) && ((_musicVolume > fadeEndVolume)))) || ((((fadeEndVolume <= fadeStartVolume)) && ((_musicVolume < fadeEndVolume)))))){
musicVolume = fadeEndVolume;
fadeTimer.stop();
};
applyMusicVolume();
}
public static function get musicVolume():Number{
return (_musicVolume);
}
public static function stopEffects():void{
var _local1:uint;
_local1 = effectsList.length;
while (_local1--) {
if (effectsList[_local1] != null){
effectsList[_local1].stop();
};
};
effectsList = [];
}
public static function playEffect(_arg1:String, _arg2:int=1):void{
var linkage = _arg1;
var repeat = _arg2;
try {
effectsChannel = new (getDefinitionByName(linkage)).play(0, repeat);
effectsList.push(effectsChannel);
applyEffectsVolume();
} catch(error:Error) {
trace("playEffect: Invalid linkage >", linkage);
};
}
private static function applyEffectsVolume():void{
var _local1:uint;
var _local2:SoundTransform;
_local1 = effectsList.length;
while (_local1--) {
if (effectsList[_local1] != null){
_local2 = effectsList[_local1].soundTransform;
_local2.volume = _effectsVolume;
effectsList[_local1].soundTransform = _local2;
};
};
}
private static function applyMusicVolume():void{
var _local1:SoundTransform;
if (musicChannel != null){
_local1 = musicChannel.soundTransform;
_local1.volume = _musicVolume;
musicChannel.soundTransform = _local1;
};
}
public static function set effectsVolume(_arg1:Number):void{
_effectsVolume = _arg1;
applyEffectsVolume();
}
public static function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
applyMusicVolume();
}
}
}//package tamba.media
Section 74
//GetURL (tamba.net.GetURL)
package tamba.net {
import flash.display.*;
import flash.net.*;
public class GetURL extends Sprite {
public static function goto(_arg1:String, _arg2:String=null):void{
var req:URLRequest;
var url = _arg1;
var window = _arg2;
req = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
trace("GetURL failed", e.message);
};
}
}
}//package tamba.net
Section 75
//Remoting (tamba.net.Remoting)
package tamba.net {
import flash.display.*;
import flash.events.*;
import tamba.events.*;
import flash.net.*;
public class Remoting extends Sprite {
private var callResponder:Responder;
private var netConnection:NetConnection;
private var functionName:String;
private var gatewayURL:String;
private var serviceName:String;
public function Remoting(_arg1:String, _arg2:String):void{
gatewayURL = _arg1;
serviceName = _arg2;
callResponder = new Responder(callHandler, errorHandler);
netConnection = new NetConnection();
netConnection.addEventListener(IOErrorEvent.IO_ERROR, onRemotingIOError, false, 0, true);
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onRemotingSecurityError, false, 0, true);
netConnection.addEventListener(NetStatusEvent.NET_STATUS, onRemotingNetStatusChange, false, 0, true);
}
private function callHandler(_arg1):void{
dispatchEvent(new EventWithParams("onRemotingSuccess", {method:functionName, data:_arg1}));
netConnection.close();
}
private function errorHandler(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
trace(_local2, "=", _arg1[_local2]);
};
dispatchEvent(new EventWithParams("onRemotingError", {name:_arg1.code, message:_arg1.description}));
netConnection.close();
}
public function call(_arg1:String, ... _args):void{
functionName = _arg1;
if (netConnection.connected){
netConnection.close();
};
netConnection.connect(gatewayURL);
_args.unshift(((serviceName + ".") + functionName), callResponder);
netConnection.call.apply(null, _args);
}
private function onRemotingSecurityError(_arg1:SecurityErrorEvent):void{
dispatchError(new Error(_arg1.text));
}
private function onRemotingNetStatusChange(_arg1:NetStatusEvent):void{
if (_arg1.info.level == "error"){
dispatchError(new Error(_arg1.info.code));
};
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onRemotingError", {name:_arg1.name, message:_arg1.message}));
}
private function onRemotingIOError(_arg1:IOErrorEvent):void{
dispatchError(new Error(_arg1.text));
}
}
}//package tamba.net
Section 76
//ScrollBar (tamba.ui.ScrollBar)
package tamba.ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
public class ScrollBar extends Sprite {
private var trackLinkage:String;
private var scrollContent;
private var maskHeight:int;
private var maskWidth:int;
private var contentInitY:int;
private var _scrollFace;
private var scrollMask:Sprite;
private var faceLinkage:String;
private var moveIncrement:Number;
private var _scrollTrack;
public function ScrollBar(_arg1, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:String=null):void{
scrollContent = _arg1;
maskWidth = _arg2;
maskHeight = _arg3;
trackLinkage = _arg4;
faceLinkage = _arg5;
contentInitY = scrollContent.y;
initChildren();
moveIncrement = ((scrollContent.height - scrollMask.height) / (_scrollTrack.height - _scrollFace.height));
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
private function onScrollFaceMouseMove(_arg1:MouseEvent=null):void{
scrollContent.y = ((-(Math.abs((contentInitY - (_scrollFace.y + _scrollTrack.y)))) * moveIncrement) + contentInitY);
}
private function initTrack():void{
if (trackLinkage == null){
_scrollTrack = new Sprite();
_scrollTrack.graphics.beginFill(0xAAAAAA);
_scrollTrack.graphics.drawRect(0, 0, 20, scrollMask.height);
_scrollTrack.graphics.endFill();
_scrollTrack.filters = [new BevelFilter(-0.25, 45)];
} else {
_scrollTrack = new (getDefinitionByName(trackLinkage));
};
_scrollTrack.x = (scrollMask.x + scrollMask.width);
_scrollTrack.y = scrollMask.y;
addChild(_scrollTrack);
}
private function initMask():void{
scrollMask = new Sprite();
scrollMask.x = scrollContent.x;
scrollMask.y = scrollContent.y;
scrollMask.graphics.beginFill(0);
scrollMask.graphics.drawRect(0, 0, maskWidth, maskHeight);
scrollMask.graphics.endFill();
scrollContent.mask = scrollMask;
addChild(scrollMask);
}
private function initChildren():void{
removeChildren();
initMask();
initTrack();
initFace();
}
private function onScrollTrackMouseDown(_arg1:MouseEvent){
_scrollFace.y = (_scrollTrack.mouseY - _scrollFace.height);
if (_scrollFace.y < 0){
_scrollFace.y = 0;
};
onScrollFaceMouseMove();
}
private function onAddedToStage(_arg1:Event):void{
_scrollFace.addEventListener(MouseEvent.MOUSE_DOWN, onScrollFaceMouseDown, false, 0, true);
}
private function initFace():void{
if (faceLinkage == null){
_scrollFace = new Sprite();
_scrollFace.graphics.beginFill(0xEEEEEE);
_scrollFace.graphics.drawRect(0, 0, 20, 20);
_scrollFace.graphics.endFill();
_scrollFace.filters = [new BevelFilter(0.25, 45)];
} else {
_scrollFace = new (getDefinitionByName(faceLinkage));
};
_scrollFace.buttonMode = true;
_scrollTrack.addChild(_scrollFace);
}
public function get scrollTrack(){
return (_scrollTrack);
}
private function removeChildren():void{
while (numChildren) {
removeChild(getChildAt(0));
};
}
public function get scrollFace(){
return (_scrollFace);
}
private function onScrollFaceMouseUp(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, onScrollFaceMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onScrollFaceMouseMove);
stopDrag();
}
private function onScrollFaceMouseDown(_arg1:MouseEvent){
stage.addEventListener(MouseEvent.MOUSE_UP, onScrollFaceMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onScrollFaceMouseMove);
_scrollFace.startDrag(false, new Rectangle(0, 0, 0, (_scrollTrack.height - _scrollFace.height)));
}
}
}//package tamba.ui
Section 77
//GlobalObject (tamba.utils.GlobalObject)
package tamba.utils {
public class GlobalObject {
private static var _vars:Object = {};
public static function set(_arg1:String, _arg2):void{
_vars[_arg1] = _arg2;
}
public static function get(_arg1:String){
if (_vars[_arg1] == null){
};
return (_vars[_arg1]);
}
}
}//package tamba.utils
Section 78
//Game (xmastree.Game)
package xmastree {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import flash.utils.*;
import flash.geom.*;
import tamba.events.*;
import com.greensock.easing.*;
import tamba.media.*;
public class Game extends MovieClip {
private var endConnection:int;// = -1
private var currentItem:MovieClip;
private var treeActive:Boolean;// = false
private var bg:MovieClip;
private var goButton:MovieClip;
private var levelInfo:Array;
private var itemList:Array;
private var maxLevel:int;// = 2
private var pipes:Array;
private var score:int;// = 0
private var itemHolder:MovieClip;
private var scoreBonus:int;// = 0
private var levelClip:MovieClip;
private var lastLevelClip:MovieClip;
private var scoreClip:MovieClip;
private var stageDims:Array;
private var pulseTimer:Timer;
private var lastOutput:String;// = ""
private var currentConnection:int;// = 0
private var connections:Array;
private var inventory:Object;
private var scoreBonusMax:int;// = 2000
private var scrollSpeed:int;// = 6
private var linkedConnections:int;// = 0
private var level:int;// = 0
private var ground:MovieClip;
private var gameActive:Boolean;// = false
private var tree:MovieClip;
private var pulseFrames:int;// = 67
private var pulseFreq:int;// = 500
private var items:Array;
private var scoreTimer:Timer;
private var scrollMaxX:int;// = 1500
public var scrollDistance:int;// = 0
public function Game():void{
score = 0;
scoreBonus = 0;
scoreBonusMax = 2000;
level = 0;
maxLevel = 2;
levelInfo = [{connections:3, scoreTimerRate:50, treeScale:0.75, inventory:["bulb", "solar", "fan", "turbine"]}, {connections:4, scoreTimerRate:100, treeScale:0.9, inventory:["transformer", "battery", "torch", "solar", "generator", "wire"]}, {connections:6, scoreTimerRate:200, treeScale:1, inventory:["bulb", "solar", "fan", "turbine", "circuit", "fuse", "boiler", "steam", "wire", "generator"]}];
inventory = {bulb:{input:"power", output:"light"}, solar:{input:"light", output:"power"}, fan:{input:"power", output:"wind"}, turbine:{input:"wind", output:"power"}, transformer:{input:"power", output:"energy"}, battery:{input:"energy", output:"power"}, torch:{input:"power", output:"light"}, generator:{input:"power", output:"power"}, wire:{input:"power", output:"power"}, circuit:{input:"safety", output:"power"}, fuse:{input:"power", output:"safety"}, boiler:{input:"power", output:"steam"}, steam:{input:"steam", output:"power"}};
lastOutput = "";
linkedConnections = 0;
endConnection = -1;
currentConnection = 0;
pipes = [];
connections = [];
pulseFreq = 500;
pulseFrames = 67;
treeActive = false;
stageDims = [600, 500];
scrollDistance = 0;
scrollSpeed = 6;
scrollMaxX = 1500;
gameActive = false;
super();
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage, false, 0, true);
}
private function checkConnection():void{
var _local1:MovieClip;
if (currentConnection < connections.length){
_local1 = connections[currentConnection];
if (currentConnection == 0){
autoScrollBG(((_local1.parent.x + _local1.x) - 300), 0.5, checkFirstAnswer);
} else {
autoScrollBG(((_local1.parent.x + _local1.x) - 300), 0.5, checkAnswer);
};
};
}
private function onItemMouseOut(_arg1:Event=null):void{
var _local2:*;
_local2 = _arg1.currentTarget;
TweenMax.to(_local2, 0.25, {glowFilter:{color:0xFFFFFF, blurX:5, blurY:5, alpha:0, strength:3, remove:true}});
TweenLite.to(bg.mc_desc, 1, {alpha:0});
}
private function initConnections():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:MovieClip;
pipes = [];
connections = [];
_local1 = levelInfo[level].connections;
_local2 = 197;
_local3 = 0;
while (_local3 < _local1) {
_local4 = new game_pipe();
if (_local3 == 0){
_local4.mc_point_0.visible = false;
} else {
if (_local3 == (_local1 - 1)){
_local4.mc_point_1.visible = false;
};
};
_local4.y = 296;
_local4.x = _local2;
_local2 = (_local2 + (_local4.width + 85));
ground.addChild(_local4);
pipes.push(_local4);
connections.push(_local4.mc_point_0);
connections.push(_local4.mc_point_1);
_local3++;
};
}
private function onItemMouseUp(_arg1:Event):void{
var _local2:*;
var _local3:int;
var _local4:int;
var _local5:MovieClip;
_local2 = _arg1.currentTarget;
stopDrag();
currentItem = null;
_local3 = pipes.length;
while (_local3--) {
_local4 = 0;
while (_local4 < 2) {
_local5 = pipes[_local3][("mc_point_" + _local4)];
if (((_local2.mc_inner.hitTestObject(_local5)) && (_local5.visible))){
addItemToPoint(_local2, _local5);
return;
};
_local4++;
};
};
resetItem(_local2);
if (allItemsFilled()){
showGoButton();
} else {
hideGoButton();
};
}
private function onTreeActivated():void{
var _local1:int;
var _local2:Array;
var _local3:*;
var _local4:Number;
Audio.playEffect("tree");
TweenLite.delayedCall(1.5, showMessage, [Language.phrase("well_done")]);
TweenLite.delayedCall(6, endLevel, [true]);
_local1 = tree.numChildren;
_local2 = [15540775, 12636993, 15540775, 9225793, 16225057, 15818023];
while (_local1--) {
_local3 = tree.getChildAt(_local1);
if (_local3.name == "mc_bauble"){
_local4 = _local2[Utils.randomInteger(0, 4)];
TweenMax.to(_local3.mc_body, 0.25, {delay:(_local1 * 0.1), glowFilter:{color:16763955, alpha:1, blurX:20, blurY:20}, colorMatrixFilter:{colorize:_local4, amount:0.8, brightness:1.8}, onComplete:onBaubleActive, onCompleteParams:[_local3.mc_body]});
};
};
awardPoints(scoreBonus);
}
private function addDraggedItemListeners(_arg1:MovieClip):void{
_arg1.addEventListener(MouseEvent.MOUSE_UP, onItemMouseUp);
}
private function showMessage(_arg1:String, _arg2:Number=2):void{
var clip:MovieClip;
var message = _arg1;
var dur = _arg2;
clip = new game_message();
clip.alpha = 0;
clip.x = 0;
clip.y = 200;
clip.text_message.htmlText = message;
levelClip.addChild(clip);
TweenLite.to(clip, 0.5, {alpha:1, onComplete:function (){
TweenLite.delayedCall(dur, hideMessage, [clip]);
}});
}
private function addStaticItemListeners(_arg1:MovieClip):void{
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, onItemMouseDown);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, onItemMouseOver);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, onItemMouseOut);
}
private function showGoButton():void{
goButton.alpha = 0;
goButton.visible = true;
TweenLite.to(goButton, 0.5, {alpha:1});
}
private function makePulse():void{
var _local1:MovieClip;
if (endConnection > -1){
_local1 = new game_pipe_pulse();
_local1.index = 0;
_local1.addEventListener(Event.ENTER_FRAME, onPulseFrame, false, 0, true);
pipes[0].addChildAt(_local1, 1);
};
}
private function hideMessage(_arg1:MovieClip):void{
var clip = _arg1;
TweenLite.to(clip, 0.5, {alpha:0, onComplete:function (){
clip.parent.removeChild(clip);
clip = null;
}});
}
private function checkFirstAnswer():void{
TweenLite.delayedCall(pulseFrames, checkAnswer, null, true);
}
private function endIntro():void{
TweenLite.delayedCall(0.5, autoScrollBG, [0, 3, startLevel]);
}
private function onBaubleActive(_arg1:MovieClip):void{
TweenMax.to(_arg1, 0.6, {glowFilter:{color:16763955, alpha:1, blurX:8, blurY:8}, repeat:-1, yoyo:true});
}
private function startLevel():void{
showMessage(Language.phrase("go"), 1);
gameActive = true;
scoreBonus = scoreBonusMax;
startScoreTimer();
bg.mc_arrow_right.visible = true;
activateItems(true);
}
private function onMouseLeave(_arg1:MouseEvent){
trace("bye mouse");
if (currentItem != null){
stopDrag();
resetItem(currentItem);
};
}
private function onScoreTimerUpdate(_arg1:Event):void{
scoreBonus = (scoreBonus - 7);
if (scoreBonus < 250){
scoreBonus = 250;
stopScoreTimer();
};
}
private function checkMouse():void{
if (!gameActive){
return;
};
if (mouseX > 510){
scrollBG(1);
} else {
if (mouseX < 90){
scrollBG(-1);
};
};
}
private function initItems():void{
var _local1:int;
var _local2:int;
var _local3:MovieClip;
items = [];
itemList = levelInfo[level].inventory.concat();
itemList = shuffleArray(itemList);
_local1 = itemList.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = new game_item();
_local3.gotoAndStop(itemList[_local2]);
_local3.name = itemList[_local2];
items.push(_local3);
_local2++;
};
stage.addEventListener(Event.RENDER, onItemRender, false, 0, true);
stage.invalidate();
}
private function activateItems(_arg1:Boolean):void{
var _local2:int;
_local2 = items.length;
while (_local2--) {
if (_arg1){
addStaticItemListeners(items[_local2]);
} else {
removeStaticItemListeners(items[_local2]);
};
items[_local2].buttonMode = _arg1;
};
}
private function onPulseFrame(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
if (_local2.currentFrame >= _local2.totalFrames){
_local2.index++;
if (_local2.index >= pipes.length){
activateTree();
};
if (_local2.index > endConnection){
removePulse(_local2);
} else {
pipes[_local2.index].addChildAt(_local2, 1);
_local2.gotoAndPlay(1);
};
};
}
private function autoScrollBG(_arg1:int, _arg2:Number=1, _arg3:Function=null):void{
TweenLite.to(this, _arg2, {scrollDistance:_arg1, onUpdate:scrollBG, onUpdateParams:[0, true], onComplete:_arg3});
}
private function removeDraggedItemListeners(_arg1:MovieClip):void{
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, onMouseLeave);
_arg1.removeEventListener(MouseEvent.MOUSE_UP, onItemMouseUp);
}
private function activateItem(_arg1:Boolean):void{
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
_local2 = connections[currentConnection];
_local3 = _local2.item;
_local4 = new game_verdict();
_local4.x = (_local2.parent.x + _local2.x);
_local4.y = ((_local2.parent.y + _local2.y) - 150);
_local4.scaleX = (_local4.scaleY = 0);
if (_arg1){
if (_local3 != null){
_local3.mc_inner.gotoAndPlay("animate");
};
awardPoints(150);
_local4.gotoAndStop("correct");
Audio.playEffect("correct");
currentConnection++;
TweenLite.delayedCall(2, checkConnection);
} else {
if (_local3 != null){
TweenMax.to(_local3, 1, {colorMatrixFilter:{saturation:0, brightness:0.2}});
};
_local4.gotoAndStop("wrong");
Audio.playEffect("wrong");
TweenLite.delayedCall(2, showMessage, [Language.phrase("game_over"), 2]);
TweenLite.delayedCall(6, endLevel, [false]);
};
TweenLite.to(_local4, 0.3, {scaleX:1, scaleY:1, ease:Back.easeOut});
ground.addChild(_local4);
}
private function onFrameEntered(_arg1:Event):void{
checkMouse();
}
private function stopPulseTimer():void{
if (pulseTimer != null){
pulseTimer.removeEventListener("timer", onPulseTimerUpdate);
pulseTimer.stop();
pulseTimer = null;
};
}
private function initTree():void{
var _local1:MovieClip;
var _local2:int;
treeActive = false;
_local1 = pipes[(pipes.length - 1)];
tree = new game_tree();
tree.y = 305;
tree.scaleX = (tree.scaleY = levelInfo[level].treeScale);
tree.x = ((_local1.x + _local1.width) - 20);
scrollMaxX = (tree.x - 300);
_local2 = 1490;
if (scrollMaxX > _local2){
scrollMaxX = _local2;
};
ground.addChild(tree);
}
private function shuffleArray(_arg1:Array):Array{
var _local2:Array;
_local2 = [];
while (_arg1.length > 0) {
_local2.push(_arg1.splice(Math.round((Math.random() * (_arg1.length - 1))), 1)[0]);
};
return (_local2);
}
private function allItemsFilled():Boolean{
var _local1:int;
_local1 = (connections.length - 1);
while (_local1--) {
if ((((connections[_local1].item == null)) && (!((_local1 == 0))))){
return (false);
};
};
return (true);
}
private function checkAnswer():void{
var _local1:MovieClip;
var _local2:String;
var _local3:String;
if ((currentConnection % 2) != 0){
endConnection++;
};
_local1 = connections[currentConnection].item;
if (currentConnection < (connections.length - 1)){
_local2 = inventory[_local1.name].input;
_local3 = lastOutput;
trace("Required:", _local2, " Got:", _local3);
if (_local2 == _local3){
TweenLite.delayedCall(pulseFrames, activateItem, [true], true);
} else {
TweenLite.delayedCall(pulseFrames, activateItem, [false], true);
};
lastOutput = inventory[_local1.name].output;
};
}
private function onRemovedFromStage(_arg1:Event):void{
stopPulseTimer();
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
stage.removeEventListener(Event.ENTER_FRAME, onFrameEntered);
}
private function onPulseTimerUpdate(_arg1:Event):void{
makePulse();
}
private function resetItem(_arg1:MovieClip):void{
removeDraggedItemListeners(_arg1);
_arg1.filters = [];
_arg1.scaleX = (_arg1.scaleY = itemHolder.antiScale);
_arg1.x = (itemHolder.mouseX - (_arg1.width * 0.5));
_arg1.y = (itemHolder.mouseY - (_arg1.height * 0.5));
itemHolder.addChild(_arg1);
TweenLite.to(_arg1, 0.25, {x:_arg1.initX, y:_arg1.initY, scaleX:1, scaleY:1, onComplete:addStaticItemListeners, onCompleteParams:[_arg1]});
currentItem = null;
}
private function initGame():void{
levelClip = new MovieClip();
endConnection = -1;
scrollDistance = 0;
goButton = new game_button();
goButton.text_label.htmlText = Language.phrase("go");
goButton.x = ((600 - goButton.width) * 0.5);
goButton.y = 120;
goButton.visible = false;
TweenMax.to(goButton, 0.5, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:12, blurY:12, strength:2}, repeat:-1, yoyo:true});
Utils.addButtonListener(goButton, onGoClicked);
levelClip.addChild(goButton);
initBG();
initConnections();
initTree();
initItems();
TweenLite.delayedCall(2, showIntro);
scoreClip = new game_score();
scoreClip.x = 470;
scoreClip.y = 120;
scoreClip.text_score.htmlText = ((Language.phrase("score", false) + ": ") + score);
levelClip.addChildAt(scoreClip, 1);
addChildAt(levelClip, 0);
}
private function startPulseTimer():void{
pulseTimer = new Timer(pulseFreq);
pulseTimer.addEventListener("timer", onPulseTimerUpdate, false, 0, true);
pulseTimer.start();
}
private function activateTree():void{
if (!treeActive){
gameActive = false;
treeActive = true;
onTreeActivated();
};
}
private function onGoClicked(_arg1:MouseEvent):void{
if (gameActive){
lastOutput = "power";
stopScoreTimer();
gameActive = false;
activateItems(false);
currentConnection = 1;
checkConnection();
hideGoButton();
};
}
private function initBG():void{
bg = new game_bg();
bg.mc_arrow_left.visible = false;
bg.mc_arrow_right.visible = false;
ground = bg.mc_ground;
TweenMax.to(bg.mc_arrow_left, 0.5, {alpha:0.25, repeat:-1, yoyo:true});
TweenMax.to(bg.mc_arrow_right, 0.5, {alpha:0.25, repeat:-1, yoyo:true});
levelClip.addChildAt(bg, 0);
}
private function endLevel(_arg1:Boolean):void{
var gameOver:Boolean;
var success = _arg1;
stopScoreTimer();
gameOver = false;
if (success){
level++;
if (level > maxLevel){
gameOver = true;
};
} else {
gameOver = true;
};
if (gameOver){
dispatchEvent(new EventWithParams("onComplete", {success:success, score:score}));
};
lastLevelClip = levelClip;
TweenLite.to(lastLevelClip, 1, {alpha:0, onComplete:function (){
lastLevelClip.parent.removeChild(lastLevelClip);
}});
if (((success) && (!(gameOver)))){
initGame();
};
}
private function showIntro():void{
showMessage(Language.phrase(("level_" + (level + 1))), 4);
autoScrollBG((tree.x - 300), 3, endIntro);
}
private function stopScoreTimer():void{
if (scoreTimer != null){
scoreTimer.removeEventListener("timer", onScoreTimerUpdate);
scoreTimer.stop();
scoreTimer = null;
};
}
private function removeStaticItemListeners(_arg1:MovieClip):void{
_arg1.removeEventListener(MouseEvent.MOUSE_DOWN, onItemMouseDown);
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, onItemMouseOver);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, onItemMouseOut);
}
private function removePulse(_arg1:MovieClip):void{
_arg1.removeEventListener(Event.ENTER_FRAME, onPulseFrame);
_arg1.parent.removeChild(_arg1);
_arg1 = null;
}
private function hideGoButton():void{
TweenLite.to(goButton, 0.5, {alpha:0, onComplete:function (){
goButton.visible = false;
}});
}
private function awardPoints(_arg1:int):void{
score = (score + _arg1);
scoreClip.text_score.htmlText = ((Language.phrase("score", false) + ": ") + score);
trace("Score:", score);
}
private function onItemMouseDown(_arg1:Event):void{
var item:*;
var point:MovieClip;
var event = _arg1;
item = event.currentTarget;
currentItem = item;
item.startDrag(false);
item.filters = [];
if (item.parent == itemHolder){
item.scaleX = (item.scaleY = itemHolder.scaleX);
levelClip.addChild(item);
} else {
if (item.parent == ground){
point = item.point;
point.item = null;
item.point = null;
item.x = (item.x - scrollDistance);
levelClip.addChild(item);
};
};
TweenLite.to(item, 0.25, {scaleX:1, scaleY:1, onUpdate:function (){
item.x = (stage.mouseX - (item.width * 0.5));
item.y = (stage.mouseY - (item.height * 0.5));
}, onComplete:function (){
item.addEventListener(MouseEvent.MOUSE_OUT, onMouseLeave);
}});
removeStaticItemListeners(item);
addDraggedItemListeners(item);
}
private function onItemMouseOver(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
TweenMax.to(_local2, 0.25, {glowFilter:{color:0xFFFFFF, blurX:5, blurY:5, alpha:1, strength:3}});
bg.mc_desc.text_desc.htmlText = Language.phrase(_local2.name);
TweenLite.to(bg.mc_desc, 1, {alpha:1});
}
private function onAddedToStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
stage.addEventListener(Event.ENTER_FRAME, onFrameEntered, false, 0, true);
initGame();
startPulseTimer();
}
private function onItemRender(_arg1:Event=null):void{
var j:int;
var xPos:int;
var i:int;
var maxWidth:int;
var antiScale:Number;
var item:MovieClip;
var scale:Number;
var event = _arg1;
try {
itemHolder = new MovieClip();
j = items.length;
xPos = 0;
i = 0;
while (i < j) {
item = items[i];
item.mc_inner.gotoAndStop(1);
item.mc_bg.width = (item.mc_inner.width * 1.2);
item.mc_bg.height = (item.mc_inner.height * 1.5);
item.mc_bg.x = (item.mc_inner.width * 0.5);
item.mc_bg.y = (item.mc_inner.height * 0.5);
item.mc_bg.alpha = 0;
itemHolder.addChild(item);
item.x = (item.initX = xPos);
item.y = (item.initY = -(item.mc_inner.height));
xPos = (xPos + (item.width + 30));
if (level == 0){
xPos = (xPos + 30);
};
i = (i + 1);
};
maxWidth = 450;
antiScale = 1;
if (itemHolder.width > maxWidth){
scale = (maxWidth / itemHolder.width);
antiScale = (itemHolder.width / maxWidth);
itemHolder.scaleX = (itemHolder.scaleY = scale);
};
itemHolder.antiScale = antiScale;
itemHolder.y = 440;
itemHolder.x = ((stageDims[0] - itemHolder.width) * 0.5);
levelClip.addChild(itemHolder);
stage.removeEventListener(Event.RENDER, onItemRender);
} catch(e:Error) {
trace("Failed to update render");
onItemRender();
};
}
private function scrollBG(_arg1:int=1, _arg2:Boolean=false):void{
if (!_arg2){
scrollDistance = (scrollDistance + (scrollSpeed * _arg1));
bg.mc_arrow_left.visible = true;
bg.mc_arrow_right.visible = true;
} else {
bg.mc_arrow_left.visible = false;
bg.mc_arrow_right.visible = false;
};
if (scrollDistance <= 0){
scrollDistance = 0;
bg.mc_arrow_left.visible = false;
} else {
if (scrollDistance >= scrollMaxX){
scrollDistance = scrollMaxX;
bg.mc_arrow_right.visible = false;
};
};
bg.mc_ground.scrollRect = new Rectangle(scrollDistance, 0, stageDims[0], stageDims[1]);
bg.mc_snow.scrollRect = new Rectangle((scrollDistance * 0.25), 0, stageDims[0], stageDims[1]);
bg.mc_sky.scrollRect = new Rectangle((scrollDistance * 0.1), 0, stageDims[0], stageDims[1]);
}
private function startScoreTimer():void{
scoreTimer = new Timer(levelInfo[level].scoreTimerRate);
scoreTimer.addEventListener("timer", onScoreTimerUpdate, false, 0, true);
scoreTimer.start();
}
private function addItemToPoint(_arg1:MovieClip, _arg2:MovieClip):void{
var _local3:Number;
var _local4:Number;
var _local5:MovieClip;
_local3 = (_arg2.parent.x + _arg2.x);
_local4 = (_arg2.parent.y + _arg2.y);
_arg1.filters = [];
_local5 = _arg1.mc_inner.mc_attach;
if (_local5 != null){
_local3 = (_local3 - _local5.x);
_local4 = (_local4 - _local5.y);
};
if (_arg1.parent != ground){
_arg1.x = (_arg1.x + scrollDistance);
ground.addChild(_arg1);
};
Audio.playEffect("connect");
TweenLite.to(_arg1, 0.2, {x:_local3, y:_local4, onComplete:addStaticItemListeners, onCompleteParams:[_arg1]});
removeDraggedItemListeners(_arg1);
if (_arg2.item != null){
resetItem(_arg2.item);
};
_arg2.item = _arg1;
_arg1.point = _arg2;
if (allItemsFilled()){
showGoButton();
} else {
hideGoButton();
};
}
}
}//package xmastree
Section 79
//HighScores (xmastree.HighScores)
package xmastree {
import flash.display.*;
import tamba.game.*;
public class HighScores extends Leaderboard {
public function HighScores(_arg1:String, _arg2:String, _arg3:uint, _arg4:String, _arg5:String, _arg6:String){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
override protected function onLineAdded(_arg1:MovieClip, _arg2:Object):void{
_arg1.points.text = _arg2.points;
}
}
}//package xmastree
Section 80
//Language (xmastree.Language)
package xmastree {
public class Language {
private static var _lang:String = "eng";
private static var _countries:Object = {uk:"en", ie:"en", za:"en", au:"en", nz:"en", sg:"en", nl:"nl", fr:"fr", be:"nl", de:"de", es:"es", at:"at", pt:"pt", dk:"dk", no:"no", se:"se", it:"it", ch:"de"};
private static var _country:String = "uk";
private static var phrases:Object = {en:{tamba:"Game by TAMBA", send_friend:"Send to a friend", submit_score:"Submit your score", your_name:"Your name", your_email:"Your email", friend_name:"Friend's name", friend_email:"Friend's email", submit:"Submit", back:"Back", error_yourname:"Please enter your name", error_youremail:"Please enter a valid email address", error_recipients:"Please enter some recipients", error_friendname:"One of your recipients has a missing name", error_friendemail:"One of your recipients has an invalid email address", email_success:"Email sent! Would you like to send another?", error_server:"Could not connect to the server", how_to_play:"How to play", play:"Play", play_now:"Play now", instructions:"Instructions", view_leaderboard:"View leaderboard", hud_time:"Time remaining", loading:"Loading", click_flag:"Click flag to play", sound_on:"Turn sound on", sound_off:"Turn sound off", leaderboard:"Leaderboard", name:"Name", score:"Score", start:"Start", go:"Go!", please_wait:"Please wait", points:"Points", leaderboard_position:"Position in leaderboard", game_over:"Game Over", congratulations:"Congratulations! You scored a total of", main_menu:"Main menu", time_up:"Time Up!", submit_score_prompt:"Submit your score to the leaderboard!", terms_apply:"* Terms and conditions apply", well_done:"Well done!", congratulations:"Congratulations", packing_list:"Packing list", stock_list:"Stock list", game_title_jp:"Jingle Parts", game_title_rs:"RS Christmas Tree", bad_luck:"Bad luck", instruction_text_jp:"Father Christmas is doing some part time work in the lead up to Christmas. Only problem is he needs to get all the orders packed away before he can go to Lapland and do his real job. Please use the cursor keys to control Father Christmas and guide him.", instruction_text_ct:"The lovely people at RS want to put some Christmas trees up outside their office. Only problem is they can't work out how to get the power to the trees. Can you work out the right combinations of RS products that will get the power from the RS office over to the trees?", your_details:"Your Details", friend_details:"Friends' Details", checklist:"Checklist", lives:"Lives", level_1:"Level 1", level_2:"Level 2", level_3:"Level 3", instruction_text_jp_2:"Use the space bar to pick up the required objects and deposit them in the collection box.", skip:"Skip", bulb:"Light Bulb", solar:"Solar Panel", fan:"Fan", turbine:"Wind Turbine", transformer:"Transformer", battery:"Battery", torch:"Torch", generator:"Generator", wire:"Wire", circuit:"Circuit Board", fuse:"Fuse", boiler:"Boiler", steam:"Steam Turbine"}, nl:{tamba:"Viraal spel door TAMBA", send_friend:"Naar een vriend sturen", submit_score:"Uw score insturen", your_name:"Uw naam", your_email:"Uw e-mailadres", friend_name:"Naam van uw vriend", friend_email:"E-mailadres van uw vriend", submit:"Versturen", back:"Terug", error_yourname:"Voer alstublieft uw naam in", error_youremail:"Voert u alstublieft een geldig e-mailadres in", error_recipients:"Voert u alstublieft enkele geadresseerden in", error_friendname:"De naam van één van uw geadresseerden ontbreekt", error_friendemail:"Het e-mailadres van één van uw geadresseerden is ongeldig", email_success:"E-mail verzonden! Wilt u nog een e-mail versturen?", error_server:"Kan geen verbinding maken met de server", how_to_play:"Spelregels", play:"Spelen", play_now:"Nu spelen", instructions:"Instructies", view_leaderboard:"Scorebord bekijken", hud_time:"Resterende tijd", loading:"Bezig met laden", click_flag:"Klik op de vlag om te spelen", sound_on:"Geluid aanzetten", sound_off:"Geluid uitzetten", leaderboard:"Scorebord ", name:"Naam", score:"Score", start:"Start", go:"Begin", please_wait:"Even geduld…", points:"Punten", leaderboard_position:"Plaats op het scorebord", game_over:"Spel afgelopen", congratulations:"Gefeliciteerd! U hebt een totale score van ", main_menu:"Hoofdmenu", time_up:"Tijd verstreken", submit_score_prompt:"Voeg uw score toe aan het scorebord!", terms_apply:"* Algemene voorwaarden zijn van toepassing", well_done:"Goed gedaan", congratulations:"Gefeliciteerd", packing_list:"Paklijst", stock_list:"Voorraadlijst", game_title_jp:"Jingle-spel", game_title_rs:"RS-kerstboom", bad_luck:"Pech", instruction_text_jp:"De kerstman heeft een parttime-baan bij RS. Het enige probleem is dat hij alle bestellingen moet inpakken voordat hij naar Lapland kan gaan om met zijn echte werk te beginnen. Gebruik de pijltjestoetsen om de kerstman te besturen en hem te vertellen wat hij moet doen.. ", instruction_text_ct:"De kerstman wil een paar kerstbomen opzetten. Het enige probleem is dat hij er niet uitkomt hoe hij de elektriciteit bij de bomen kan krijgen. Kunt u de juiste combinatie van RS-producten vinden, die ervoor zorgt dat de bomen worden aangesloten op de elektriciteit van het RS-kantoor?", lives:"Levens", level_1:"Level 1", level_2:"Level 2", level_3:"Level 3", get_collecting:"Begin met verzamelen", instruction_text_jp_2:"Gebruik de spatietoets om de vereiste producten op te pakken en in de mand te plaatsen.", skip:"Overslaan", time_bonus:"Tijd bonus", bulb:"Gloeilamp", solar:"Zonnepaneel", fan:"Ventilator", turbine:"Windturbine", transformer:"Transformator", battery:"Batterij", torch:"Zaklamp", generator:"Generator", wire:"Kabel", circuit:"Printplaat", fuse:"Zekering", boiler:"Ketel", steam:"Stoomturbine"}, fr:{tamba:"Produit par TAMBA", send_friend:"Envoyer à un(e) ami(e)", submit_score:"Ajoutez votre score au classement !", your_name:"Votre nom", your_email:"Votre adresse e-mail", friend_name:"Nom de votre ami(e)", friend_email:"E-mail de votre ami(e)", submit:"Envoyer", back:"Retour", error_yourname:"Entrez votre nom SVP", error_youremail:"Entrez une adresse e-mail valide SVP", error_recipients:"Entrez le nom d'un destinataire SVP", error_friendname:"L’un des destinataires n’a pas de nom", error_friendemail:"L’adresse e-mail d’un(e) de vos ami(e)s n’est pas valide", email_success:"L’e-mail a été envoyé ! ", error_server:"Connexion au serveur impossible", how_to_play:"Règles du jeu", play:"Jouer", play_now:"Jouer maintenant", instructions:"Instructions", view_leaderboard:"Afficher le classement", hud_time:"Temps restant", loading:"Chargement...", click_flag:"Cliquez sur le drapeau pour jouer", sound_on:"Activer le son", sound_off:"Désactiver le son", leaderboard:"Classement", name:"Nom", score:"Score", start:"Démarrer", go:"C'est parti !", please_wait:"Veuillez patienter", points:"Points", leaderboard_position:"Position dans le classement", game_over:"Perdu", congratulations:"Félicitations. Vous avez obtenu au total", main_menu:"Menu principal", time_up:"Temps écoulé", submit_score_prompt:"Ajoutez votre score au classement !", terms_apply:"* Sous réserve des conditions d’utilisation", well_done:"Bravo !", congratulations:"Félicitations", packing_list:"Objets à trouver", stock_list:"Liste des références", game_title_jp:"Jingle Parts", game_title_rs:"Arbre de Noël RS", bad_luck:"Dommage !", instruction_text_jp:"Aidez le Père Noël à emballer le plus de commandes que possible. Utilisez les touches fléchées pour le guider dans le magasin et la barre d'espace pour prendre/déposer les objets.", instruction_text_ct:"Acheminez le courant électrique jusqu’au sapin pour allumer la guirlande. Pour cela, il vous suffit de placer les produits dans le bon ordre. Utilisez votre souris !", lives:"Parties", level_1:"NIVEAU 1", level_2:"NIVEAU 2", level_3:"NIVEAU 3", instruction_text_jp_2:"Pour accélérer, ramassez les sucres d'orge !", skip:"Passer l'intro", bulb:"Ampoule", solar:"panneau solaire", fan:"ventilateur", turbine:"éolienne", transformer:"transformateur", battery:"Pile", torch:"lampe de poche", generator:"générateur", wire:"fil ", circuit:"circuit imprimé", fuse:"fusible", boiler:"système de chauffe", steam:"turbine à vapeur"}, de:{tamba:"Online-Spiel von TAMBA", send_friend:"An einen Freund senden", submit_score:"Ergebnis einsenden", your_name:"Ihr Name", your_email:"Ihre E-Mail-Adresse", friend_name:"Name Ihres Freundes", friend_email:"E-Mail-Adresse Ihres Freundes", submit:"Absenden", back:"Zurück", error_yourname:"Bitte geben Sie Ihren Namen ein", error_youremail:"Bitte geben Sie eine gültige E-Mail-Adresse ein", error_recipients:"Bitte geben Sie einige Empfänger ein", error_friendname:"Bei einem Ihrer Empfänger fehlt der Name", error_friendemail:"Einer Ihrer Empfänger hat eine ungültige E-Mail-Adresse", email_success:"E-Mail gesendet! Möchten Sie noch eine E-Mail senden?", error_server:"Verbindung zum Server fehlgeschlagen", how_to_play:"Spielregeln", play:"Spielen", play_now:"Jetzt spielen", instructions:"Anleitungen", view_leaderboard:"Rangliste anzeigen", hud_time:"Verbleibende Zeit", loading:"Laden...", click_flag:"Bitte die Fahne klicken, um zu spielen", sound_on:"Sound ein", sound_off:"Sound aus", leaderboard:"Rangliste", name:"Name", score:"Ergebnis", start:"Start", go:"Los!", please_wait:"Bitte warten", points:"Punkte", leaderboard_position:"Position auf der Rangliste", game_over:"Game Over", congratulations:"Herzlichen Glückwunsch! Ihr Ergebnis ist", main_menu:"Hauptmenü", time_up:"Zeit abgelaufen!", submit_score_prompt:"Senden Die Ihr Ergebnis an die Rangliste!", terms_apply:"*Nutzungsbedingungen gelten", well_done:"Gut gemacht!", congratulations:"Herzlichen Glückwunsch", packing_list:"Packliste", stock_list:"Bestandsliste", game_title_jp:"Jingle-Stücke", game_title_rs:"RS-Weihnachtsbaum", bad_luck:"Pech gehabt", instruction_text_jp:"Der Weihnachtsmann hat kurz vor den Festtagen noch einen Teilzeitjob angenommen. Sein Problem ist jedoch, dass er alle diese Aufträge verpacken muss, bevor er sich in Lappland seinen Geschenken widmen kann. Verwenden Sie die Cursortasten, um den Weihnachtsmann zu steuern. ", instruction_text_ct:"Die lieben Leute von RS möchten vor ihrem Büro ein paar Weihnachtsbäume aufstellen. Das einzige Problem ist, dass sie nicht wissen, wie der Strom zu den Bäumen gelangen kann. Können Sie die richtige Kombination von RS-Produkten finden, mit der der Strom vom RS-Büro hinüber zu den Bäumen geleitet wird?", lives:"Leben", level_1:"Level 1", level_2:"Level 2", level_3:"Level 3", get_collecting:"Sammeln Sie", instruction_text_jp_2:"Benutzen Sie die Leertaste um die benötigten Objekte zu holen und sie in der Box zu sammeln.", skip:"Überspringen", bulb:"Glühbirne", solar:"Solarpanel", fan:"Lüfter", turbine:"Windrad", transformer:"Wandler", battery:"Batterie", torch:"Taschenlampe", generator:"Generator", wire:"Kabel", circuit:"Leiterplatte", fuse:"Sicherung", boiler:"Boiler", steam:"Dampfturbine"}, es:{tamba:"Juego viral por TAMBA", send_friend:"Enviar a un amigo", submit_score:"Enviar su puntuación", your_name:"Nombre", your_email:"Su e-mail", friend_name:"Nombre de su amigo", friend_email:"Email de su amigo", submit:"Enviar", back:"Volver", error_yourname:"Introduzca su nombre", error_youremail:"Introduzca una dirección de email válida", error_recipients:"Introduzca algunos destinatarios", error_friendname:"A uno de sus destinatarios le falta el nombre", error_friendemail:"A uno de sus destinatarios le falta la dirección de email", email_success:"<font face=\"Calibri\">¡</font>Email enviado<font face=\"Calibri\">!</font> ¿Quiere mandar otro?", error_server:"No pudimos conectar con el servidor", how_to_play:"Cómo jugar", play:"Jugar", play_now:"Jugar ahora", instructions:"Instrucciones", view_leaderboard:"Ver la clasificación", hud_time:"Tiempo restante", loading:"Cargando", click_flag:"Pulse en la bandera para jugar", sound_on:"Activar el sonido", sound_off:"Desactivar el sonido", leaderboard:"PUNTUACIÓN", name:"Nombre", score:"Puntuación", start:"Iniciar", go:"<font face=\"Calibri\">¡</font>ADELANTE<font face=\"Calibri\">!</font>", please_wait:"Por favor espere", points:"Puntos", leaderboard_position:"Posición en la clasificación", game_over:"Fin del juego", congratulations:"¡Enhorabuena! Usted logró una puntuación total de", main_menu:"Menú principal", time_up:"<font face=\"Calibri\">¡</font>Se ha acabado el tiempo<font face=\"Calibri\">!</font>", submit_score_prompt:"¡Envía su puntuación a la tabla de mejores puntuaciones!", terms_apply:"* Términos y condiciones aplicables", well_done:"<font face=\"Calibri\">¡</font>MUY BIEN<font face=\"Calibri\">!</font>", congratulations:"Enhorabuena", packing_list:"Listo para empaquetar", stock_list:"Pedido", game_title_jp:"Jingle Parts", game_title_rs:"Árbol de Navidad de RS", bad_luck:"Mala suerte", instruction_text_jp:"Papá Noel está haciendo un poco de trabajo extra antes de Navidad. El único problema es que necesita empaquetar todos los pedidos antes de ir a Laponia para hacer su verdadero trabajo. Utilice las teclas del cursor para controlar a Papá Noel y guiarlo. ", instruction_text_ct:"La simpática gente de RS quiere poner algunos árboles de Navidad en su oficina. El único problema es que no saben como llevar la electricidad hasta los árboles. ¿Puede adivinar cuál es la combinación correcta de productos RS que llevará la electricidad desde la oficina de RS hasta los árboles?", lives:"Vidas", level_1:"Nivel 1", level_2:"Nivel 2", level_3:"Nivel 3", get_collecting:"Obtenga recogiendo", instruction_text_jp_2:"Utilice la barra espaciadora para recoger los objetos requeridos y depositarlos en la caja.", skip:"Omitir", time_bonus:"Bonificación de tiempo", bulb:"Lámpara", solar:"Panel solar", fan:"Ventilador", turbine:"Turbina eólica", transformer:"Transformador", battery:"Batería", torch:"Linterna", generator:"Generador", wire:"Cable", circuit:"Placa de circuito", fuse:"Fusible", boiler:"Calentador", steam:"Turbina a vapor"}, at:{tamba:"Virales Spiel von TAMBA", send_friend:"An einen Freund senden", submit_score:"Ergebnis senden", your_name:"Ihr Name", your_email:"E-Mail Adresse", friend_name:"Name Ihres Freundes", friend_email:"E-Mail Adresse Ihres Freundes", submit:"Absenden", back:"Zurück", error_yourname:"Bitte geben Sie Ihren Namen ein", error_youremail:"Bitte geben Sie eine gültige E-Mail Adresse ein", error_recipients:"Bitte geben Sie die Namen Ihrer Freunde ein", error_friendname:"Bei einem Ihrer Freunde fehlt der Name", error_friendemail:"Einer Ihrer Freunde hat eine ungültige E-Mail Adresse", email_success:"E-Mail gesendet! Möchten Sie noch mehr senden?", error_server:"Verbindung zum Server fehlgeschlagen", how_to_play:"Spielregeln", play:"Spielen", play_now:"Jetzt spielen", instructions:"Anleitungen", view_leaderboard:"Rangliste anzeigen", hud_time:"Verbleibende Zeit", loading:"Laden...", click_flag:"Klicken Sie auf die Fahne, um zu spielen", sound_on:"Sound ein", sound_off:"Sound aus", leaderboard:"Rangliste", name:"Name", score:"Ergebnis", start:"Start", go:"Los!", please_wait:"Bitte warten", points:"Punkte", leaderboard_position:"Position auf der Rangliste", game_over:"Game Over", congratulations:"Herzlichen Glückwunsch! Ihr Ergebnis lautet", main_menu:"Hauptmenü", time_up:"Zeit abgelaufen!", submit_score_prompt:"Senden Sie Ihr Ergebnis an die Rangliste!", terms_apply:"*Teilnahmebedingungen", well_done:"Gut gemacht!", congratulations:"Herzlichen Glückwunsch", packing_list:"Packliste", stock_list:"Bestandsliste", game_title_jp:"Jingle Parts", game_title_rs:"RS-Weihnachtsbaum", bad_luck:"Pech gehabt", instruction_text_jp:"Der Weihnachtsmann hat kurz vor den Festtagen noch einen Teilzeitjob angenommen. Sein Problem ist jedoch, dass er noch alle Bestellungen verpacken muss, bevor er sich am Nordpol seinen Geschenken widmen kann. Verwenden Sie die Cursortasten, um den Weihnachtsmann zu steuern. ", instruction_text_ct:"Wir von RS möchten vor unserem Büro ein paar Weihnachtsbäume aufstellen. Helfen Sie uns und finden Sie dazu die richtige Kombination von RS-Produkten heraus, um den Strom vom RS-Büro zu den Bäumen zu leiten.", lives:"Leben", level_1:"Level 1", level_2:"Level 2", level_3:"Level 3", get_collecting:"Einsammeln", instruction_text_jp_2:"Drücken Sie die Leertaste um das benötigte Objekt aufzuheben und es im Paket abzulegen.", skip:"Überspringen", time_bonus:"Zeitguthaben", bulb:"Glühbirne", solar:"Solarmodul", fan:"Ventilator", turbine:"Windgenerator", transformer:"Transformator", battery:"Batterie", torch:"Taschenlampe", generator:"Stromerzeuger", wire:"Kabel", circuit:"Leiterplatte", fuse:"Sicherung", boiler:"Heizkessel", steam:"Dampfturbine"}, pt:{tamba:"Jogo Viral by TAMBA", send_friend:"Enviar a um amigo", submit_score:"Enviar pontuação", your_name:"Nome", your_email:"Email", friend_name:"Nome do amigo", friend_email:"Email do amigo", submit:"Enviar", back:"Voltar", error_yourname:"Introduza o seu nome", error_youremail:"Introduza um email válido", error_recipients:"Introduza alguns destinatários", error_friendname:"Falta um nome de um dos destinatários", error_friendemail:"Um dos destinatários possui email inválido", email_success:"Email enviado! Deseja enviar outro?", error_server:"Impossível conectar ao servidor", how_to_play:"Como jogar", play:"Jogar", play_now:"Jogar agora", instructions:"Instruções", view_leaderboard:"Ver ranking", hud_time:"Tempo restante", loading:"Carregando", click_flag:"Clique na bandeira para jogar", sound_on:"Ligar o som", sound_off:"Desligar o som", leaderboard:"Ranking", name:"Nome", score:"Pontuação", start:"Iniciar", go:"Avançar!", please_wait:"Por favor aguarde", points:"Pontos", leaderboard_position:"Lugar no ranking", game_over:"Jogo concluído", congratulations:"Parabéns! Você obteve um total de ", main_menu:"Menu principal", time_up:"Duração!", submit_score_prompt:"Envie a sua pontuação ao ranking! ", terms_apply:"* Termos e condições aplicáveis", well_done:"Muito bem!", congratulations:"Parabéns", packing_list:"Encomenda", stock_list:"Lista de estoques", game_title_jp:"Jingle Parts", game_title_rs:"Árvore de Natal RS ", bad_luck:"Má sorte", instruction_text_jp:"O Papai Noel está a fazer alguns trabalhos extras antes do Natal. O único problema é que precisa de ter todas as encomendas empacotadas muito antes de partir para a Lapónia e fazer as tão esperadas entregas. Usa as teclas do cursor para controlar o Papai Noel e guiá-lo nesta tarefa. ", instruction_text_ct:"O simpático pessoal da RS deseja colocar algumas árvores de natal à porta do seu escritório. O único problema é que não sabem como conseguir electricidade para iluminar as árvores. Será que você consegue descobrir as combinações correctas dos produtos RS para extrair do nosso escritório toda a electricidade indispensável para completar esta tarefa?", lives:"Vidas", level_1:"NÍVEL 1", level_2:"NÍVEL 2", level_3:"NÍVEL 3", get_collecting:"Ganhe pegando", instruction_text_jp_2:"Use a barra de espaço para recolher os objectos necessários e colocá-los na caixa", skip:"Saltar", time_bonus:"Bônus de tempo", bulb:"Lâmpada", solar:"Painel solar", fan:"Ventilador", turbine:"Turbina eólica", transformer:"Transformador", battery:"Bateria", torch:"Lanterna", generator:"Gerador", wire:"Cabo", circuit:"Placa de circuito", fuse:"Fusível", boiler:"Aquecedor", steam:"Turbina a vapor"}, dk:{tamba:"Viral spil ved Tamba", send_friend:"Send til en ven", submit_score:"Indsend din score", your_name:"Dit navn", your_email:"Din e-mail", friend_name:"Vens navn", friend_email:"Vens email", submit:"Indsend", back:"Tilbage", error_yourname:"Indtast dit navn", error_youremail:"Indtast venligst en gyldig e-mail-adresse", error_recipients:"Anfør nogle modtagere", error_friendname:"Navn på modtager mangler", error_friendemail:"Ugyldig e-mail-adresse", email_success:"E-mail sendt! Vil du gerne sende en mere?", error_server:"Kunne ikke forbinde til serveren", how_to_play:"Hvordan man spiller", play:"Spil", play_now:"Spil nu", instructions:"Instruktioner", view_leaderboard:"Se leaderboard", hud_time:"Resterende tid", loading:"Loading", click_flag:"Klik på flaget for at spille", sound_on:"Slå lyden til", sound_off:"Slå lyden fra", leaderboard:"High score", name:"Navn", score:"Score", start:"Start", go:"Go!", please_wait:"Vent venligst", points:"Point", leaderboard_position:"Placering på high score", game_over:"Game Over", congratulations:"Tillykke! Du scorede i alt", main_menu:"Hovedmenu", time_up:"Tiden er gået", submit_score_prompt:"Indsend dine point til high score!", terms_apply:"* Vilkår og betingelser gælder", well_done:"Godt gået!", congratulations:"Tillykke", packing_list:"Pakkeliste", stock_list:"Lagerliste", game_title_jp:"Jingle dele", game_title_rs:"RS juletræ", bad_luck:"Uheldig", instruction_text_jp:"Julemanden har en del arbejde at gøre i tiden op til jul. Eneste problem er, at han er nødt til at få alle de ordrer pakket væk, før han kan tage til Lapland og gøre hans rigtige job. Brug venligst piletasterne til at styre julemanden og guide ham til at", instruction_text_ct:"De gode medarbejdere hos RS ønsker at sætte nogle juletræer op uden for deres kontor. Det eneste problem er, at de ikke kan finde ud af, hvordan de får strøm til træerne. Kan du hjælpe med at finde den rigtige kombination af RS produkter, som vil få strøm fra RS kontoret over til træerne?", lives:"Liv", level_1:"Bane 1", level_2:"Bane 2", level_3:"Bane 3", get_collecting:"Start med at samle", instruction_text_jp_2:"Brug space-tasten til at samle ting op med og læg dem i boksen.", skip:"Spring over", time_bonus:"Tidsbonus", bulb:"Lyspære", solar:"Solfanger", fan:"Fan", turbine:"Vindmølle", transformer:"Omformer", battery:"Batteri", torch:"Lommelygte", generator:"Generator", wire:"Wire", circuit:"Printplade", fuse:"Sikring", boiler:"Kedel", steam:"Dampturbine"}, no:{tamba:"Viral spill ved TAMBA", send_friend:"Send til en venn", submit_score:"Send inn ditt resultat", your_name:"Ditt navn", your_email:"Din e-post", friend_name:"Venns navn", friend_email:"Din venns epost", submit:"Send", back:"Tilbake", error_yourname:"Vennligst skriv inn navnet ditt", error_youremail:"Vennligst skriv inn en gyldig e-postadresse", error_recipients:"Vennligst skriv inn noen mottakere", error_friendname:"Navn på mottaker mangler", error_friendemail:"Ugyldig e-post adresse", email_success:"E-post sendt! Vil du sende en ny?", error_server:"Kunne ikke koble til serveren", how_to_play:"Hvrodan spille", play:"Spill", play_now:"Spill nå", instructions:"Instruksjoner", view_leaderboard:"Se high score", hud_time:"Gjenværende tid", loading:"Laster", click_flag:"Klikk flagg for å spille", sound_on:"Slå lyden på", sound_off:"Skru av lyd", leaderboard:"High score", name:"Navn", score:"Resultat", start:"Start", go:"Sett i gang!", please_wait:"Vennligst vent", points:"Poeng", leaderboard_position:"Plassering på high score", game_over:"Spill slutt", congratulations:"Gratulerer! Du skoret totalt", main_menu:"Hovedmeny", time_up:"Tiden er oppbrukt", submit_score_prompt:"Send inn dine poeng til high score", terms_apply:"* Vilkår og betingelser gjelder", well_done:"Vel gjort!", congratulations:"Gratulerer", packing_list:"Pakkeliste", stock_list:"Lagerliste", game_title_jp:"Jingle Deler", game_title_rs:"RS Juletre", bad_luck:"Bad luck!", instruction_text_jp:"Julenissen gjør litt deltidsarbeid i forkant av jul. Det eneste problemet er at han må få alle ordrene pakket før han kan dra til Lappland og utføre sin virkelige jobb. Vennligst bruk piltastene til å styre Julenissen og guide ham til", instruction_text_ct:"De hyggelige ansatte på RS ønsker å sette opp noen juletrær utenfor kontoret sitt. Det eneste problemet er at de ikke kan finne ut hvordan du kan få strøm til trærne. Kan du regne ut de rette kombinasjonene av RS produkter som får strøm fra RS kontoret over", lives:"Liv", level_1:"Bane 1", level_2:"Bane 2", level_3:"Bane 3", get_collecting:"Begynn å samle", instruction_text_jp_2:"Bruk space-tasten til å plukke opp ting og legg de i boksen", skip:"Hopp over", time_bonus:"Tidsbonus", bulb:"Lyspære", solar:"Solcellepanel", fan:"Vifte", turbine:"Vind turbin", transformer:"Transformator", battery:"Batteri", torch:"Lommelykt", generator:"Generator", wire:"Wire", circuit:"Kretskort", fuse:"Sikring", boiler:"Trykkjele", steam:"Damp turbin"}, se:{tamba:"Viral spel genom Tamba", send_friend:"Skicka till en vän", submit_score:"Skicka in dina poäng", your_name:"Ditt namn", your_email:"Din e-post", friend_name:"Vännens namn", friend_email:"Vännens e-post", submit:"Skicka in", back:"Tillbaka", error_yourname:"Ange ditt namn", error_youremail:"Ange en giltig e-postadress", error_recipients:"Ange vissa mottagare", error_friendname:"En av mottagarna saknar ett namn", error_friendemail:"Ogiltig e-mailadress", email_success:"E-post skickat! Vill du skicka ett till?", error_server:"Kunde inte ansluta till servern", how_to_play:"Spelregler för", play:"Spela", play_now:"Spela nu", instructions:"Instruktioner", view_leaderboard:"Se high score", hud_time:"Återstående tid", loading:"Laddar", click_flag:"Klicka på flaggan för att spela", sound_on:"Sätt på ljudet", sound_off:"Stäng av ljudet", leaderboard:"High score", name:"Namn", score:"Betyg", start:"Start", go:"Go!", please_wait:"Var god vänta", points:"Poäng", leaderboard_position:"Placering på high score", game_over:"Game Over", congratulations:"Grattis! Du fick totalt", main_menu:"Huvudmeny", time_up:"Tiden är slut", submit_score_prompt:"Skicka in dina poäng till high score!", terms_apply:"* Särskilda villkor gäller", well_done:"Bra gjort!", congratulations:"Grattis", packing_list:"Packlista", stock_list:"Lagerlista", game_title_jp:"Jingle Delar", game_title_rs:"RS Julgran", bad_luck:"Otur", instruction_text_jp:"Tomten har en del arbete att göra fram till jul. Problemet är bara att han behöver få undan alla beställningar innan han kan åka till Lappland och göra sitt riktiga jobb. Använd piltangenterna för att styra Jultomten och leda honom till", instruction_text_ct:"De härliga människorna på RS vill ställa upp några julgranar utanför kontoret. Enda problemet är att de inte kan räkna ut hur de ska få ström till träden. Kan du räkna ut rätt kombination av RS produkter som får ström från kontoret över till julgranarna?", lives:"Liv", level_1:"Nivå 1", level_2:"Nivå 2", level_3:"Nivå 3", get_collecting:"Börja plocka", instruction_text_jp_2:"Använd space-tangenten för att plocka upp och lägga saker i boxen.", skip:"Hoppa över", time_bonus:"Tidsbonus", bulb:"Glödlampa", solar:"Solpanel", fan:"Fläkt", turbine:"Vindmölla", transformer:"Transformer", battery:"Batteri", torch:"Ficklampa", generator:"Generator", wire:"Wire", circuit:"Kretskort", fuse:"Säkring", boiler:"Kittel", steam:"Ångturbin"}, it:{tamba:"Viral game di TAMBA", send_friend:"Invia a un amico", submit_score:"Invia il tuo punteggio", your_name:"Nome", your_email:"E-mail", friend_name:"Nome dell'amico", friend_email:"E-mail dell'amico", submit:"Invia", back:"Indietro", error_yourname:"Inserisci il nome", error_youremail:"Inserisci un indirizzo e-mail valido", error_recipients:"Inserisci i destinatari", error_friendname:"Uno dei destinatari è senza nome", error_friendemail:"Uno dei destinatari presenta un indirizzo e-mail non valido", email_success:"E-mail inviata! Desideri inviarne un'altra?", error_server:"Impossibile connettersi al server", how_to_play:"Come giocare", play:"Gioca", play_now:"Gioca adesso", instructions:"Istruzioni", view_leaderboard:"Visualizza la classifica dei leader", hud_time:"Tempo rimanente", loading:"Caricamento in corso", click_flag:"Fare clic sulla bandierina per giocare", sound_on:"Attiva audio", sound_off:"Disattiva audio", leaderboard:"Classifica", name:"Nome", score:"Punteggio", start:"Avvio", go:"Vai!", please_wait:"Attendere", points:"Punti", leaderboard_position:"Posizione nella classifica dei leader", game_over:"Fine", congratulations:"Congratulazioni! Hai totalizzato:", main_menu:"Menù principale", time_up:"Tempo di attività!", submit_score_prompt:"Invia il tuo punteggio alla classifica dei leader!", terms_apply:"* Applicare Termini e Condizioni ", well_done:"Ben fatto!", congratulations:"Congratulazioni", packing_list:"Elenco dei pacchi", stock_list:"Elenco dei prodotti", game_title_jp:"Jingle Parts", game_title_rs:"Albero di Natale di RS", bad_luck:"Che sfortuna!", instruction_text_jp:"Babbo Natale sta lavorando part-time in vista del Natale. L'unico problema è che deve preparare tutti i pacchi degli ordini prima di poter andare in Lapponia e iniziare la sua vera attività. Utilizzando i tasti del cursore, controlla e guida Babbo Natale. ", instruction_text_ct:"Il personale di RS vorrebbe allestire alcuni alberi di Natale all'esterno dell'ufficio. L'unico problema è che non si riesce a capire come collegare gli alberi alla rete elettrica. Riesci a trovare la giusta combinazione di prodotti RS per collegare gli alberi all'alimentazione elettrica dell'ufficio di RS?", lives:"Vita", level_1:"Livello 1", level_2:"Livello 2", level_3:"Livello 3", get_collecting:"Raccogli", instruction_text_jp_2:"Utilizza la barra spaziatrice per raccogliere i prodotti RS e depositali nella vaschetta", skip:"Salta intro", time_bonus:"Extra time", bulb:"Lampadina", solar:"Pannello Solare", fan:"Ventola", turbine:"Turbina eolica", transformer:"Trasformatore", battery:"Batteria", torch:"Torcia elettrica", generator:"Generatore", wire:"Filo", circuit:"Schede", fuse:"Fusibile", boiler:"Caldaia", steam:"Turbina a vapore"}};
private static var _languages:Array = ["en", "nl", "fr", "de", "es", "at", "pt", "dk", "no", "se", "it"];
public static function set lang(_arg1:String):void{
_lang = _arg1;
}
public static function set country(_arg1:String):void{
_country = _arg1;
_lang = _countries[_country];
}
public static function get country():String{
return (_country);
}
public static function phrase(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:String=null):String{
var _local5:String;
var _local6:String;
_local5 = _lang;
if (_arg4 != null){
_local5 = _arg4;
};
if (phrases[_local5] == null){
return ("!MISSING!");
};
_local6 = phrases[_local5][_arg1];
if (_local6 == null){
_local6 = (("{" + phrases["en"][_arg1]) + "}");
trace("Missing phrase:", _local5, "->", _arg1);
};
if (_arg2){
_local6 = _local6.toUpperCase();
};
if (_arg3){
_local6 = (("<b>" + _local6) + "</b>");
};
return (_local6);
}
public static function get languages():Array{
return (_languages);
}
public static function get lang():String{
return (_lang);
}
}
}//package xmastree
Section 81
//Main (xmastree.Main)
package xmastree {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import tamba.events.*;
import tamba.utils.*;
import com.memecounter.*;
import com.greensock.easing.*;
import tamba.display.*;
import flash.system.*;
public class Main extends MovieClip {
private var preloaderMovie:MovieClip;
private var preloader:Preloader;
private var langSelect:MovieClip;
private var contentHolder:MovieClip;
private var screenManager:ScreenManager;
public function Main():void{
var rootURL:String;
super();
addFrameScript(0, frame1);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.showDefaultContextMenu = false;
try {
Tracker.init(1013, root);
} catch(e:Error) {
};
rootURL = "http://viral.tamba.co.uk/rs/xmastree/";
GlobalObject.set("rootURL", rootURL);
GlobalObject.set("remotingURL", (rootURL + "amfphp/gateway.php"));
GlobalObject.set("bookmarkURL", "http://viral.tamba.co.uk/rs/xmastree/bookmarks.php");
contentHolder = new MovieClip();
contentHolder.mask = new StageMask(600, 500);
addChild(contentHolder);
startPreloader();
}
private function startPreloader():void{
preloaderMovie = new screen_preloader();
contentHolder.addChildAt(preloaderMovie, 0);
preloader = new Preloader(this);
preloader.addEventListener("onPreloaderProgress", onPreloaderProgress);
preloader.addEventListener("onPreloaderComplete", onPreloaderComplete);
preloader.start();
}
function frame1(){
stop();
}
private function onAssetsFrameEntered(_arg1:Event=null):void{
var _local2:int;
var _local3:*;
Utils.clearButtonListeners();
langSelect = new lang_picker();
stage.removeEventListener(Event.ENTER_FRAME, onAssetsFrameEntered);
TweenLite.to(preloaderMovie.mc_pct, 0.25, {alpha:0});
_local2 = langSelect.numChildren;
while (_local2--) {
_local3 = langSelect.getChildAt(_local2);
_local3.alpha = 0;
TweenLite.to(_local3, 0.2, {alpha:1, delay:(0.05 * _local2)});
Utils.addButtonListener(_local3, onFlagClicked);
};
preloaderMovie.addChild(langSelect);
}
private function onPreloaderComplete(_arg1:EventWithParams=null):void{
preloader.removeEventListener("onPreloaderProgress", onPreloaderProgress);
preloader.removeEventListener("onPreloaderComplete", onPreloaderComplete);
preloader = null;
stage.addEventListener(Event.ENTER_FRAME, onAssetsFrameEntered);
gotoAndStop(3);
}
private function onPreloaderProgress(_arg1:EventWithParams):void{
var _local2:int;
_local2 = Math.ceil((_arg1.params.progress * 100));
preloaderMovie.mc_pct.text_pct.text = (_local2 + "%");
}
private function onFlagClicked(_arg1:Event=null):void{
var tmp:Array;
var event = _arg1;
tmp = event.currentTarget.name.split("_");
Language.country = tmp[1];
trace("Country:", Language.country);
TweenLite.to(langSelect, 0.25, {alpha:0});
Utils.clearButtonListeners();
screenManager = new ScreenManager();
contentHolder.addChildAt(screenManager, 0);
TweenLite.to(preloaderMovie, 0.5, {x:-610, onComplete:function (){
contentHolder.removeChild(preloaderMovie);
}});
}
}
}//package xmastree
Section 82
//ScreenManager (xmastree.ScreenManager)
package xmastree {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import flash.utils.*;
import tamba.events.*;
import tamba.utils.*;
import com.greensock.easing.*;
import tamba.game.*;
import tamba.net.*;
import tamba.media.*;
import flash.text.*;
public class ScreenManager extends MovieClip {
private var screenName:String;// = ""
private var clientID:String;// = "rsxsmastree"
private var urls:Object;
private var bg:MovieClip;
private var menuActive:Boolean;// = true
private var btnBack:MovieClip;
private var highScores:HighScores;
private var isScoreSubmitted:Boolean;// = false
private var screen:MovieClip;
private var submitScore:SubmitScore;
private var sendFriend:SendToFriend;
private var score:int;// = 2220
private var screenInfo:Object;
private var gameSuccess:Boolean;// = false
private var footer:MovieClip;
private var maxSendFriend:int;// = 4
private var game:Game;
public function ScreenManager():void{
clientID = "rsxsmastree";
menuActive = true;
screenName = "";
score = 2220;
gameSuccess = false;
maxSendFriend = 4;
isScoreSubmitted = false;
screenInfo = {screen_title:{init:initTitleScreen}, screen_instructions:{init:initInstructions}, screen_sendfriend:{init:initSendFriend}, screen_leaderboard:{init:initLeaderboard}, screen_submitscore:{init:initSubmitScore}};
urls = {uk:"http://rswww.com", at:"http://www.rs-components.at", be:"http://www.rsonline.be", nl:"http://www.rsonline.be", de:"http://www.rsonline.de", dk:"http://www.rsonline.dk", es:"http://rsonline.es", fr:"http://rswww.fr", ie:"http://rswww.ie", it:"http://rswww.it", nl:"http://www.rsonline.nl", no:"http://www.rsonline.no", pt:"http://rsportugal.com", se:"http://www.rsonline.se", za:"http://www.rsonline.co.za", ch:"http://www.rsonline.ch"};
super();
initBG();
initFooter();
Audio.playMusic("music_main");
}
private function onHighScoresSuccess(_arg1:EventWithParams):void{
var _local2:MovieClip;
_local2 = _arg1.params.data;
_local2.x = 24;
_local2.y = 62;
screen.addChild(_local2);
highScores.removeEventListener("onSuccess", onHighScoresSuccess);
}
private function resetSendFriend():void{
var _local1:*;
_local1 = 1;
while (_local1 <= maxSendFriend) {
screen[("input_friendname_" + _local1)].htmlText = "";
screen[("input_friendemail_" + _local1)].htmlText = "";
_local1++;
};
screen.btn_submit.visible = true;
}
private function initInstructions():void{
screen.text_title.htmlText = Language.phrase("instructions");
screen.text_body.htmlText = Language.phrase("instruction_text_ct", false);
screen.text_body.autoSize = TextFieldAutoSize.LEFT;
}
private function onBgButtonOver(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
TweenMax.to(_local2, 0.5, {colorMatrixFilter:{brightness:1.25}, glowFilter:{blurX:15, blurY:15, strength:2, color:16764165, alpha:0.5}});
}
private function initGame():void{
var logo:MovieClip;
game = new Game();
game.alpha = 0;
logo = new game_logo();
logo.gotoAndStop(Language.lang);
logo.x = 288;
logo.y = -22;
Utils.addButtonListener(logo, onClientClicked);
game.addChild(logo);
game.addEventListener("onComplete", onGameComplete, false, 0, true);
addChildAt(game, 1);
TweenLite.to(footer.mc_bookmarks, 1, {y:510});
TweenLite.to(game, 2, {alpha:1, onComplete:function (){
bg.visible = false;
}});
}
private function onLeaderboardClicked(_arg1:MouseEvent):void{
switchScreen("screen_leaderboard");
}
private function initSubmitScore():void{
screen.input_yourname.tabIndex = 0;
screen.input_youremail.tabIndex = 1;
if (!gameSuccess){
screen.text_title.htmlText = Language.phrase("game_over");
} else {
screen.text_title.htmlText = Language.phrase("well_done");
};
screen.btn_submit.text_label.htmlText = Language.phrase("submit");
screen.text_yourname.htmlText = Language.phrase("your_name");
screen.text_youremail.htmlText = Language.phrase("your_email");
screen.text_score.htmlText = ((score + " ") + Language.phrase("points"));
Utils.addButtonListener(screen.btn_submit, onScoreSubmitted);
}
private function onBookmarkClicked(_arg1:MouseEvent):void{
var _local2:String;
_local2 = ((((((((GlobalObject.get("bookmarkURL") + "?lang=") + Language.lang) + "&country=") + Language.country) + "&client=") + clientID) + "&bookmark=") + _arg1.currentTarget.name.replace("btn_", ""));
GetURL.goto(_local2, "_blank");
}
private function onClientClicked(_arg1:MouseEvent):void{
var _local2:String;
_local2 = urls[Language.country];
GetURL.goto(_local2, "_blank");
}
private function onScoreSubmitted(_arg1:Event):void{
screen.text_error.htmlText = Language.phrase("please_wait", true, true);
screen.btn_submit.visible = false;
submitScore = new SubmitScore(GlobalObject.get("remotingURL"), "GameFunctions", "rstree671a", screen.input_yourname.text, screen.input_youremail.text, score, 0);
submitScore.addEventListener("onSuccess", onSubmitScoreSuccess, false, 0, true);
submitScore.addEventListener("onError", onSubmitScoreError, false, 0, true);
submitScore.submit();
}
private function onPlayClicked(_arg1:MouseEvent):void{
switchScreen("screen_game");
}
private function initBG():void{
var _local1:int;
var _local2:*;
bg = new ui_bg();
_local1 = bg.numChildren;
while (_local1--) {
_local2 = bg.getChildAt(_local1);
if ((_local2 is MovieClip)){
_local2.gotoAndPlay(1);
};
};
btnBack = bg.mc_polarbear.mc_sign.mc_inner;
btnBack.text_label.htmlText = Language.phrase("back");
bg.btn_play.text_label.htmlText = Language.phrase("play");
bg.btn_instructions.text_label.htmlText = Language.phrase("instructions");
bg.btn_leaderboard.text_label.htmlText = Language.phrase("leaderboard");
bg.btn_sendfriend.text_label.htmlText = Language.phrase("send_friend");
adjustBgButtonText(bg.btn_instructions.text_label);
adjustBgButtonText(bg.btn_leaderboard.text_label);
adjustBgButtonText(bg.btn_sendfriend.text_label);
Utils.addButtonListener(bg.btn_play, onPlayClicked, onBgButtonOver, onBgButtonOut, true);
Utils.addButtonListener(bg.btn_instructions, onInstructionsClicked, onBgButtonOver, onBgButtonOut, true);
Utils.addButtonListener(bg.btn_leaderboard, onLeaderboardClicked, onBgButtonOver, onBgButtonOut, true);
Utils.addButtonListener(bg.btn_sendfriend, onSendFriendClicked, onBgButtonOver, onBgButtonOut, true);
Utils.addButtonListener(btnBack, onMainMenuClicked, onBgButtonOver, onBgButtonOut, true);
bg.mc_logo_1.gotoAndStop(Language.lang);
bg.mc_logo_2.gotoAndStop(Language.lang);
Utils.addButtonListener(bg.mc_logo_1, onClientClicked, onBgButtonOver, onBgButtonOut, true);
Utils.addButtonListener(bg.mc_logo_2, onClientClicked, onBgButtonOver, onBgButtonOut, true);
addChild(bg);
}
private function onMainMenuClicked(_arg1:MouseEvent):void{
switchScreen("screen_title");
}
private function initSendFriend():void{
var _local1:int;
var _local2:int;
screen.input_yourname.tabIndex = 0;
screen.input_youremail.tabIndex = 1;
screen.text_yourname.text = Language.phrase("your_name");
screen.text_youremail.text = Language.phrase("your_email");
screen.text_friendname.text = Language.phrase("friend_name");
screen.text_friendemail.text = Language.phrase("friend_email");
_local1 = 2;
_local2 = 1;
while (_local2 <= maxSendFriend) {
screen[("input_friendname_" + _local2)].tabIndex = _local1;
_local1++;
screen[("input_friendemail_" + _local2)].tabIndex = _local1;
_local1++;
_local2++;
};
screen.text_title.htmlText = Language.phrase("send_friend");
screen.btn_submit.text_label.htmlText = Language.phrase("submit");
Utils.addButtonListener(screen.btn_submit, onSendFriendSubmitted);
}
private function onInstructionsClicked(_arg1:MouseEvent):void{
switchScreen("screen_instructions");
}
private function onSubmitScoreSuccess(_arg1:EventWithParams=null):void{
screen.text_error.htmlText = "";
isScoreSubmitted = true;
switchScreen("screen_leaderboard");
}
private function onBgButtonOut(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.currentTarget;
TweenMax.to(_local2, 0.5, {colorMatrixFilter:{brightness:1}, glowFilter:{blurX:0, blurY:0, strength:2, color:16764165, alpha:0, remove:true}});
}
private function resetSubmitScore():void{
submitScore.removeEventListener("onSuccess", onSubmitScoreSuccess);
submitScore.removeEventListener("onError", onSubmitScoreError);
}
private function initLeaderboard():void{
screen.text_title.htmlText = Language.phrase("leaderboard");
highScores = new HighScores(GlobalObject.get("remotingURL"), "GameFunctions", 226, "leaderboard_line", "scroll_track", "scroll_face");
highScores.addEventListener("onSuccess", onHighScoresSuccess, false, 0, true);
highScores.makeLeaderboard();
}
private function onSoundClicked(_arg1:MouseEvent):void{
if (Audio.musicVolume > 0){
Audio.effectsVolume = 0;
Audio.musicVolume = 0;
_arg1.currentTarget.text_label.htmlText = Language.phrase("sound_on", false, true);
} else {
Audio.effectsVolume = 1;
Audio.musicVolume = 1;
_arg1.currentTarget.text_label.htmlText = Language.phrase("sound_off", false, true);
};
}
private function onSendFriendError(_arg1:EventWithParams):void{
screen.text_error.htmlText = Language.phrase(_arg1.params.name, true, true);
screen.btn_submit.visible = true;
}
private function onSendFriendSuccess(_arg1:EventWithParams):void{
screen.text_error.htmlText = Language.phrase("email_success", true, true);
resetSendFriend();
screen.btn_submit.visible = true;
}
private function initTitleScreen():void{
}
private function onTambaClicked(_arg1:MouseEvent):void{
GetURL.goto("http://www.tamba.co.uk", "_blank");
}
private function onBgScrollComplete():void{
if ((((screenName == "screen_title")) && (!((screen == null))))){
screen.parent.removeChild(screen);
screen = null;
};
menuActive = true;
}
private function initFooter():void{
footer = new screen_footer();
footer.btn_sound.text_label.htmlText = Language.phrase("sound_off", false, true);
footer.btn_tamba.text_label.htmlText = Language.phrase("tamba", false, true);
Utils.addButtonListener(footer.btn_tamba, onTambaClicked, null, null, true);
Utils.addButtonListener(footer.btn_sound, onSoundClicked, null, null, true);
addChild(footer);
initBookmarks(footer.mc_bookmarks);
}
private function adjustBgButtonText(_arg1):void{
_arg1.autoSize = TextFieldAutoSize.CENTER;
_arg1.y = ((_arg1.parent.height - _arg1.height) * 0.5);
}
private function onSubmitScoreError(_arg1:EventWithParams):void{
screen.text_error.htmlText = Language.phrase(_arg1.params.name, true, true);
screen.btn_submit.visible = true;
resetSubmitScore();
}
private function onGameComplete(_arg1:EventWithParams):void{
var event = _arg1;
bg.visible = true;
menuActive = true;
score = event.params.score;
gameSuccess = event.params.success;
switchScreen("screen_submitscore");
TweenLite.delayedCall(1, function (){
game.parent.removeChild(game);
game = null;
});
}
private function initBookmarks(_arg1:MovieClip):void{
var _local2:uint;
_local2 = _arg1.numChildren;
while (_local2--) {
if (_arg1.getChildAt(_local2).name.indexOf("btn_") === 0){
Utils.addButtonListener(_arg1.getChildAt(_local2), onBookmarkClicked);
};
};
}
private function onSendFriendClicked(_arg1:MouseEvent):void{
switchScreen("screen_sendfriend");
}
private function switchScreen(_arg1:String):void{
var xPos:int;
var linkage = _arg1;
if (!menuActive){
return;
};
menuActive = false;
if (((((!((screen == null))) && ((screen.name == "screen_submitscore")))) && (!((linkage == "screen_title"))))){
screenName = linkage;
TweenLite.to(screen, 0.5, {alpha:0, onComplete:function (){
screen.parent.removeChild(screen);
screen = null;
screen = new (getDefinitionByName(linkage));
screen.x = -452;
screen.y = 55;
screen.name = screenName;
screenInfo[screenName].init();
screen.alpha = 0;
bg.addChildAt(screen, 1);
TweenLite.to(screen, 0.5, {alpha:1});
menuActive = true;
}});
return;
};
xPos = 600;
screenName = linkage;
if (screenName == "screen_game"){
initGame();
} else {
if (screenName == "screen_title"){
xPos = 0;
} else {
screen = new (getDefinitionByName(linkage));
screen.x = -452;
screen.y = 55;
screen.name = screenName;
screenInfo[screenName].init();
bg.addChildAt(screen, 1);
};
TweenLite.to(bg, 1, {x:xPos, onComplete:onBgScrollComplete, ease:Strong.easeInOut});
};
}
private function onSendFriendSubmitted(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:*;
screen.btn_submit.visible = false;
screen.text_error.htmlText = "";
_local2 = [];
_local3 = 1;
while (_local3 <= maxSendFriend) {
if (((!((screen[("input_friendname_" + _local3)].text == ""))) || (!((screen[("input_friendemail_" + _local3)].text == ""))))){
_local2.push([screen[("input_friendname_" + _local3)].text, screen[("input_friendemail_" + _local3)].text]);
};
_local3++;
};
sendFriend = new SendToFriend(GlobalObject.get("remotingURL"), "GameFunctions", screen.input_yourname.text, screen.input_youremail.text, _local2, Language.lang, Language.country);
sendFriend.addEventListener("onSuccess", onSendFriendSuccess, false, 0, true);
sendFriend.addEventListener("onError", onSendFriendError, false, 0, true);
sendFriend.send();
}
}
}//package xmastree
Section 83
//Utils (xmastree.Utils)
package xmastree {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.greensock.easing.*;
public class Utils {
public static var buttonListeners:Array = [];
public static function clearButtonListeners():void{
var _local1:String;
for (_local1 in buttonListeners) {
buttonListeners[_local1][0].removeEventListener(MouseEvent[buttonListeners[_local1][1]], buttonListeners[_local1][2]);
buttonListeners[_local1][0].buttonMode = false;
};
buttonListeners = [];
}
private static function onDefaultMouseOut(_arg1:MouseEvent){
highlightClip(MovieClip(_arg1.currentTarget), false);
}
public static function highlightClip(_arg1:MovieClip, _arg2:Boolean):void{
var _local3:ColorTransform;
var _local4:int;
_local3 = new ColorTransform();
_local4 = 20;
if (!_arg2){
_local4 = 0;
};
_local3.redOffset = _local4;
_local3.greenOffset = _local4;
_local3.blueOffset = _local4;
_arg1.transform.colorTransform = _local3;
}
public static function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
return (_local2.test(_arg1));
}
public static function addButtonListener(_arg1:Object, _arg2:Function=null, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=false):void{
if (_arg2 == null){
_arg2 = onDefaultClick;
};
if (_arg3 == null){
_arg3 = onDefaultMouseOver;
};
if (_arg4 == null){
_arg4 = onDefaultMouseOut;
};
_arg1.addEventListener(MouseEvent.CLICK, _arg2, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, _arg3, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, _arg4, false, 0, true);
if ((_arg1 is MovieClip)){
_arg1.mouseChildren = false;
_arg1.buttonMode = true;
_arg1.useHandCursor = true;
};
if (!_arg5){
buttonListeners.push([_arg1, "CLICK", _arg2]);
buttonListeners.push([_arg1, "MOUSE_OVER", _arg3]);
buttonListeners.push([_arg1, "MOUSE_OUT", _arg4]);
};
}
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
public static function zeroPad(_arg1:int, _arg2:int):String{
var _local3:String;
_local3 = ("" + _arg1);
while (_local3.length < _arg2) {
_local3 = ("0" + _local3);
};
return (_local3);
}
public static function validateString(_arg1:String):Boolean{
return ((_arg1.length > 0));
}
public static function msToString(_arg1:uint):String{
var _local2:Date;
var _local3:int;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:Number;
var _local8:String;
_local2 = new Date(_arg1);
_local3 = _local2.getMinutes();
_local4 = _local3.toString();
if (_local3 < 10){
_local4 = ("0" + _local4);
};
_local5 = _local2.getSeconds();
_local6 = _local5.toString();
if (_local5 < 10){
_local6 = ("0" + _local6);
};
_local7 = Math.floor(((_arg1 % 1000) / 10));
_local8 = _local7.toString();
if (_local7 < 10){
_local8 = ("0" + _local8);
};
return (((((_local4 + ":") + _local6) + ":") + _local8));
}
private static function onDefaultClick(_arg1:MouseEvent):void{
}
private static function onDefaultMouseOver(_arg1:MouseEvent){
highlightClip(MovieClip(_arg1.currentTarget), true);
}
public static function randomInteger(_arg1:Number, _arg2:Number):Number{
return (Math.round(((Math.random() * (_arg2 - _arg1)) + _arg1)));
}
}
}//package xmastree
Section 84
//connect (connect)
package {
import flash.media.*;
public dynamic class connect extends Sound {
}
}//package
Section 85
//correct (correct)
package {
import flash.media.*;
public dynamic class correct extends Sound {
}
}//package
Section 86
//game_bg (game_bg)
package {
import flash.display.*;
public dynamic class game_bg extends MovieClip {
public var mc_arrow_right:MovieClip;
public var mc_ground:MovieClip;
public var mc_desc:MovieClip;
public var mc_snow:MovieClip;
public var mc_arrow_left:MovieClip;
public var mc_sky:MovieClip;
}
}//package
Section 87
//game_button (game_button)
package {
import flash.display.*;
import flash.text.*;
public dynamic class game_button extends MovieClip {
public var text_label:TextField;
}
}//package
Section 88
//game_item (game_item)
package {
import flash.display.*;
public dynamic class game_item extends MovieClip {
public var mc_inner:MovieClip;
public var mc_bg:MovieClip;
}
}//package
Section 89
//game_logo (game_logo)
package {
import flash.display.*;
public dynamic class game_logo extends MovieClip {
public function game_logo(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 90
//game_message (game_message)
package {
import flash.display.*;
import flash.text.*;
public dynamic class game_message extends MovieClip {
public var text_message:TextField;
}
}//package
Section 91
//game_pipe (game_pipe)
package {
import flash.display.*;
public dynamic class game_pipe extends MovieClip {
public var mc_point_0:MovieClip;
public var mc_point_1:MovieClip;
}
}//package
Section 92
//game_pipe_pulse (game_pipe_pulse)
package {
import flash.display.*;
public dynamic class game_pipe_pulse extends MovieClip {
public function game_pipe_pulse(){
addFrameScript(66, frame67);
}
function frame67(){
stop();
}
}
}//package
Section 93
//game_score (game_score)
package {
import flash.display.*;
import flash.text.*;
public dynamic class game_score extends MovieClip {
public var text_score:TextField;
}
}//package
Section 94
//game_tree (game_tree)
package {
import flash.display.*;
public dynamic class game_tree extends MovieClip {
public var mc_bauble:MovieClip;
}
}//package
Section 95
//game_verdict (game_verdict)
package {
import flash.display.*;
public dynamic class game_verdict extends MovieClip {
}
}//package
Section 96
//item_label (item_label)
package {
import flash.display.*;
import flash.text.*;
public dynamic class item_label extends MovieClip {
public var text_label:TextField;
}
}//package
Section 97
//lang_picker (lang_picker)
package {
import flash.display.*;
public dynamic class lang_picker extends MovieClip {
public var flag_se:MovieClip;
public var flag_sg:MovieClip;
public var flag_ch:MovieClip;
public var flag_de:MovieClip;
public var flag_uk:MovieClip;
public var flag_es:MovieClip;
public var flag_nl:MovieClip;
public var flag_no:MovieClip;
public var flag_fr:MovieClip;
public var flag_nz:MovieClip;
public var flag_dk:MovieClip;
public var flag_pt:MovieClip;
public var flag_ie:MovieClip;
public var flag_za:MovieClip;
public var flag_it:MovieClip;
public var flag_at:MovieClip;
public var flag_au:MovieClip;
public var flag_be:MovieClip;
}
}//package
Section 98
//leaderboard_line (leaderboard_line)
package {
import flash.display.*;
import flash.text.*;
public dynamic class leaderboard_line extends MovieClip {
public var points:TextField;
public var pos:TextField;
public var username:TextField;
}
}//package
Section 99
//music_main (music_main)
package {
import flash.media.*;
public dynamic class music_main extends Sound {
}
}//package
Section 100
//screen_footer (screen_footer)
package {
import flash.display.*;
public dynamic class screen_footer extends MovieClip {
public var btn_tamba:MovieClip;
public var btn_sound:MovieClip;
public var mc_bookmarks:MovieClip;
}
}//package
Section 101
//screen_game (screen_game)
package {
import flash.display.*;
public dynamic class screen_game extends MovieClip {
}
}//package
Section 102
//screen_instructions (screen_instructions)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_instructions extends MovieClip {
public var text_body:TextField;
public var text_title:TextField;
}
}//package
Section 103
//screen_leaderboard (screen_leaderboard)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_leaderboard extends MovieClip {
public var text_title:TextField;
}
}//package
Section 104
//screen_preloader (screen_preloader)
package {
import flash.display.*;
public dynamic class screen_preloader extends MovieClip {
public var mc_pct:MovieClip;
}
}//package
Section 105
//screen_sendfriend (screen_sendfriend)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_sendfriend extends MovieClip {
public var input_friendname_4:TextField;
public var text_yourname:TextField;
public var input_yourname:TextField;
public var input_youremail:TextField;
public var input_friendemail_1:TextField;
public var input_friendemail_2:TextField;
public var input_friendemail_4:TextField;
public var input_friendemail_3:TextField;
public var btn_submit:MovieClip;
public var text_error:TextField;
public var text_friendname:TextField;
public var text_friendemail:TextField;
public var text_youremail:TextField;
public var text_title:TextField;
public var input_friendname_2:TextField;
public var input_friendname_3:TextField;
public var input_friendname_1:TextField;
}
}//package
Section 106
//screen_submitscore (screen_submitscore)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_submitscore extends MovieClip {
public var text_score:TextField;
public var text_yourname:TextField;
public var input_yourname:TextField;
public var input_youremail:TextField;
public var btn_submit:MovieClip;
public var text_error:TextField;
public var text_youremail:TextField;
public var text_title:TextField;
}
}//package
Section 107
//screen_title (screen_title)
package {
import flash.display.*;
public dynamic class screen_title extends MovieClip {
}
}//package
Section 108
//scroll_face (scroll_face)
package {
import flash.display.*;
public dynamic class scroll_face extends MovieClip {
}
}//package
Section 109
//scroll_track (scroll_track)
package {
import flash.display.*;
public dynamic class scroll_track extends MovieClip {
}
}//package
Section 110
//tree (tree)
package {
import flash.media.*;
public dynamic class tree extends Sound {
}
}//package
Section 111
//ui_bg (ui_bg)
package {
import flash.display.*;
public dynamic class ui_bg extends MovieClip {
public var mc_penguin_yellow_yellow:MovieClip;
public var btn_leaderboard:MovieClip;
public var mc_penguin_red_red:MovieClip;
public var btn_play:MovieClip;
public var mc_bauble:MovieClip;
public var mc_logo_1:MovieClip;
public var mc_logo_2:MovieClip;
public var mc_polarbear:MovieClip;
public var mc_penguin_green_red:MovieClip;
public var btn_instructions:MovieClip;
public var btn_sendfriend:MovieClip;
}
}//package
Section 112
//wrong (wrong)
package {
import flash.media.*;
public dynamic class wrong extends Sound {
}
}//package