Section 1
//language (api.language)
package api {
import flash.net.*;
public class language {
public static var localConnection = new LocalConnection();
public static var _languageNum:uint = 0;
public static var _languageBox:Array = new Array();
public static var SpillGroupUrl:Array = new Array();
public static var gamename = "crazy_squirrel";
public static function get url2():String{
var _local1:int;
_local1 = 0;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url2);
}
public static function get language_nr():String{
return (_languageBox[_languageNum].language_nr);
}
public static function get portal():String{
return (_languageBox[_languageNum].portal);
}
public static function set Language(_arg1:Object):void{
var returnDomain:Function;
var hostingdomain:String;
var myList:String;
var myArray:Array;
var language1:*;
var language2:*;
var language3:*;
var language4:*;
var language5:*;
var language6:*;
var language7:*;
var language8:*;
var language9:*;
var language10:*;
var language11:*;
var language12:*;
var language13:*;
var language14:*;
var language15:*;
var language16:*;
var language17:*;
var domainextention:int;
var domainname:int;
var languageVersion = _arg1;
returnDomain = function (_arg1:String):String{
var _local2:String;
var _local3:uint;
_local2 = new String();
_local3 = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
return (_local2);
};
hostingdomain = "";
myList = localConnection.domain;
myArray = myList.split(".");
if (myArray.length <= 3){
domainextention = (myArray.length - 1);
domainname = (myArray.length - 2);
hostingdomain = ((myArray[domainname] + ".") + myArray[domainextention]);
} else {
hostingdomain = localConnection.domain;
};
if (hostingdomain == "undefined.localhost"){
hostingdomain = "offline_play";
};
language1 = new languageItem();
language1.url1 = ((("http://www.agame.com/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language1.url2 = ((("http://www.agame.com/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language1.language_nr = 1;
language1.branding_nr = 1;
language1.portal = "tweens";
_languageBox.push(language1);
language2 = new languageItem();
language2.url1 = "http://www.game.com.cn/moregames/";
language2.url2 = "http://www.game.com.cn/moregames/";
language2.language_nr = 2;
language2.branding_nr = 2;
language2.portal = "game_com_cn";
_languageBox.push(language2);
language3 = new languageItem();
language3.url1 = ((("http://www.spel.nl/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language3.url2 = ((("http://www.spel.nl/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language3.language_nr = 3;
language3.branding_nr = 4;
language3.portal = "tweens";
_languageBox.push(language3);
language4 = new languageItem();
language4.url1 = ((("http://www.jeu.fr/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language4.url2 = ((("http://www.jeu.fr/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language4.language_nr = 4;
language4.branding_nr = 5;
language4.portal = "tweens";
_languageBox.push(language4);
language5 = new languageItem();
language5.url1 = ((("http://www.spielen.com/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language5.url2 = ((("http://www.spielen.com/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language5.language_nr = 5;
language5.branding_nr = 6;
language5.portal = "tweens";
_languageBox.push(language5);
language6 = new languageItem();
language6.url1 = ((("http://www.egames.jp/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language6.url2 = ((("http://www.egames.jp/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language6.language_nr = 17;
language6.branding_nr = 44;
language6.portal = "tweens";
_languageBox.push(language6);
language7 = new languageItem();
language7.url1 = ((("http://www.spel.se/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language7.url2 = ((("http://www.spel.se/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language7.language_nr = 7;
language7.branding_nr = 9;
language7.portal = "tweens";
_languageBox.push(language7);
language8 = new languageItem();
language8.url1 = ((("http://www.game.co.in/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language8.url2 = ((("http://www.game.co.in/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language8.language_nr = 16;
language8.branding_nr = 12;
language8.portal = "tweens";
_languageBox.push(language8);
language9 = new languageItem();
language9.url1 = ((("http://www.zapjuegos.com/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language9.url2 = ((("http://www.zapjuegos.com/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language9.language_nr = 9;
language9.branding_nr = 3;
language9.portal = "tweens";
_languageBox.push(language9);
language10 = new languageItem();
language10.url1 = ((("http://www.clickjogos.com/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language10.url2 = ((("http://www.clickjogos.com/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language10.language_nr = 11;
language10.branding_nr = 7;
language10.portal = "tweens";
_languageBox.push(language10);
language11 = new languageItem();
language11.url1 = ((("http://www.games.co.id/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language11.url2 = ((("http://www.games.co.id/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language11.language_nr = 13;
language11.branding_nr = 13;
language11.portal = "tweens";
_languageBox.push(language11);
language12 = new languageItem();
language12.url1 = ((("http://www.flashgames.ru/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language12.url2 = ((("http://www.flashgames.ru/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language12.language_nr = 12;
language12.branding_nr = 11;
language12.portal = "tweens";
_languageBox.push(language12);
language13 = new languageItem();
language13.url1 = ((("http://www.gry.pl/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language13.url2 = ((("http://www.gry.pl/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language13.language_nr = 6;
language13.branding_nr = 21;
language13.portal = "tweens";
_languageBox.push(language13);
language14 = new languageItem();
language14.url1 = ((("http://www.ojogos.pt/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language14.url2 = ((("http://www.ojogos.pt/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language14.language_nr = 10;
language14.branding_nr = 42;
language14.portal = "tweens";
_languageBox.push(language14);
language15 = new languageItem();
language15.url1 = ((("http://www.gioco.it/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language15.url2 = ((("http://www.gioco.it/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language15.language_nr = 8;
language15.branding_nr = 23;
language15.portal = "tweens";
_languageBox.push(language15);
language16 = new languageItem();
language16.url1 = ((("http://www.dailygame.com/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language16.url2 = ((("http://www.dailygame.com/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language16.language_nr = 1;
language16.branding_nr = 47;
language16.portal = "tweens";
_languageBox.push(language16);
language17 = new languageItem();
language17.url1 = ((("http://www.agame.co.uk/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language17.url2 = ((("http://www.agame.co.uk/?utm_medium=brandedgames_internal&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language17.language_nr = 16;
language17.branding_nr = 48;
language17.portal = "tweens";
_languageBox.push(language17);
SpillGroupUrl.push("localhost");
SpillGroupUrl.push("www8.agame.com");
SpillGroupUrl.push("gamedev.dev.spilgames.com");
if ((((((languageVersion is Number)) || ((languageVersion is uint)))) || ((languageVersion is int)))){
_languageNum = (Number(languageVersion) - 1);
};
}
public static function get url1():String{
var _local1:int;
_local1 = 0;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url1);
}
public static function get branding_nr():String{
return (_languageBox[_languageNum].branding_nr);
}
}
var _local1:* = (language.Language = 1);
return (_local1);
}//package api
class languageItem {
public var url1:String;
public var url2:String;
public var branding_nr:int;
public var language_nr:int;
public var portal:String;
private function languageItem(){
}
}
Section 2
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
}
}//package caurina.transitions
Section 3
//Equations (caurina.transitions.Equations)
package caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package caurina.transitions
Section 4
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var originalValueComplete:Object;
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var hasModifier:Boolean;
public var valueComplete:Number;
public var extra:Object;
public var valueStart:Number;
public var modifierFunction:Function;
public var arrayIndex:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){
valueStart = _arg1;
valueComplete = _arg2;
originalValueComplete = _arg3;
arrayIndex = _arg4;
extra = _arg5;
isSpecialProperty = _arg6;
hasModifier = Boolean(_arg7);
modifierFunction = _arg7;
modifierParameters = _arg8;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("arrayIndex:" + String(arrayIndex)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("extra:" + String(extra)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("hasModifier:" + String(hasModifier)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 5
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var preProcess:Function;
public var setValue:Function;
public var getValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
preProcess = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("preProcess:" + String(preProcess)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 6
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier)
package caurina.transitions {
public class SpecialPropertyModifier {
public var getValue:Function;
public var modifyValues:Function;
public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){
modifyValues = _arg1;
getValue = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 7
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter)
package caurina.transitions {
public class SpecialPropertySplitter {
public var parameters:Array;
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){
splitValues = _arg1;
parameters = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 8
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
public static var autoOverwrite:Boolean = true;
private static var _engineExists:Boolean = false;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyModifierList:Object;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
var _local6:SpecialProperty;
if (!_inited){
init();
};
_local6 = new SpecialProperty(_arg2, _arg3, _arg4, _arg5);
_specialPropertyList[_arg1] = _local6;
}
public static function init(... _args):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Array;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Function;
var _local9:TweenListObj;
var _local10:Number;
var _local11:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local4 = _arg1.concat();
} else {
_local4 = [_arg1];
};
_local5 = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local6 = (isNaN(_local5.time)) ? 0 : _local5.time;
_local7 = (isNaN(_local5.delay)) ? 0 : _local5.delay;
if (typeof(_local5.transition) == "string"){
_local11 = _local5.transition.toLowerCase();
_local8 = _transitionList[_local11];
} else {
_local8 = _local5.transition;
};
if (!Boolean(_local8)){
_local8 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local5.useFrames == true){
_local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams);
} else {
_local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams);
};
_local9.properties = null;
_local9.onStart = _local5.onStart;
_local9.onUpdate = _local5.onUpdate;
_local9.onComplete = _local5.onComplete;
_local9.onOverwrite = _local5.onOverwrite;
_local9.onStartParams = _local5.onStartParams;
_local9.onUpdateParams = _local5.onUpdateParams;
_local9.onCompleteParams = _local5.onCompleteParams;
_local9.onOverwriteParams = _local5.onOverwriteParams;
_local9.onStartScope = _local5.onStartScope;
_local9.onUpdateScope = _local5.onUpdateScope;
_local9.onCompleteScope = _local5.onCompleteScope;
_local9.onOverwriteScope = _local5.onOverwriteScope;
_local9.onErrorScope = _local5.onErrorScope;
_local9.isCaller = true;
_local9.count = _local5.count;
_local9.waitFrames = _local5.waitFrames;
_tweenList.push(_local9);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local10 = (_tweenList.length - 1);
updateTweenByIndex(_local10);
removeTweenByIndex(_local10);
};
_local3++;
};
return (true);
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
var _local5:SpecialPropertySplitter;
var _local6:Array;
var _local7:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
if (_specialPropertySplitterList[_args[_local4]]){
_local5 = _specialPropertySplitterList[_args[_local4]];
_local6 = _local5.splitValues(_arg1, null);
_local7 = 0;
while (_local7 < _local6.length) {
_local3.push(_local6[_local7].name);
_local7++;
};
} else {
_local3.push(_args[_local4]);
};
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
var _local3:Number;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local3 = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.33.74");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
updateFrame();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var cTime:Number;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
cTime = getCurrentTweeningTime(tTweening);
if (cTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(cTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (cTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope;
try {
tTweening.onStart.apply(eventScope, tTweening.onStartParams);
} catch(e2:Error) {
handleError(tTweening, e2, "onStart");
};
};
for (pName in tTweening.properties) {
if (tTweening.properties[pName].isSpecialProperty){
if (Boolean(_specialPropertyList[pName].preProcess)){
tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra);
};
pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
pv = tScope[pName];
};
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.hasStarted = true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (cTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (cTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d, tTweening.transitionParams);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
if (tProperty.isSpecialProperty){
_specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
tScope[pName] = nv;
};
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope;
try {
tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams);
} catch(e3:Error) {
handleError(tTweening, e3, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope;
try {
tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams);
} catch(e4:Error) {
handleError(tTweening, e4, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_local3 = getCurrentTweeningTime(_tweenList[_local2]);
_tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var eventScope:Object;
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(eventScope, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace()));
};
} else {
if (!Boolean(pTweening.onError)){
printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace()));
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
_currentTimeFrame = 0;
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Object;
var _local12:Object;
var _local13:Function;
var _local14:Object;
var _local15:TweenListObj;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local6 = _arg1.concat();
} else {
_local6 = [_arg1];
};
_local7 = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
_local10 = new Array();
_local11 = {overwrite:true, time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
_local12 = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
if (((_local7.overwrite == undefined)) ? autoOverwrite : _local7.overwrite){
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
};
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
return (true);
};
_local2++;
};
return (false);
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = getCurrentTweeningTime(_local2);
_local2.isPaused = true;
return (true);
}
public static function getCurrentTweeningTime(_arg1:Object):Number{
return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
_currentTimeFrame = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope;
try {
_tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 9
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var timeComplete:Number;
public var onStartParams:Array;
public var onUpdateScope:Object;
public var rounded:Boolean;
public var onUpdateParams:Array;
public var properties:Object;
public var onComplete:Function;
public var transitionParams:Object;
public var updatesSkipped:Number;
public var onStart:Function;
public var onOverwriteScope:Object;
public var skipUpdates:Number;
public var onStartScope:Object;
public var scope:Object;
public var transition:Function;
public var timePaused:Number;
public var onCompleteParams:Array;
public var timesCalled:Number;
public var isCaller:Boolean;
public var onError:Function;
public var onErrorScope:Object;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public var onCompleteScope:Object;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
transitionParams = _arg6;
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
_local2.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:Boolean;
var _local3:String;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = true;
for (_local3 in properties) {
if (!_local2){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local3].name));
_local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete));
_local1 = (_local1 + "]");
_local2 = false;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
_local1 = (_local1 + (", transitionParams:" + String(transitionParams)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (onStartScope){
_local1 = (_local1 + (", onStartScope:" + String(onStartScope)));
};
if (onUpdateScope){
_local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope)));
};
if (onCompleteScope){
_local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope)));
};
if (onOverwriteScope){
_local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope)));
};
if (onErrorScope){
_local1 = (_local1 + (", onErrorScope:" + String(onErrorScope)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (isCaller){
_local1 = (_local1 + (", isCaller:" + String(isCaller)));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (timesCalled){
_local1 = (_local1 + (", timesCalled:" + String(timesCalled)));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (hasStarted){
_local1 = (_local1 + (", hasStarted:" + String(hasStarted)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package caurina.transitions
Section 10
//Debug (com.hexagonstar.util.debug.Debug)
package com.hexagonstar.util.debug {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public final class Debug {
public static const LEVEL_WARN:int = 2;
public static const LEVEL_DEBUG:int = 0;
public static const LEVEL_INFO:int = 1;
public static const LEVEL_FATAL:int = 4;
public static const LEVEL_ERROR:int = 3;
private static var _stage:Stage;
private static var _filterLevel:int = 0;
private static var _isEnabled:Boolean = true;
private static var _isConnected:Boolean = false;
private static var _isPollingFPS:Boolean = false;
private static var _stopWatch:StopWatch;
private static var _connection:LocalConnection;
private static var _fpsMeter:FPSMeter;
public static function forceGC():void{
try {
} catch(e1:Error) {
try {
new LocalConnection().connect("forceGC");
new LocalConnection().connect("forceGC");
} catch(e2:Error) {
};
};
}
private static function send(_arg1:String, _arg2, _arg3:int=1, _arg4:int=0):void{
var _local5:Number;
var _local6:ByteArray;
if (_isEnabled){
if (!_isConnected){
_isConnected = true;
_connection = new LocalConnection();
_connection.addEventListener(StatusEvent.STATUS, onStatus);
};
_local5 = 0;
if (typeof(_arg2) == "string"){
_local5 = String(_arg2).length;
} else {
if (typeof(_arg2) == "object"){
_local6 = new ByteArray();
_local6.writeObject(_arg2);
_local5 = _local6.length;
_local6 = null;
};
};
if (_local5 > 39000){
storeDataLSO(_arg1, _arg2);
_arg1 = "onLargeData";
_arg2 = null;
};
_connection.send("_alcon_lc", _arg1, _arg2, _arg3, _arg4, "");
};
}
public static function stop():void{
if (_fpsMeter){
_isPollingFPS = false;
_fpsMeter.stop();
_fpsMeter.removeEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate);
_fpsMeter = null;
_stage = null;
};
}
public static function timerReset():void{
if (_stopWatch){
_stopWatch.reset();
};
}
private static function onFPSUpdate(_arg1:Event):void{
send("onFPS", ((((((_fpsMeter.fps + ",") + _stage.frameRate) + ",") + _fpsMeter.frt) + ",") + System.totalMemory));
}
public static function delimiter():void{
Debug.trace("[%DLT%]", 5);
}
public static function set enabled(_arg1:Boolean):void{
_isEnabled = _arg1;
}
public static function inspect(_arg1:Object):void{
send("onInspect", _arg1, 1, -1);
}
public static function timerStart(_arg1:String=""):void{
if (_isEnabled){
if (!_stopWatch){
_stopWatch = new StopWatch();
};
_stopWatch.start(_arg1);
};
}
public static function createCategory(_arg1:int, _arg2:String="", _arg3:uint=0, _arg4:uint=0xFFFF00):void{
send("onCategory", [_arg1, _arg2, _arg3, _arg4], 0, 0);
}
private static function storeDataLSO(_arg1:String, _arg2):void{
var sharedObject:SharedObject;
var flushResult:String;
var m = _arg1;
var d = _arg2;
sharedObject = SharedObject.getLocal("alcon", "/");
sharedObject.data["alconMethod"] = m;
sharedObject.data["alconData"] = d;
try {
flushResult = sharedObject.flush();
if (flushResult == SharedObjectFlushStatus.FLUSHED){
return;
};
} catch(e:Error) {
Security.showSettings(SecurityPanel.LOCAL_STORAGE);
};
}
public static function hexDump(_arg1:Object):void{
send("onHexDump", _arg1, 0, 0);
}
private static function onStatus(_arg1:StatusEvent):void{
}
public static function get enabled():Boolean{
return (_isEnabled);
}
public static function trace(... _args):void{
var _local2:int;
_local2 = ((_args[1] is int)) ? _args[1] : 1;
if ((((_local2 >= _filterLevel)) && ((_local2 < 7)))){
send("onData", _args[0], _local2, 0);
};
}
public static function timerToString():void{
if (_stopWatch){
Debug.trace(_stopWatch.toString());
};
}
public static function mark(_arg1:uint=0xFF00FF):void{
send("onMarker", _arg1, 1, -1);
}
public static function timerInSeconds():void{
if (_stopWatch){
Debug.trace((_stopWatch.timeInSeconds + "s"));
};
}
public static function set filterLevel(_arg1:int):void{
if ((((_arg1 >= 0)) && ((_arg1 < 5)))){
_filterLevel = _arg1;
};
}
public static function monitor(_arg1:Stage, _arg2:int=500):void{
if (_isPollingFPS){
Debug.stop();
};
if (((_isEnabled) && (!(_fpsMeter)))){
_isPollingFPS = true;
_stage = _arg1;
sendCapabilities();
_fpsMeter = new FPSMeter(_stage, _arg2);
_fpsMeter.addEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate);
_fpsMeter.start();
};
}
public static function time():void{
Debug.trace("[%TME%]", 5);
}
private static function sendCapabilities():void{
var _local1:XML;
var _local2:Array;
var _local3:XML;
var _local4:String;
_local1 = describeType(Capabilities);
_local2 = [];
for each (_local3 in _local1.*) {
_local4 = _local3.@name.toString();
if ((((((_local4.length > 0)) && (!((_local4 == "_internal"))))) && (!((_local4 == "prototype"))))){
_local2.push({p:_local4, v:Capabilities[_local4].toString()});
};
};
_local2.sortOn(["p"], Array.CASEINSENSITIVE);
send("onCap", _local2);
}
public static function clear():void{
Debug.trace("[%CLR%]", 5);
}
public static function timerStop():void{
if (_stopWatch){
_stopWatch.stop();
};
}
public static function timerInMilliSeconds():void{
if (_stopWatch){
Debug.trace((_stopWatch.timeInMilliSeconds + "ms"));
};
}
public static function get filterLevel():int{
return (_filterLevel);
}
public static function traceObj(_arg1:Object, _arg2:int=64, _arg3:int=1):void{
if ((((_arg3 >= _filterLevel)) && ((_arg3 < 7)))){
send("onData", _arg1, _arg3, _arg2);
};
}
public static function timerStopToString(_arg1:Boolean=false):void{
if (_stopWatch){
_stopWatch.stop();
Debug.trace(_stopWatch.toString());
if (_arg1){
_stopWatch.reset();
};
};
}
public static function pause():void{
Debug.trace("[%PSE%]", 5);
}
}
}//package com.hexagonstar.util.debug
Section 11
//FPSMeter (com.hexagonstar.util.debug.FPSMeter)
package com.hexagonstar.util.debug {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class FPSMeter extends EventDispatcher {
private var _pollInterval:int;
private var _delay:int;
private var _ms:int;
private var _prev:int;
private var _delayMax:int;// = 10
private var _timer:Timer;
private var _frt:int;
private var _fps:int;
private var _isRunning:Boolean;
private var _stage:Stage;
public static const FPS_UPDATE:String = "fpsUpdate";
public function FPSMeter(_arg1:Stage, _arg2:int=500){
_delayMax = 10;
super();
_stage = _arg1;
_pollInterval = _arg2;
reset();
}
public function stop():void{
if (_isRunning){
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, onTimer);
_stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_timer = null;
reset();
};
}
public function reset():void{
_fps = 0;
_frt = 0;
_ms = 0;
_delay = 0;
_prev = 0;
_isRunning = false;
}
private function onEnterFrame(_arg1:Event):void{
var _local2:Number;
_local2 = getTimer();
_delay++;
if (_delay >= _delayMax){
_delay = 0;
_fps = int(((1000 * _delayMax) / (_local2 - _prev)));
_prev = _local2;
};
_frt = (_local2 - _ms);
_ms = _local2;
}
private function onTimer(_arg1:TimerEvent):void{
dispatchEvent(new Event(FPSMeter.FPS_UPDATE));
}
public function get frt():int{
return (_frt);
}
public function get fps():int{
return (_fps);
}
public function start():void{
if (!_isRunning){
_isRunning = true;
_timer = new Timer(_pollInterval, 0);
_timer.addEventListener(TimerEvent.TIMER, onTimer);
_stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
_timer.start();
};
}
}
}//package com.hexagonstar.util.debug
Section 12
//StopWatch (com.hexagonstar.util.debug.StopWatch)
package com.hexagonstar.util.debug {
import flash.utils.*;
public class StopWatch {
private var _started:Boolean;// = false
private var _stopTimeKeys:Array;
private var _startTimeKeys:Array;
private var _title:String;
public function StopWatch(){
_started = false;
super();
reset();
}
public function get timeInMilliSeconds():int{
var _local1:int;
var _local2:int;
if (_started){
_stopTimeKeys[(_startTimeKeys.length - 1)] = getTimer();
};
_local1 = 0;
_local2 = 0;
while (_local2 < _startTimeKeys.length) {
_local1 = (_local1 + (_stopTimeKeys[_local2] - _startTimeKeys[_local2]));
_local2++;
};
return (_local1);
}
public function toString():String{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:int;
_local1 = "\n ********************* [STOPWATCH] *********************";
if (_title != ""){
_local1 = (_local1 + ("\n * " + _title));
};
_local2 = 0;
while (_local2 < _startTimeKeys.length) {
_local3 = _startTimeKeys[_local2];
_local4 = _stopTimeKeys[_local2];
_local1 = (_local1 + (((((("\n * started [" + format(_local3)) + "ms] stopped [") + format(_local4)) + "ms] time [") + format((_local4 - _local3))) + "ms]"));
_local2++;
};
if (_local2 == 0){
_local1 = (_local1 + "\n * never started.");
} else {
_local1 = (_local1 + (("\n * total runnning time: " + timeInSeconds) + "s"));
};
_local1 = (_local1 + "\n *******************************************************");
return (_local1);
}
public function get timeInSeconds():Number{
return ((timeInMilliSeconds / 1000));
}
public function get started():Boolean{
return (_started);
}
public function start(_arg1:String=""):void{
if (!_started){
_title = _arg1;
_started = true;
_startTimeKeys.push(getTimer());
};
}
public function reset():void{
_startTimeKeys = [];
_stopTimeKeys = [];
_started = false;
}
private function format(_arg1:int):String{
var _local2:String;
var _local3:int;
var _local4:int;
_local2 = "";
_local3 = _arg1.toString().length;
_local4 = 0;
while (_local4 < (5 - _local3)) {
_local2 = (_local2 + "0");
_local4++;
};
return ((_local2 + _arg1));
}
public function stop():void{
var _local1:int;
if (_started){
_local1 = getTimer();
_stopTimeKeys[(_startTimeKeys.length - 1)] = _local1;
_started = false;
};
}
}
}//package com.hexagonstar.util.debug
Section 13
//PlayTime (controlers.time.PlayTime)
package controlers.time {
import flash.display.*;
import flash.events.*;
import events.*;
import controlers.*;
import flash.utils.*;
import flash.text.*;
public class PlayTime extends Sprite {
private const PUNISH:uint = 30;
private var t:Timer;
private var tf:TextField;
public var dispatcher:Controler;
public var interval:Number;// = 0.0333
private var pause:Boolean;// = false
public static var stageTime:Number;
public function PlayTime():void{
interval = 0.0333;
pause = false;
super();
addEventListener(Event.ADDED_TO_STAGE, hAdd);
if (!stageTime){
stageTime = 0;
};
}
public function stop():void{
pause = true;
}
public function addTime():void{
stageTime = (stageTime + Math.round((PUNISH / interval)));
}
private function hAdd(_arg1:Event):void{
addEventListener(Event.ENTER_FRAME, hTimer);
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
start();
}
public function getTime():uint{
return (stageTime);
}
public function start():void{
pause = false;
}
public function getStringTime():String{
return (numberToTime(stageTime));
}
private function numberToTime(_arg1:uint):String{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:String;
_local2 = Math.floor(((((_arg1 / 1000) / interval) * 100) % 100));
_local3 = Math.floor((((_arg1 / 1000) / interval) % 60));
_local5 = "";
_local6 = "";
_local7 = "";
if (_local3 < 10){
_local5 = ("0" + _local3);
} else {
_local5 = _local3.toString();
};
_local4 = int((((_arg1 / 1000) / interval) / 60));
if (_local4 < 10){
_local6 = ("0" + _local4);
} else {
_local6 = _local4.toString();
};
_local7 = ((_local2 < 10)) ? ("0" + _local2) : _local2.toString();
_local8 = ((((_local6 + ":") + _local5) + ":") + _local7);
return (_local8);
}
public function setDispatcher(_arg1):void{
dispatcher = _arg1;
}
private function hTimer(_arg1:Event):void{
if (pause == false){
dispatcher.dispatchEvent(new TimeEvent("timeUpdate", {timeString:numberToTime(stageTime)}));
stageTime++;
};
}
public function resetTime():void{
stageTime = 0;
dispatcher.dispatchEvent(new TimeEvent("timeUpdate", {timeString:numberToTime(stageTime)}));
}
public function destroy():void{
removeEventListener(Event.ENTER_FRAME, hTimer);
}
}
}//package controlers.time
Section 14
//Controler (controlers.Controler)
package controlers {
import flash.events.*;
public class Controler extends EventDispatcher {
public function Controler():void{
}
}
}//package controlers
Section 15
//GameControler (controlers.GameControler)
package controlers {
import flash.display.*;
import flash.events.*;
import events.*;
import objects.*;
import flash.media.*;
import controlers.time.*;
import views.*;
public class GameControler extends MovieClip {
public var hero:Hero;
public var pt:PlayTime;
public var channel:SoundChannel;
public var music:Sound;
public var language:uint;
public var array:Array;
public var keyRightPress:Boolean;// = false
public var level:uint;
public var branding:uint;
public var url1:String;// = "http://agame.com"
public var view:View;
public var trans:SoundTransform;
public var listener;
public var keySpacePress:Boolean;// = false
public var controler:Controler;
public var musicPermission:Boolean;
public var keyLeftPress:Boolean;// = false
public var pause:Boolean;// = false
public static var soundPermission:Boolean = true;
public function GameControler(_arg1:uint, _arg2:Boolean, _arg3:String, _arg4:Array, _arg5:uint, _arg6:uint, _arg7:String):void{
keyLeftPress = false;
keyRightPress = false;
keySpacePress = false;
pause = false;
array = new Array();
url1 = "http://agame.com";
super();
trans = new SoundTransform(0.5, 0);
this.array = _arg4;
this.level = _arg1;
this.language = _arg5;
this.branding = _arg6;
this.url1 = _arg7;
musicPermission = _arg2;
controler = new Controler();
hero = new Hero(_arg3);
hero.setSound(soundPermission);
if (_arg1 == 1){
hero.resetHp();
};
pt = new PlayTime();
view = new View(_arg3, _arg4);
view.createLevel(_arg1);
view.setControler(controler);
hero.setDispatcher(controler);
pt.setDispatcher(controler);
music = new MusicLevel();
view.gameUI.setThumb(_arg3);
view.gameUI.setMusic(!(musicPermission));
view.gameUI.setSound(!(soundPermission));
if (musicPermission == true){
channel = music.play(0, 999);
channel.soundTransform = trans;
};
addChild(pt);
addChild(view);
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
if (musicPermission == true){
channel.stop();
};
removeEventListener(KeyboardEvent.KEY_DOWN, hDown);
removeEventListener(KeyboardEvent.KEY_UP, hUp);
removeEventListener(Event.ENTER_FRAME, hFrame);
controler.removeEventListener(HeroEvent.HEAL, hHeal);
controler.removeEventListener(HeroEvent.FINISH, hFinish);
controler.removeEventListener(HeroEvent.FIRST_LAND, hFirstLand);
controler.removeEventListener(HeroEvent.REVERSE, hReverse);
controler.removeEventListener(HeroEvent.FLY, hFly);
controler.removeEventListener(TimeEvent.UPDATE, hUpdateTime);
stage.removeEventListener(HeroEvent.LAND, hLand);
stage.removeEventListener(HeroEvent.DAMAGE, hDamage);
controler.removeEventListener(HeroEvent.PUSH, hPush);
controler.removeEventListener(HeroEvent.STAY, hStay);
controler.removeEventListener(HeroEvent.RIDE, hRide);
controler.removeEventListener(HeroEvent.JUMP, hJump);
controler.removeEventListener(HeroEvent.JUMP2, hJump2);
controler.removeEventListener(HeroEvent.START_LINE, hStart);
controler.removeEventListener(MainEvent.GAME_END, hEndGame);
controler.removeEventListener(HeroEvent.DEAD, hDead);
view.removeEventListener(MainEvent.MENU, hMenu);
controler.removeEventListener(TimeEvent.ADD, hAddTime);
pt.destroy();
removeChild(pt);
pt = null;
hero.destroy();
hero = null;
controler.removeEventListener(ButtonClickEvent.RETRY, hRetryButton);
if (view){
view.gameUI.removeEventListener(ButtonClickEvent.SOUND, hSoundButton);
view.gameUI.removeEventListener(ButtonClickEvent.MUSIC, hMusicButton);
view.gameUI.removeEventListener(ButtonClickEvent.RETRY, hRetryButton);
view.gameUI.removeEventListener(ButtonClickEvent.BACK, hBackButton);
view.destroy();
removeChild(view);
view = null;
};
}
public function hFly(_arg1:HeroEvent):void{
view.mc_hero.fly(hero);
}
private function hDead(_arg1:HeroEvent):void{
pause = true;
view.gameFailed(language, branding, url1);
}
private function hFinish(_arg1:HeroEvent):void{
if (listener.level == 1){
listener.dispatchEvent(new LevelEvent("levelSuccess", {musicPermission:musicPermission}));
} else {
pause = true;
view.gameSuccess(language, branding, url1);
};
}
public function hEndGame(_arg1:MainEvent):void{
listener.dispatchEvent(new LevelEvent("levelSuccess", {musicPermission:musicPermission}));
}
private function hUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 37:
keyLeftPress = false;
break;
case 32:
keySpacePress = false;
break;
case 39:
keyRightPress = false;
break;
};
}
private function hDamage(_arg1:HeroEvent):void{
hero.damage(_arg1.params.damage);
view.mc_hero.startBlinking();
}
private function hAdd(_arg1:Event):void{
controler.addEventListener(HeroEvent.DEAD, hDead);
view.gameUI.addEventListener(ButtonClickEvent.SOUND, hSoundButton);
view.gameUI.addEventListener(ButtonClickEvent.MUSIC, hMusicButton);
view.gameUI.addEventListener(ButtonClickEvent.RETRY, hRetryButton);
controler.addEventListener(ButtonClickEvent.RETRY, hRetryButton);
view.gameUI.addEventListener(ButtonClickEvent.BACK, hBackButton);
controler.addEventListener(HeroEvent.FLY, hFly);
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(HeroEvent.LAND, hLand);
stage.addEventListener(HeroEvent.DAMAGE, hDamage);
controler.addEventListener(HeroEvent.HEAL, hHeal);
controler.addEventListener(HeroEvent.REVERSE, hReverse);
addEventListener(KeyboardEvent.KEY_DOWN, hDown);
addEventListener(KeyboardEvent.KEY_UP, hUp);
addEventListener(Event.ENTER_FRAME, hFrame);
controler.addEventListener(HeroEvent.FINISH, hFinish);
controler.addEventListener(HeroEvent.FIRST_LAND, hFirstLand);
controler.addEventListener(HeroEvent.PUSH, hPush);
controler.addEventListener(HeroEvent.STAY, hStay);
controler.addEventListener(HeroEvent.RIDE, hRide);
controler.addEventListener(HeroEvent.JUMP, hJump);
controler.addEventListener(HeroEvent.JUMP2, hJump2);
controler.addEventListener(TimeEvent.UPDATE, hUpdateTime);
controler.addEventListener(HeroEvent.START_LINE, hStart);
controler.addEventListener(MainEvent.GAME_END, hEndGame);
view.addEventListener(MainEvent.MENU, hMenu);
controler.addEventListener(TimeEvent.ADD, hAddTime);
}
public function hJump2(_arg1:HeroEvent):void{
view.mc_hero.endJump();
}
public function hMusicButton(_arg1:ButtonClickEvent):void{
if (musicPermission == false){
channel = music.play(0, 999);
channel.soundTransform = trans;
musicPermission = true;
} else {
channel.stop();
musicPermission = false;
};
view.gameUI.setMusic(!(musicPermission));
}
public function setListener(_arg1):void{
listener = _arg1;
}
private function hDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 37:
keyLeftPress = true;
break;
case 32:
keySpacePress = true;
break;
case 39:
keyRightPress = true;
break;
};
}
public function hReverse(_arg1:HeroEvent):void{
view.mc_hero.reverse(_arg1.params.newDir);
}
private function hHeal(_arg1:HeroEvent):void{
hero.heal();
}
public function hFirstLand(_arg1:HeroEvent):void{
view.mc_hero.land(hero);
}
public function hBackButton(_arg1:ButtonClickEvent):void{
dispatchEvent(new MainEvent("backToMenu", {musicPermission:musicPermission}));
}
private function hLand(_arg1:HeroEvent):void{
if (hero.ground == false){
hero.land();
};
}
public function hRide(_arg1:HeroEvent):void{
view.mc_hero.ride(hero);
}
public function hSoundButton(_arg1:ButtonClickEvent):void{
if (soundPermission == false){
soundPermission = true;
} else {
soundPermission = false;
};
hero.setSound(soundPermission);
view.gameUI.setSound(!(soundPermission));
}
public function hRetryButton(_arg1:ButtonClickEvent):void{
dispatchEvent(new LevelEvent("levelRetry", new Object()));
}
public function hPush(_arg1:HeroEvent):void{
view.mc_hero.push(hero);
}
private function hAddTime(_arg1:TimeEvent):void{
pt.addTime();
}
public function hJump(_arg1:HeroEvent):void{
view.mc_hero.jump(hero);
}
private function hUpdateTime(_arg1:TimeEvent):void{
if (pause == false){
view.gameUI.updateTime(_arg1.params.timeString);
} else {
view.gameUI.mc_clock.n1.stop();
};
}
public function hStart(_arg1:HeroEvent):void{
pt.resetTime();
view.gameUI.mc_clock.n1.gotoAndPlay(1);
}
public function hStay(_arg1:HeroEvent):void{
view.mc_hero.stay(hero);
}
private function hFrame(_arg1:Event):void{
if (pause == false){
stage.focus = this;
stage.stageFocusRect = false;
view.gameUI.setHp(hero.getHp());
if (keyLeftPress == true){
hero.accelerate("left");
};
if (keyRightPress == true){
hero.accelerate("right");
};
if ((((keyLeftPress == false)) && ((keyRightPress == false)))){
hero.accelerate("zero");
};
if (keySpacePress == true){
if (hero.ground == true){
hero.jump();
};
};
hero.frame();
view.setView(hero);
};
}
public function hMenu(_arg1:MainEvent):void{
dispatchEvent(new MainEvent("backToMenu", {musicPermission:musicPermission}));
}
}
}//package controlers
Section 16
//LevelControler (controlers.LevelControler)
package controlers {
import flash.display.*;
import flash.events.*;
import events.*;
public class LevelControler extends MovieClip {
public var gc:GameControler;
public var vehicle:String;
public var language:uint;
public var array:Array;
public var branding:uint;
public var level:uint;
public var url1:String;// = "http://agame.com"
public var musicPermission:Boolean;
public function LevelControler(_arg1:Boolean, _arg2:String, _arg3:Array, _arg4:uint, _arg5:uint, _arg6:String):void{
array = new Array();
url1 = "http://agame.com";
super();
this.array = _arg3;
this.vehicle = _arg2;
this.language = _arg4;
this.branding = _arg5;
this.url1 = _arg6;
musicPermission = _arg1;
level = 1;
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
gc.removeEventListener(LevelEvent.RETRY, hRetry);
gc.removeEventListener(MainEvent.MENU, hMenu);
gc.destroy();
removeChild(gc);
gc = null;
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
gc = new GameControler(level, musicPermission, vehicle, array, language, branding, url1);
gc.setListener(this);
gc.addEventListener(LevelEvent.RETRY, hRetry);
gc.addEventListener(MainEvent.MENU, hMenu);
addChild(gc);
stage.focus = gc;
addEventListener(LevelEvent.SUCCESS, hSuccess);
}
private function hRetry(_arg1:LevelEvent):void{
level = 1;
gc.removeEventListener(LevelEvent.RETRY, hRetry);
gc.destroy();
gc = new GameControler(level, musicPermission, vehicle, array, language, branding, url1);
gc.addEventListener(LevelEvent.RETRY, hRetry);
gc.addEventListener(MainEvent.MENU, hMenu);
gc.setListener(this);
addChild(gc);
stage.focus = gc;
}
private function hSuccess(_arg1:LevelEvent):void{
musicPermission = _arg1.params.musicPermission;
if (level == 1){
gc.removeEventListener(LevelEvent.RETRY, hRetry);
level++;
gc.destroy();
gc = new GameControler(level, musicPermission, vehicle, array, language, branding, url1);
gc.addEventListener(LevelEvent.RETRY, hRetry);
gc.addEventListener(MainEvent.MENU, hMenu);
gc.setListener(this);
addChild(gc);
stage.focus = gc;
} else {
if (level == 2){
Object(parent).dispatchEvent(new MainEvent("gameEnd", {musicPermission:musicPermission}));
};
};
}
private function hMenu(_arg1:MainEvent):void{
dispatchEvent(new MainEvent("backToMenu", {musicPermission:_arg1.params.musicPermission}));
}
}
}//package controlers
Section 17
//Preloader (controlers.Preloader)
package controlers {
import flash.display.*;
import flash.events.*;
import com.hexagonstar.util.debug.*;
public class Preloader extends MovieClip {
public var li:LoaderInfo;
public var mc:MovieClip;
private var parentClass:Object;
public function Preloader(_arg1:Object, _arg2:MovieClip):void{
Debug.trace("2x");
parentClass = _arg1;
this.mc = _arg2;
parentClass.loaderInfo.addEventListener(Event.COMPLETE, initApplication);
parentClass.loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
}
private function initApplication(_arg1:Event):void{
parentClass.play();
Debug.trace("loaded");
}
public function showProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
_local2 = _arg1.bytesTotal;
_local3 = _arg1.bytesLoaded;
_local4 = Math.round(((100 * _local3) / _local2));
Debug.trace(_local4.toString());
if (mc.n1){
mc.n1.tf1.text = _local4.toString();
};
}
}
}//package controlers
Section 18
//ButtonClickEvent (events.ButtonClickEvent)
package events {
import flash.events.*;
public class ButtonClickEvent extends Event {
public var params:Object;
public static const MUSIC:String = "musicClick";
public static const BACK:String = "backClick";
public static const RETRY:String = "retryClick";
public static const SOUND:String = "soundClick";
public function ButtonClickEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 19
//HeroEvent (events.HeroEvent)
package events {
import flash.events.*;
public class HeroEvent extends Event {
public var params:Object;
public static const REVERSE:String = "heroReverse";
public static const FALL:String = "heroFall";
public static const JUMP2:String = "heroJump2";
public static const START_LINE:String = "heroStartLine";
public static const FINISH:String = "heroFinish";
public static const STAY:String = "heroStay";
public static const PUSH:String = "heroPush";
public static const DEAD:String = "heroDead";
public static const HEAL:String = "heroHeal";
public static const LAND:String = "heroLand";
public static const JUMP:String = "heroJump";
public static const DAMAGE:String = "heroDamage";
public static const FLY:String = "heroFly";
public static const RIDE:String = "heroRide";
public static const FIRST_LAND:String = "firstLand";
public function HeroEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 20
//LevelEvent (events.LevelEvent)
package events {
import flash.events.*;
public class LevelEvent extends Event {
public var params:Object;
public static const RETRY:String = "levelRetry";
public static const SUCCESS:String = "levelSuccess";
public function LevelEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 21
//MainEvent (events.MainEvent)
package events {
import flash.events.*;
public class MainEvent extends Event {
public var params:Object;
public static const MENU_END:String = "menuEnd";
public static const GAME_END:String = "gameEnd";
public static const MENU:String = "backToMenu";
public function MainEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 22
//MapEvent (events.MapEvent)
package events {
import flash.events.*;
public class MapEvent extends Event {
public var params:Object;
public static const MOVE:String = "mapMove";
public function MapEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 23
//TimeEvent (events.TimeEvent)
package events {
import flash.events.*;
public class TimeEvent extends Event {
public var params:Object;
public static const ADD:String = "timeAdd";
public static const UPDATE:String = "timeUpdate";
public function TimeEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 24
//XMLEvent (events.XMLEvent)
package events {
import flash.events.*;
public class XMLEvent extends Event {
public var params:Object;
public static const COMPLETE:String = "completeXML";
public function XMLEvent(_arg1:String, _arg2:Object):void{
super(_arg1);
this.params = _arg2;
}
}
}//package events
Section 25
//ambient1L_211 (main_game_fla.ambient1L_211)
package main_game_fla {
import flash.display.*;
public dynamic class ambient1L_211 extends MovieClip {
public function ambient1L_211(){
addFrameScript(150, frame151);
}
function frame151(){
gotoAndPlay("loop");
}
}
}//package main_game_fla
Section 26
//back_238 (main_game_fla.back_238)
package main_game_fla {
import flash.display.*;
public dynamic class back_238 extends MovieClip {
public var n1:MovieClip;
public function back_238(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 27
//branding_aligned_center_2 (main_game_fla.branding_aligned_center_2)
package main_game_fla {
import flash.display.*;
public dynamic class branding_aligned_center_2 extends MovieClip {
public function branding_aligned_center_2(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package main_game_fla
Section 28
//btn_back_309 (main_game_fla.btn_back_309)
package main_game_fla {
import flash.display.*;
public dynamic class btn_back_309 extends MovieClip {
public var n1:MovieClip;
public function btn_back_309(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 29
//btn_music_271 (main_game_fla.btn_music_271)
package main_game_fla {
import flash.display.*;
public dynamic class btn_music_271 extends MovieClip {
public var n1:MovieClip;
public function btn_music_271(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 30
//btn_onemore_308 (main_game_fla.btn_onemore_308)
package main_game_fla {
import flash.display.*;
public dynamic class btn_onemore_308 extends MovieClip {
public var n1:MovieClip;
public function btn_onemore_308(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 31
//btn_sound_307 (main_game_fla.btn_sound_307)
package main_game_fla {
import flash.display.*;
public dynamic class btn_sound_307 extends MovieClip {
public var n1:MovieClip;
public function btn_sound_307(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 32
//damages_293 (main_game_fla.damages_293)
package main_game_fla {
import flash.display.*;
public dynamic class damages_293 extends MovieClip {
public function damages_293(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 33
//deskaambientP_182 (main_game_fla.deskaambientP_182)
package main_game_fla {
import flash.display.*;
public dynamic class deskaambientP_182 extends MovieClip {
public function deskaambientP_182(){
addFrameScript(150, frame151);
}
function frame151(){
gotoAndPlay("loop");
}
}
}//package main_game_fla
Section 34
//help_273 (main_game_fla.help_273)
package main_game_fla {
import flash.display.*;
public dynamic class help_273 extends MovieClip {
public var n1:MovieClip;
public function help_273(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 35
//help_window_235 (main_game_fla.help_window_235)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class help_window_235 extends MovieClip {
public var tf2:TextField;
public var tf_right:TextField;
public var tf_title:TextField;
public var btn_close:SimpleButton;
public var tf_left:TextField;
public var tf_jump:TextField;
public var btn_back:MovieClip;
public var tf_space:TextField;
public var tf1:TextField;
}
}//package main_game_fla
Section 36
//intro_hitarea_63 (main_game_fla.intro_hitarea_63)
package main_game_fla {
import flash.display.*;
public dynamic class intro_hitarea_63 extends MovieClip {
public var button_intro:SimpleButton;
}
}//package main_game_fla
Section 37
//intro_logos_1 (main_game_fla.intro_logos_1)
package main_game_fla {
import flash.display.*;
public dynamic class intro_logos_1 extends MovieClip {
public var n1:MovieClip;
public function intro_logos_1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
this.stop();
}
function frame1(){
this.stop();
}
function frame4(){
this.stop();
}
function frame5(){
this.stop();
}
function frame2(){
this.stop();
}
}
}//package main_game_fla
Section 38
//loading_277 (main_game_fla.loading_277)
package main_game_fla {
import flash.display.*;
public dynamic class loading_277 extends MovieClip {
public function loading_277(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package main_game_fla
Section 39
//logo_246 (main_game_fla.logo_246)
package main_game_fla {
import flash.display.*;
public dynamic class logo_246 extends MovieClip {
public function logo_246(){
addFrameScript(102, frame103, 189, frame190);
}
function frame103(){
stop();
}
function frame190(){
stop();
}
}
}//package main_game_fla
Section 40
//mc_back_napis_239 (main_game_fla.mc_back_napis_239)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_back_napis_239 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 41
//mc_bike_game_107 (main_game_fla.mc_bike_game_107)
package main_game_fla {
import flash.display.*;
public dynamic class mc_bike_game_107 extends MovieClip {
public var n1:MovieClip;
public function mc_bike_game_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 42
//mc_desk_262 (main_game_fla.mc_desk_262)
package main_game_fla {
import flash.display.*;
public dynamic class mc_desk_262 extends MovieClip {
public function mc_desk_262(){
addFrameScript(11, frame12, 15, frame16);
}
function frame12(){
stop();
}
function frame16(){
stop();
}
}
}//package main_game_fla
Section 43
//mc_logo_281 (main_game_fla.mc_logo_281)
package main_game_fla {
import flash.display.*;
public dynamic class mc_logo_281 extends MovieClip {
public function mc_logo_281(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 44
//mc_menu_242 (main_game_fla.mc_menu_242)
package main_game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.xml.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
public dynamic class mc_menu_242 extends MovieClip {
public var btn_bike:MovieClip;
public var btn_help:MovieClip;
public var mc_quad:MovieClip;
public var mc_game_logo:MovieClip;
public var btn_quad:MovieClip;
public var btn_sound:MovieClip;
public var select_text:MovieClip;
public var mc_desk:MovieClip;
public var spile2:MovieClip;
public var spile1:MovieClip;
public var mc_logo:MovieClip;
public var btn_desk:MovieClip;
public var mc_musicx:MovieClip;
public var btn_start:MovieClip;
public var mc_bike:MovieClip;
public function mc_menu_242(){
addFrameScript(0, frame1, 8, frame9, 17, frame18, 79, frame80, 85, frame86, 137, frame138);
}
function frame80(){
}
function frame86(){
stop();
}
function frame18(){
mc_desk.gotoAndPlay(1);
mc_desk.visible = true;
}
function frame1(){
mc_desk.stop();
mc_desk.visible = false;
mc_quad.stop();
mc_quad.visible = false;
mc_bike.stop();
mc_bike.visible = false;
}
function frame9(){
mc_desk.stop();
mc_desk.visible = false;
mc_quad.stop();
mc_quad.visible = false;
mc_bike.stop();
mc_bike.visible = false;
}
function frame138(){
Object(parent).endMenu();
}
}
}//package main_game_fla
Section 45
//mc_n1_sound_272 (main_game_fla.mc_n1_sound_272)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_n1_sound_272 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 46
//mc_pop1_327 (main_game_fla.mc_pop1_327)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_pop1_327 extends MovieClip {
public var btn_retry:MovieClip;
public var tf_time_to:TextField;
public var tf_awesome:TextField;
public var spile1:MovieClip;
public var spile2:MovieClip;
public var btn_main:MovieClip;
public var tf1:TextField;
}
}//package main_game_fla
Section 47
//mc_pop2_333 (main_game_fla.mc_pop2_333)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_pop2_333 extends MovieClip {
public var btn_retry:MovieClip;
public var tf_your_ride:TextField;
public var tf_game_over:TextField;
public var spile1:MovieClip;
public var spile2:MovieClip;
public var btn_main:MovieClip;
}
}//package main_game_fla
Section 48
//mc_quad_230 (main_game_fla.mc_quad_230)
package main_game_fla {
import flash.display.*;
public dynamic class mc_quad_230 extends MovieClip {
public function mc_quad_230(){
addFrameScript(14, frame15, 19, frame20);
}
function frame15(){
stop();
}
function frame20(){
stop();
}
}
}//package main_game_fla
Section 49
//mc_quad_game_68 (main_game_fla.mc_quad_game_68)
package main_game_fla {
import flash.display.*;
public dynamic class mc_quad_game_68 extends MovieClip {
public var n1:MovieClip;
public function mc_quad_game_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 50
//mc_rower_260 (main_game_fla.mc_rower_260)
package main_game_fla {
import flash.display.*;
public dynamic class mc_rower_260 extends MovieClip {
public function mc_rower_260(){
addFrameScript(11, frame12, 17, frame18);
}
function frame18(){
stop();
}
function frame12(){
stop();
}
}
}//package main_game_fla
Section 51
//mc_sq_149 (main_game_fla.mc_sq_149)
package main_game_fla {
import flash.display.*;
public dynamic class mc_sq_149 extends MovieClip {
public var n1:MovieClip;
public function mc_sq_149(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 52
//mc_thumb2_311 (main_game_fla.mc_thumb2_311)
package main_game_fla {
import flash.display.*;
public dynamic class mc_thumb2_311 extends MovieClip {
public function mc_thumb2_311(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 53
//mp_btn_330 (main_game_fla.mp_btn_330)
package main_game_fla {
import flash.display.*;
public dynamic class mp_btn_330 extends MovieClip {
public var n1:MovieClip;
public function mp_btn_330(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 54
//n1_help_275 (main_game_fla.n1_help_275)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class n1_help_275 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 55
//n1_mc_back_331 (main_game_fla.n1_mc_back_331)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class n1_mc_back_331 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 56
//nut_278 (main_game_fla.nut_278)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nut_278 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 57
//obrotL_216 (main_game_fla.obrotL_216)
package main_game_fla {
import flash.display.*;
public dynamic class obrotL_216 extends MovieClip {
public function obrotL_216(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package main_game_fla
Section 58
//QuadLadowanieL_104 (main_game_fla.QuadLadowanieL_104)
package main_game_fla {
import flash.display.*;
public dynamic class QuadLadowanieL_104 extends MovieClip {
public function QuadLadowanieL_104(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 59
//QuadLadowanieP_93 (main_game_fla.QuadLadowanieP_93)
package main_game_fla {
import flash.display.*;
public dynamic class QuadLadowanieP_93 extends MovieClip {
public function QuadLadowanieP_93(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 60
//QuadObrotL_106 (main_game_fla.QuadObrotL_106)
package main_game_fla {
import flash.display.*;
public dynamic class QuadObrotL_106 extends MovieClip {
public function QuadObrotL_106(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 61
//QuadObrotP_98 (main_game_fla.QuadObrotP_98)
package main_game_fla {
import flash.display.*;
public dynamic class QuadObrotP_98 extends MovieClip {
public function QuadObrotP_98(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 62
//QuadSkokL_103 (main_game_fla.QuadSkokL_103)
package main_game_fla {
import flash.display.*;
public dynamic class QuadSkokL_103 extends MovieClip {
public function QuadSkokL_103(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package main_game_fla
Section 63
//QuadSkokP_92 (main_game_fla.QuadSkokP_92)
package main_game_fla {
import flash.display.*;
public dynamic class QuadSkokP_92 extends MovieClip {
public function QuadSkokP_92(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package main_game_fla
Section 64
//rower_266 (main_game_fla.rower_266)
package main_game_fla {
import flash.display.*;
public dynamic class rower_266 extends MovieClip {
public function rower_266(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 65
//RowerAmbientL_147 (main_game_fla.RowerAmbientL_147)
package main_game_fla {
import flash.display.*;
public dynamic class RowerAmbientL_147 extends MovieClip {
public function RowerAmbientL_147(){
addFrameScript(150, frame151);
}
function frame151(){
gotoAndPlay("loop");
}
}
}//package main_game_fla
Section 66
//RowerAmbientP_136 (main_game_fla.RowerAmbientP_136)
package main_game_fla {
import flash.display.*;
public dynamic class RowerAmbientP_136 extends MovieClip {
public function RowerAmbientP_136(){
addFrameScript(148, frame149);
}
function frame149(){
gotoAndPlay("loop");
}
}
}//package main_game_fla
Section 67
//RowerLadowanieL_146 (main_game_fla.RowerLadowanieL_146)
package main_game_fla {
import flash.display.*;
public dynamic class RowerLadowanieL_146 extends MovieClip {
public function RowerLadowanieL_146(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 68
//RowerLadowanieP_135 (main_game_fla.RowerLadowanieP_135)
package main_game_fla {
import flash.display.*;
public dynamic class RowerLadowanieP_135 extends MovieClip {
public function RowerLadowanieP_135(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 69
//RowerObrotL_148 (main_game_fla.RowerObrotL_148)
package main_game_fla {
import flash.display.*;
public dynamic class RowerObrotL_148 extends MovieClip {
public function RowerObrotL_148(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 70
//RowerObrotP_139 (main_game_fla.RowerObrotP_139)
package main_game_fla {
import flash.display.*;
public dynamic class RowerObrotP_139 extends MovieClip {
public function RowerObrotP_139(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
}
}
}//package main_game_fla
Section 71
//RowerSkokL_145 (main_game_fla.RowerSkokL_145)
package main_game_fla {
import flash.display.*;
public dynamic class RowerSkokL_145 extends MovieClip {
public function RowerSkokL_145(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 72
//RowerSkokP_134 (main_game_fla.RowerSkokP_134)
package main_game_fla {
import flash.display.*;
public dynamic class RowerSkokP_134 extends MovieClip {
public function RowerSkokP_134(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 73
//sel_deska_268 (main_game_fla.sel_deska_268)
package main_game_fla {
import flash.display.*;
public dynamic class sel_deska_268 extends MovieClip {
public function sel_deska_268(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 74
//sel_quad_264 (main_game_fla.sel_quad_264)
package main_game_fla {
import flash.display.*;
public dynamic class sel_quad_264 extends MovieClip {
public function sel_quad_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 75
//skokL_209 (main_game_fla.skokL_209)
package main_game_fla {
import flash.display.*;
public dynamic class skokL_209 extends MovieClip {
public function skokL_209(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package main_game_fla
Section 76
//start_244 (main_game_fla.start_244)
package main_game_fla {
import flash.display.*;
public dynamic class start_244 extends MovieClip {
public function start_244(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 77
//stoper_290 (main_game_fla.stoper_290)
package main_game_fla {
import flash.display.*;
public dynamic class stoper_290 extends MovieClip {
public var n1:MovieClip;
}
}//package main_game_fla
Section 78
//ta_btn_328 (main_game_fla.ta_btn_328)
package main_game_fla {
import flash.display.*;
public dynamic class ta_btn_328 extends MovieClip {
public var n1:MovieClip;
public function ta_btn_328(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 79
//ta_mc_329 (main_game_fla.ta_mc_329)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ta_mc_329 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 80
//text1_276 (main_game_fla.text1_276)
package main_game_fla {
import flash.display.*;
public dynamic class text1_276 extends MovieClip {
public function text1_276(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package main_game_fla
Section 81
//tf_time_310 (main_game_fla.tf_time_310)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class tf_time_310 extends MovieClip {
public var tf2:TextField;
public var tf1:TextField;
}
}//package main_game_fla
Section 82
//Timeline_66 (main_game_fla.Timeline_66)
package main_game_fla {
import flash.display.*;
public dynamic class Timeline_66 extends MovieClip {
public function Timeline_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_game_fla
Section 83
//txt_1_270 (main_game_fla.txt_1_270)
package main_game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class txt_1_270 extends MovieClip {
public var tf1:TextField;
}
}//package main_game_fla
Section 84
//wiewiorkaodepchniecieP_173 (main_game_fla.wiewiorkaodepchniecieP_173)
package main_game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.xml.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
public dynamic class wiewiorkaodepchniecieP_173 extends MovieClip {
public function wiewiorkaodepchniecieP_173(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
Object(parent.parent).endPush();
}
}
}//package main_game_fla
Section 85
//wiewiorobrotP_186 (main_game_fla.wiewiorobrotP_186)
package main_game_fla {
import flash.display.*;
public dynamic class wiewiorobrotP_186 extends MovieClip {
public function wiewiorobrotP_186(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package main_game_fla
Section 86
//wiewiorSKOKP_180 (main_game_fla.wiewiorSKOKP_180)
package main_game_fla {
import flash.display.*;
public dynamic class wiewiorSKOKP_180 extends MovieClip {
public function wiewiorSKOKP_180(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package main_game_fla
Section 87
//wiewiorZESKOKP_181 (main_game_fla.wiewiorZESKOKP_181)
package main_game_fla {
import flash.display.*;
public dynamic class wiewiorZESKOKP_181 extends MovieClip {
public function wiewiorZESKOKP_181(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package main_game_fla
Section 88
//ZeskokL_210 (main_game_fla.ZeskokL_210)
package main_game_fla {
import flash.display.*;
public dynamic class ZeskokL_210 extends MovieClip {
public function ZeskokL_210(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package main_game_fla
Section 89
//XMLData (model.xml.XMLData)
package model.xml {
import flash.display.*;
public class XMLData extends MovieClip {
public function XMLData():void{
}
public function getData():String{
var _local1:String;
_local1 = "<list><item lang_id=\"1\" lang = \"US ENGLISH TEXT\"><help>Help</help><time>Time:</time><help_tf1>Only the nuttiest of squirells will be able to tackle this crazy course of obstacles! Use your keyboard to give it a spin.</help_tf1><left>Left</left><right>Right</right><space>Space</space><jump>Jump</jump><help_tf2>When you hit danger zones, your wheels will get damaged. Collect wrenches to repair your ride!</help_tf2><start>Start</start><select_ride>Select your ride</select_ride><music>Music</music><damage>Damage</damage><sound>Sound</sound><try_again>Try Again</try_again><back>Back</back><game_over>Game Over</game_over><your_ride>Your ride is totaled!</your_ride><main_menu>Main Menu</main_menu><awesome>Awesome!</awesome></item><item lang_id=\"16\" lang = \"UK ENGLISH TEXT\"><help>Help</help><time>Time:</time><help_tf1>Only the nuttiest of squirrels will be able to tackle this crazy obstacle course! Use your keyboard to give it a spin.</help_tf1><left>Left</left><right>Right</right><space>Space</space><jump>Jump</jump><help_tf2>Your wheels will get damaged when you hit danger zones. Collect spanners to repair your ride!</help_tf2><start>Start</start><select_ride>Select your ride</select_ride><music>Music</music><damage>Damage</damage><sound>Sound</sound><try_again>Try Again</try_again><back>Back</back><game_over>Game Over</game_over><your_ride>Your ride is a write-off!</your_ride><main_menu>Main Menu</main_menu><awesome>Awesome!</awesome></item><item lang_id=\"3\" lang = \"DUTCH\"><help>Help</help><time>Tijd:</time><help_tf1>Alleen de meest gesjeesde eekhoorns kunnen deze krankzinnige hindernisbaan aan! Gebruik je toetsenbord om een poging te wagen.</help_tf1><left>Links</left><right>Rechts</right><space>Spatiebalk</space><jump>Springen</jump><help_tf2>Als je de gevarenzones raakt, gaan je wielen kapot. Verzamel moersleutels om je voertuig te repareren! </help_tf2><start>Starten</start><select_ride>Kies je voertuig</select_ride><music>Muziek</music><damage>Schade</damage><sound>Geluid</sound><try_again>Opnieuw</try_again><back>Terug</back><game_over>Game Over</game_over><your_ride>Je voertuig is total loss!</your_ride><main_menu>Hoofdmenu</main_menu><awesome>Geweldig!</awesome></item><item lang_id=\"4\" lang = \"FRENCH\"><help>Aide</help><time>Temps :</time><help_tf1>Seul le plus fou des écureuils pourra s'attaquer à cette course d'obstacles absolument démente ! Utilise ton clavier pour essayer.</help_tf1><left>Gauche</left><right>Droite</right><space>Barre d'espace</space><jump>Sauter</jump><help_tf2>Si tu heurtes des zones dangereuses, tes roues seront endommagées. Ramasse des clés pour réparer ton véhicule !</help_tf2><start>Jouer</start><select_ride>Choisis ton véhicule</select_ride><music>Musique</music><damage>Endommagement</damage><sound>Son</sound><try_again>Essayer de nouveau </try_again><back>Retour</back><game_over>Game over</game_over><your_ride>Ton véhicule est en panne !</your_ride><main_menu>Menu principal</main_menu><awesome>Incroyable !</awesome></item><item lang_id=\"5\" lang =\"GERMAN\"><help>Hilfe</help><time>Zeit:</time><help_tf1>Nur den verrücktesten Eichhörnchen wird es gelingen, diesen irren Hindernisparcours zu überwinden! Benutze deine Tastatur, um loszuwirbeln.</help_tf1><left>Links</left><right>Rechts</right><space>Leertaste</space><jump>Springen</jump><help_tf2>Wenn du Gefahrenzonen berührst, werden deine Räder beschädigt. Sammle Schraubenschlüssel, um dein Fahrzeug zu reparieren!</help_tf2><start>Start</start><select_ride>Wähle dein Fahrzeug</select_ride><music>Musik</music><damage>Schaden</damage><sound>Ton</sound><try_again>Nochmal probieren</try_again><back>Zurück</back><game_over>Game over</game_over><your_ride>Dein Fahrzeug hat einen Totalschaden!</your_ride><main_menu>Hauptmenü</main_menu><awesome>Ausgezeichnet!</awesome></item><item lang_id=\"9\" lang =\"SPANISH\"><help>Ayuda</help><time>Tiempo:</time><help_tf1>¡Solo las ardillas más chifladas conseguirán abordar esta alocada carrera de obstáculos! Usa el teclado para darle un giro.</help_tf1><left>Izquierda</left><right>Derecha</right><space>Espacio</space><jump>Saltar</jump><help_tf2>Cuando pases por zonas de peligro, tus ruedas se dañarán. ¡Coge llaves inglesas para reparar tu medio de transporte!</help_tf2><start>Iniciar</start><select_ride>Selecciona tu medio de transporte</select_ride><music>Música</music><damage>Daño</damage><sound>Sonido</sound><try_again>¿Volver a intentar?</try_again><back>Atrás</back><game_over>Fin de partida</game_over><your_ride>¡Tu medio de transporte está hecho polvo!</your_ride><main_menu>Menú principal</main_menu><awesome>¡Impresionante!</awesome></item><item lang_id=\"11\" lang =\"BRAZILIAN\"><help>Ajuda</help><time>Tempo:</time><help_tf1>Apenas os esquilos mais radicais conseguirão superar esta pista maluca cheia de obstáculos! Use o seu teclado para começar a ação.</help_tf1><left>Esquerda</left><right>Direita</right><space>Espaço</space><jump>Pular</jump><help_tf2>Quando você atingir zonas perigosas, suas rodas serão danificadas. Recolha chaves de fenda para consertar seu veículo!</help_tf2><start>Começar</start><select_ride>Selecionar seu veículo</select_ride><music>Música</music><damage>Dano</damage><sound>Som</sound><try_again>Tentar de novo</try_again><back>Anterior</back><game_over>Acabou</game_over><your_ride>Seu veículo está detonado!</your_ride><main_menu>Menu principal</main_menu><awesome>Incrível!</awesome></item><item lang_id=\"10\" lang =\"PORTUGUESE\"><help>Ajuda</help><time>Tempo:</time><help_tf1>Só os esquilos mais malucos conseguirão chegar ao fim desta pista de obstáculos demente! Usa o teu teclado para tentares.</help_tf1><left>Esquerda</left><right>Direita</right><space>Espaços</space><jump>Saltar</jump><help_tf2>Quando chegares às zonas perigosas, as tuas rodas ficarão danificadas. Apanha chaves de fendas para reparares o teu veículo!</help_tf2><start>Começar</start><select_ride>Escolhe o teu veículo</select_ride><music>Música</music><damage>Danos</damage><sound>Som</sound><try_again>Tentar novamente</try_again><back>Retroceder</back><game_over>Fim do Jogo</game_over><your_ride>O teu veículo doid estruído!</your_ride><main_menu>Menu principal</main_menu><awesome>Incrível!</awesome></item><item lang_id=\"8\" lang =\"ITALIAN\"><help>Aiuto</help><time>Tempo:</time><help_tf1>Solo il più svitato fra gli scoiattoli sarebbe in grado di affrontare questa pazza corsa ad ostacoli! Usa la tua tastiera per fargli fare un giro.</help_tf1><left>Sinistra</left><right>Destra</right><space>Barra spaziatrice</space><jump>Salta</jump><help_tf2>Quando colpisci delle zone pericolose le tue ruote saranno danneggiate. Raccogli chiavi inglesi per riparare il tuo mezzo di trasporto!</help_tf2><start>Avvia</start><select_ride>Scegli il tuo mezzo di trasporto</select_ride><music>Musica</music><damage>Danni</damage><sound>Audio</sound><try_again>Riprova</try_again><back>Indietro</back><game_over>Gioco finito </game_over><your_ride>Il tuo mezzo di trasporto è distrutto!</your_ride><main_menu>Menu principale</main_menu><awesome>Fantastico!</awesome></item><item lang_id=\"7\" lang =\"SWEDISH\"><help>Hjälp</help><time>Tid:</time><help_tf1>Bara de tokigaste ekorrarna kommer att kunna klara den här vansinniga hinderbanan! Använd ditt tangentbord för att köra.</help_tf1><left>Vänster</left><right>Höger</right><space>Mellanslag</space><jump>Hoppa</jump><help_tf2>När du träffar farozoner skadas dina hjul. Samla skruvnycklar för att reparera ditt fordon!</help_tf2><start>Starta</start><select_ride>Välj fordon</select_ride><music>Musik</music><damage>Skador</damage><sound>Ljud</sound><try_again>Försöka igen</try_again><back>Bakåt</back><game_over>Game over</game_over><your_ride>Ditt åk är kvaddat!</your_ride><main_menu>Huvudmeny</main_menu><awesome>Grymt!</awesome></item><item lang_id=\"6\" lang =\"POLISH\"><help>Pomoc</help><time>Czas:</time><help_tf1>Tylko najbardziej szalone wiewiórki będą w stanie pokonać ten zwariowany tor przeszkód! Do sterowania postacią służą strzałki na klawiaturze.</help_tf1><left>W lewo</left><right>W prawo</right><space>Spacja</space><jump>Skok</jump><help_tf2>Podczas gry pojazd ulega uszkodzeniom, które możesz usunąć, zbierając klucze na torze.</help_tf2><start>Start</start><select_ride>Wybierz pojazd</select_ride><music>Muzyka</music><damage>Uszkodzenia</damage><sound>Dźwięk</sound><try_again>Spróbuj ponownie</try_again><back>Powrót</back><game_over>Koniec gry</game_over><your_ride>Pojazd całkowicie uszkodzony!</your_ride><main_menu>Menu główne</main_menu><awesome>Wspaniale!</awesome></item><item lang_id=\"12\" lang =\"RUSSIAN\"><help>Помощь</help><time>Время:</time><help_tf1>Лишь самые безбашенные из белок способны пройти эту безумную трассу со множеством препятствий! Для игры используй клавиатуру:</help_tf1><left>Влево</left><right>Вправо</right><space>Пробел</space><jump>Прыжок</jump><help_tf2>На опасных участках трассы легко повредить своего \"железного коня\". Собирай гаечные ключи, чтобы отремонтировать его!</help_tf2><start>Старт</start><select_ride>Выбери тачку</select_ride><music>Музыка</music><damage>Повреждения</damage><sound>Звук</sound><try_again>Еще раз</try_again><back>Обратно</back><game_over>Конец игры</game_over><your_ride>Слишком много повреждений…</your_ride><main_menu>Главное меню</main_menu><awesome>Супер!</awesome></item><item lang_id=\"13\" lang =\"INDONESIAN\"><help>Bantuan</help><time>Waktu:</time><help_tf1>Hanya tupai-tupai yang nakal yang mampu mengatasi rintangan ini! Pergunakan keyboard anda untuk memberikannya sebuah putaran.</help_tf1><left>Kiri</left><right>Kanan</right><space>Spasi</space><jump>Lompat</jump><help_tf2>Saat anda mengenai zona bahaya, roda anda akan mengalami kerusakan. Kumpulkan kunci inggrisnya untuk memperbaiki kendaraan anda!</help_tf2><start>Mulai</start><select_ride>Pilihlah kendaraan anda</select_ride><music>Musik</music><damage>Kerusakan</damage><sound>Suara</sound><try_again>Coba lagi</try_again><back>Kembali</back><game_over>Berakhir</game_over><your_ride>Kendaraan anda mengalami kecelakaan!</your_ride><main_menu>Menu utama</main_menu><awesome>Mengagumkan!</awesome></item></list>";
return (_local1);
}
}
}//package model.xml
Section 90
//XMLL (model.xml.XMLL)
package model.xml {
import flash.events.*;
import events.*;
import flash.net.*;
import flash.xml.*;
public class XMLL extends EventDispatcher {
private var loaded:Boolean;// = false
private var myXML:XML;
private var array:Array;
private var myLoader:URLLoader;
private var myXMLURL:URLRequest;
private var url:String;
private var attArray:Array;
public function XMLL():void{
var _local1:*;
myXML = new XML();
loaded = false;
super();
_local1 = new XMLData();
myXML = new XML(_local1.getData());
}
public function xmlLoad():void{
var _local1:XMLDocument;
var _local2:XMLNode;
var _local3:Number;
var _local4:XMLNode;
var _local5:Array;
var _local6:String;
array = new Array();
loaded = true;
myXML.ignoreComments = true;
myXML.ignoreWhitespace = true;
_local1 = new XMLDocument();
_local1.ignoreWhite = true;
_local1.parseXML(myXML);
_local2 = _local1.firstChild.firstChild;
_local3 = 0;
while (_local2.firstChild.firstChild) {
_local4 = _local2.firstChild;
_local5 = new Array();
while (_local4) {
_local6 = _local4.firstChild.toString();
_local5[_local4.nodeName.toString()] = format(_local6);
_local4 = _local4.nextSibling;
};
array[Number(_local2.attributes.lang_id)] = _local5;
_local2 = _local2.nextSibling;
_local3++;
};
dispatchEvent(new XMLEvent("completeXML", {attArray:attArray, array:array}));
}
private function format(_arg1:String):String{
_arg1 = _arg1.split("<").join("<");
_arg1 = _arg1.split(">").join(">");
_arg1 = _arg1.split(""").join("\"");
_arg1 = _arg1.split("&").join("&");
_arg1 = _arg1.split(" ").join(" ");
_arg1 = _arg1.split("'").join("'");
return (_arg1);
}
}
}//package model.xml
Section 91
//Button1 (objects.buttons.Button1)
package objects.buttons {
import flash.display.*;
import flash.events.*;
public class Button1 extends MovieClip {
public var clip:MovieClip;
private var mother:Object;
public function Button1(_arg1:MovieClip, _arg2:Object):void{
clip = _arg1;
clip.stop();
mother = _arg2;
clip.addEventListener(MouseEvent.CLICK, hClick);
clip.addEventListener(MouseEvent.ROLL_OUT, hRollOut);
clip.addEventListener(MouseEvent.ROLL_OVER, hRoll);
clip.buttonMode = true;
clip.mouseChildren = false;
}
private function hClick(_arg1:MouseEvent):void{
mother.hClick(_arg1);
}
public function destroy():void{
clip.removeEventListener(MouseEvent.CLICK, hClick);
clip.removeEventListener(MouseEvent.ROLL_OUT, hRollOut);
clip.removeEventListener(MouseEvent.ROLL_OVER, hRoll);
}
private function hRoll(_arg1:MouseEvent):void{
clip.gotoAndStop(2);
}
private function hRollOut(_arg1:MouseEvent):void{
clip.gotoAndStop(1);
}
}
}//package objects.buttons
Section 92
//Bike (objects.vehicles.Bike)
package objects.vehicles {
public class Bike {
public const MAX_X_SPEED:Number = 21;
public const MAX_Y_SPEED:Number = 22;
public const JUMP:Number = 20;
public const ACCELERATE2:Number = 0.4;
public const RESISTANCE:Number = 1;
public const ACCELERATE:Number = 1.5;
public function Bike():void{
}
}
}//package objects.vehicles
Section 93
//Desk (objects.vehicles.Desk)
package objects.vehicles {
public class Desk {
public const MAX_X_SPEED:Number = 18;
public const MAX_Y_SPEED:Number = 22;
public const JUMP:Number = 19;
public const ACCELERATE2:Number = 0.4;
public const RESISTANCE:Number = 0.9;
public const ACCELERATE:Number = 1;
public function Desk():void{
}
}
}//package objects.vehicles
Section 94
//Quad (objects.vehicles.Quad)
package objects.vehicles {
public class Quad {
public const MAX_X_SPEED:Number = 24;
public const MAX_Y_SPEED:Number = 22;
public const JUMP:Number = 17;
public const ACCELERATE2:Number = 0.4;
public const RESISTANCE:Number = 0.8;
public const ACCELERATE:Number = 2;
public function Quad():void{
}
}
}//package objects.vehicles
Section 95
//AddTime (objects.AddTime)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
import controlers.*;
public class AddTime extends MovieClip {
public var dispatcher:Controler;
public function AddTime():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
alpha = 0;
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
dispatcher = GameControler(parent.parent.parent).controler;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
_local2 = _arg1.params.mc_hero;
if (this.hitTestObject(_local2.sensor)){
dispatcher.dispatchEvent(new TimeEvent("timeAdd", new Object()));
stage.removeEventListener(MapEvent.MOVE, hMapMove);
};
}
}
}//package objects
Section 96
//Barrel (objects.Barrel)
package objects {
public class Barrel extends Damages {
public function Barrel():void{
amount = 20;
}
}
}//package objects
Section 97
//Barrel2 (objects.Barrel2)
package objects {
public class Barrel2 extends Damages {
public function Barrel2():void{
amount = 20;
}
}
}//package objects
Section 98
//Barrier (objects.Barrier)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
public class Barrier extends MovieClip {
public function Barrier():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if ((((_local3.x < (_local2.x - this.x))) && (((_local3.x + this.width) > (_local2.x - this.x))))){
if ((((_local3.y < (_local2.y - this.y))) && (((_arg1.params.mc_map.y + this.height) > (_local2.y - this.y))))){
_arg1.params.hero.blocked = true;
if (_arg1.params.hero.xSpeed > 0){
_local3.x = ((_local2.x - this.x) - this.width);
} else {
_local3.x = (_local2.x - this.x);
};
_arg1.params.hero.xSpeed = 0;
};
};
}
}
}//package objects
Section 99
//Bench (objects.Bench)
package objects {
public class Bench extends Box {
public function Bench():void{
}
}
}//package objects
Section 100
//Box (objects.Box)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
public class Box extends MovieClip {
public function Box():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
if (_arg1.params.vehicle != "quad"){
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if ((((((_local3.x < (_local2.x - this.x))) && (((_arg1.params.mc_map.x + this.width) > (_local2.x - this.x))))) && ((_arg1.params.hero.hang == false)))){
if (((((this.hitTestObject(_local2.sensor)) && ((_local3.y > (((_local2.y - this.y) - _arg1.params.hero.ySpeed) - 1))))) && ((_arg1.params.hero.ySpeed >= 0)))){
_local3.y = (_local2.y - this.y);
_local2.rotation = this.rotation;
stage.dispatchEvent(new HeroEvent("heroLand", {clip:this}));
};
};
};
}
}
}//package objects
Section 101
//Damages (objects.Damages)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
public class Damages extends MovieClip {
public var amount:uint;// = 10
public function Damages():void{
amount = 10;
super();
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
_local2 = _arg1.params.mc_hero;
if (((((this.hitTestObject(_local2)) && ((_arg1.params.hero.immortal == false)))) && (!((stage == null))))){
stage.dispatchEvent(new HeroEvent("heroDamage", {damage:amount}));
};
}
}
}//package objects
Section 102
//Finish (objects.Finish)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
import views.*;
public class Finish extends MovieClip {
public function Finish():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if (this.hitTestObject(_local2.sensor)){
View(_local3.parent).controler.dispatchEvent(new HeroEvent("heroFinish", {clip:this}));
};
}
}
}//package objects
Section 103
//Flowers (objects.Flowers)
package objects {
public class Flowers extends Box {
public function Flowers():void{
}
}
}//package objects
Section 104
//Ground (objects.Ground)
package objects {
import flash.display.*;
import events.*;
public class Ground extends Box {
public function Ground():void{
}
override public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:*;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if ((((((_local3.x < (_local2.x - this.x))) && (((_arg1.params.mc_map.x + this.width) > (_local2.x - this.x))))) && ((_arg1.params.hero.hang == false)))){
if (this.hitTestObject(_local2.sensor)){
_local4 = ((this.x - _local2.x) + _local3.x);
if ((_local4 / Math.tan(((rotation * Math.PI) / 180))) != -(Infinity)){
if ((((_arg1.params.hero.jumpTime > 10)) || ((_arg1.params.hero.ground == true)))){
if (_local3.y <= ((_local2.y - this.y) + (_local4 / Math.tan((((90 - rotation) * Math.PI) / 180))))){
_local3.y = ((_local2.y - this.y) + (_local4 / Math.tan((((90 - rotation) * Math.PI) / 180))));
_local2.rotation = this.rotation;
stage.dispatchEvent(new HeroEvent("heroLand", {clip:this}));
};
};
} else {
_local3.y = (_local2.y - this.y);
_local2.rotation = this.rotation;
if (stage){
stage.dispatchEvent(new HeroEvent("heroLand", {clip:this}));
};
};
};
};
}
}
}//package objects
Section 105
//Hero (objects.Hero)
package objects {
import flash.events.*;
import events.*;
import controlers.*;
import flash.media.*;
import flash.utils.*;
import objects.vehicles.*;
public class Hero {
public var channel:SoundChannel;
public var lastYSpeed:Number;
public var soundLandPermission:Boolean;// = true
public var ground:Boolean;// = false
public var channel2:SoundChannel;
public var veh;
public var soundLand:Boolean;// = true
public var jumpTime:Number;// = 0
private var s2:Sound;
public var driveSound:Boolean;// = false
public var dispatcher:Controler;
public var healSound:Sound;
public var vehicle:String;
private var s1:SBoardLand;
public var xSpeed:Number;// = 0
public var immortal:Boolean;// = false
public var wasJump:Boolean;// = false
public var lastGround:Boolean;// = false
public var soundPermission:Boolean;
public var timer:Timer;
public var allowSound:Boolean;// = true
public var ySpeed:Number;// = 0
public var mustJump:Boolean;// = false
public var lastXSpeed:Number;
public var lastJump:Boolean;// = false
public var blocked:Boolean;// = false
public var hang:Boolean;// = false
public var lastDirectory:String;// = "right"
private static var hp:Number = 100;
public function Hero(_arg1:String):void{
xSpeed = 0;
ySpeed = 0;
ground = false;
jumpTime = 0;
hang = false;
immortal = false;
blocked = false;
lastGround = false;
soundLand = true;
lastJump = false;
allowSound = true;
channel = new SoundChannel();
channel2 = new SoundChannel();
driveSound = false;
soundLandPermission = true;
lastDirectory = "right";
wasJump = false;
mustJump = false;
super();
this.vehicle = _arg1;
jumpTime = 0;
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, hImmortalEnd);
s1 = new SBoardLand();
healSound = new SHeal();
switch (_arg1){
case "desk":
veh = new Desk();
s2 = new SBoard();
break;
case "quad":
veh = new Quad();
s2 = new SQuad3();
break;
case "bike":
veh = new Bike();
s2 = new SBike4();
break;
};
}
public function land():void{
if (ground == false){
hang = true;
ground = true;
ySpeed = 0;
soundLand = true;
} else {
soundLand = false;
};
}
public function reduceSpeed():void{
var _local1:uint;
_local1 = 5;
if (xSpeed > 0){
xSpeed = ((xSpeed > _local1)) ? _local1 : xSpeed;
} else {
xSpeed = ((xSpeed < -(_local1))) ? -(_local1) : xSpeed;
};
}
public function getSpeed():Object{
var _local1:Object;
_local1 = new Object();
_local1.xSpeed = xSpeed;
_local1.ySpeed = ySpeed;
return (_local1);
}
private function hImmortalEnd(_arg1:TimerEvent):void{
timer.stop();
immortal = false;
}
public function setDispatcher(_arg1):void{
dispatcher = _arg1;
}
public function jump():void{
mustJump = true;
}
public function destroy():void{
timer.removeEventListener(TimerEvent.TIMER, hImmortalEnd);
channel2.removeEventListener(Event.SOUND_COMPLETE, hSoundComplete);
channel.removeEventListener(Event.SOUND_COMPLETE, hSoundComplete2);
}
public function getTime():Number{
return (jumpTime);
}
public function resetHp():void{
hp = 100;
}
public function hSoundComplete2(_arg1:Event):void{
soundLandPermission = true;
}
public function setSound(_arg1:Boolean):void{
soundPermission = _arg1;
}
public function accelerate(_arg1:String):void{
if (_arg1 == "left"){
if (ground == true){
xSpeed = (xSpeed + veh.ACCELERATE);
} else {
xSpeed = (xSpeed + veh.ACCELERATE2);
};
} else {
if (_arg1 == "right"){
if (ground == true){
xSpeed = (xSpeed - veh.ACCELERATE);
} else {
xSpeed = (xSpeed - veh.ACCELERATE2);
};
} else {
if (_arg1 == "zero"){
if (xSpeed > 0){
xSpeed = (xSpeed - 0.5);
xSpeed = ((xSpeed < 0)) ? 0 : xSpeed;
};
if (xSpeed < 0){
xSpeed = (xSpeed + 0.5);
xSpeed = ((xSpeed > 0)) ? 0 : xSpeed;
};
};
};
};
if ((((((lastXSpeed < 8)) && ((xSpeed >= 8)))) || ((((lastXSpeed > -8)) && ((xSpeed <= -8)))))){
dispatcher.dispatchEvent(new HeroEvent("heroPush", new Object()));
};
}
public function hSoundComplete(_arg1:Event):void{
driveSound = false;
}
public function heal():void{
hp = (hp + 10);
if (soundPermission == true){
healSound.play(0, 1);
};
}
public function frame():void{
if (((((allowSound) && ((driveSound == false)))) && ((soundPermission == true)))){
driveSound = true;
if ((((((((vehicle == "desk")) || ((vehicle == "bike")))) && ((ground == true)))) && (!((xSpeed == 0))))){
channel2 = s2.play(200, 1);
};
if (vehicle == "quad"){
channel2 = s2.play(0, 1);
};
channel2.addEventListener(Event.SOUND_COMPLETE, hSoundComplete);
};
if ((((xSpeed == 0)) || ((((ground == false)) && ((((vehicle == "desk")) || ((vehicle == "bike")))))))){
channel2.stop();
driveSound = false;
};
ySpeed = (ySpeed + 1.5);
jumpTime++;
xSpeed = ((xSpeed > veh.MAX_X_SPEED)) ? veh.MAX_X_SPEED : xSpeed;
xSpeed = ((xSpeed < -(veh.MAX_X_SPEED))) ? -(veh.MAX_X_SPEED) : xSpeed;
ySpeed = ((ySpeed > veh.MAX_Y_SPEED)) ? veh.MAX_Y_SPEED : ySpeed;
if ((((((((ground == true)) && ((lastGround == false)))) && ((lastYSpeed > 1)))) || ((((lastGround == false)) && ((lastJump == true)))))){
dispatcher.dispatchEvent(new HeroEvent("firstLand", new Object()));
wasJump = false;
if (((((allowSound) && (soundLandPermission))) && (soundPermission))){
channel = s1.play(0, 1);
channel.addEventListener(Event.SOUND_COMPLETE, hSoundComplete2);
soundLandPermission = false;
};
} else {
soundLand = false;
};
if ((((ySpeed == veh.MAX_Y_SPEED)) && ((ground == false)))){
hp = (hp - (2 * veh.RESISTANCE));
if (hp <= 0){
hp = 0;
dead();
};
};
if ((((((lastXSpeed == 0)) && (!((xSpeed == 0))))) && ((ground == true)))){
dispatcher.dispatchEvent(new HeroEvent("heroRide", new Object()));
};
if ((((ground == true)) && ((mustJump == true)))){
jumpTime = 0;
ySpeed = -(veh.JUMP);
ground = false;
soundLand = true;
lastJump = true;
wasJump = true;
mustJump = false;
dispatcher.dispatchEvent(new HeroEvent("heroJump", new Object()));
};
if ((((ground == false)) && ((ySpeed > 0)))){
dispatcher.dispatchEvent(new HeroEvent("heroJump2", new Object()));
};
if (ySpeed == veh.MAX_Y_SPEED){
dispatcher.dispatchEvent(new HeroEvent("heroFly", new Object()));
};
if (((((((!((lastXSpeed == 0))) && ((xSpeed == 0)))) && ((ground == true)))) || ((((((xSpeed == 0)) && ((ground == true)))) && ((lastGround == false)))))){
dispatcher.dispatchEvent(new HeroEvent("heroStay", new Object()));
};
blocked = false;
lastGround = ground;
lastYSpeed = ySpeed;
lastXSpeed = xSpeed;
lastJump = false;
ground = false;
if (xSpeed > 0){
if (lastDirectory == "right"){
dispatcher.dispatchEvent(new HeroEvent("heroReverse", {newDir:"left"}));
};
lastDirectory = "left";
};
if (xSpeed < 0){
if (lastDirectory == "left"){
dispatcher.dispatchEvent(new HeroEvent("heroReverse", {newDir:"right"}));
};
lastDirectory = "right";
};
}
public function damage(_arg1:uint):void{
hp = (hp - (_arg1 * veh.RESISTANCE));
if (hp <= 0){
hp = 0;
dead();
};
immortal = true;
timer.start();
}
public function dead():void{
dispatcher.dispatchEvent(new HeroEvent("heroDead", new Object()));
}
public function getHp():uint{
return (hp);
}
}
}//package objects
Section 106
//JumpPad (objects.JumpPad)
package objects {
import flash.display.*;
import events.*;
public class JumpPad extends Box {
public function JumpPad():void{
}
override public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:*;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if (((this.hitTestObject(_local2.sensor)) && ((_arg1.params.hero.xSpeed < 15)))){
_local4 = ((this.x - _local2.x) + _local3.x);
if ((_local4 / Math.tan(((rotation * Math.PI) / 180))) != -(Infinity)){
if ((((_arg1.params.hero.ySpeed > 1)) || ((_arg1.params.hero.ground == true)))){
if (_local3.y <= ((_local2.y - this.y) + (_local4 / Math.tan((((90 - rotation) * Math.PI) / 180))))){
_local3.y = ((_local2.y - this.y) + (_local4 / Math.tan((((90 - rotation) * Math.PI) / 180))));
_local2.rotation = this.rotation;
stage.dispatchEvent(new HeroEvent("heroLand", {clip:this}));
};
};
} else {
_local3.y = (_local2.y - this.y);
_local2.rotation = this.rotation;
stage.dispatchEvent(new HeroEvent("heroLand", {clip:this}));
};
};
}
}
}//package objects
Section 107
//RightBarrier (objects.RightBarrier)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
public class RightBarrier extends MovieClip {
public function RightBarrier():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if ((((_local3.x < (_local2.x - this.x))) && (((_local3.x + this.width) > (_local2.x - this.x))))){
if ((((_local3.y < (_local2.y - this.y))) && (((_arg1.params.mc_map.y + this.height) > (_local2.y - this.y))))){
_arg1.params.hero.blocked = true;
if (_arg1.params.hero.xSpeed > 0){
_local3.x = ((_local2.x - this.x) - this.width);
};
_arg1.params.hero.xSpeed = 0;
};
};
}
}
}//package objects
Section 108
//Slower (objects.Slower)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
public class Slower extends MovieClip {
public function Slower():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if (this.hitTestObject(_local2.sensor)){
_arg1.params.hero.reduceSpeed();
};
}
}
}//package objects
Section 109
//Spikes (objects.Spikes)
package objects {
public class Spikes extends Damages {
public function Spikes():void{
amount = 17;
alpha = 0;
}
}
}//package objects
Section 110
//StartLine (objects.StartLine)
package objects {
import flash.display.*;
import flash.events.*;
import events.*;
import views.*;
public class StartLine extends MovieClip {
public function StartLine():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
alpha = 0;
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = _arg1.params.mc_hero;
_local3 = _arg1.params.mc_map;
if (this.hitTestObject(_local2.sensor)){
View(_local3.parent).controler.dispatchEvent(new HeroEvent("heroStartLine", {clip:this}));
};
}
}
}//package objects
Section 111
//Tool (objects.Tool)
package objects {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import events.*;
import controlers.*;
public class Tool extends MovieClip {
public var dispatcher:Controler;
public function Tool():void{
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function destroy():void{
stage.removeEventListener(MapEvent.MOVE, hMapMove);
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
stage.addEventListener(MapEvent.MOVE, hMapMove);
dispatcher = GameControler(parent.parent.parent).controler;
}
public function hide():void{
Tweener.addTween(this, {alpha:0, time:1, transition:"easeOutBack"});
}
public function hMapMove(_arg1:MapEvent):void{
var _local2:MovieClip;
_local2 = _arg1.params.mc_hero;
if (this.hitTestObject(_local2)){
dispatcher.dispatchEvent(new HeroEvent("heroHeal", new Object()));
this.hide();
stage.removeEventListener(MapEvent.MOVE, hMapMove);
};
}
}
}//package objects
Section 112
//Wall (objects.Wall)
package objects {
public class Wall extends Box {
public function Wall():void{
}
}
}//package objects
Section 113
//Wire (objects.Wire)
package objects {
public class Wire extends Box {
public function Wire():void{
}
}
}//package objects
Section 114
//Wood (objects.Wood)
package objects {
public class Wood extends Box {
public function Wood():void{
}
}
}//package objects
Section 115
//PopupBackRetry (views.display.popups.PopupBackRetry)
package views.display.popups {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import objects.buttons.*;
public class PopupBackRetry extends MovieClip {
public var b2:Button1;
public var b1:Button1;
public var language:uint;
public var branding:uint;
public var n1:MovieClip;
public var url1:String;
public function PopupBackRetry(_arg1:Array, _arg2, _arg3, _arg4:String):void{
this.language = _arg2;
this.branding = _arg3;
this.url1 = _arg4;
n1.spile1.gotoAndStop(_arg2);
n1.spile2.gotoAndStop(_arg3);
n1.spile1.buttonMode = true;
n1.spile2.buttonMode = true;
n1.spile1.addEventListener(MouseEvent.CLICK, onCLick);
n1.spile2.addEventListener(MouseEvent.CLICK, onCLick);
addEventListener(Event.ADDED_TO_STAGE, hAdd);
x = 120;
y = 72;
n1.btn_retry.n1.tf1.text = _arg1["try_again"];
n1.btn_main.n1.tf1.text = _arg1["main_menu"];
b1 = new Button1(n1.btn_retry, this);
b2 = new Button1(n1.btn_main, this);
}
public function hClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case n1.btn_main:
Object(parent).clickMenu();
break;
case n1.btn_retry:
Object(parent).clickRetry();
break;
};
}
public function destroy():void{
b1.destroy();
b2.destroy();
}
public function onCLick(_arg1:MouseEvent):void{
var _local2:URLRequest;
if (Number(language) == 2){
_local2 = new URLRequest(url1);
} else {
_local2 = new URLRequest(((url1 + "&utm_content=") + "crazy_squirrel"));
};
navigateToURL(_local2, "_blank");
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
n1.gotoAndPlay(1);
}
}
}//package views.display.popups
Section 116
//PopupFail (views.display.popups.PopupFail)
package views.display.popups {
public class PopupFail extends PopupBackRetry {
public function PopupFail(_arg1:Array, _arg2, _arg3, _arg4:String):void{
addFrameScript(6, frame7, 15, frame16);
super(_arg1, _arg2, _arg3, _arg4);
n1.tf_game_over.text = _arg1["game_over"];
n1.tf_your_ride.text = _arg1["your_ride"];
}
function frame7(){
stop();
}
function frame16(){
stop();
}
}
}//package views.display.popups
Section 117
//PopupHelp (views.display.popups.PopupHelp)
package views.display.popups {
import flash.display.*;
import flash.events.*;
import objects.buttons.*;
public class PopupHelp extends MovieClip {
public var array:Array;
public var n1:MovieClip;
public var n2:MovieClip;
public function PopupHelp(_arg1:Array):void{
array = new Array();
super();
addFrameScript(6, frame7, 15, frame16);
this.array = _arg1;
addEventListener(Event.ADDED_TO_STAGE, hAdd);
x = 275;
y = 200;
}
public function hClick(_arg1:MouseEvent):void{
play();
n2.mouseEnabled = false;
mouseEnabled = false;
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
n1.gotoAndPlay(1);
n1.btn_back.addEventListener(MouseEvent.CLICK, hClick);
n1.btn_close.addEventListener(MouseEvent.CLICK, hClick);
n1.tf_title.text = array["help"];
n1.tf1.text = array["help_tf1"];
n1.tf2.text = array["help_tf2"];
n1.tf_left.text = array["left"];
n1.tf_right.text = array["right"];
n1.tf_jump.text = array["jump"];
n1.tf_space.text = array["space"];
n1.btn_back.n1.tf1.text = array["back"];
addChild(new Button1(n1.btn_back, this));
}
function frame7(){
stop();
}
function frame16(){
stop();
}
public function show():void{
gotoAndPlay(1);
n2.mouseEnabled = true;
mouseEnabled = true;
}
}
}//package views.display.popups
Section 118
//PopupSuccess (views.display.popups.PopupSuccess)
package views.display.popups {
public class PopupSuccess extends PopupBackRetry {
public function PopupSuccess(_arg1:Array, _arg2, _arg3, _arg4):void{
addFrameScript(6, frame7, 14, frame15);
super(_arg1, _arg2, _arg3, _arg4);
n1.tf_awesome.text = _arg1["awesome"];
n1.tf_time_to.text = _arg1["time"];
}
function frame15(){
stop();
}
function frame7(){
stop();
}
}
}//package views.display.popups
Section 119
//DisplayHero (views.display.DisplayHero)
package views.display {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
public class DisplayHero extends McSquirrel {
private var hero:Object;
public var vehicle:String;
var jumping:Boolean;// = false
public var clip:MovieClip;
var b;// = 0
var endJumping:Boolean;// = false
private var bCounter:uint;// = 0
public var flyPermission:Boolean;// = true
var jumpPhase:uint;// = 0
public function DisplayHero(_arg1:String):void{
bCounter = 0;
b = 0;
jumpPhase = 0;
endJumping = false;
jumping = false;
flyPermission = true;
super();
this.vehicle = _arg1;
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function blinking():void{
var _local1:Number;
_local1 = ((alpha == 0.5)) ? 1 : 0.5;
if (bCounter < 3){
Tweener.addTween(this, {alpha:_local1, time:0.25, transition:"linear", onComplete:blinking});
} else {
Tweener.addTween(this, {alpha:_local1, time:0.25, transition:"linear"});
};
bCounter++;
}
public function land(_arg1:Object):void{
endJumping = false;
flyPermission = true;
this.hero = _arg1;
jumping = false;
if (_arg1.ground == true){
if (_arg1.xSpeed != 0){
clip.gotoAndStop(("ride" + dir()));
} else {
clip.gotoAndStop((("stand" + rnd()) + dir()));
};
};
}
public function push(_arg1):void{
this.hero = _arg1;
if (vehicle == "desk"){
if (_arg1.ground == true){
clip.gotoAndStop(("push" + dir()));
};
} else {
if (_arg1.ground == true){
clip.gotoAndStop(("ride" + dir()));
};
};
}
private function hAdd(_arg1:Event):void{
switch (vehicle){
case "desk":
clip = clip_desk;
clip_quad.visible = false;
clip_bike.visible = false;
clip.visible = true;
break;
case "quad":
clip = clip_quad;
clip_desk.visible = false;
clip_bike.visible = false;
clip.visible = true;
break;
case "bike":
clip = clip_bike;
clip_desk.visible = false;
clip_quad.visible = false;
clip.visible = true;
break;
};
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
clip.gotoAndStop(1);
}
public function jump(_arg1:Object):void{
endJumping = false;
flyPermission = true;
this.hero = _arg1;
clip.gotoAndStop(("jump" + dir()));
jumping = true;
if (clip.n1){
clip.n1.gotoAndPlay(1);
};
}
public function stay(_arg1):void{
this.hero = _arg1;
clip.gotoAndStop((("stand" + rnd()) + dir()));
}
public function fly(_arg1):void{
this.hero = _arg1;
if (vehicle == "desk"){
if ((((_arg1.ground == false)) && ((flyPermission == true)))){
clip.gotoAndStop(("fall" + dir()));
flyPermission = false;
};
};
}
public function startBlinking():void{
bCounter = 0;
blinking();
}
public function rnd():uint{
return (1);
}
public function endJump():void{
if (((hero) && ((jumping == true)))){
if ((((hero.ground == false)) && ((endJumping == false)))){
clip.gotoAndStop(("jump2" + dir()));
if (clip.n1){
endJumping = true;
clip.n1.gotoAndPlay(1);
rotation = 0;
};
};
};
if (((hero) && ((jumping == false)))){
if (hero.ySpeed > 10){
if ((((hero.ySpeed < hero.veh.MAX_Y_SPEED)) || (!((vehicle == "desk"))))){
clip.gotoAndStop(("jump2" + dir()));
rotation = 0;
};
};
};
}
public function endPush():void{
if (vehicle == "desk"){
if (hero.ground == true){
clip.gotoAndStop(("ride" + dir()));
};
};
}
public function dir():String{
return (("_" + hero.lastDirectory));
}
public function reverse(_arg1:String):void{
clip.gotoAndStop(("reverse_" + _arg1));
}
public function ride(_arg1:Object):void{
this.hero = _arg1;
clip.gotoAndStop(("ride" + dir()));
}
}
}//package views.display
Section 120
//GameInterface (views.display.GameInterface)
package views.display {
import flash.display.*;
import flash.events.*;
import events.*;
import flash.text.*;
import objects.buttons.*;
public class GameInterface extends MovieClip {
public var tf_damage:TextField;
private var b2:Button1;
public var mc_soundx:MovieClip;
private var b1:Button1;
public var mc_clock:MovieClip;
private var b3:Button1;
public var btn_retry:MovieClip;
public var tf_name:TextField;
private var b4:Button1;
public var btn_sound:MovieClip;
public var btn_music:MovieClip;
public var mc_musicx:MovieClip;
public var mc_time:MovieClip;
public var mc_thumb:MovieClip;
public var mc_bar:MovieClip;
public var btn_back:MovieClip;
public function GameInterface():void{
b1 = new Button1(btn_sound, this);
b2 = new Button1(btn_music, this);
b3 = new Button1(btn_retry, this);
b4 = new Button1(btn_back, this);
mc_musicx.mouseEnabled = false;
mc_soundx.mouseEnabled = false;
}
public function hClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case btn_sound:
dispatchEvent(new ButtonClickEvent("soundClick", new Object()));
break;
case btn_music:
dispatchEvent(new ButtonClickEvent("musicClick", new Object()));
break;
case btn_retry:
dispatchEvent(new ButtonClickEvent("retryClick", new Object()));
break;
case btn_back:
dispatchEvent(new ButtonClickEvent("backClick", new Object()));
break;
};
}
public function destroy():void{
b1.destroy();
b2.destroy();
b3.destroy();
b4.destroy();
b1 = null;
b2 = null;
b3 = null;
b4 = null;
}
public function setName(_arg1:String):void{
if (_arg1 != ""){
tf_name.text = _arg1;
} else {
tf_name.text = "Players name";
};
}
public function setMusic(_arg1:Boolean):void{
mc_musicx.visible = _arg1;
}
public function setHp(_arg1):void{
mc_bar.gotoAndStop((100 - _arg1));
}
public function updateTime(_arg1:String):void{
mc_time.tf1.text = _arg1;
mc_time.tf2.text = _arg1;
}
public function dead():void{
mc_bar.gotoAndStop(101);
}
public function setThumb(_arg1:String):void{
mc_thumb.gotoAndStop(_arg1);
}
public function setSound(_arg1:Boolean):void{
mc_soundx.visible = _arg1;
}
public function setLanguage(_arg1:Array):void{
tf_damage.text = _arg1["damage"];
btn_music.n1.tf1.text = _arg1["music"];
btn_sound.n1.tf1.text = _arg1["sound"];
btn_back.n1.tf1.text = _arg1["main_menu"];
btn_retry.n1.tf1.text = _arg1["try_again"];
}
}
}//package views.display
Section 121
//MyMenu (views.display.MyMenu)
package views.display {
import flash.display.*;
import flash.events.*;
import events.*;
import flash.media.*;
import flash.net.*;
import views.display.popups.*;
import views.*;
public class MyMenu extends McMenu {
public var popup1:PopupHelp;
public var channel:SoundChannel;
public var vehicle:String;// = "desk"
public var music:Sound;
public var language:uint;
public var array:Array;
public var branding:uint;
public var url1:String;// = "http://agame.com"
public var trans:SoundTransform;
public var logo:Logo;
public var bSound:Sound;
public var musicPermission:Boolean;// = true
public static var firstTime:Boolean = true;
public function MyMenu(_arg1:Boolean, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:String):void{
array = new Array();
musicPermission = true;
vehicle = "desk";
url1 = "http://agame.com";
super();
n1.spile1.gotoAndStop(_arg3);
n1.spile2.gotoAndStop(_arg4);
n1.spile1.buttonMode = true;
n1.spile2.buttonMode = true;
n1.spile1.addEventListener(MouseEvent.CLICK, onCLick);
n1.spile2.addEventListener(MouseEvent.CLICK, onCLick);
trans = new SoundTransform(0.5, 0);
this.language = _arg3;
this.branding = _arg4;
this.url1 = _arg5;
trace(_arg5);
if (firstTime == true){
firstTime = false;
n1.gotoAndPlay("wo_pre");
} else {
n1.gotoAndPlay("wo_pre");
};
this.array = _arg2;
musicPermission = _arg1;
btn(n1.btn_start);
btn(n1.btn_desk);
btn(n1.btn_bike);
btn(n1.btn_quad);
btn(n1.btn_help);
btn(n1.btn_sound);
logo = new Logo(n1.mc_logo);
bSound = new SButton();
music = new MusicStart();
if (musicPermission == true){
channel = music.play(0, 999);
channel.soundTransform = trans;
};
n1.mc_musicx.visible = !(musicPermission);
n1.mc_musicx.mouseEnabled = false;
setLanguage();
}
private function hClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case n1.btn_start:
n1.gotoAndPlay("menu_out");
if (vehicle == "desk"){
n1.mc_desk.gotoAndPlay("out");
};
if (vehicle == "bike"){
n1.mc_bike.gotoAndPlay("out");
};
if (vehicle == "quad"){
n1.mc_quad.gotoAndPlay("out");
};
break;
case n1.btn_help:
if (!popup1){
popup1 = new PopupHelp(array);
addChild(popup1);
} else {
popup1.show();
};
break;
case n1.btn_sound:
if (musicPermission == true){
channel.stop();
musicPermission = false;
} else {
channel = music.play(0, 999);
channel.soundTransform = trans;
musicPermission = true;
};
n1.mc_musicx.visible = !(musicPermission);
break;
case n1.btn_desk:
if (vehicle == "quad"){
n1.mc_quad.gotoAndPlay("out");
};
if (vehicle == "bike"){
n1.mc_bike.gotoAndPlay("out");
};
if (vehicle != "desk"){
vehicle = "desk";
n1.mc_desk.visible = true;
n1.mc_desk.gotoAndPlay(1);
};
break;
case n1.btn_quad:
if (vehicle == "desk"){
n1.mc_desk.gotoAndPlay("out");
};
if (vehicle == "bike"){
n1.mc_bike.gotoAndPlay("out");
};
if (vehicle != "quad"){
vehicle = "quad";
n1.mc_quad.visible = true;
n1.mc_quad.gotoAndPlay(1);
};
break;
case n1.btn_bike:
if (vehicle == "quad"){
n1.mc_quad.gotoAndPlay("out");
};
if (vehicle == "desk"){
n1.mc_desk.gotoAndPlay("out");
};
if (vehicle != "bike"){
vehicle = "bike";
n1.mc_bike.visible = true;
n1.mc_bike.gotoAndPlay(1);
};
break;
};
}
public function destroy():void{
if (musicPermission == true){
channel.stop();
};
destroyBtn(n1.btn_start);
destroyBtn(n1.btn_desk);
destroyBtn(n1.btn_bike);
destroyBtn(n1.btn_quad);
destroyBtn(n1.btn_help);
destroyBtn(n1.btn_sound);
}
private function destroyBtn(_arg1:MovieClip):void{
_arg1.removeEventListener(MouseEvent.CLICK, hClick);
_arg1.removeEventListener(MouseEvent.ROLL_OVER, hRollOver);
_arg1.removeEventListener(MouseEvent.ROLL_OUT, hRollOut);
}
private function hRollOut(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop(1);
}
public function onCLick(_arg1:MouseEvent):void{
var _local2:URLRequest;
if (Number(language) == 2){
_local2 = new URLRequest(url1);
} else {
_local2 = new URLRequest(((url1 + "&utm_content=") + "crazy_squirrel"));
};
navigateToURL(_local2, "_blank");
}
private function btn(_arg1:MovieClip):void{
_arg1.stop();
_arg1.addEventListener(MouseEvent.CLICK, hClick);
_arg1.addEventListener(MouseEvent.ROLL_OVER, hRollOver);
_arg1.addEventListener(MouseEvent.ROLL_OUT, hRollOut);
_arg1.buttonMode = true;
_arg1.mouseChildren = false;
}
private function hRollOver(_arg1:MouseEvent):void{
bSound.play(0, 1);
_arg1.target.gotoAndStop(2);
}
private function hRollOver2(_arg1:MouseEvent):void{
bSound.play(0, 1);
}
public function endMenu():void{
parent.dispatchEvent(new MainEvent("menuEnd", {musicPermission:musicPermission, vehicle:vehicle}));
}
public function setLanguage():void{
n1.btn_help.n1.tf1.text = array["help"];
n1.select_text.tf1.text = array["select_ride"];
n1.btn_sound.n1.tf1.text = array["music"];
if (((!((language == 1))) && (!((language == 16))))){
n1.mc_game_logo.gotoAndStop(("nr_" + language));
};
}
}
}//package views.display
Section 122
//Logo (views.Logo)
package views {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Logo extends MovieClip {
private var clip:MovieClip;
public var rolledOver:Boolean;// = false
public function Logo(_arg1:MovieClip):void{
rolledOver = false;
super();
clip = _arg1;
clip.mouseChildren = false;
}
private function hRoll(_arg1:MouseEvent):void{
if (rolledOver == false){
clip.gotoAndPlay("roll");
rolledOver = true;
};
}
private function hRollOut(_arg1:MouseEvent):void{
if (rolledOver == true){
clip.gotoAndPlay("rollOut");
rolledOver = false;
};
}
private function getLogoURL(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.tagemigames.com/?lang=en";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
clip.gotoAndStop(1);
rolledOver = false;
}
}
}//package views
Section 123
//View (views.View)
package views {
import flash.display.*;
import flash.events.*;
import events.*;
import controlers.*;
import objects.*;
import flash.media.*;
import views.display.*;
import views.display.popups.*;
public class View extends MovieClip {
public var pop1:PopupSuccess;
public var pop2:PopupFail;
public var gameUI:MovieClip;
public var mc_hero:DisplayHero;
public var vehicle:String;
private var s2:Sound;
public var mc_bck:MovieClip;
public var mc_map:MovieClip;
public var slupek2:McSlupek2;
public var slupek:McSlupek;
public var cor2Y:Number;
public var array:Array;
public var level:uint;
public var corX:Number;
public var corY:Number;
public var controler:Controler;
public var cor2X:Number;
public function View(_arg1:String, _arg2:Array):void{
array = new Array();
super();
this.array = _arg2;
this.vehicle = _arg1;
addEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function clickMenu():void{
destroyChilds();
dispatchEvent(new MainEvent("backToMenu", new Object()));
}
public function destroy():void{
destroyChilds();
if (pop1){
pop1.destroy();
removeChild(pop1);
pop1 = null;
};
if (pop2){
pop2.destroy();
removeChild(pop2);
pop2 = null;
};
gameUI.destroy();
removeChild(mc_bck);
removeChild(mc_map);
removeChild(mc_hero);
removeChild(gameUI);
removeChild(slupek);
removeChild(slupek2);
slupek = null;
slupek2 = null;
mc_map = null;
mc_bck = null;
mc_hero = null;
gameUI = null;
}
private function hAdd(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, hAdd);
}
public function setView(_arg1:Object):void{
var _local2:Object;
_local2 = _arg1.getSpeed();
_arg1.hang = false;
if (_arg1.blocked == false){
mc_map.x = (mc_map.x + _local2.xSpeed);
mc_bck.x = (mc_bck.x + (_local2.xSpeed / 15));
};
mc_map.y = (mc_map.y - _local2.ySpeed);
if (mc_bck){
stage.dispatchEvent(new MapEvent("mapMove", {mc_hero:mc_hero, mc_map:mc_map, hero:_arg1, vehicle:vehicle}));
if (mc_bck){
mc_bck.y = ((mc_map.y / 10) + 100);
slupek.x = (mc_map.x + corX);
slupek.y = (mc_map.y + corY);
slupek2.x = (mc_map.x + cor2X);
slupek2.y = (mc_map.y + cor2Y);
};
};
}
public function clickRetry():void{
destroyChilds();
controler.dispatchEvent(new ButtonClickEvent("retryClick", new Object()));
}
public function setControler(_arg1:Controler):void{
controler = _arg1;
}
public function land():void{
}
public function gameSuccess(_arg1, _arg2, _arg3):void{
pop1 = new PopupSuccess(array, _arg1, _arg2, _arg3);
pop1.n1.tf1.text = gameUI.mc_time.tf1.text;
addChild(pop1);
}
public function destroyChilds():void{
var _local1:uint;
var _local2:DisplayObject;
_local1 = 0;
while (_local1 < mc_map.numChildren) {
_local2 = mc_map.getChildAt(_local1);
if ((((((((((((((((((_local2 is Box)) || ((_local2 is Damages)))) || ((_local2 is Finish)))) || ((_local2 is Tool)))) || ((_local2 is RightBarrier)))) || ((_local2 is Slower)))) || ((_local2 is Barrier)))) || ((_local2 is StartLine)))) || ((_local2 is AddTime)))){
Object(mc_map.getChildAt(_local1)).destroy();
mc_map.removeChild(_local2);
_local1--;
} else {
mc_map.removeChild(_local2);
_local1--;
};
_local1++;
};
}
public function gameFailed(_arg1, _arg2, _arg3:String):void{
pop2 = new PopupFail(array, _arg1, _arg2, _arg3);
addChild(pop2);
gameUI.dead();
}
public function createLevel(_arg1:uint):void{
level = _arg1;
slupek = new McSlupek();
slupek2 = new McSlupek2();
gameUI = new GameInterface();
gameUI.setLanguage(array);
mc_hero = new DisplayHero(vehicle);
mc_bck = new McBck();
mc_map = new MovieClip();
if (level == 1){
mc_map = new McMap();
mc_bck = new McBck();
corX = -505;
corY = 25;
cor2X = 2905;
cor2Y = 1397;
mc_map.x = 900;
mc_map.y = 100;
};
if (level == 2){
mc_map = new McMap2();
mc_bck = new McBck2();
corX = -416.2;
corY = 83.1;
cor2X = 2987;
cor2Y = 1301;
mc_map.x = 800;
mc_map.y = 100;
};
mc_hero.x = 275;
mc_hero.y = 265;
mc_bck.x = -100;
mc_bck.y = 100;
slupek.x = (mc_map.x + corX);
slupek.y = (mc_map.y + corY);
slupek2.x = (mc_map.x + cor2X);
slupek2.y = (mc_map.y + cor2Y);
addChild(mc_bck);
addChild(mc_map);
addChild(mc_hero);
addChild(slupek);
addChild(slupek2);
addChild(gameUI);
}
}
}//package views
Section 124
//Main (Main)
package {
import flash.display.*;
import events.*;
import controlers.*;
import model.xml.*;
import views.display.*;
public class Main extends MovieClip {
public var mc_preloader:MovieClip;
public var mc_hero:MovieClip;
public var mc_map:MovieClip;
public var language:uint;// = 1
public var array:Array;
private var preloader:Preloader;
private var lc:LevelControler;
public var branding:uint;// = 1
private var menu:MyMenu;
public var url1:String;// = "http://agame.com"
public function Main(_arg1, _arg2, _arg3):void{
var _local4:XMLL;
language = 1;
branding = 1;
array = new Array();
url1 = "http://agame.com";
super();
this.language = _arg1;
this.branding = _arg2;
this.url1 = _arg3;
_local4 = new XMLL();
_local4.addEventListener(XMLEvent.COMPLETE, loadedXML);
_local4.xmlLoad();
}
public function hGameEnd(_arg1:MainEvent):void{
lc.removeEventListener(MainEvent.MENU, hGameEnd);
lc.destroy();
lc = null;
initMenu(_arg1.params.musicPermission);
}
private function initGame(_arg1:Boolean, _arg2:String):void{
lc = new LevelControler(_arg1, _arg2, array, language, branding, url1);
addChild(lc);
lc.addEventListener(MainEvent.MENU, hGameEnd);
}
private function hMenuEnd(_arg1:MainEvent):void{
menu.destroy();
removeChild(menu);
menu = null;
initGame(_arg1.params.musicPermission, _arg1.params.vehicle);
}
private function initMenu(_arg1:Boolean):void{
menu = new MyMenu(_arg1, array, language, branding, url1);
menu.gotoAndPlay(1);
addChild(menu);
addEventListener(MainEvent.MENU_END, hMenuEnd);
addEventListener(MainEvent.GAME_END, hGameEnd);
}
public function loadedXML(_arg1:XMLEvent):void{
array = _arg1.params.array[language];
initMenu(true);
}
}
}//package
Section 125
//MainLoaderNew (MainLoaderNew)
package {
import flash.display.*;
import flash.events.*;
import api.*;
import com.hexagonstar.util.debug.*;
import flash.net.*;
import flash.text.*;
import flash.geom.*;
public class MainLoaderNew extends MovieClip {
public var ldr:Loader;
public var lbar:MovieClip;
public var lpc:TextField;
public var mc_trash:MovieClip;
public var intro:MovieClip;
public var flashvars1;
public var localConnection:LocalConnection;
public function MainLoaderNew():void{
var _local1:ColorTransform;
ldr = new Loader();
super();
addFrameScript(0, frame1, 1, frame2);
stop();
Debug.monitor(stage, 1000);
loaderInfo.addEventListener(Event.COMPLETE, hCompleteLoad);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, hProgress);
intro.addEventListener(MouseEvent.CLICK, onCLick);
localConnection = new LocalConnection();
_local1 = lbar.transform.colorTransform;
if (language.portal == "family"){
_local1.color = 40669;
intro.gotoAndStop(1);
};
if (language.portal == "tweens"){
_local1.color = 16681752;
intro.gotoAndStop(3);
};
if (language.portal == "girl"){
_local1.color = 0xFFFFFF;
intro.gotoAndStop(2);
};
if (language.portal == "game_com_cn"){
_local1.color = 16681752;
intro.gotoAndStop(4);
};
if (language.portal == "teen"){
_local1.color = 15592168;
intro.gotoAndStop(5);
};
intro.n1.gotoAndStop(language.branding_nr);
lbar.transform.colorTransform = _local1;
}
public function onCLick(_arg1:Event){
var _local2:URLRequest;
if (Number(language.language_nr) == 2){
_local2 = new URLRequest(language.url1);
} else {
_local2 = new URLRequest(((language.url1 + "&utm_content=") + _arg1.currentTarget.name));
};
navigateToURL(_local2, "_blank");
}
public function hCompleteLoad(_arg1:Event):void{
gotoAndStop(2);
addChild(new Main(language.language_nr, language.branding_nr, language.url1));
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hProgress(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
lbar.scaleX = (_local2 / 100);
lpc.text = (int(_local2) + "%");
}
}
}//package
Section 126
//McBck (McBck)
package {
import flash.display.*;
public dynamic class McBck extends MovieClip {
}
}//package
Section 127
//McBck2 (McBck2)
package {
import flash.display.*;
public dynamic class McBck2 extends MovieClip {
}
}//package
Section 128
//McMap (McMap)
package {
import flash.display.*;
public dynamic class McMap extends MovieClip {
}
}//package
Section 129
//McMap2 (McMap2)
package {
import flash.display.*;
public dynamic class McMap2 extends MovieClip {
}
}//package
Section 130
//McMenu (McMenu)
package {
import flash.display.*;
public dynamic class McMenu extends MovieClip {
public var n1:MovieClip;
}
}//package
Section 131
//McQuad (McQuad)
package {
import flash.display.*;
public dynamic class McQuad extends MovieClip {
}
}//package
Section 132
//McSlupek (McSlupek)
package {
import flash.display.*;
public dynamic class McSlupek extends MovieClip {
}
}//package
Section 133
//McSlupek2 (McSlupek2)
package {
import flash.display.*;
public dynamic class McSlupek2 extends MovieClip {
}
}//package
Section 134
//McSquirrel (McSquirrel)
package {
import flash.display.*;
public dynamic class McSquirrel extends MovieClip {
public var clip_bike:MovieClip;
public var clip_desk:MovieClip;
public var sensor:MovieClip;
public var clip_quad:MovieClip;
}
}//package
Section 135
//MusicLevel (MusicLevel)
package {
import flash.media.*;
public dynamic class MusicLevel extends Sound {
}
}//package
Section 136
//MusicStart (MusicStart)
package {
import flash.media.*;
public dynamic class MusicStart extends Sound {
}
}//package
Section 137
//SBike4 (SBike4)
package {
import flash.media.*;
public dynamic class SBike4 extends Sound {
}
}//package
Section 138
//SBoard (SBoard)
package {
import flash.media.*;
public dynamic class SBoard extends Sound {
}
}//package
Section 139
//SBoardLand (SBoardLand)
package {
import flash.media.*;
public dynamic class SBoardLand extends Sound {
}
}//package
Section 140
//SButton (SButton)
package {
import flash.media.*;
public dynamic class SButton extends Sound {
}
}//package
Section 141
//SHeal (SHeal)
package {
import flash.media.*;
public dynamic class SHeal extends Sound {
}
}//package
Section 142
//SQuad3 (SQuad3)
package {
import flash.media.*;
public dynamic class SQuad3 extends Sound {
}
}//package