Section 1
//catcat_406 (_fla.catcat_406)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class catcat_406 extends MovieClip {
public var cat_mc:MovieClip;
public function catcat_406(){
addFrameScript(0, frame1);
}
function frame1(){
cat_mc.gotoAndStop(MovieClip(root).catId);
}
}
}//package _fla
Section 2
//dog_name_629 (_fla.dog_name_629)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class dog_name_629 extends MovieClip {
public var _txt:TextField;
public function dog_name_629(){
addFrameScript(0, frame1);
}
function frame1(){
_txt.text = MovieClip(root).nick;
}
}
}//package _fla
Section 3
//fiysdfew_458 (_fla.fiysdfew_458)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class fiysdfew_458 extends MovieClip {
public function fiysdfew_458(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
MovieClip(root).addV(7);
}
}
}//package _fla
Section 4
//flag_icon_673 (_fla.flag_icon_673)
package _fla {
import flash.display.*;
public dynamic class flag_icon_673 extends MovieClip {
public function flag_icon_673(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 5
//fsdfew_624 (_fla.fsdfew_624)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class fsdfew_624 extends MovieClip {
public var more_btn:SimpleButton;
public function fsdfew_624(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, MovieClip(root).More);
}
}
}//package _fla
Section 6
//gegr_600 (_fla.gegr_600)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class gegr_600 extends MovieClip {
public function gegr_600(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
MovieClip(root).addV(7);
}
}
}//package _fla
Section 7
//help_mc_135 (_fla.help_mc_135)
package _fla {
import flash.display.*;
import com.greensock.*;
import com.greensock.easing.*;
public dynamic class help_mc_135 extends MovieClip {
public function help_mc_135(){
addFrameScript(0, frame1);
}
public function show_help(_arg1:Boolean):void{
if (_arg1){
TweenLite.to(this, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
} else {
TweenLite.to(this, 0.5, {scaleX:0, scaleY:0});
};
}
function frame1(){
this.scaleX = (this.scaleY = 0);
}
}
}//package _fla
Section 8
//helpzizi_137 (_fla.helpzizi_137)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class helpzizi_137 extends MovieClip {
public var next_btn:SimpleButton;
public var exit_btn:SimpleButton;
public function helpzizi_137(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
next_btn.addEventListener(MouseEvent.CLICK, next_handler);
}
function frame2(){
stop();
exit_btn.addEventListener(MouseEvent.CLICK, exit_handler);
}
public function exit_handler(_arg1:MouseEvent):void{
exit_btn.removeEventListener(MouseEvent.CLICK, exit_handler);
(this.parent as MovieClip).show_help(false);
this.gotoAndStop(1);
}
public function next_handler(_arg1:MouseEvent):void{
next_btn.removeEventListener(MouseEvent.CLICK, next_handler);
this.play();
}
}
}//package _fla
Section 9
//MainTimeline (_fla.MainTimeline)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import spill.localisation.*;
import com.greensock.*;
import flash.filters.*;
import com.spilgames.api.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class MainTimeline extends MovieClip {
public const STATE_TREATMENT:String = "st_treatment";
public const STATE_EAT:String = "st_eat";
public const STATE_NORMAL:String = "st_normal";
public const STATE_FUN:String = "st_fun";
public const STATE_TRAINING:String = "st_training";
public const STATE_TEACH:String = "st_teach";
public const STATE_DRINK:String = "st_drink";
public const STATE_SLEEP:String = "st_sleep";
public const STATE_HAND:String = "st_hand";
public const STATE_TOILET:String = "st_toilet";
public const STATE_WASH:String = "st_wash";
public var state_1:MovieClip;
public var state_2:MovieClip;
public var item_1:MovieClip;
public var item_2:MovieClip;
public var item_3:MovieClip;
public var item_5:MovieClip;
public var item_7:MovieClip;
public var item_4:MovieClip;
public var state_3:MovieClip;
public var state_5:MovieClip;
public var state_7:MovieClip;
public var item_9:MovieClip;
public var state_4:MovieClip;
public var state_6:MovieClip;
public var item_6:MovieClip;
public var state_9:MovieClip;
public var item_8:MovieClip;
public var pauseOffset:int;
public var _scoreCallbackID:int;
public var hook_mc:MovieClip;
public var state_8:MovieClip;
public var isPassed:Boolean;
public var hasFood:Boolean;
public var startTime:int;
public var btn_moregamesat:BrandingLogo;
public var help_btn:SimpleButton;
public var i:int;
public var more_btn:SimpleButton;
public var state1_mc:MovieClip;
public var pause_mc:MovieClip;
public var lost_mc:MovieClip;
public var pause_btn:SimpleButton;
public var currentState:String;
public var lastClick:int;
public var cat_mc:MovieClip;
public var cat5_mc:MovieClip;
public var gameData:Array;
public var time:int;
public var play_btn:SimpleButton;
public var TIME:int;
public var _awardsCallbackID:int;
public var win_mc:MovieClip;
public var isPaused:Boolean;
public var start_btn:SimpleButton;
public var moreGameURI:String;
public var next_btn:SimpleButton;
public var outRoom:Boolean;
public var actId:int;
public var d_mc:MovieClip;
public var help_mc:MovieClip;
public var isStart:Boolean;
public var pointData:Object;
public var nick:String;
public var hint1_mc:MovieClip;
public var isLost:Boolean;
public var sel_1:MovieClip;
public var sel_2:MovieClip;
public var sel_3:MovieClip;
public var catId:int;
public var nick_txt:TextField;
public var fontList:Array;
public var inRoom:Boolean;
public var awarded:int;
public var hasMilk:Boolean;
public var spilGamesServices:SpilGamesServices;
public var lang:String;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function pause_handler(_arg1:MouseEvent):void{
pause_mc.show_pause(true);
}
public function handle_btnMoreGames(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
}
public function in_state_eat():void{
}
public function clear_state(_arg1:String):void{
switch (_arg1){
case STATE_EAT:
break;
case STATE_DRINK:
break;
case STATE_SLEEP:
break;
case STATE_WASH:
if (inRoom){
item_4.clear_wash();
cat_mc.visible = true;
};
break;
case STATE_TREATMENT:
break;
case STATE_HAND:
break;
case STATE_TOILET:
break;
case STATE_FUN:
if (outRoom){
item_8.visible = true;
};
break;
case STATE_TEACH:
break;
case STATE_TRAINING:
if (outRoom){
};
break;
};
}
public function game_win():void{
isPassed = true;
this.removeEventListener(Event.ENTER_FRAME, tick);
TweenLite.to(win_mc, 0.5, {scaleX:1, scaleY:1});
}
public function $(_arg1:MovieClip, _arg2:Function, _arg3:String, _arg4:String="", _arg5:int=1, _arg6:int=-1):void{
var _local7:InteractiveObject;
var _local8:int;
if (_arg6 != -1){
_local8 = _arg5;
while (_local8 <= _arg6) {
_local7 = _arg1[((_arg3 + _local8) + _arg4)];
_arg2.apply(null, [_local7, _local8]);
_local8++;
};
} else {
_local8 = _arg5;
while ((_local7 = _arg1[((_arg3 + _local8) + _arg4)])) {
_arg2.apply(null, [_local7, _local8]);
_local8++;
};
};
}
public function onServicesReady(_arg1:Event):void{
}
public function init_room_ui():void{
lost_mc.scaleX = (lost_mc.scaleY = 0);
win_mc.scaleX = (win_mc.scaleY = 0);
hint1_mc.x = 262;
hint1_mc.y = 332;
hint1_mc.scaleX = (hint1_mc.scaleY = 0);
hint1_mc.scaleX = (hint1_mc.scaleY = 0);
}
public function help_handler(_arg1:MouseEvent):void{
help_mc.show_help(true);
}
public function show_warning(_arg1:int):void{
if (_arg1 == 0){
return;
};
var _local2:MovieClip;
if (hint1_mc){
hint1_mc.gotoAndStop(_arg1);
hint1_mc.scaleX = (hint1_mc.scaleY = 1);
};
}
public function more_handler(_arg1:MouseEvent):void{
}
function frame2(){
stop();
more_btn.addEventListener(MouseEvent.CLICK, handle_btnMoreGames);
btn_moregamesat.buttonMode = true;
btn_moregamesat.mouseEnabled = true;
btn_moregamesat.addEventListener(MouseEvent.CLICK, handle_btnMoreGames);
init_start();
}
public function clear_eat():void{
}
public function in_toilet():void{
if (((outRoom) && ((currentState == STATE_TOILET)))){
cat_mc.gotoAndStop("toilet");
};
}
function frame5(){
stop();
init_room();
}
function frame1(){
moreGameURI = "http://www";
lang = "en";
nick = "";
TIME = 300;
pauseOffset = 0;
startTime = 0;
pointData = {eat:{x:265, y:524}, drink:{x:163, y:524}, sleep:{x:104, y:446}, teach:{x:353, y:390}, toilet:{x:633, y:300}, ball:{x:565, y:355}};
gameData = [undefined, {initV:100, speed:0.03, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}, {initV:100, speed:0.02, v:0, supply:30}];
isStart = false;
fontList = Font.enumerateFonts();
i = 0;
while (i < fontList.length) {
trace(fontList[i].fontName);
i++;
};
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
Languages.initialize();
Languages.getLanguage("jp").textLanguage = "en_us";
Languages.getLanguage("cn").textLanguage = "en_us";
SpilGame.initialize("cute-kitten-daycare", PortalGroup.GIRL, "cute-kitten-daycare", this, true);
spilGamesServices = SpilGamesServices.getInstance();
spilGamesServices.addEventListener("servicesReady", onServicesReady);
spilGamesServices.addEventListener("servicesFailed", onServicesFailed);
spilGamesServices.connect(this);
}
public function start_handler(_arg1:MouseEvent):void{
if (nick_txt.text == ""){
return;
};
nick = nick_txt.text;
start_btn.removeEventListener(MouseEvent.CLICK, start_handler);
play();
}
function frame4(){
stop();
init_nickname();
}
public function enter_state(_arg1:String):void{
}
public function init_start():void{
play_btn.addEventListener(MouseEvent.CLICK, play_handler);
help_btn.addEventListener(MouseEvent.CLICK, help_handler);
more_btn.addEventListener(MouseEvent.CLICK, more_handler);
isStart = false;
}
public function sel_cat(_arg1:int):void{
if (catId == _arg1){
return;
};
if (catId > 0){
removeLight(this[("sel_" + catId)]);
};
catId = _arg1;
if (catId > 0){
addLight(this[("sel_" + catId)]);
};
}
public function onSubmitScoreButtonClick(_arg1:MouseEvent):void{
}
function frame3(){
stop();
init_select_cat();
}
public function try_2_fill(_arg1:int):void{
switch (_arg1){
case 1:
if (((((inRoom) && (hasFood))) && ((currentState == STATE_NORMAL)))){
currentState = STATE_EAT;
cat_mc.gotoAndStop("walk_left");
TweenLite.to(d_mc, 0.5, {x:pointData.eat.x, y:pointData.eat.y, onComplete:in_eat});
};
break;
case 2:
if (((((inRoom) && (hasMilk))) && ((currentState == STATE_NORMAL)))){
currentState = STATE_DRINK;
cat_mc.gotoAndStop("walk_left");
TweenLite.to(d_mc, 0.5, {x:pointData.drink.x, y:pointData.drink.y, onComplete:in_drink});
};
break;
};
}
public function get_id(_arg1:String, _arg2:int=1):int{
var _local3:Array = _arg1.split("_");
return (int(_local3[_arg2]));
}
public function createGUI():void{
}
public function init_select_cat():void{
$(this, function (_arg1:MovieClip, _arg2:int):void{
_arg1.mouseChildren = true;
_arg1.buttonMode = true;
_arg1.lightColor = 6697779;
_arg1.initData = {scaleX:_arg1.scaleX, scaleY:_arg1.scaleY};
_arg1.addEventListener(MouseEvent.ROLL_OUT, sel_out);
_arg1.addEventListener(MouseEvent.ROLL_OVER, sel_over);
_arg1.addEventListener(MouseEvent.CLICK, sel_click);
}, "sel_");
catId = -1;
next_btn.addEventListener(MouseEvent.CLICK, next_handler);
}
public function init_room():void{
inRoom = true;
hook_mc.visible = false;
init_room_ui();
init_room_event();
currentState = STATE_NORMAL;
if (!isStart){
start_game();
};
}
public function init_nickname():void{
nick = "";
nick_txt.text = "";
cat5_mc.gotoAndStop(catId);
start_btn.addEventListener(MouseEvent.CLICK, start_handler);
}
public function spill_submit_award(_arg1:String):void{
trace(("awards" + _arg1));
_awardsCallbackID = AwardsService.submitAward(_arg1, onAwardRequestProcessed);
}
public function init_room_event():void{
pause_btn.addEventListener(MouseEvent.CLICK, pause_handler);
$(this, function (_arg1:MovieClip, _arg2:int):void{
_arg1.mouseChildren = false;
_arg1.buttonMode = true;
_arg1.addEventListener(MouseEvent.CLICK, item_click_handler);
}, "item_");
}
public function spill_submit_score(_arg1:int):void{
_scoreCallbackID = ScoreService.submitScore(_arg1, onScoreRequestProcessed);
}
public function in_ball():void{
if (((outRoom) && ((currentState == STATE_FUN)))){
cat_mc.gotoAndStop("ball");
};
}
public function in_teach():void{
if (((outRoom) && ((currentState == STATE_TEACH)))){
cat_mc.gotoAndStop("teach");
};
}
public function removeLight(_arg1:MovieClip):void{
_arg1.removeEventListener(Event.ENTER_FRAME, lightHandler);
_arg1.filters = [];
}
public function go_handler(_arg1:MouseEvent):void{
clear_state(currentState);
if (inRoom){
inRoom = false;
this.nextFrame();
} else {
outRoom = false;
this.prevFrame();
};
}
public function addLight(_arg1:MovieClip):void{
_arg1.lightData = {speed:1, blur:5, color:0xFFFFFF};
if (_arg1.hasOwnProperty("lightColor")){
_arg1.lightData.color = _arg1.lightColor;
};
_arg1.addEventListener(Event.ENTER_FRAME, lightHandler);
}
public function update_pause(_arg1:int):void{
pauseOffset = (pauseOffset + _arg1);
}
public function init_gameData():void{
awarded = 0;
startTime = getTimer();
pauseOffset = 0;
isLost = false;
isPassed = false;
isPaused = false;
lastClick = 0;
hasFood = false;
hasMilk = false;
var _local1 = 1;
while (_local1 < 10) {
gameData[_local1].v = (gameData[_local1].initV / 2);
_local1++;
};
}
public function in_drink():void{
if (((inRoom) && ((currentState == STATE_DRINK)))){
cat_mc.gotoAndStop("drink");
};
}
public function leave_state_eat():void{
}
public function in_sleep():void{
if (((inRoom) && ((currentState == STATE_SLEEP)))){
cat_mc.gotoAndStop("sleep");
};
}
public function play_handler(_arg1:MouseEvent):void{
clear_start();
this.play();
}
public function in_eat():void{
if (((inRoom) && ((currentState == STATE_EAT)))){
cat_mc.gotoAndStop("eat");
};
}
public function clear_select_cat():void{
next_btn.removeEventListener(MouseEvent.CLICK, next_handler);
$(this, function (_arg1:MovieClip, _arg2:int):void{
_arg1.removeEventListener(MouseEvent.ROLL_OUT, sel_out);
_arg1.removeEventListener(MouseEvent.ROLL_OVER, sel_over);
_arg1.removeEventListener(MouseEvent.CLICK, sel_click);
}, "sel_");
}
public function top(_arg1:DisplayObject):void{
_arg1.parent.setChildIndex(_arg1, (_arg1.parent.numChildren - 1));
}
public function lightHandler(_arg1:Event):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
_local2.lightData.blur = (_local2.lightData.blur + _local2.lightData.speed);
_local2.filters = [getBitmapFilter(_local2.lightData)];
if (_local2.lightData.blur >= 16){
_local2.lightData.speed = -1;
} else {
if (_local2.lightData.blur <= 5){
_local2.lightData.speed = 1;
};
};
}
public function onAwardRequestProcessed(_arg1:int, _arg2:Object):void{
}
public function game_lost():void{
if (((isLost) || (isPassed))){
return;
};
isLost = true;
this.removeEventListener(Event.ENTER_FRAME, tick);
TweenLite.to(lost_mc, 0.5, {scaleX:1, scaleY:1});
}
public function item_click_handler(_arg1:MouseEvent):void{
var _local2:int = get_id(_arg1.currentTarget.name);
lastClick = _local2;
hook_mc.visible = true;
switch (_local2){
case 1:
hasFood = true;
cat_mc.gotoAndStop(2);
break;
case 2:
cat_mc.gotoAndStop(3);
hasMilk = true;
break;
case 3:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_SLEEP;
item_3.visible = false;
cat_mc.gotoAndStop(4);
break;
case 4:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_WASH;
cat_mc.visible = false;
item_4.cat_mc.gotoAndStop((catId + 1));
break;
case 5:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_TREATMENT;
cat_mc.gotoAndStop(6);
break;
case 6:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_HAND;
cat_mc.gotoAndStop(7);
break;
case 7:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_TOILET;
cat_mc.gotoAndStop(8);
break;
case 8:
if (currentState != STATE_NORMAL){
return;
};
item_8.visible = false;
clear_state(currentState);
currentState = STATE_FUN;
cat_mc.gotoAndStop(9);
break;
case 9:
if (currentState != STATE_NORMAL){
return;
};
clear_state(currentState);
currentState = STATE_TRAINING;
cat_mc.gotoAndStop(10);
break;
};
}
public function sel_click(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
sel_cat(get_id(_local2.name));
}
public function More(_arg1:MouseEvent=null):void{
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
}
public function onScoreRequestProcessed(_arg1:int, _arg2:Object):void{
}
public function sel_over(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
_local2.scaleX = (_local2.scaleY = (_local2.initData.scaleX * 1.05));
}
public function tick(_arg1:Event):void{
var awId:int;
var e = _arg1;
if (((isLost) || (isPassed))){
this.removeEventListener(Event.ENTER_FRAME, tick);
return;
};
if (isPaused){
return;
};
$(this, function (_arg1:MovieClip, _arg2:int):void{
_arg1.tick();
}, "state_");
state1_mc.tick();
if (outRoom){
};
time = (TIME - Math.round((((getTimer() - startTime) - pauseOffset) / 1000)));
if (time <= 0){
awId = 5;
check_over();
} else {
if (time < 60){
awId = 4;
} else {
if (time < 120){
awId = 3;
} else {
if (time < 180){
awId = 2;
} else {
if (time < 240){
awId = 1;
};
};
};
};
};
if (awId != awarded){
awarded = awId;
spill_submit_award(("award" + awId.toString()));
};
}
public function handle_btnSpil(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()));
}
public function check_over():void{
if (state1_mc.value < 0.6){
game_lost();
} else {
game_win();
};
}
public function clear_room():void{
}
public function start_game():void{
init_gameData();
isStart = true;
this.addEventListener(Event.ENTER_FRAME, tick);
}
public function onSubmitAwardButtonClick(_arg1:MouseEvent):void{
_awardsCallbackID = AwardsService.submitAward("award1", onAwardRequestProcessed);
}
public function addV(_arg1:int):void{
var _local2:int = (gameData[_arg1].v + gameData[_arg1].supply);
_local2 = Math.min(_local2, gameData[_arg1].initV);
gameData[_arg1].v = _local2;
cat_mc.gotoAndStop("normal");
cat_mc.visible = true;
currentState = STATE_NORMAL;
switch (_arg1){
case 3:
case 8:
this[("item_" + _arg1.toString())].visible = true;
break;
case 4:
item_4.cat_mc.gotoAndStop(1);
d_mc.visible = true;
break;
};
cat_mc.gotoAndStop(1);
var _local3:MovieClip;
_local3 = hint1_mc;
_local3.scaleX = (_local3.scaleY = 0);
hook_mc.visible = false;
}
public function replay():void{
this.gotoAndStop("start");
}
public function sel_out(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
_local2.scaleX = (_local2.scaleY = _local2.initData.scaleX);
}
public function d_click(_arg1:MouseEvent):void{
var _local2:int = get_id(_arg1.currentTarget.name);
try_2_fill(_local2);
}
public function clear_start():void{
play_btn.removeEventListener(MouseEvent.CLICK, play_handler);
help_btn.removeEventListener(MouseEvent.CLICK, help_handler);
more_btn.removeEventListener(MouseEvent.CLICK, more_handler);
}
public function onServicesFailed(_arg1:ErrorEvent):void{
}
public function getBitmapFilter(_arg1:Object):BitmapFilter{
var _local2:Number = _arg1.color;
var _local3:Number = 1;
var _local4:Number = _arg1.blur;
var _local5:Number = _arg1.blur;
var _local6:Number = 2;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Number = BitmapFilterQuality.HIGH;
return (new GlowFilter(_local2, _local3, _local4, _local5, _local6, _local9, _local7, _local8));
}
public function next_handler(_arg1:MouseEvent):void{
if (catId < 1){
return;
};
clear_select_cat();
this.play();
}
}
}//package _fla
Section 10
//pausemc_660 (_fla.pausemc_660)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import com.greensock.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class pausemc_660 extends MovieClip {
public var pauseTime:int;
public var pauseTimer:int;
public var isPaused:Boolean;
public var main:MovieClip;
public var start_btn:SimpleButton;
public function pausemc_660(){
addFrameScript(0, frame1);
}
public function onRemoved(_arg1:Event):void{
stage.removeEventListener(Event.DEACTIVATE, onDeactived);
start_btn.removeEventListener(MouseEvent.CLICK, start_handler);
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
function frame1(){
main = MovieClip(root);
this.scaleX = (this.scaleY = 0);
isPaused = false;
start_btn.addEventListener(MouseEvent.CLICK, start_handler);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function onDeactived(_arg1:Event):void{
if (((((main.isLost) || (main.isPassed))) || (main.isPaused))){
return;
};
show_pause(true);
}
public function start_handler(_arg1:MouseEvent):void{
show_pause(false);
}
public function show_pause(_arg1:Boolean):void{
if (isPaused == _arg1){
return;
};
isPaused = _arg1;
main.isPaused = _arg1;
if (_arg1){
pauseTimer = getTimer();
TweenLite.to(this, 0.3, {scaleX:1, scaleY:1});
} else {
TweenLite.to(this, 0.3, {scaleX:0, scaleY:0});
main.update_pause((getTimer() - pauseTimer));
};
}
}
}//package _fla
Section 11
//sadqwdwqdqw_522 (_fla.sadqwdwqdqw_522)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class sadqwdwqdqw_522 extends MovieClip {
public function sadqwdwqdqw_522(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
MovieClip(root).addV(7);
}
}
}//package _fla
Section 12
//shibai_648 (_fla.shibai_648)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class shibai_648 extends MovieClip {
public var main:MovieClip;
public var replay_btn:SimpleButton;
public var more_btn:SimpleButton;
public var cat_mc:MovieClip;
public function shibai_648(){
addFrameScript(0, frame1);
}
public function onRemoved(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
replay_btn.removeEventListener(MouseEvent.CLICK, replay_handler);
more_btn.removeEventListener(MouseEvent.CLICK, more);
}
function frame1(){
cat_mc.gotoAndStop(MovieClip(root).catId);
main = MovieClip(root);
replay_btn.addEventListener(MouseEvent.CLICK, replay_handler);
more_btn.addEventListener(MouseEvent.CLICK, more);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function replay_handler(_arg1:MouseEvent):void{
main.replay();
}
public function more(_arg1:MouseEvent):void{
main.More();
}
}
}//package _fla
Section 13
//sjizisdfs_647 (_fla.sjizisdfs_647)
package _fla {
import flash.display.*;
public dynamic class sjizisdfs_647 extends MovieClip {
public function sjizisdfs_647(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 14
//Timeline_359 (_fla.Timeline_359)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_359 extends MovieClip {
public var bar_mc:MovieClip;
public var normalState:Object;
public var warningState:Object;
public var id:int;
public var a:Array;
public var rect:Rectangle;
public var g:Graphics;
public var o:Object;
public var _txt:TextField;
public var r:Array;
public var value:Number;
public var main:MovieClip;
public function Timeline_359(){
addFrameScript(0, frame1);
}
public function draw_state(_arg1:Number):void{
var _local2:Matrix = new Matrix();
_txt.text = (Math.round((_arg1 * 100)).toString() + "%");
_local2.createGradientBox((rect.width * _arg1), rect.height, (Math.PI / 2));
g.clear();
if (_arg1 <= 0){
main.game_lost();
return;
};
var _local3:Object = normalState;
if (_arg1 < 0.4){
_local3 = warningState;
};
value = _arg1;
g.beginGradientFill("linear", _local3.c, a, r, _local2);
g.drawRoundRect(0, 0, (rect.width * _arg1), rect.height, 6, 6);
g.endFill();
}
public function tick():void{
var _local1:Number;
if (id != 0){
o.v = (o.v - o.speed);
if (o.v < 0){
o.v = 0;
};
_local1 = (o.v / o.initV);
draw_state(_local1);
if (_local1 <= 0.1){
main.show_warning(id);
};
} else {
draw_state(get_avg());
};
}
public function get_avg():Number{
var _local1:Number = 0;
var _local2:Number = 1;
while (_local2 <= 10) {
_local1 = (_local1 + (main.gameData[_local2].v / main.gameData[_local2].initV));
_local2++;
};
return ((_local1 / 10));
}
function frame1(){
warningState = {c:[16731530, 0xFF0000, 16731530]};
normalState = {c:[8568831, 12031, 8568831]};
a = [0xFF, 0xFF, 0xFF];
g = bar_mc.graphics;
rect = bar_mc.getRect(bar_mc);
r = [63, 127, 219];
_txt.visible = false;
bar_mc.removeChildAt(0);
main = MovieClip(root);
id = main.get_id(this.name);
if (id != 0){
o = main.gameData[id];
};
}
}
}//package _fla
Section 15
//Timeline_361 (_fla.Timeline_361)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_361 extends MovieClip {
public var bar_mc:MovieClip;
public var normalState:Object;
public var warningState:Object;
public var id:int;
public var a:Array;
public var rect:Rectangle;
public var g:Graphics;
public var o:Object;
public var _txt:TextField;
public var r:Array;
public var value:Number;
public var main:MovieClip;
public function Timeline_361(){
addFrameScript(0, frame1);
}
public function draw_state(_arg1:Number):void{
var _local2:Matrix = new Matrix();
_txt.text = (Math.round((_arg1 * 100)).toString() + "%");
_local2.createGradientBox((rect.width * _arg1), rect.height, (Math.PI / 2));
g.clear();
if (_arg1 <= 0){
main.game_lost();
return;
};
var _local3:Object = normalState;
if (_arg1 < 0.4){
_local3 = warningState;
};
value = _arg1;
g.beginGradientFill("linear", _local3.c, a, r, _local2);
g.drawRoundRect(0, 0, (rect.width * _arg1), rect.height, 6, 6);
g.endFill();
}
public function tick():void{
var _local1:Number;
if (id != 0){
o.v = (o.v - o.speed);
if (o.v < 0){
o.v = 0;
};
_local1 = (o.v / o.initV);
draw_state(_local1);
if (_local1 <= 0.1){
main.show_warning(id);
};
} else {
draw_state(get_avg());
};
}
public function get_avg():Number{
var _local1:Number = 0;
var _local2:Number = 1;
while (_local2 < 10) {
_local1 = (_local1 + (main.gameData[_local2].v / main.gameData[_local2].initV));
_local2++;
};
return ((_local1 / 10));
}
function frame1(){
warningState = {c:[16731530, 0xFF0000, 16731530]};
normalState = {c:[8568831, 12031, 8568831]};
a = [0xFF, 0xFF, 0xFF];
g = bar_mc.graphics;
rect = bar_mc.getRect(bar_mc);
r = [63, 127, 219];
_txt.visible = false;
bar_mc.removeChildAt(0);
main = MovieClip(root);
id = main.get_id(this.name);
if (id != 0){
o = main.gameData[id];
};
}
}
}//package _fla
Section 16
//Timeline_379 (_fla.Timeline_379)
package _fla {
import flash.display.*;
public dynamic class Timeline_379 extends MovieClip {
public function Timeline_379(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 17
//Timeline_380 (_fla.Timeline_380)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_380 extends MovieClip {
public function Timeline_380(){
addFrameScript(65, frame66);
}
function frame66(){
stop();
MovieClip(root).addV(4);
}
}
}//package _fla
Section 18
//Timeline_388 (_fla.Timeline_388)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_388 extends MovieClip {
public function Timeline_388(){
addFrameScript(84, frame85);
}
function frame85(){
stop();
MovieClip(root).addV(4);
}
}
}//package _fla
Section 19
//Timeline_396 (_fla.Timeline_396)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_396 extends MovieClip {
public function Timeline_396(){
addFrameScript(72, frame73);
}
function frame73(){
stop();
MovieClip(root).addV(4);
}
}
}//package _fla
Section 20
//Timeline_407 (_fla.Timeline_407)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_407 extends MovieClip {
public var m1:MovieClip;
public var m2:MovieClip;
public var m3:MovieClip;
public function Timeline_407(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
MovieClip(root).cat_mc = m1;
}
function frame2(){
stop();
MovieClip(root).cat_mc = m2;
}
function frame3(){
stop();
MovieClip(root).cat_mc = m3;
}
}
}//package _fla
Section 21
//Timeline_408 (_fla.Timeline_408)
package _fla {
import flash.display.*;
public dynamic class Timeline_408 extends MovieClip {
public function Timeline_408(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 22
//Timeline_411 (_fla.Timeline_411)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_411 extends MovieClip {
public function Timeline_411(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
MovieClip(root).addV(1);
}
}
}//package _fla
Section 23
//Timeline_426 (_fla.Timeline_426)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_426 extends MovieClip {
public function Timeline_426(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
MovieClip(root).addV(2);
}
}
}//package _fla
Section 24
//Timeline_435 (_fla.Timeline_435)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_435 extends MovieClip {
public function Timeline_435(){
addFrameScript(154, frame155);
}
function frame155(){
stop();
MovieClip(root).addV(3);
}
}
}//package _fla
Section 25
//Timeline_447 (_fla.Timeline_447)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_447 extends MovieClip {
public function Timeline_447(){
addFrameScript(124, frame125);
}
function frame125(){
stop();
MovieClip(root).addV(5);
}
}
}//package _fla
Section 26
//Timeline_454 (_fla.Timeline_454)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_454 extends MovieClip {
public function Timeline_454(){
addFrameScript(70, frame71);
}
function frame71(){
stop();
MovieClip(root).addV(6);
}
}
}//package _fla
Section 27
//Timeline_460 (_fla.Timeline_460)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_460 extends MovieClip {
public function Timeline_460(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
MovieClip(root).addV(8);
}
}
}//package _fla
Section 28
//Timeline_465 (_fla.Timeline_465)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_465 extends MovieClip {
public function Timeline_465(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
MovieClip(root).addV(9);
}
}
}//package _fla
Section 29
//Timeline_476 (_fla.Timeline_476)
package _fla {
import flash.display.*;
public dynamic class Timeline_476 extends MovieClip {
public function Timeline_476(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 30
//Timeline_480 (_fla.Timeline_480)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_480 extends MovieClip {
public function Timeline_480(){
addFrameScript(185, frame186);
}
function frame186(){
stop();
MovieClip(root).addV(1);
}
}
}//package _fla
Section 31
//Timeline_498 (_fla.Timeline_498)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_498 extends MovieClip {
public function Timeline_498(){
addFrameScript(165, frame166);
}
function frame166(){
stop();
MovieClip(root).addV(2);
}
}
}//package _fla
Section 32
//Timeline_499 (_fla.Timeline_499)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_499 extends MovieClip {
public function Timeline_499(){
addFrameScript(154, frame155);
}
function frame155(){
stop();
MovieClip(root).addV(3);
}
}
}//package _fla
Section 33
//Timeline_510 (_fla.Timeline_510)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_510 extends MovieClip {
public function Timeline_510(){
addFrameScript(124, frame125);
}
function frame125(){
stop();
MovieClip(root).addV(5);
}
}
}//package _fla
Section 34
//Timeline_519 (_fla.Timeline_519)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_519 extends MovieClip {
public function Timeline_519(){
addFrameScript(70, frame71);
}
function frame71(){
stop();
MovieClip(root).addV(6);
}
}
}//package _fla
Section 35
//Timeline_524 (_fla.Timeline_524)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_524 extends MovieClip {
public function Timeline_524(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
MovieClip(root).addV(8);
}
}
}//package _fla
Section 36
//Timeline_530 (_fla.Timeline_530)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_530 extends MovieClip {
public function Timeline_530(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
MovieClip(root).addV(9);
}
}
}//package _fla
Section 37
//Timeline_539 (_fla.Timeline_539)
package _fla {
import flash.display.*;
public dynamic class Timeline_539 extends MovieClip {
public function Timeline_539(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 38
//Timeline_543 (_fla.Timeline_543)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_543 extends MovieClip {
public function Timeline_543(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
MovieClip(root).addV(1);
}
}
}//package _fla
Section 39
//Timeline_563 (_fla.Timeline_563)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_563 extends MovieClip {
public function Timeline_563(){
addFrameScript(159, frame160);
}
function frame160(){
stop();
MovieClip(root).addV(2);
}
}
}//package _fla
Section 40
//Timeline_564 (_fla.Timeline_564)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_564 extends MovieClip {
public function Timeline_564(){
addFrameScript(154, frame155);
}
function frame155(){
stop();
MovieClip(root).addV(3);
}
}
}//package _fla
Section 41
//Timeline_585 (_fla.Timeline_585)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_585 extends MovieClip {
public function Timeline_585(){
addFrameScript(124, frame125);
}
function frame125(){
stop();
MovieClip(root).addV(5);
}
}
}//package _fla
Section 42
//Timeline_595 (_fla.Timeline_595)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_595 extends MovieClip {
public function Timeline_595(){
addFrameScript(70, frame71);
}
function frame71(){
stop();
MovieClip(root).addV(6);
}
}
}//package _fla
Section 43
//Timeline_602 (_fla.Timeline_602)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_602 extends MovieClip {
public function Timeline_602(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
MovieClip(root).addV(8);
}
}
}//package _fla
Section 44
//Timeline_608 (_fla.Timeline_608)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Timeline_608 extends MovieClip {
public function Timeline_608(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
MovieClip(root).addV(9);
}
}
}//package _fla
Section 45
//Timeline_626 (_fla.Timeline_626)
package _fla {
import flash.display.*;
public dynamic class Timeline_626 extends MovieClip {
public function Timeline_626(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 46
//times_646 (_fla.times_646)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class times_646 extends MovieClip {
public var bit_2:MovieClip;
public var bit_3:MovieClip;
public var main:MovieClip;
public var bit_1:MovieClip;
public function times_646(){
addFrameScript(0, frame1);
}
function frame1(){
main = MovieClip(root);
this.addEventListener(Event.ENTER_FRAME, do_update);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function onRemoved(_arg1:Event):void{
this.removeEventListener(Event.ENTER_FRAME, do_update);
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function do_update(_arg1:Event):void{
var _local2:int = Math.floor((main.time / 60));
var _local3:int = (main.time % 60);
bit_1.gotoAndStop((_local2 + 1));
var _local4:int = (_local3 / 10);
var _local5:int = (_local3 % 10);
bit_2.gotoAndStop((_local4 + 1));
bit_3.gotoAndStop((_local5 + 1));
}
}
}//package _fla
Section 47
//win_658 (_fla.win_658)
package _fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class win_658 extends MovieClip {
public var main:MovieClip;
public var replay_btn:SimpleButton;
public var more_btn:SimpleButton;
public var cat_mc:MovieClip;
public function win_658(){
addFrameScript(0, frame1);
}
public function onRemoved(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
replay_btn.removeEventListener(MouseEvent.CLICK, replay_handler);
more_btn.removeEventListener(MouseEvent.CLICK, more);
}
function frame1(){
cat_mc.gotoAndStop(MovieClip(root).catId);
main = MovieClip(root);
replay_btn.addEventListener(MouseEvent.CLICK, replay_handler);
more_btn.addEventListener(MouseEvent.CLICK, more);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
public function replay_handler(_arg1:MouseEvent):void{
main.replay();
}
public function more(_arg1:MouseEvent):void{
main.More();
}
}
}//package _fla
Section 48
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 49
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_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.cachedOrphan)) && (_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;
_arg1.cachedOrphan = false;
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
_arg1.cachedOrphan = true;
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package com.greensock.core
Section 50
//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 cachedOrphan:Boolean;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
public var cachedPauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.5;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2)!=null) ? _arg2 : {};
if (this.vars.isGSVars){
this.vars = this.vars.vars;
};
this.cachedDuration = (this.cachedTotalDuration = _arg1);
_delay = (this.vars.delay) ? Number(this.vars.delay) : 0;
this.cachedTimeScale = (this.vars.timeScale) ? Number(this.vars.timeScale) : 1;
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
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{
var _local2:Number = (_arg1 / this.cachedDuration);
this.cachedDuration = (this.cachedTotalDuration = _arg1);
if (((((this.active) && (!(this.cachedPaused)))) && (!((_arg1 == 0))))){
this.setTotalTime((this.cachedTotalTime * _local2), true);
};
setDirtyCache(false);
}
public function invalidate():void{
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.totalDuration, _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 totalTime():Number{
return (this.cachedTotalTime);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
this.cachedPauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - this.cachedPauseTime));
this.cachedPauseTime = 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 = (((this.cachedPauseTime) || ((this.cachedPauseTime == 0)))) ? this.cachedPauseTime : 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{
this.gc = !(_arg1);
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.cachedOrphan))){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (((!(_arg2)) && (!(this.cachedOrphan)))){
this.timeline.remove(this, true);
};
};
return (false);
}
}
}//package com.greensock.core
Section 51
//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 52
//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 {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:int;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.52;
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, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
if (_arg1 == null){
throw (new Error("Cannot tween a null object."));
};
this.target = _arg1;
if ((((this.target is TweenCore)) && (this.vars.timeScale))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
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);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_local4) && (!(this.gc)))){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
return (false);
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (this.vars.onInit){
this.vars.onInit.apply(null, this.vars.onInitParams);
};
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 > -1) {
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("onInitAllProps", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
if (((!((_local3 == _local4.target.propName))) || ((_local4.name == "")))){
delete propTweenLookup[_local3];
};
};
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) && (!((_arg1 == _overwrittenProps))))){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false, _arg3:Object=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
if ((_arg1 in masterList)){
_local4 = masterList[_arg1];
_local5 = _local4.length;
while (--_local5 > -1) {
_local6 = _local4[_local5];
if (!_local6.gc){
if (_arg2){
_local6.complete(false, false);
};
if (_arg3 != null){
_local6.killVars(_arg3);
};
if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){
_local6.setEnabled(false, false);
};
};
};
if (_arg3 == null){
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 = (rootFrame + 1);
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 > -1) {
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 53
//AwardsService (com.spilgames.api.AwardsService)
package com.spilgames.api {
public class AwardsService {
public static function submitAward(_arg1:String, _arg2:Function=null):int{
return (SpilGamesServices.getInstance().send("Awards", "submitAward", _arg2, {tag:_arg1, userName:User.getUserName(), userHash:User.getUserHash()}));
}
}
}//package com.spilgames.api
Section 54
//ScoreService (com.spilgames.api.ScoreService)
package com.spilgames.api {
public class ScoreService {
public static function submitScore(_arg1:int, _arg2:Function=null):int{
return (SpilGamesServices.getInstance().send("Score", "submitScore", _arg2, {score:_arg1, userName:User.getUserName(), userHash:User.getUserHash()}));
}
}
}//package com.spilgames.api
Section 55
//SpilGamesServices (com.spilgames.api.SpilGamesServices)
package com.spilgames.api {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class SpilGamesServices extends MovieClip {
private const DEFAULT_CONNECTION_LOCATION:String = "http://www8.agame.com/games/flash/services/ServicesConnection.swf";
private var previousFrameTime:Number;
private var _connected:Boolean;// = false
private var _numConnectionLoadTries:uint;// = 0
private var _request:URLRequest;
private var currentDelay:Number;// = 0
private var _connecting:Boolean;// = false
private var _loader:Loader;
private var _servicesConnection;// = null
private var _alwaysInFront:Boolean;// = false
public static const INVALID_ID:int = -1;
public static const CONFIGURATION_FAILED:String = "configurationFailure";
private static const MAX_CONNECTION_LOAD_RETRIES:uint = 99;
public static const INVALID_DOMAIN:String = "invalidDomain";
private static var _instance:SpilGamesServices = null;
public function SpilGamesServices(_arg1:Private=null){
if (!_arg1){
throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance"));
};
}
private function handleRemovedFromStage(_arg1:Event):void{
trace("WARNING: please do not remove SpilGamesServices from the stage");
}
private function handleLoadComplete(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_servicesConnection = LoaderInfo(_arg1.target).content;
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
addChild(_servicesConnection);
}
public function send(_arg1:String, _arg2:String, _arg3:Function, _arg4:Object=null):int{
if (isReady()){
return (_servicesConnection.send(_arg1, _arg2, _arg3, _arg4));
};
return (INVALID_ID);
}
private function handleServicesFailed(_arg1:ErrorEvent):void{
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
_connecting = false;
if (hasEventListener("servicesFailed")){
dispatchEvent(new ErrorEvent("servicesFailed", false, false, _arg1.text));
};
}
public function get version():String{
return ("1.1");
}
public function isReady():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isReady())));
}
private function handleIOError(_arg1:IOErrorEvent):void{
_numConnectionLoadTries++;
if (_numConnectionLoadTries > MAX_CONNECTION_LOAD_RETRIES){
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connecting = false;
trace("ERROR: SpilGamesServices failed to load the connection object");
if (hasEventListener(_arg1.type)){
dispatchEvent(_arg1);
};
} else {
trace(("WARN: SpilGamesServices failed to load the connection object, retry #" + _numConnectionLoadTries));
previousFrameTime = getTimer();
addEventListener(Event.ENTER_FRAME, updateConnectionRetry);
};
}
public function disconnect():void{
if (_servicesConnection){
_servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.removeEventListener("serviceError", handleServiceError);
if (_connected){
_servicesConnection.disconnect();
};
removeChild(_servicesConnection);
};
_servicesConnection = null;
if (_loader){
try {
_loader.close();
} catch(e:Error) {
} finally {
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
};
_loader = null;
};
removeEventListener(Event.ENTER_FRAME, bringToFront);
removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (parent){
parent.removeChild(this);
};
_connected = (_connecting = false);
}
private function handleServicesReady(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connected = true;
_connecting = false;
dispatchEvent(new Event("servicesReady"));
}
public function get connection(){
return (_servicesConnection);
}
private function updateConnectionRetry(_arg1:Event):void{
var _local2:Number = getTimer();
var _local3:Number = ((_local2 - previousFrameTime) / 1000);
currentDelay = (currentDelay + _local3);
if (currentDelay >= 2){
trace(("WARN: SpilGamesServices trying to reconnect after: " + currentDelay));
_loader.load(_request);
removeEventListener(Event.ENTER_FRAME, updateConnectionRetry);
currentDelay = 0;
};
previousFrameTime = _local2;
}
private function handleServiceError(_arg1:Event):void{
var _local2:String;
if (hasEventListener("serviceError")){
_local2 = "";
if ((_arg1 is ErrorEvent)){
_local2 = ErrorEvent(_arg1).text;
} else {
_local2 = _arg1.toString();
};
dispatchEvent(new ErrorEvent("serviceError", false, false, _local2));
};
}
public function isServiceAvailable(_arg1:String):Boolean{
return (((isReady()) && (_servicesConnection.isServiceAvailable(_arg1))));
}
public function getSiteID():int{
if (_servicesConnection != null){
return (_servicesConnection.getSiteID());
};
return (INVALID_ID);
}
public function getChannelID():int{
if (_servicesConnection != null){
return (_servicesConnection.getChannelID());
};
return (INVALID_ID);
}
public function set alwaysInFront(_arg1:Boolean):void{
if (_alwaysInFront != _arg1){
_alwaysInFront = _arg1;
if (_alwaysInFront){
addEventListener(Event.ENTER_FRAME, bringToFront);
} else {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
public function getItemID():int{
if (_servicesConnection != null){
return (_servicesConnection.getItemID());
};
return (INVALID_ID);
}
public function allowDomain(_arg1:String):void{
Security.allowDomain("*");
Security.allowInsecureDomain("*");
}
public function connect(_arg1:DisplayObjectContainer, ... _args):void{
var _local3:String;
var _local4:URLVariables;
var _local5:Date;
if (((!(_connecting)) && (!(_connected)))){
if (!_arg1.stage){
throw (new Error("The given clip must be present in the display list (added to stage)"));
};
_connecting = true;
_arg1.stage.addChild(this);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){
_local3 = root.loaderInfo.parameters["servicesLoc"];
_request = new URLRequest(_local3);
} else {
_local3 = DEFAULT_CONNECTION_LOCATION;
_local4 = new URLVariables();
_local5 = new Date();
_local4.nocache = ((((_local5.fullYear * 12) + (_local5.month + 1)) * 31) + _local5.day);
_request = new URLRequest(_local3);
_request.data = _local4;
};
allowDomain(_local3);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_loader.load(_request);
};
}
public function get alwaysInFront():Boolean{
return (_alwaysInFront);
}
public function get connecting():Boolean{
return (_connecting);
}
public function isDomainAllowed():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid())));
}
public function bringToFront(_arg1:Event=null):void{
var e = _arg1;
if (parent){
try {
parent.setChildIndex(this, (parent.numChildren - 1));
} catch(e:Error) {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
public static function getInstance():SpilGamesServices{
if (!_instance){
_instance = new SpilGamesServices(new Private());
};
return (_instance);
}
}
}//package com.spilgames.api
class Private {
private function Private(){
}
}
Section 56
//User (com.spilgames.api.User)
package com.spilgames.api {
import flash.display.*;
public class User {
public static function getUserName():String{
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserName());
};
return ("");
}
public static function isGuest():Boolean{
var _local2:DisplayObject;
var _local3:Object;
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.isGuest());
};
_local2 = SpilGamesServices.getInstance().root;
if (_local2.loaderInfo != null){
_local3 = _local2.loaderInfo.parameters;
return (((((((!(_local3.username)) || ((_local3.username == "")))) || (!(_local3.hash)))) || ((_local3.hash == ""))));
};
return (false);
}
public static function getUserHash():String{
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserHash());
};
return ("");
}
}
}//package com.spilgames.api
Section 57
//Brand (spill.localisation.Brand)
package spill.localisation {
import flash.xml.*;
public class Brand {
public var domain:String;
public var emailPage:String;
public var name:String;
public var site_id:uint;
public var isExternal:Boolean;// = false
public var id:Number;
public var hostingDomain:String;// = ""
public var preferedLanguage:String;// = ""
public var moreLink:String;// = ""
public var hasSendToFriendLink:Boolean;// = true
public var emailLink:String;// = "game"
public var portalGroup:uint;
public var useGoogleAnalitics:Boolean;// = true
private static const topLevelDoubles:String = ((((((((((((((("ac.cn,ac.jp,ac.uk,ad.jp,adm.br,adv.br,agr.br," + "ah.cn,am.br,arq.br,art.br,asn.au,ato.br,av.tr,bel.tr,bio.br,biz.tr,bj.cn,bmd.br,") + "cim.br,cng.br,cnt.br,co.at,co.jp,co.uk,com.au,com.br,com.cn,com.eg,com.hk,com.mx,") + "com.ru,com.tr,com.tw,conf.au,cq.cn,csiro.au,dr.tr,ecn.br,edu.au,edu.br,edu.tr,") + "emu.id.au,eng.br,esp.br,etc.br,eti.br,eun.eg,far.br,fj.cn,fm.br,fnd.br,fot.br,") + "fst.br,g12.br,gb.com,gb.net,gd.cn,gen.tr,ggf.br,gob.mx,gov.au,gov.br,gov.cn,") + "gov.hk,gov.tr,gr.jp,gs.cn,gx.cn,gz.cn,ha.cn,hb.cn,he.cn,hi.cn,hk.cn,hl.cn,hn.cn,") + "id.au,idv.tw,imb.br,ind.br,inf.br,info.au,info.tr,jl.cn,jor.br,js.cn,jx.cn,k12.tr,") + "lel.br,ln.cn,ltd.uk,mat.br,me.uk,med.br,mil.br,mil.tr,mo.cn,mus.br,name.tr,ne.jp,") + "net.au,net.br,net.cn,net.eg,net.hk,net.lu,net.mx,net.ru,net.tr,net.tw,net.uk,") + "nm.cn,no.com,nom.br,not.br,ntr.br,nx.cn,odo.br,oop.br,or.at,or.jp,org.au,org.br,") + "org.cn,org.hk,org.lu,org.ru,org.tr,org.tw,org.uk,plc.uk,pol.tr,pp.ru,ppg.br,pro.br,") + "psc.br,psi.br,qh.cn,qsl.br,rec.br,sc.cn,sd.cn,se.com,se.net,sh.cn,slg.br,sn.cn,") + "srv.br,sx.cn,tel.tr,tj.cn,tmp.br,trd.br,tur.br,tv.br,tw.cn,uk.com,uk.net,vet.br,") + "wattle.id.au,web.tr,xj.cn,xz.cn,yn.cn,zj.cn,zlg.br,co.nr,co.nz,com.fr,com.ph,com.ar,") + "com.id,com.in");
private function get utm_campaign():String{
if (isExternal){
return (("utm_campaign=" + hostingDomain));
};
return ("");
}
public function exportXML():XML{
var _local3:XML;
var _local1:XML = <portal/>
;
_local1.@id = site_id;
_local1.@language = preferedLanguage;
_local1.@channel = portalGroup;
var _local2:XML = <domain/>
;
_local2.appendChild(new XMLNode(3, domain));
_local1.appendChild(_local2);
if (moreLink){
_local3 = <more_games_path/>
;
_local3.appendChild(new XMLNode(3, moreLink));
_local1.appendChild(_local3);
};
_local2 = <game_path/>
;
_local2.appendChild(new XMLNode(3, emailLink));
_local1.appendChild(_local2);
if (!useGoogleAnalitics){
_local1.attributes.noGoogleAnalitics = true;
};
if (!hasSendToFriendLink){
_local1.attributes.noSendToFriendLink = true;
};
return (_local1);
}
public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{
var _local6:String = ("http://" + domain);
_local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local6 = (_local6 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
trace(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local6 = (_local6 + ("&utm_source=" + _arg4));
if (((!((_arg5 == ""))) && (!((_arg5 == null))))){
_local6 = (_local6 + ("&utm_content=" + _arg5));
};
};
return (_local6);
}
private function get utm_source():String{
return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal"));
}
public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{
var _local5:String = ("http://" + domain);
_local5 = (_local5 + ("/" + moreLink));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg2) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg3 = stripSubDomain(_arg3);
if (_arg3 == "localhost"){
_arg3 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg3));
if (((!((_arg4 == ""))) && (!((_arg4 == null))))){
_local5 = (_local5 + ("&utm_content=" + _arg4));
};
};
return (_local5);
}
public function get backgroundColor():uint{
return (PortalGroup.backgroundColors[portalGroup]);
}
private function get utm_term():String{
return ("utm_term=");
}
public function importXML(_arg1:XMLNode):void{
}
public function getSendToFriendLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String=""):String{
if (!hasSendToFriendLink){
return (getMoreGamesLink(_arg1, _arg3));
};
var _local5:String = ("http://" + domain);
_local5 = (_local5 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg4));
_local5 = (_local5 + "&utm_content=send_to_friend");
};
return (_local5);
}
public static function stripSubDomain(_arg1:String):String{
if (!_arg1){
return ("");
};
var _local2:Array = _arg1.split(".");
if (_local2.length <= 2){
return (_arg1);
};
_local2 = _local2.reverse();
if (topLevelDoubles.indexOf((((_local2[1] + ".") + _local2[0]) + ",")) > 0){
return (((((_local2[2] + ".") + _local2[1]) + ".") + _local2[0]));
};
return (((_local2[1] + ".") + _local2[0]));
}
}
}//package spill.localisation
Section 58
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.display.*;
import flash.events.*;
public class BrandingLogo extends MovieClip {
public function BrandingLogo(){
addFrameScript(0, frame1);
super();
stop();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
if (stage){
added();
};
brandingChanged();
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("brandingChanged", brandingChanged, false, 0, true);
brandingChanged();
}
private function brandingChanged(_arg1:Event=null):void{
if (SpilGame.currentBranding){
gotoAndStop(SpilGame.currentBranding.domain);
};
}
function frame1(){
stop();
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("brandingChanged", brandingChanged);
}
}
}//package spill.localisation
Section 59
//Brandings (spill.localisation.Brandings)
package spill.localisation {
public class Brandings {
private static var brands_by_id:Object = new Object();
private static var brands_by_domain:Object = new Object();
public static function getBrandByID(_arg1:Number):Brand{
return (brands_by_id[_arg1]);
}
public static function getBrandsArray():Array{
var _local2:Brand;
var _local1:Array = new Array();
for each (_local2 in brands_by_domain) {
_local1.push(_local2);
};
return (_local1);
}
private static function addBrand(_arg1:Brand):Brand{
if (brands_by_domain[_arg1.domain]){
trace(("ERROR: Attempting to add duplicate brand by domain: " + _arg1.domain));
} else {
brands_by_domain[_arg1.domain] = _arg1;
};
if (brands_by_id[_arg1.site_id]){
trace(("ERROR: Attempting to add duplicate brand by id: " + _arg1.site_id));
} else {
brands_by_id[_arg1.site_id] = _arg1;
};
return (_arg1);
}
public static function initialize():void{
var _local1:Brand;
_local1 = new Brand();
_local1.site_id = 79;
_local1.domain = "www.agame.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TEENS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 88;
_local1.domain = "www.gamesgames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 90;
_local1.domain = "www.girlsgogames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 45;
_local1.domain = "www.a10.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.YOUNG_ADULTS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 92;
_local1.domain = "www.games.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 107;
_local1.domain = "www.agame.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.TEENS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 102;
_local1.domain = "www.girlsgogames.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 2;
_local1.domain = "www.game.com.cn";
_local1.moreLink = "moregames/";
_local1.preferedLanguage = "cn";
_local1.portalGroup = PortalGroup.NONE;
_local1.useGoogleAnalitics = false;
_local1.hasSendToFriendLink = false;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 25;
_local1.domain = "www.spel.nl";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 1;
_local1.domain = "www.spelletjes.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 93;
_local1.domain = "www.girlsgogames.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 12;
_local1.domain = "www.jeu.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 95;
_local1.domain = "www.girlsgogames.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 11;
_local1.domain = "www.jeux.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 26;
_local1.domain = "www.spielen.com";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 94;
_local1.domain = "www.girlsgogames.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 5;
_local1.domain = "www.jetztspielen.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 109;
_local1.domain = "www.minigry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 16;
_local1.domain = "www.gry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 98;
_local1.domain = "www.girlsgogames.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 108;
_local1.domain = "www.spel.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 100;
_local1.domain = "www.girlsgogames.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 44;
_local1.domain = "www.spela.se";
_local1.emailLink = "spel_";
_local1.preferedLanguage = "se";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 106;
_local1.domain = "www.giocaregratis.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 15;
_local1.domain = "www.gioco.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 99;
_local1.domain = "www.girlsgogames.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 97;
_local1.domain = "www.zapjuegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 86;
_local1.domain = "www.juegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 96;
_local1.domain = "www.juegosdechicas.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 122;
_local1.domain = "www.girlsgogames.es";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 125;
_local1.domain = "www.juegos.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 126;
_local1.domain = "www.juegosdechicas.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 127;
_local1.domain = "www.juegos.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 128;
_local1.domain = "www.juegosdechicas.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 91;
_local1.domain = "www.clickjogos.com";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 101;
_local1.domain = "www.girlsgogames.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 50;
_local1.domain = "www.ojogos.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 55;
_local1.domain = "www.games.co.id";
_local1.emailLink = "permainanme";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "id";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 105;
_local1.domain = "www.flashgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 104;
_local1.domain = "www.girlsgogames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 103;
_local1.domain = "www.ourgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 24;
_local1.domain = "www.game.co.in";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "in";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 87;
_local1.domain = "www.ojogos.pt";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pt";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 120;
_local1.domain = "www.egames.jp";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "jp";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 121;
_local1.domain = "www.dailygame.com";
_local1.emailLink = "/game/";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 123;
_local1.domain = "www.zapapa.com";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.ZAPAPA;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 124;
_local1.domain = "www.zapapa.nl";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.HYVES;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 0;
_local1.domain = "gamedev.dev.spilgames.com";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
}
public static function exportXML():XML{
var _local2:Brand;
var _local1:XML = <portals/>
;
for each (_local2 in brands_by_domain) {
_local1.appendChild(_local2.exportXML());
};
return (_local1);
}
public static function getBrandByDomain(_arg1:String):Brand{
return (brands_by_domain[_arg1]);
}
public static function hasDomain(_arg1:String):Boolean{
return (!((brands_by_domain[_arg1] == null)));
}
}
}//package spill.localisation
Section 60
//Language (spill.localisation.Language)
package spill.localisation {
import flash.xml.*;
public class Language {
public var portal_groups:Array;
public var references:Array;
public var name:String;
public var embedInputFonts:Boolean;// = true
public var id:uint;
public var forceFont:String;// = null
public var textLanguage:String;
public var bwcId:int;
public var embedFonts:Boolean;// = true
public var displayName:String;// = ""
public var dname:String;
public function Language(_arg1:String, _arg2:String=null){
references = [];
super();
name = _arg1;
dname = _arg2;
portal_groups = new Array();
}
public function exportXML():XMLNode{
var _local1:XMLNode = new XMLNode(1, "language");
_local1.attributes.name = name;
if (textLanguage != null){
_local1.attributes.textLanguage = textLanguage;
};
if (references.length){
_local1.attributes.references = references.toString();
};
_local1.attributes.id = bwcId;
var _local2:XMLNode = new XMLNode(1, "display_name");
_local2.firstChild = new XMLNode(3, displayName);
_local1.appendChild(_local2);
var _local3:Array = [];
var _local4:Array = PortalGroup.channelNames;
var _local5:int;
while (_local5 < _local4.length) {
_local3.push(Brandings.getBrandByDomain(portal_groups[_local5]).site_id);
_local5++;
};
_local1.attributes.channels = _local3.join(",");
return (_local1);
}
public function get p_teen():String{
return (portal_groups[PortalGroup.YOUNG_ADULTS]);
}
public function set p_hyves(_arg1:String):void{
portal_groups[PortalGroup.HYVES] = _arg1;
}
public function set p_teen(_arg1:String):void{
portal_groups[PortalGroup.YOUNG_ADULTS] = _arg1;
}
public function get p_tween():String{
return (portal_groups[PortalGroup.TEENS]);
}
public function get p_family():String{
return (portal_groups[PortalGroup.FAMILY]);
}
public function get p_girl():String{
trace("Language", portal_groups[PortalGroup.GIRL]);
return (portal_groups[PortalGroup.GIRL]);
}
public function get p_hyves():String{
return (portal_groups[PortalGroup.HYVES]);
}
public function set p_girl(_arg1:String):void{
portal_groups[PortalGroup.GIRL] = _arg1;
}
public function set p_zapapa(_arg1:String):void{
portal_groups[PortalGroup.ZAPAPA] = _arg1;
}
public function get displayAcronim():String{
return ((dname) ? dname : name);
}
public function set p_family(_arg1:String):void{
portal_groups[PortalGroup.FAMILY] = _arg1;
}
public function set p_tween(_arg1:String):void{
portal_groups[PortalGroup.TEENS] = _arg1;
}
public function get p_zapapa():String{
return (portal_groups[PortalGroup.ZAPAPA]);
}
}
}//package spill.localisation
Section 61
//Languages (spill.localisation.Languages)
package spill.localisation {
import flash.xml.*;
public class Languages {
public static var languages:Object = new Object();
private static var _init:Boolean = false;
public static function initialize():void{
var _local1:Language;
if (_init){
return;
};
_init = true;
_local1 = new Language("nl");
_local1.displayName = "Nederlands";
_local1.p_family = "www.spelletjes.nl";
_local1.p_tween = "www.spel.nl";
_local1.p_girl = "www.girlsgogames.nl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.p_hyves = "www.zapapa.nl";
_local1.bwcId = 3;
addLanguage(_local1);
_local1 = new Language("es");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.com";
_local1.p_tween = "www.zapjuegos.com";
_local1.p_girl = "www.girlsgogames.es";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 9;
addLanguage(_local1);
_local1 = new Language("pl");
_local1.displayName = "Polski";
_local1.p_family = "www.gry.pl";
_local1.p_tween = "www.gry.pl";
_local1.p_girl = "www.girlsgogames.pl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 6;
addLanguage(_local1);
_local1 = new Language("fr");
_local1.displayName = "Français";
_local1.p_family = "www.jeux.fr";
_local1.p_tween = "www.jeu.fr";
_local1.p_girl = "www.girlsgogames.fr";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 4;
addLanguage(_local1);
_local1 = new Language("en_us", "us");
_local1.displayName = "English";
_local1.p_family = "www.gamesgames.com";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 1;
addLanguage(_local1);
addReference(_local1, "en");
_local1 = new Language("id");
_local1.displayName = "Bahasa Ind.";
_local1.p_family = "www.games.co.id";
_local1.p_tween = "www.games.co.id";
_local1.p_girl = "www.games.co.id";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 11;
addLanguage(_local1);
_local1 = new Language("ru");
_local1.displayName = "Русский";
_local1.p_family = "www.ourgames.ru";
_local1.p_tween = "www.flashgames.ru";
_local1.p_girl = "www.girlsgogames.ru";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 12;
addLanguage(_local1);
_local1 = new Language("se");
_local1.displayName = "Svenska";
_local1.p_family = "www.spela.se";
_local1.p_tween = "www.spel.se";
_local1.p_girl = "www.girlsgogames.se";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 7;
addLanguage(_local1);
addReference(_local1, "sv");
_local1 = new Language("it");
_local1.displayName = "Italiano";
_local1.p_family = "www.gioco.it";
_local1.p_tween = "www.gioco.it";
_local1.p_girl = "www.girlsgogames.it";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 8;
addLanguage(_local1);
_local1 = new Language("en_uk", "uk");
_local1.displayName = "English";
_local1.p_family = "www.games.co.uk";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.co.uk";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 13;
addLanguage(_local1);
_local1 = new Language("cn");
_local1.displayName = "中文";
_local1.p_family = "www.game.com.cn";
_local1.p_tween = "www.game.com.cn";
_local1.p_girl = "www.game.com.cn";
_local1.p_teen = "www.game.com.cn";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 2;
_local1.embedInputFonts = false;
addLanguage(_local1);
addReference(_local1, "zh-CN");
addReference(_local1, "zh-TW");
_local1 = new Language("pt");
_local1.displayName = "Português";
_local1.p_family = "www.ojogos.pt";
_local1.p_tween = "www.ojogos.pt";
_local1.p_girl = "www.ojogos.pt";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 17;
addLanguage(_local1);
_local1 = new Language("in");
_local1.displayName = "English";
_local1.p_family = "www.game.co.in";
_local1.p_tween = "www.game.co.in";
_local1.p_girl = "www.game.co.in";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.textLanguage = "en_uk";
_local1.bwcId = 14;
addLanguage(_local1);
_local1 = new Language("de");
_local1.displayName = "Deutsch";
_local1.p_family = "www.jetztspielen.de";
_local1.p_tween = "www.spielen.com";
_local1.p_girl = "www.girlsgogames.de";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 5;
addLanguage(_local1);
_local1 = new Language("br");
_local1.displayName = "Português (BR)";
_local1.p_family = "www.ojogos.com.br";
_local1.p_tween = "www.clickjogos.com";
_local1.p_girl = "www.girlsgogames.com.br";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 10;
addLanguage(_local1);
_local1 = new Language("jp");
_local1.displayName = "日本語";
_local1.p_family = "www.egames.jp";
_local1.p_tween = "www.egames.jp";
_local1.p_girl = "www.egames.jp";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.embedInputFonts = false;
_local1.bwcId = 19;
addLanguage(_local1);
addReference(_local1, "ja");
_local1 = new Language("ar");
_local1.displayName = "English";
_local1.p_family = "www.dailygame.com";
_local1.p_tween = "www.dailygame.com";
_local1.p_girl = "www.dailygame.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 20;
addLanguage(_local1);
addReference(_local1, "ar");
_local1 = new Language("es_mx", "mx");
_local1.displayName = "Español (mx)";
_local1.p_family = "www.juegos.mx";
_local1.p_tween = "www.juegos.mx";
_local1.p_girl = "www.juegosdechicas.mx";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
addLanguage(_local1);
addReference(_local1, "mx");
_local1 = new Language("es_ar", "arg");
_local1.displayName = "Español (ar)";
_local1.p_family = "www.juegos.com.ar";
_local1.p_tween = "www.juegos.com.ar";
_local1.p_girl = "www.juegosdechicas.com.ar";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
addLanguage(_local1);
addReference(_local1, "arg");
}
public static function exportXML():XMLNode{
var _local3:Language;
var _local1:Array = getLanguagesArray();
var _local2:XMLNode = new XMLNode(1, "languages");
for each (_local3 in _local1) {
_local2.appendChild(_local3.exportXML());
};
return (_local2);
}
public static function getLanguagesArray():Array{
var _local3:Language;
var _local1:Array = new Array();
var _local2:Object = new Object();
for each (_local3 in languages) {
if (!_local2[_local3.name]){
_local1.push(_local3);
_local2[_local3.name] = true;
};
};
return (_local1);
}
public static function getLanguage(_arg1:String):Language{
return (languages[_arg1]);
}
private static function addLanguage(_arg1:Language):void{
languages[_arg1.name] = _arg1;
}
private static function addReference(_arg1:Language, _arg2:String):void{
languages[_arg2] = _arg1;
_arg1.references.push(_arg2);
}
public static function getLanguageByOldID(_arg1:int):Language{
var _local2:Language;
for each (_local2 in languages) {
if (_local2.bwcId == _arg1){
return (_local2);
};
};
return (null);
}
}
}//package spill.localisation
Section 62
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
public class LanguageSelectBox extends MovieClip {
private var flag:MovieClip;
private var languageName_text:TextField;
private var popup:MovieClip;
private var mc:MovieClip;
public function LanguageSelectBox(){
trace("new langselecbox");
super();
if (numChildren > 0){
removeChildAt(0);
};
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true);
Languages.initialize();
popup = new LanguageSelectPopup_mc();
x = Math.round(x);
y = Math.round(y);
popup.y = (-(Math.floor(popup.height)) + 1);
popup.visible = false;
addChild(popup);
mc = new LanguageSelectBox_mc();
addChild(mc);
flag = mc.flag;
languageName_text = mc.languageName_text;
if (stage){
added();
};
init();
languageChanged();
}
private function added(_arg1:Event=null):void{
trace("addedselebnox");
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
}
private function mouseOut(_arg1:MouseEvent):void{
popup.visible = false;
}
public function set popupLocation(_arg1:String):void{
trace(("popupLocation = " + _arg1));
if (_arg1 == "bottom"){
popup.y = Math.floor(mc.height);
} else {
popup.y = (-(Math.floor(mc.height)) + 1);
};
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
public function init():void{
var _local3:MovieClip;
var _local4:Language;
trace("initselectbox");
var _local1:Array = new Array(popup.l_br, popup.l_de, popup.l_en_us, popup.l_fr, popup.l_in, popup.l_jp, popup.l_pt, popup.l_ru, popup.l_ar, popup.l_cn, popup.l_en_uk, popup.l_es, popup.l_id, popup.l_it, popup.l_nl, popup.l_pl, popup.l_se, popup.l_es_mx, popup.l_es_ar);
var _local2:int;
while (_local2 < _local1.length) {
_local3 = MovieClip(_local1[_local2]);
if (_local3){
_local3.addEventListener(MouseEvent.CLICK, itemClicked, true, 0, true);
_local3.flag.gotoAndStop(_local3.name.substr(2));
_local3.flag.mouseEnabled = false;
_local3.text.mouseEnabled = false;
_local4 = Languages.getLanguage(_local3.name.substr(2));
if (_local4){
_local3.text.text = _local4.displayAcronim;
} else {
trace((("Error, '" + _local3.name.substr(2)) + "' language not found"));
};
} else {
trace((((("Error, btn number '" + _local2) + "' is not a MovieClip or there is no button '") + _local1[_local2]) + "'"));
};
_local2++;
};
}
private function itemClicked(_arg1:MouseEvent):void{
SpilGame.changeLanguage(_arg1.currentTarget.name.substr(2));
popup.visible = false;
}
private function mouseOver(_arg1:MouseEvent):void{
popup.visible = true;
}
private function languageChanged(_arg1:Event=null):void{
if (SpilGame.currentLanguage){
if ((((SpilGame.portalGroup == PortalGroup.HYVES)) && ((SpilGame.currentLanguage.name == "nl")))){
this.visible = false;
return;
};
this.visible = true;
flag.gotoAndStop(SpilGame.currentLanguage.name);
languageName_text.text = SpilGame.currentLanguage.displayName;
languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts;
};
}
}
}//package spill.localisation
Section 63
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc)
package spill.localisation {
import flash.display.*;
import flash.text.*;
public dynamic class LanguageSelectBox_mc extends MovieClip {
public var languageName_text:TextField;
public var flag:MovieClip;
}
}//package spill.localisation
Section 64
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_cn:MovieClip;
public var l_br:MovieClip;
public var l_se:MovieClip;
public var l_id:MovieClip;
public var l_es_ar:MovieClip;
public var l_es_mx:MovieClip;
public var l_in:MovieClip;
public var l_en_uk:MovieClip;
public var l_en_us:MovieClip;
public var l_es:MovieClip;
public var l_ar:MovieClip;
public var l_it:MovieClip;
public var l_pl:MovieClip;
public var l_nl:MovieClip;
public var l_de:MovieClip;
public var l_ru:MovieClip;
public var l_pt:MovieClip;
public var l_jp:MovieClip;
public var l_fr:MovieClip;
}
}//package spill.localisation
Section 65
//PortalGroup (spill.localisation.PortalGroup)
package spill.localisation {
import flash.xml.*;
public class PortalGroup {
public static const YOUNG_ADULTS:uint = 3;
public static const FAMILY:uint = 0;
public static const channelNames:Array = ["family", "tween", "girl", "teen", "zapapa", "hyves"];
public static const ZAPAPA:uint = 4;
public static const HYVES:uint = 5;
public static const TEENS:uint = 1;
public static const GIRL:uint = 2;
public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
public static const NONE:uint = 6;
public static function getName(_arg1:int):String{
return (channelNames[_arg1]);
}
public static function exportXML():XMLNode{
var _local3:XMLNode;
var _local1:XMLNode = new XMLNode(1, "channels");
var _local2:int;
while (_local2 < 5) {
_local3 = new XMLNode(1, "channel");
_local3.attributes.name = channelNames[_local2];
_local3.attributes.id = _local2;
_local1.appendChild(_local3);
_local2++;
};
return (_local1);
}
}
}//package spill.localisation
Section 66
//spil_internal (spill.localisation.spil_internal)
package spill.localisation {
public namespace spil_internal = "spill.localisation";
}//package spill.localisation
Section 67
//SpilGame (spill.localisation.SpilGame)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import flash.external.*;
public class SpilGame {
private static const cookieName:String = "spilgames_language_v100";
private static const cookiePath:String = "/";
private static const cookieLanguageVar:String = "savedLang";
public static const LANGUAGE_CHANGED:String = "languageChanged";
public static const BRANDING_CHANGED:String = "brandingChanged";
private static var strings:Object = new Object();
public static var currentBranding:Brand;
private static var contexMenuItem:ContextMenuItem;
spil_internal static var gameName:String;
spil_internal static var debugHostDomain:String = "";
private static var localDomains:Object = new Object();
spil_internal static var emailPage:String;
private static var channelLock:Boolean = false;
spil_internal static var debugEmbedDomain:String = "";
private static var eventDispatcher:EventDispatcher;
private static var _init:Boolean = false;
public static var currentLanguage:Language;
spil_internal static var portalGroup:uint;
private static var stage:Sprite;
public static function getSpilCompanyLink():String{
var _local1 = "http://www.gameportal.net/";
_local1 = (_local1 + ("?utm_medium=brandedgames_" + (isExternal) ? "external" : "internal"));
_local1 = (_local1 + ("&utm_campaign=" + gameName));
_local1 = (_local1 + ("&utm_source=" + Brand.stripSubDomain((embedDomain) ? embedDomain : hostingDomain)));
_local1 = (_local1 + "&utm_content=Branding_Link");
return (_local1);
}
public static function getPromotionLink(_arg1:String="feature_promotion"):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1));
}
public static function traceAllBrands():void{
trace(outputAllBrands());
}
public static function getString(_arg1:String):String{
var _local2:Object = strings[_arg1];
if (_local2){
if (currentLanguage.textLanguage){
return (_local2[currentLanguage.textLanguage]);
};
if (_local2[currentLanguage.name]){
return (_local2[currentLanguage.name]);
};
return (_local2["en_us"]);
//unresolved jump
};
return ("");
}
public static function initialize(_arg1:String, _arg2:int, _arg3:String, _arg4:Sprite, _arg5:Boolean=false):void{
stage = _arg4;
if (_init){
trace("ERROR: LocalisationManager already initialised");
return;
};
_init = true;
localDomains["localhost"] = true;
localDomains["www8.agame.com"] = true;
localDomains["gamedev.dev.spilgames.com"] = true;
localDomains["stg.spel.nl"] = true;
localDomains["stg.girlsgogames.nl"] = true;
localDomains["stg.pl.spel.nl"] = true;
localDomains["stg.pl.girlsgogames.nl"] = true;
trace(localDomains["stg.girlsgogames.nl"]);
Brandings.initialize();
Languages.initialize();
initContexMenu(_arg4);
channelLock = _arg5;
gameName = _arg1.replace(" ", "_");
portalGroup = _arg2;
emailPage = _arg3;
chooseLanguage();
chooseBranding();
if (portalGroup == PortalGroup.HYVES){
changeLanguage("nl");
};
}
public static function get isExternal():Boolean{
return (((((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain])))) && (!(isStagingDomain))));
}
private static function initContexMenu(_arg1:Sprite):void{
contexMenuItem = new ContextMenuItem("");
_arg1.contextMenu = new ContextMenu();
_arg1.contextMenu.customItems.push(contexMenuItem);
contexMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contexMenuClicked);
}
private static function replaceFn():String{
var _local2:String = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
spil_internal static function get hostingDomain():String{
var _local1:LocalConnection;
if (debugHostDomain != ""){
return (debugHostDomain);
};
_local1 = new LocalConnection();
return (_local1.domain);
}
spil_internal static function chooseLanguage():void{
if (cookieLanguage != null){
currentLanguage = cookieLanguage;
} else {
if (isExternal){
currentLanguage = systemLanguage;
} else {
currentLanguage = portalLanguage;
if (!currentLanguage){
currentLanguage = systemLanguage;
};
};
};
if (!currentLanguage){
trace("Unable to determine language, using 'English US'");
currentLanguage = Languages.getLanguage("en_us");
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
private static function contexMenuClicked(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu")));
}
public static function initTextField(_arg1:TextField):void{
var _local2:TextFormat;
trace(_arg1.text);
_arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn);
trace(_arg1.text);
_arg1.embedFonts = currentLanguage.embedFonts;
if (currentLanguage.forceFont != ""){
_local2 = new TextFormat();
_local2.font = currentLanguage.forceFont;
_arg1.setTextFormat(_local2);
};
}
public static function importXMLv2(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.attribute("identifier")] = new Object());
for each (_local4 in _local2.children()) {
if (_local4.children().length() > 0){
_local3[_local4.name()] = _local4.children()[0].toString();
} else {
_local3[_local4.name()] = "";
};
};
};
}
spil_internal static function changeLanguage(_arg1:String):void{
var _local2:Language = Languages.getLanguage(_arg1);
if (!_local2){
trace("ERROR: Supplied language string does not have a matching language");
} else {
cookieLanguage = _local2;
currentLanguage = _local2;
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
chooseBranding();
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
public static function getSendToFriendLink():String{
return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain));
}
spil_internal static function chooseBranding():void{
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]);
if (!(currentBranding is Brand)){
currentBranding = Brandings.getBrandByDomain("www.agame.com");
};
contexMenuItem.caption = ("More Games: " + currentBranding.domain);
dispatchEvent(new Event(BRANDING_CHANGED));
}
spil_internal static function get systemLanguage():Language{
return (Languages.getLanguage(Capabilities.language));
}
spil_internal static function set cookieLanguage(_arg1:Language):void{
var _local2:SharedObject = SharedObject.getLocal(cookieName, cookiePath);
if (_arg1 == null){
_local2.data[cookieLanguageVar] = null;
} else {
_local2.data[cookieLanguageVar] = _arg1.name;
};
_local2.flush();
}
public static function importXML(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.identifier] = new Object());
for each (_local4 in _local2.children()) {
_local3[_local4.name()] = _local4.children()[0].toString();
};
};
}
spil_internal static function dispatchEvent(_arg1:Event):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.dispatchEvent(_arg1);
}
private static function getDomain(_arg1:String):String{
var _local2:String;
var _local3:uint;
if (_arg1.indexOf("file") == 0){
return ("offline_play");
};
_local2 = new String();
_local3 = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
if (_local2 == "localhost"){
_local2 = "offline_play";
};
return (_local2);
}
public static function exportXML():XML{
var _local1:XML = <spil_games/>
;
_local1.appendChild(Brandings.exportXML());
_local1.appendChild(Languages.exportXML());
_local1.appendChild(PortalGroup.exportXML());
return (_local1);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function outputAllBrands():String{
var _local3:Brand;
var _local1:Array = Brandings.getBrandsArray();
var _local2 = "";
for each (_local3 in _local1) {
_local2 = (_local2 + (_local3.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain) + "\n"));
};
return (_local2);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function getMoreGamesLink(_arg1:String=""):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1));
}
public static function get isStagingDomain():Boolean{
var _local1:String = ("http://" + embedDomain);
return ((_local1.indexOf("http://stg.") >= 0));
}
spil_internal static function get cookieLanguage():Language{
var _local1:SharedObject = SharedObject.getLocal(cookieName, cookiePath);
var _local2:String = String(_local1.data[cookieLanguageVar]);
return (Languages.getLanguage(_local2));
}
private static function get portalLanguage():Language{
var _local1:Brand;
var _local2:String;
var _local3:Language;
if (isExternal){
return (null);
};
if (!embedDomain){
return (null);
};
_local1 = Brandings.getBrandByDomain(embedDomain);
if (!_local1){
return (null);
};
_local2 = _local1.preferedLanguage;
if (!_local2){
return (null);
};
_local3 = Languages.getLanguage(_local2);
if (!_local3){
return (null);
};
return (_local3);
}
spil_internal static function get embedDomain():String{
var loc:String;
if (debugEmbedDomain != ""){
return (debugEmbedDomain);
};
if (ExternalInterface.available){
try {
loc = ExternalInterface.call("window.location.href.toString");
if (((!((loc == ""))) && (!((loc == null))))){
trace(("embed domain = " + getDomain(loc)));
return (getDomain(loc));
};
} catch(e:SecurityError) {
trace(("Security Error connecting to external interface, error = " + e));
} catch(e:Error) {
trace(("Error connecting to external interface, error = " + e));
};
};
return (null);
}
}
}//package spill.localisation
Section 68
//SpilGamesLink (spill.localisation.SpilGamesLink)
package spill.localisation {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class SpilGamesLink extends SimpleButton {
public function SpilGamesLink(){
addEventListener(MouseEvent.CLICK, buttonClicked);
}
private function buttonClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()), "_blank");
}
}
}//package spill.localisation
Section 69
//TextFieldFit (spill.localisation.TextFieldFit)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
public class TextFieldFit extends MovieClip {
protected var _glowQuality:Number;// = 1
protected var _gridFitType:String;// = "pixel"
protected var _text:String;// = "default"
private var debugBounding:Sprite;
protected var _disableWordwrap:Boolean;// = false
protected var _textSize:Number;// = 12
protected var _multiline:Boolean;// = false
protected var _font:String;// = ""
protected var _embedFonts:Boolean;// = true
protected var _underline:Boolean;// = false
protected var _vAlign:String;// = "top"
protected var _italic:Boolean;// = false
protected var _useGlowFilter:Boolean;// = false
protected var _glowColor:uint;// = 0
protected var _bold:Boolean;// = false
private var h:Number;
protected var _antiAliasType:String;// = "advanced"
private var sizeChanged:Boolean;// = true
private var w:Number;
private var embeddedFonts:Array;
protected var _hAlign:String;// = "left"
protected var _textColor:uint;// = 0
protected var _glowStrength:Number;// = 5
protected var _glowBlur:Number;// = 3
protected var _selectable:Boolean;// = false
private var format:TextFormat;
private var field:TextField;
private var valid:Boolean;// = true
private static const gutter:Number = 2;
spil_internal static var embedFonts:Boolean = true;
spil_internal static var forceAAType:String = null;
spil_internal static var forceFont:String = null;
public static var alwaysCheckWidth:Boolean = false;
public function TextFieldFit(){
var _local1:Boolean = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
var _local2:Number = width;
var _local3:Number = height;
if (numChildren > 0){
removeChildAt(0);
};
if (!field){
field = new TextField();
addChild(field);
};
field.border = false;
field.background = false;
field.type = TextFieldType.DYNAMIC;
mouseEnabled = false;
mouseChildren = false;
format = new TextFormat();
embeddedFonts = Font.enumerateFonts(false);
setSize(_local2, _local3);
validate();
if (stage){
addEventListener(Event.RENDER, init);
stage.invalidate();
};
init();
}
private function resizeText(_arg1:Boolean=false):void{
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
if (format.size <= 3){
trace("WARNING: Text resised to 3px, either an error occured or the text just wont fit");
return;
};
field.setTextFormat(format);
resizeText(true);
} else {
if (_arg1 == false){
while (doesTextFit()) {
if (format.size <= textSize){
format.size = Object((Number(format.size) + 1));
field.setTextFormat(format);
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
field.setTextFormat(format);
break;
};
} else {
break;
};
};
};
};
}
public function set hAlign(_arg1:String):void{
_hAlign = _arg1;
invalidate();
}
public function set bold(_arg1:Boolean):void{
_bold = _arg1;
invalidate();
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.RENDER, init);
updateProperties();
layoutText();
}
private function validate(_arg1:Event=null):void{
updateProperties();
layoutText();
removeEventListener(Event.ENTER_FRAME, validate);
valid = true;
}
public function set glowBlur(_arg1:Number):void{
_glowBlur = _arg1;
invalidate();
}
public function get vAlign():String{
return (_vAlign);
}
public function get italic():Boolean{
return (_italic);
}
public function get textColor():uint{
return (_textColor);
}
private function invalidate():void{
if (valid){
addEventListener(Event.ENTER_FRAME, validate);
if (stage){
stage.invalidate();
};
valid = false;
};
}
public function get text():String{
return (_text);
}
public function get useGlowFilter():Boolean{
return (_useGlowFilter);
}
public function get selectable():Boolean{
return (_selectable);
}
public function set text(_arg1:String):void{
_text = _arg1;
invalidate();
}
public function set embedFonts(_arg1:Boolean):void{
_embedFonts = _arg1;
invalidate();
}
public function set vAlign(_arg1:String):void{
_vAlign = _arg1;
invalidate();
}
public function set italic(_arg1:Boolean):void{
_italic = _arg1;
invalidate();
}
public function get font():String{
return (_font);
}
public function set multiline(_arg1:Boolean):void{
_multiline = _arg1;
invalidate();
}
public function get disableWordwrap():Boolean{
return (_disableWordwrap);
}
public function set textColor(_arg1:uint):void{
_textColor = _arg1;
invalidate();
}
public function get antiAliasType():String{
return (_antiAliasType);
}
private function layoutText():void{
resizeText();
field.height = (field.textHeight + (gutter * 2));
if (vAlign == "top"){
field.y = 0;
} else {
if (vAlign == "middle"){
field.y = ((h - field.height) / 2);
} else {
if (vAlign == "bottom"){
field.y = (h - field.height);
};
};
};
}
public function set glowQuality(_arg1:Number):void{
_glowQuality = _arg1;
invalidate();
}
public function get hAlign():String{
return (_hAlign);
}
public function setSize(_arg1:Number, _arg2:Number):void{
w = _arg1;
h = _arg2;
scaleX = (scaleY = 1);
field.width = w;
field.height = h;
invalidate();
}
public function get bold():Boolean{
return (_bold);
}
public function set gridFitType(_arg1:String):void{
_gridFitType = _arg1;
invalidate();
}
public function set underline(_arg1:Boolean):void{
_underline = _arg1;
invalidate();
}
public function get glowBlur():Number{
return (_glowBlur);
}
public function set useGlowFilter(_arg1:Boolean):void{
_useGlowFilter = _arg1;
invalidate();
}
public function set textSize(_arg1:Number):void{
_textSize = _arg1;
sizeChanged = true;
invalidate();
}
public function set font(_arg1:String):void{
_font = _arg1;
invalidate();
}
public function set selectable(_arg1:Boolean):void{
_selectable = _arg1;
invalidate();
}
public function get multiline():Boolean{
return (_multiline);
}
public function get embedFonts():Boolean{
return (_embedFonts);
}
public function set glowColor(_arg1:uint):void{
_glowColor = _arg1;
invalidate();
}
public function set disableWordwrap(_arg1:Boolean):void{
_disableWordwrap = _arg1;
invalidate();
}
public function get glowQuality():Number{
return (_glowQuality);
}
public function get gridFitType():String{
return (_gridFitType);
}
public function get underline():Boolean{
return (_underline);
}
public function get textSize():Number{
return (_textSize);
}
public function get textField():TextField{
return (field);
}
public function get glowColor():uint{
return (_glowColor);
}
public function set antiAliasType(_arg1:String):void{
_antiAliasType = _arg1;
invalidate();
}
public function set glowStrength(_arg1:Number):void{
_glowStrength = _arg1;
invalidate();
}
protected function updateProperties():void{
var _local1:Boolean;
var _local2:Font;
field.text = _text;
field.multiline = ((((_text.indexOf(" ") < 0)) && ((_text.length < 14)))) ? false : _multiline;
field.wordWrap = ((field.multiline) && (!(_disableWordwrap)));
field.selectable = _selectable;
field.antiAliasType = (forceAAType) ? forceAAType : _antiAliasType;
field.gridFitType = _gridFitType;
embeddedFonts = Font.enumerateFonts(false);
if (((((_embedFonts) && (!((_font == ""))))) && (TextFieldFit.embedFonts))){
_local1 = false;
for each (_local2 in embeddedFonts) {
if (_font == _local2.fontName){
_local1 = true;
break;
};
};
field.embedFonts = _local1;
if (!_local1){
trace(((("WARNING: Embedded font '" + _font) + "' not found, disabling embedding of fonts, text = ") + _text));
} else {
trace((("Found Embedded font '" + _font) + "' using font"));
};
} else {
field.embedFonts = false;
};
if (TextFieldFit.forceFont){
format.font = TextFieldFit.forceFont;
} else {
format.font = _font;
};
if (sizeChanged){
format.size = _textSize;
};
format.color = _textColor;
format.align = _hAlign;
format.bold = _bold;
format.italic = _italic;
format.underline = _underline;
format.leftMargin = 0;
format.rightMargin = 0;
field.setTextFormat(format);
if (_useGlowFilter){
filters = [new GlowFilter(_glowColor, 1, _glowBlur, _glowBlur, _glowStrength, _glowQuality)];
} else {
filters = [];
};
}
private function doesTextFit():Boolean{
if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){
return (false);
};
return (true);
}
public function get glowStrength():Number{
return (_glowStrength);
}
}
}//package spill.localisation
Section 70
//bg_sound (bg_sound)
package {
import flash.media.*;
public dynamic class bg_sound extends Sound {
}
}//package
Section 71
//BgMusic (BgMusic)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class BgMusic extends MovieClip {
public static var bMusic:Boolean = true;
public static var autoStoped:Boolean = false;
public static var position:Number = 0;
private static var channel:SoundChannel;
public static var sound:Sound;
public function BgMusic(){
this.addEventListener(MouseEvent.CLICK, clickHandler);
this.addEventListener(Event.ADDED_TO_STAGE, init);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeHandler);
sound = new bg_sound();
stop();
this.buttonMode = true;
this.mouseChildren = false;
}
private function init(_arg1:Event):void{
if (bMusic){
this.gotoAndStop(1);
channel = sound.play(position, 1);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
} else {
this.gotoAndStop(2);
};
}
private function soundCompleteHandler(_arg1:Event):void{
position = 0;
channel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
channel = sound.play(0, 1);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
public function autoStart():void{
if (autoStoped){
autoStoped = false;
bMusic = true;
action();
};
}
private function action():void{
if (bMusic){
this.gotoAndStop(1);
if (channel){
channel.stop();
};
channel = sound.play(position, 1);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
} else {
this.gotoAndStop(2);
position = channel.position;
channel.stop();
channel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
private function removeHandler(_arg1:Event):void{
autoStoped = false;
if (channel){
position = channel.position;
channel.stop();
};
}
private function clickHandler(_arg1:MouseEvent):void{
bMusic = !(bMusic);
autoStoped = false;
action();
}
public function forceStop():void{
if (bMusic){
autoStoped = true;
bMusic = false;
action();
};
}
public static function try2stop():void{
if (channel){
channel.stop();
};
}
}
}//package