Section 1
//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 2
//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 3
//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 4
//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 5
//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 6
//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 7
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
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 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 updateFrame():void{
_currentTimeFrame++;
}
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.31.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 = {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;
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 8
//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 9
//BigAssCanvas (com.bit101.display.BigAssCanvas)
package com.bit101.display {
import flash.display.*;
import flash.geom.*;
public class BigAssCanvas extends Sprite {
private var _color:uint;
private var _height:Number;
private var _transparent:Boolean;
private var _width:Number;
private var _bitmaps:Array;
public function BigAssCanvas(_arg1:Number, _arg2:Number, _arg3:Boolean=false, _arg4:uint=0xFFFFFF){
_width = _arg1;
_height = _arg2;
_transparent = _arg3;
_color = _arg4;
makeBitmaps();
}
public function fillRect(_arg1:Rectangle, _arg2:uint):void{
var _local3:int;
var _local4:Bitmap;
var _local5:Rectangle;
_local3 = 0;
while (_local3 < _bitmaps.length) {
_local4 = (_bitmaps[_local3] as Bitmap);
_local5 = _arg1.clone();
_arg1.clone().x = (_local5.x - _local4.x);
_local5.y = (_local5.y - _local4.y);
_local4.bitmapData.fillRect(_local5, _arg2);
_local3++;
};
}
public function noise(_arg1:int, _arg2:uint=0, _arg3:uint=0xFF, _arg4:uint=7, _arg5:Boolean=false):void{
var _local6:int;
var _local7:Bitmap;
_local6 = 0;
while (_local6 < _bitmaps.length) {
_local7 = (_bitmaps[_local6] as Bitmap);
_local7.bitmapData.noise(_arg1, _arg2, _arg3, _arg4, _arg5);
_local6++;
};
}
public function lock():void{
var _local1:int;
var _local2:Bitmap;
_local1 = 0;
while (_local1 < _bitmaps.length) {
_local2 = (_bitmaps[_local1] as Bitmap);
_local2.bitmapData.lock();
_local1++;
};
}
public function perlinNoise(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:int, _arg5:Boolean, _arg6:uint=7, _arg7:Boolean=false):void{
var _local8:Array;
var _local9:int;
var _local10:Bitmap;
var _local11:Array;
var _local12:int;
_local8 = new Array();
_local9 = 0;
while (_local9 < _arg3) {
_local8.push(new Point());
_local9++;
};
_local9 = 0;
while (_local9 < _bitmaps.length) {
_local10 = (_bitmaps[_local9] as Bitmap);
_local11 = new Array();
_local12 = 0;
while (_local12 < _local8.length) {
_local11[_local12] = new Point((_local8[_local12].x + _local10.x), (_local8[_local12].y + _local10.y));
_local12++;
};
_local10.bitmapData.perlinNoise(_arg1, _arg2, _arg3, _arg4, false, _arg5, _arg6, _arg7, _local11);
_local9++;
};
}
public function dispose():void{
var _local1:Bitmap;
while (_bitmaps.length > 0) {
_local1 = (_bitmaps.shift() as Bitmap);
removeChild(_local1);
_local1.bitmapData.dispose();
};
}
public function getPixel32(_arg1:Number, _arg2:Number):uint{
var _local3:int;
var _local4:Bitmap;
_local3 = 0;
while (_local3 < _bitmaps.length) {
_local4 = (_bitmaps[_local3] as Bitmap);
if ((((((((_arg1 >= _local4.x)) && ((_arg1 < (_local4.x + _local4.width))))) && ((_arg2 >= _local4.y)))) && ((_arg2 < (_local4.y + _local4.height))))){
return (_local4.bitmapData.getPixel32((_arg1 - _local4.x), (_arg2 - _local4.y)));
};
_local3++;
};
return (0);
}
public function draw(_arg1:IBitmapDrawable, _arg2:Matrix=null, _arg3:ColorTransform=null, _arg4:String=null, _arg5:Rectangle=null, _arg6:Boolean=false):void{
var _local7:int;
var _local8:Bitmap;
var _local9:Matrix;
var _local10:Rectangle;
if (_arg2 == null){
_arg2 = new Matrix();
};
_local7 = 0;
while (_local7 < _bitmaps.length) {
_local8 = (_bitmaps[_local7] as Bitmap);
_local9 = _arg2.clone();
_arg2.clone().tx = (_local9.tx - _local8.x);
_local9.ty = (_local9.ty - _local8.y);
if (_arg5 != null){
_local10 = _arg5.clone();
_arg5.clone().x = (_local10.x - _local8.x);
_local10.y = (_local10.y - _local8.y);
} else {
_local10 = null;
};
_local8.bitmapData.draw(_arg1, _local9, _arg3, _arg4, _local10, _arg6);
_local7++;
};
}
private function makeBitmaps():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Bitmap;
_bitmaps = new Array();
_local1 = _height;
_local2 = 0;
while (_local1 > 0) {
_local3 = 0;
_local4 = _width;
while (_local4 > 0) {
_local5 = new Bitmap(new BitmapData(Math.min(2880, _local4), Math.min(2880, _local1), _transparent, _color));
_local5.x = _local3;
_local5.y = _local2;
addChild(_local5);
_bitmaps.push(_local5);
_local4 = (_local4 - _local5.width);
_local3 = (_local3 + _local5.width);
};
_local2 = (_local2 + Math.min(2880, _local1));
_local1 = (_local1 - Math.min(2880, _local1));
};
}
public function setPixel(_arg1:Number, _arg2:Number, _arg3:uint):void{
var _local4:int;
var _local5:Bitmap;
_local4 = 0;
while (_local4 < _bitmaps.length) {
_local5 = (_bitmaps[_local4] as Bitmap);
if ((((((((_arg1 >= _local5.x)) && ((_arg1 < (_local5.x + _local5.width))))) && ((_arg2 >= _local5.y)))) && ((_arg2 < (_local5.y + _local5.height))))){
_local5.bitmapData.setPixel(Math.round((_arg1 - _local5.x)), Math.round((_arg2 - _local5.y)), _arg3);
};
_local4++;
};
}
public function unlock():void{
var _local1:int;
var _local2:Bitmap;
_local1 = 0;
while (_local1 < _bitmaps.length) {
_local2 = (_bitmaps[_local1] as Bitmap);
_local2.bitmapData.unlock();
_local1++;
};
}
public function copyPixelsOut(_arg1:Rectangle, _arg2:Boolean=true, _arg3:uint=4278190080):BitmapData{
var _local4:BitmapData;
var _local5:int;
var _local6:Bitmap;
var _local7:Rectangle;
_local4 = new BitmapData(_arg1.width, _arg1.height, true, _arg3);
_local5 = 0;
while (_local5 < _bitmaps.length) {
_local6 = (_bitmaps[_local5] as Bitmap);
_local7 = _arg1.clone();
_arg1.clone().x = (_local7.x - _local6.x);
_local7.y = (_local7.y - _local6.y);
if (_local7.intersects(new Rectangle(0, 0, 2880, 2880))){
_local4.copyPixels(_local6.bitmapData, _local7, new Point());
};
_local5++;
};
return (_local4);
}
public function setPixel32(_arg1:Number, _arg2:Number, _arg3:uint):void{
var _local4:int;
var _local5:Bitmap;
_local4 = 0;
while (_local4 < _bitmaps.length) {
_local5 = (_bitmaps[_local4] as Bitmap);
if ((((((((_arg1 >= _local5.x)) && ((_arg1 < (_local5.x + _local5.width))))) && ((_arg2 >= _local5.y)))) && ((_arg2 < (_local5.y + _local5.height))))){
_local5.bitmapData.setPixel32((_arg1 - _local5.x), (_arg2 - _local5.y), _arg3);
};
_local4++;
};
}
public function getPixel(_arg1:Number, _arg2:Number):uint{
var _local3:int;
var _local4:Bitmap;
_local3 = 0;
while (_local3 < _bitmaps.length) {
_local4 = (_bitmaps[_local3] as Bitmap);
if ((((((((_arg1 >= _local4.x)) && ((_arg1 < (_local4.x + _local4.width))))) && ((_arg2 >= _local4.y)))) && ((_arg2 < (_local4.y + _local4.height))))){
return (_local4.bitmapData.getPixel((_arg1 - _local4.x), (_arg2 - _local4.y)));
};
_local3++;
};
return (0);
}
}
}//package com.bit101.display
Section 10
//ProcessEvent (com.touchmypixel.events.ProcessEvent)
package com.touchmypixel.events {
import flash.events.*;
public class ProcessEvent extends Event {
public var percentage:Number;// = 0
public static const START = "Process.Start";
public static const COMPLETE = "Process.Complete";
public static const PROGRESS = "Process.Progress";
public function ProcessEvent(_arg1:String, _arg2:Number=0, _arg3:Boolean=false, _arg4:Boolean=false){
percentage = 0;
this.percentage = _arg2;
if (_arg1 == COMPLETE){
this.percentage = 1;
};
super(_arg1, _arg3, _arg4);
}
}
}//package com.touchmypixel.events
Section 11
//Animation (com.touchmypixel.peepee.utils.Animation)
package com.touchmypixel.peepee.utils {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import com.bit101.display.*;
public class Animation extends Sprite {
private var clipData:MovieClip;
public var bitmap:Bitmap;
public var clip:MovieClip;
private var _totalFrames;
public var speed:Number;// = 1
public var bigBitmap:BigAssCanvas;
public var currentFrame:Number;// = 1
public var onEnd:Function;
private var _cache:Boolean;// = true
public var r:Rectangle;
public var treatAsLoopedGraphic:Boolean;// = false
public var useSpriteSheet:Boolean;// = false
public var frames:Array;
public var repeat:Boolean;// = true
public var rows:Number;// = 0
public var reverse:Boolean;// = false
private var _playing:Boolean;// = false
public var cols:Number;// = 0
public function Animation(){
frames = [];
currentFrame = 1;
_playing = false;
_cache = true;
repeat = true;
reverse = false;
speed = 1;
treatAsLoopedGraphic = false;
cols = 0;
rows = 0;
useSpriteSheet = false;
super();
bitmap = new Bitmap();
bitmap.smoothing = false;
addChild(bitmap);
}
public function prevFrame(_arg1:Boolean=false):void{
if (_arg1){
currentFrame = (currentFrame - speed);
} else {
currentFrame--;
};
if (currentFrame < 1){
currentFrame = totalFrames;
};
goto(Math.floor(currentFrame));
}
public function buildCacheFromClip2(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Matrix;
clip = _arg1;
if (clip["e_bounds"] != null){
_local3 = clip["e_bounds"];
r = new Rectangle(_local3.x, _local3.y, _local3.width, _local3.height);
clip["e_bounds"].visible = false;
} else {
r = clip.getRect(clip);
};
cols = Math.floor((2880 / r.width));
rows = Math.ceil((clip.totalFrames / cols));
bigBitmap = new BigAssCanvas(Math.ceil((cols * clip.width)), Math.ceil((rows * clip.height)), true);
_local2 = 0;
while (_local2 <= (clip.totalFrames - 1)) {
clip.gotoAndStop((_local2 + 1));
makeAllChildrenGoToFrame(clip, (_local2 + 1));
_local4 = ((_local2 % cols) * r.width);
_local5 = (Math.floor((_local2 / cols)) * r.height);
_local6 = new Matrix();
_local6.translate(-(r.x), -(r.y));
_local6.scale(clip.scaleX, clip.scaleY);
_local6.translate(_local4, _local5);
bigBitmap.draw(clip, _local6, null, null);
_local2++;
};
_totalFrames = clip.totalFrames;
}
private function makeAllChildrenGoToFrame(_arg1:MovieClip, _arg2:int):void{
var _local3:int;
var _local4:*;
_local3 = 0;
while (_local3 < _arg1.numChildren) {
_local4 = _arg1.getChildAt(_local3);
if ((_local4 is MovieClip)){
makeAllChildrenGoToFrame(_local4, _arg2);
_local4.gotoAndStop(_arg2);
};
_local3++;
};
}
public function stop():void{
_playing = false;
removeEventListener(Event.ENTER_FRAME, enterFrame);
}
public function destroy(){
stop();
if (parent){
parent.removeChild(this);
};
}
public function get totalFrames():Number{
return (clip.totalFrames);
}
public function get playing():Boolean{
return (_playing);
}
public function play():void{
_playing = true;
addEventListener(Event.ENTER_FRAME, enterFrame, false, 0, true);
}
public function nextFrame(_arg1:Boolean=false):void{
if (_arg1){
currentFrame = (currentFrame + speed);
} else {
currentFrame++;
};
if (currentFrame > totalFrames){
currentFrame = 1;
};
goto(Math.floor(currentFrame));
}
public function buildCacheFromLibrary(_arg1:String):void{
if (useSpriteSheet){
buildCacheFromClip2(new (getDefinitionByName(_arg1)));
} else {
buildCacheFromClip(new (getDefinitionByName(_arg1)));
};
}
private function goto(_arg1:Number):void{
var _local2:*;
var _local3:Rectangle;
var _local4:Rectangle;
if (!_cache){
if (!clipData){
_local2 = getQualifiedClassName(clip);
clipData = new (getDefinitionByName(_local2));
_local3 = clipData.getRect(clipData);
clipData.x = _local3.x;
clipData.y = _local3.y;
addChild(clipData);
};
clipData.gotoAndStop(_arg1);
} else {
if (useSpriteSheet){
_local4 = r.clone();
_local4.x = (((currentFrame - 1) % cols) * r.width);
_local4.y = (Math.floor(((currentFrame - 1) / cols)) * r.height);
if (bitmapData){
bitmapData.dispose();
};
bitmapData = bigBitmap.copyPixelsOut(_local4);
bitmap.bitmapData = bitmapData;
bitmap.smoothing = true;
} else {
bitmap.bitmapData = frames[(currentFrame - 1)];
bitmap.smoothing = true;
};
};
}
public function enterFrame(_arg1:Event=null):void{
if (reverse){
prevFrame(true);
} else {
nextFrame(true);
};
if (currentFrame >= totalFrames){
if (!repeat){
stop();
};
dispatchEvent(new Event(Event.COMPLETE));
if (onEnd != null){
onEnd();
};
};
}
public function gotoAndPlayRandomFrame():void{
gotoAndPlay(Math.ceil((Math.random() * totalFrames)));
}
public function get bitmapData():BitmapData{
return (bitmap.bitmapData);
}
public function gotoAndStop(_arg1:Number):void{
if (treatAsLoopedGraphic){
if (_arg1 > totalFrames){
_arg1 = (_arg1 % totalFrames);
};
};
currentFrame = _arg1;
goto(currentFrame);
stop();
}
public function gotoAndPlay(_arg1:Number):void{
currentFrame = _arg1;
goto(currentFrame);
play();
}
public function update():void{
stop();
frames = [];
buildCacheFromClip(clip);
}
public function buildCacheFromClip(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:BitmapData;
var _local5:Matrix;
clip = _arg1;
if (clip["e_bounds"] != null){
_local3 = clip["e_bounds"];
r = new Rectangle(_local3.x, _local3.y, _local3.width, _local3.height);
clip["e_bounds"].visible = false;
} else {
r = clip.getRect(clip);
};
_local2 = 1;
while (_local2 <= clip.totalFrames) {
clip.gotoAndStop(_local2);
makeAllChildrenGoToFrame(clip, _local2);
_local4 = new BitmapData(r.width, r.height, true, 0);
_local5 = new Matrix();
_local5.translate(-(r.x), -(r.y));
_local5.scale(clip.scaleX, clip.scaleY);
_local4.draw(clip, _local5);
frames.push(_local4);
_local2++;
};
bitmap.x = r.x;
bitmap.y = r.y;
}
public function set bitmapData(_arg1:BitmapData){
bitmap.bitmapData = _arg1;
}
}
}//package com.touchmypixel.peepee.utils
Section 12
//AnimationCache (com.touchmypixel.peepee.utils.AnimationCache)
package com.touchmypixel.peepee.utils {
import flash.events.*;
import flash.utils.*;
import com.touchmypixel.events.*;
public class AnimationCache extends EventDispatcher {
public var replaceExisting:Boolean;// = false
private var animations:Object;
public var currentlyProcessingItem:uint;// = 0
public var cacheQueue:Array;
private static var instance:AnimationCache;
public function AnimationCache(){
cacheQueue = [];
currentlyProcessingItem = 0;
replaceExisting = false;
animations = {};
super();
if (AnimationCache.instance){
throw (new Error("AnimationCache is a Singleton. Don't Instantiate!"));
};
instance = this;
}
public function addToBulkCache(_arg1:Array){
var _local2:*;
for each (_local2 in _arg1) {
cacheQueue.push(_local2);
};
}
private function process():void{
var _local1:*;
_local1 = cacheQueue[currentlyProcessingItem++];
if (_local1 != null){
cacheAnimation(_local1);
dispatchEvent(new ProcessEvent(ProcessEvent.PROGRESS, (currentlyProcessingItem / cacheQueue.length)));
setTimeout(process, 1);
} else {
dispatchEvent(new ProcessEvent(ProcessEvent.COMPLETE));
cacheQueue = [];
};
}
public function getAnimation(_arg1):Animation{
var _local2:Animation;
if (!animations[_arg1]){
trace(("MISSING ANIMATION :" + _arg1));
return (null);
};
_local2 = new Animation();
_local2.frames = animations[_arg1].frames;
_local2.bigBitmap = animations[_arg1].bigBitmap;
_local2.bitmap.x = animations[_arg1].bitmap.x;
_local2.bitmap.y = animations[_arg1].bitmap.y;
_local2.cols = animations[_arg1].cols;
_local2.rows = animations[_arg1].rows;
_local2.r = animations[_arg1].r;
_local2.clip = animations[_arg1].clip;
_local2.useSpriteSheet = animations[_arg1].useSpriteSheet;
_local2.gotoAndStop(1);
return (_local2);
}
public function cacheAnimation(_arg1:String, _arg2:Boolean=false):Animation{
var _local3:Animation;
if (((!(animations[_arg1])) || (replaceExisting))){
_local3 = new Animation();
_local3.useSpriteSheet = _arg2;
_local3.buildCacheFromLibrary(_arg1);
animations[_arg1] = _local3;
} else {
_local3 = animations[_arg1];
};
return (_local3);
}
public function processQueue(){
currentlyProcessingItem = 0;
dispatchEvent(new ProcessEvent(ProcessEvent.START));
process();
}
public static function getInstance():AnimationCache{
return ((instance) ? instance : new (AnimationCache));
}
}
}//package com.touchmypixel.peepee.utils
Section 13
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(_arg1:Event):void{
var _local2:String;
var _local3:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
_local2 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package CPMStar
Section 14
//DocClass (Doc.DocClass)
package Doc {
import flash.events.*;
import flash.display.*;
import mochi.as3.*;
import flash.utils.*;
import CPMStar.*;
public dynamic class DocClass extends Base {
public var mochi_recs_mc:MovieClip;
public var cpmAd:AdLoader;
public var mochiGameId:String;// = "65b2a886d021da53"
var finishLoad:Boolean;// = false
public var loadingText_mc:MovieClip;
public var points_mc_:MovieClip;
var finishAds:Boolean;// = false
var isAdsMochi:Boolean;// = false
public var mochi_recs_mc_:MovieClip;
public var aaa;
var loadT:Number;
public var download_mc_:MovieClip;
public var points_mc:MovieClip;
public var adBox:Sprite;
public var download_mc:MovieClip;
var adsSeconds:Number;// = 15
public var adBox_:MovieClip;
public var conditionsToGo:Number;// = 0
public var CPMStarContentSpotID:String;// = "1730Q939E8E73"
public static const SPONSOR_BASE_URL:String = "candystand.com";
public static var iAm:DocClass;
public function DocClass(){
CPMStarContentSpotID = "1730Q939E8E73";
mochiGameId = "65b2a886d021da53";
isAdsMochi = false;
conditionsToGo = 0;
finishLoad = false;
finishAds = false;
adsSeconds = 15;
super();
addFrameScript(0, frame1, 2, frame3);
stop();
iAm = this;
trace(this);
fromMyClip("download_mc");
fromMyClip("points_mc");
fromMyClip("mochi_recs_mc");
fromMyClip("adBox");
MochiBot.track(this, "67804dd9");
MochiBot.track(this, "077df3f3");
if (loaderInfo.url.indexOf("") < 0){
download_mc.alpha = 1;
return;
};
MochiServices.connect(mochiGameId, this);
addChild(new screenSponsorSplash());
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
}
public function afterAd(){
finishAds = true;
playIfLoadedAndAdShow();
}
private function onCpmError(_arg1:IOErrorEvent):void{
trace("cpm error");
afterAd();
}
public function get isKongregateOrSimilar():Boolean{
var _local1:String;
_local1 = loaderInfo.url.toLowerCase();
return ((((_local1.indexOf("kongregate.com") >= 0)) || ((_local1.indexOf(SPONSOR_BASE_URL) >= 0))));
}
public function playIfLoadedAndAdShow():void{
conditionsToGo++;
if (conditionsToGo == 2){
try {
removeChild(adBox);
} catch(e:Error) {
};
removeEventListener(Event.ENTER_FRAME, onEF);
if (currentFrame == 1){
play();
};
};
}
public function showAds(){
var _local1:Number;
if (isKongregateOrSimilar){
_local1 = 140;
points_mc.y = (points_mc.y + _local1);
loadingText_mc.y = (loadingText_mc.y + _local1);
afterAd();
} else {
if (isAdsMochi){
MochiAd.showPreGameAd({clip:root, id:mochiGameId, res:"700x560", no_bg:true, no_progress_bar:true, ad_finished:DocClass.afterMochiAds, ad_progress:DocClass.onMochiProgress});
} else {
showContiniousCPMAds();
};
};
}
function showContiniousCPMAds(){
cpmAd = new AdLoader(CPMStarContentSpotID);
cpmAd.addEventListener(IOErrorEvent.IO_ERROR, onCpmError);
cpmAd.addEventListener(Event.INIT, onCpmLoaded);
adBox.addChild(cpmAd);
setTimeout(afterAd, (adsSeconds * 1000));
loadT = new Date().getTime();
addEventListener(Event.ENTER_FRAME, onEF);
}
function frame3(){
stop();
}
private function onCpmLoaded(_arg1:Event):void{
}
public function afterSponsorSplash(){
showAds();
}
public function showLoadPercent(_arg1:Number){
points_mc.gotoAndStop(Math.round((_arg1 / 10)));
}
public function onLoadProgress(_arg1:ProgressEvent){
var _local2:Number;
_local2 = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
if (!isAdsMochi){
showLoadPercent(_local2);
};
}
public function onLoadComplete(_arg1:Event){
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoadProgress);
loaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
finishLoad = true;
playIfLoadedAndAdShow();
}
public function get isOnSponsorSite():Boolean{
return ((loaderInfo.url.indexOf(DocClass.SPONSOR_BASE_URL) >= 0));
}
private function onEF(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (finishLoad){
_local2 = new Date().getTime();
_local3 = (_local2 - loadT);
_local4 = (((_local3 / 1000) / adsSeconds) * 100);
if (_local4 < 20){
_local4 = 20;
};
showLoadPercent(_local4);
};
}
function frame1(){
}
public static function onMochiProgress(_arg1:Number){
trace(("onMochiProgress" + _arg1));
iAm.showLoadPercent(_arg1);
}
public static function afterMochiAds(){
iAm.afterAd();
}
}
}//package Doc
Section 15
//_bumper_310 (LoveToJump2_fla._bumper_310)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class _bumper_310 extends MovieClip {
public function _bumper_310(){
addFrameScript(204, frame205);
}
function frame205(){
stop();
}
}
}//package LoveToJump2_fla
Section 16
//allDone_241 (LoveToJump2_fla.allDone_241)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class allDone_241 extends MovieClip {
public var in_mc_:MovieClip;
public function allDone_241(){
addFrameScript(40, frame41);
}
function frame41(){
stop();
}
}
}//package LoveToJump2_fla
Section 17
//allDone_in_242 (LoveToJump2_fla.allDone_in_242)
package LoveToJump2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class allDone_in_242 extends MovieClip {
public var x_txt_:TextField;
}
}//package LoveToJump2_fla
Section 18
//Allimport_20 (LoveToJump2_fla.Allimport_20)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class Allimport_20 extends MovieClip {
public function Allimport_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 19
//bonus_text_in_236 (LoveToJump2_fla.bonus_text_in_236)
package LoveToJump2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bonus_text_in_236 extends MovieClip {
public var x_txt:TextField;
}
}//package LoveToJump2_fla
Section 20
//bonus_text_mc_235 (LoveToJump2_fla.bonus_text_mc_235)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class bonus_text_mc_235 extends MovieClip {
public var in_mc:MovieClip;
public function bonus_text_mc_235(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package LoveToJump2_fla
Section 21
//captionNew_219 (LoveToJump2_fla.captionNew_219)
package LoveToJump2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class captionNew_219 extends MovieClip {
public var cap_txt_:TextField;
}
}//package LoveToJump2_fla
Section 22
//fon_men_191 (LoveToJump2_fla.fon_men_191)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class fon_men_191 extends MovieClip {
public var man1:MovieClip;
public var man4:MovieClip;
public var man5:MovieClip;
public var man0:MovieClip;
public var man2:MovieClip;
public var man3:MovieClip;
public function fon_men_191(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 23
//Graph_L2J2_287_Symbol44rer444_246 (LoveToJump2_fla.Graph_L2J2_287_Symbol44rer444_246)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class Graph_L2J2_287_Symbol44rer444_246 extends MovieClip {
public function Graph_L2J2_287_Symbol44rer444_246(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 24
//Graph_L2J2plus_10_Sym_208 (LoveToJump2_fla.Graph_L2J2plus_10_Sym_208)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class Graph_L2J2plus_10_Sym_208 extends MovieClip {
public var hit_mc:MovieClip;
public function Graph_L2J2plus_10_Sym_208(){
addFrameScript(0, frame1, 3, frame4);
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package LoveToJump2_fla
Section 25
//Graph_L2J2plus2_13_APPEAR_305 (LoveToJump2_fla.Graph_L2J2plus2_13_APPEAR_305)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class Graph_L2J2plus2_13_APPEAR_305 extends MovieClip {
public function Graph_L2J2plus2_13_APPEAR_305(){
addFrameScript(31, frame32, 62, frame63, 93, frame94, 124, frame125, 154, frame155);
}
function frame155(){
stop();
}
function frame94(){
stop();
}
function frame125(){
stop();
}
function frame32(){
stop();
}
function frame63(){
stop();
}
}
}//package LoveToJump2_fla
Section 26
//graphShape_142 (LoveToJump2_fla.graphShape_142)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class graphShape_142 extends MovieClip {
public var straight:MovieClip;
}
}//package LoveToJump2_fla
Section 27
//guideControls_newcopy2_163 (LoveToJump2_fla.guideControls_newcopy2_163)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class guideControls_newcopy2_163 extends MovieClip {
public var bt_down:MovieClip;
public var bt_up:MovieClip;
public var bt_left:MovieClip;
public var bt_right:MovieClip;
}
}//package LoveToJump2_fla
Section 28
//locked_man_126 (LoveToJump2_fla.locked_man_126)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class locked_man_126 extends MovieClip {
public var playHere_btn:SimpleButton;
}
}//package LoveToJump2_fla
Section 29
//quality_btn_247 (LoveToJump2_fla.quality_btn_247)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class quality_btn_247 extends MovieClip {
public function quality_btn_247(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 30
//slowMotionEffect_230 (LoveToJump2_fla.slowMotionEffect_230)
package LoveToJump2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class slowMotionEffect_230 extends MovieClip {
public var bonusDown_mc:MovieClip;
public var tip_txt:TextField;
public var bonus_text_mc:MovieClip;
}
}//package LoveToJump2_fla
Section 31
//spirits_L2J2_252 (LoveToJump2_fla.spirits_L2J2_252)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class spirits_L2J2_252 extends MovieClip {
public function spirits_L2J2_252(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 32
//splashFon_198 (LoveToJump2_fla.splashFon_198)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class splashFon_198 extends MovieClip {
public var animationMen_mc:MovieClip;
}
}//package LoveToJump2_fla
Section 33
//splashFoncopy_206 (LoveToJump2_fla.splashFoncopy_206)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class splashFoncopy_206 extends MovieClip {
public var animationMen_mc:MovieClip;
}
}//package LoveToJump2_fla
Section 34
//star_in_176 (LoveToJump2_fla.star_in_176)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class star_in_176 extends MovieClip {
public var starAnim_mc:MovieClip;
}
}//package LoveToJump2_fla
Section 35
//starAnim_177 (LoveToJump2_fla.starAnim_177)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class starAnim_177 extends MovieClip {
public function starAnim_177(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 36
//stars_131 (LoveToJump2_fla.stars_131)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class stars_131 extends MovieClip {
public var star1_:MovieClip;
public var star2_:MovieClip;
public var star3_:MovieClip;
public var star4_:MovieClip;
public var star5_:MovieClip;
}
}//package LoveToJump2_fla
Section 37
//tab_alpha_301 (LoveToJump2_fla.tab_alpha_301)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class tab_alpha_301 extends MovieClip {
public function tab_alpha_301(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 38
//underPauseNSound_214 (LoveToJump2_fla.underPauseNSound_214)
package LoveToJump2_fla {
import flash.display.*;
public dynamic class underPauseNSound_214 extends MovieClip {
public function underPauseNSound_214(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package LoveToJump2_fla
Section 39
//winUserName_284 (LoveToJump2_fla.winUserName_284)
package LoveToJump2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class winUserName_284 extends MovieClip {
public var cancelUser_btn_:Graph_L2J2_10_Symbol90;
public var userNameCap_txt_:TextField;
public var okUser_btn_:Graph_L2J2_9_Symbol91;
public var userName_txt_:TextField;
public var under_mc_:MovieClip;
}
}//package LoveToJump2_fla
Section 40
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
loader.load(req);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_w:Number;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var progress:Number;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
bar_w = ((w - bar.x) - 10);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
progress = Math.min(1, options.progress_override(clip));
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Object;
var _local11:Number;
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local8 = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
_local9 = ((100 * _local3) / chk.ad_msec);
_local10 = this._mochiad_bar._inside;
_local11 = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 41
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
MochiSocial.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 42
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 43
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 44
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local3:Object;
var _local4:Object;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
}
}//package mochi.as3
Section 45
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _consumableProperties:Object;
private var _syncID:Number;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (_arg1.privateProperties.consumable){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function sync(_arg1:Event=null):void{
var _local2:Object;
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
_local2 = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[_local2]);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 46
//MochiScores (mochi.as3.MochiScores)
package mochi.as3 {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
delete options.clip;
MochiServices.setContainer();
MochiServices.bringToTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiServices.warnID(_arg1, true);
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi.as3
Section 47
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = _callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.8 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
var _local3:Number;
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
_local3 = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.target;
_local3 = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var mochiLCURL:String;
var req:URLRequest;
var complete:Function;
var clip = _arg1;
loader = new Loader();
mochiLCURL = (_servURL + _mochiLC);
req = new URLRequest(mochiLCURL);
complete = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String;
var _local4:URLRequest;
var _local5:URLVariables;
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
_local3 = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local4 = new URLRequest(_local3);
_local5 = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function updateCopy(_arg1:Object):void{
MochiServices.send("coins_updateCopy", _arg1, null, null);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 48
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const LOGIN_HIDE:String = "LoginHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function requestLogin():void{
MochiServices.send("coins_requestLogin");
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 49
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:String;
if (_syncContainer[_arg1] == _arg2){
return;
};
_local3 = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
}
}//package mochi.as3
Section 50
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var error:Event;// = null
public var key:String;// = null
public var operation:String;// = null
public var data;// = null
public var _loader:URLLoader;
public function MochiUserData(_arg1:String="", _arg2:Function=null){
key = null;
data = null;
error = null;
operation = null;
callback = null;
super();
this.key = _arg1;
this.callback = _arg2;
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function request(_arg1:String, _arg2:ByteArray):void{
var api_url:String;
var api_token:String;
var args:URLVariables;
var req:URLRequest;
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
api_url = MochiSocial.getAPIURL();
api_token = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
args = new URLVariables();
args.op = _operation;
args.key = key;
req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData;
_local3 = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData;
_local4 = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 51
//Particle (MyParticle.Particle)
package MyParticle {
import flash.display.*;
public class Particle extends MovieClip {
var lastFrame:Number;
var removingMc:Sprite;
public function Particle(){
lastFrame = lastFrame;
super();
lastFrame = (totalFrames - 1);
addFrameScript(lastFrame, removeMe);
removingMc = this;
}
function removeMe(){
addFrameScript(lastFrame, null);
if (removingMc.parent != null){
removingMc.parent.removeChild(removingMc);
};
removingMc = null;
}
}
}//package MyParticle
Section 52
//ParticleController (MyParticle.ParticleController)
package MyParticle {
import flash.events.*;
import flash.display.*;
import com.touchmypixel.peepee.utils.*;
import flash.geom.*;
public class ParticleController extends EventDispatcher {
private var _particleClass:Class;
public var Drandom:Number;// = 4
var _cacheMotion:String;
private var _followMc:Sprite;
private var _isFollow:Boolean;
public var partDx:Number;// = 0
public var partDy:Number;// = 0
var partAnim:Animation;
private var _canvasMc:Sprite;
public var everyNtimes:Number;// = 1
var timeN:Number;// = 0
static var animationCache:AnimationCache;
public function ParticleController(){
partDx = 0;
partDy = 0;
everyNtimes = 1;
timeN = 0;
Drandom = 4;
super();
}
public function get isFollow():Boolean{
return (_isFollow);
}
public function get particleClass():Class{
return (_particleClass);
}
public function get cacheMotion():String{
return (_cacheMotion);
}
function followTo(_arg1:Event){
var _local2:Point;
var _local3:Sprite;
var _local4:Animation;
timeN++;
if ((timeN % everyNtimes) != 0){
return;
};
_local2 = new Point(followMc.x, followMc.y);
_local2 = followMc.localToGlobal(new Point(0, 0));
_local2 = canvasMc.globalToLocal(_local2);
if (!_cacheMotion){
_local3 = (new particleClass() as Particle);
} else {
_local4 = animationCache.getAnimation(_cacheMotion);
_local3 = _local4;
_local4.play();
_local4.addEventListener(Event.ENTER_FRAME, removeIt);
};
_local3.x = (((_local2.x + Base.random((Drandom + 1))) - (Drandom / 2)) + partDx);
_local3.y = (((_local2.y + Base.random((Drandom + 1))) - (Drandom / 2)) + partDy);
canvasMc.addChildAt(_local3, 0);
}
public function set canvasMc(_arg1:Sprite):void{
_canvasMc = _arg1;
}
public function set followMc(_arg1:Sprite):void{
_followMc = _arg1;
}
public function set particleClass(_arg1:Class):void{
_particleClass = _arg1;
}
public function get followMc():Sprite{
return (_followMc);
}
public function get canvasMc():Sprite{
return (_canvasMc);
}
public function set isFollow(_arg1:Boolean):void{
if (_isFollow == _arg1){
return;
};
if (_arg1){
followMc.addEventListener(Event.ENTER_FRAME, followTo);
timeN = 0;
} else {
followMc.removeEventListener(Event.ENTER_FRAME, followTo);
};
_isFollow = _arg1;
}
public function set cacheMotion(_arg1:String):void{
_cacheMotion = _arg1;
if (_cacheMotion){
animationCache = AnimationCache.getInstance();
animationCache.replaceExisting = true;
animationCache.cacheAnimation(_cacheMotion);
};
}
function removeIt(_arg1:Event){
var _local2:Animation;
_local2 = (_arg1.currentTarget as Animation);
if (_local2.currentFrame == _local2.totalFrames){
_local2.removeEventListener(Event.ENTER_FRAME, removeIt);
canvasMc.removeChild(_local2);
};
}
}
}//package MyParticle
Section 53
//_silence (_silence)
package {
import flash.media.*;
public dynamic class _silence extends Sound {
}
}//package
Section 54
//Base (Base)
package {
import flash.display.*;
import flash.utils.*;
public class Base extends MovieClip {
public function Base(){
tabEnabled = false;
}
function beforeDelete(){
}
function showScreenCurrentBtns(){
}
public function fromMyClip(_arg1:String){
this[_arg1] = getChildByName(myNameToStage(_arg1));
return (this[_arg1]);
}
function afterCreate(){
}
public static function stageNameToMy(_arg1:String):String{
return (_arg1.substr(0, (_arg1.length - 1)));
}
public static function getClass(_arg1:String):Class{
return ((getDefinitionByName(_arg1) as Class));
}
public static function random(_arg1:int):int{
return (Math.floor((Math.random() * _arg1)));
}
public static function hrefTo(_arg1:String="FlashTeam.ru", _arg2:String="http://games.flashteam.ru"):String{
return (_arg1);
}
public static function fromMyClip_s(_arg1:DisplayObjectContainer, _arg2:String){
return (_arg1.getChildByName(myNameToStage(_arg2)));
}
public static function createClassObj(_arg1:String){
return (new (getClass(_arg1)));
}
public static function myNameToStage(_arg1:String):String{
return ((_arg1 + "_"));
}
}
}//package
Section 55
//BodyPart (BodyPart)
package {
import flash.events.*;
import flash.display.*;
public class BodyPart extends Base {
public var leg_mc_:L2_leg2;
var myMan:Man;
var childParts:Object;
public var arm_mc_:L2_arm2;
public var foot_mc_:L2_foot2;
public var shoulder2_mc_:L2_shoulder2;
public var shoulder_mc_:L2_shoulder2;
public var in_mc_:MovieClip;
public var head_mc_:L2_head2;
public var hand_mc_:L2_hand2;
var parentPart:BodyPart;
public var hip2_mc_:L2_heap2;
public var hip_mc_:L2_heap2;
protected var stepDegree:Number;
public var manLevelPointer_mc_:MovieClip;
var stepPhaze:Number;// = 0
static const stepsImmediate:Number = 3;
static const stepsUsual:Number = 7;
static var steps:Number = 7;
public function BodyPart(){
childParts = {};
stepPhaze = 0;
super();
parentPart = ((parent is BodyPart)) ? (parent as BodyPart) : null;
if (parentPart != null){
parentPart.childParts[stageNameToMy(this.name)] = this;
};
}
protected function rotate_ef(_arg1){
stepPhaze = (stepPhaze + (myMan.myLevelL.fpsK * 1));
if (stepPhaze >= steps){
removeEventListener(Event.ENTER_FRAME, rotate_ef);
};
rotation = (rotation + (myMan.myLevelL.fpsK * stepDegree));
}
function rotate(_arg1:Number, _arg2:Boolean=false){
if (isNaN(_arg1)){
_arg1 = 0;
};
steps = (_arg2) ? stepsImmediate : stepsUsual;
stepPhaze = 0;
stepDegree = ((_arg1 - rotation) / steps);
if ((((stepDegree == 0)) && (!((parentPart == null))))){
return;
};
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, rotate_ef);
};
addEventListener(Event.ENTER_FRAME, rotate_ef);
}
}
}//package
Section 56
//Chucky (Chucky)
package {
import flash.media.*;
public dynamic class Chucky extends Sound {
}
}//package
Section 57
//clipPerson (clipPerson)
package {
public dynamic class clipPerson extends ClipPerson {
}
}//package
Section 58
//ClipPerson (ClipPerson)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClipPerson extends Base {
public var select_border_mc_:MovieClip;
public var man_uner_mc_:MovieClip;
private var _isLocked:Boolean;// = false
var stars_mc:MovieClip;
var speed_prog:MyProgressBar;
public var rotate_prog_:progBarNew;
public var rotate_up_:plusMegaNew;
public var speed_prog_:progBarNew;
var stars:Array;
public var man_uner_mini_mc_:MovieClip;
var _myScreen:ScreenSelectPerson;
var man_mc:MovieClip;
public var stars_mc_:MovieClip;
var menuScreen:ScreenMenu;
var name_txt:TextField;
public var locked_mc_:MovieClip;
var speed_under:MovieClip;
var locked_mc:MovieClip;
var rotate_under:MovieClip;
var select_border_mc:MovieClip;
public var from_begin_btn_:Graph_L2J2_12_Symbol88copy;
var points_txt:TextField;
var man_uner_mini_mc:MovieClip;
public var name_txt_:TextField;
public var man_mc_:MovieClip;
public var speed_up_:plusMegaNew;
var level_txt:TextField;
var skillsScreen:ScreenSkillUp;
var from_begin_btn:MyBtn;
public var speed_under_:MovieClip;
var man_uner_mc:MovieClip;
var speed_up:SimpleButton;
var percPlus;// = 5
var man_quad_mc:MovieClip;
var _objPerson:Person;
var mainStar:MovieClip;
var rotate_prog:MyProgressBar;
public var level_txt_:TextField;
public var points_txt_:TextField;
public var man_quad_mc_:MovieClip;
public var rotate_under_:MovieClip;
var rotate_up:SimpleButton;
public function ClipPerson(){
_isLocked = false;
percPlus = 5;
super();
fromMyClip("man_mc");
fromMyClip("name_txt");
fromMyClip("points_txt");
fromMyClip("level_txt");
fromMyClip("speed_prog");
fromMyClip("rotate_prog");
fromMyClip("speed_up");
fromMyClip("rotate_up");
fromMyClip("from_begin_btn");
fromMyClip("select_border_mc");
fromMyClip("man_uner_mc");
fromMyClip("man_quad_mc");
fromMyClip("stars_mc");
fromMyClip("rotate_under");
fromMyClip("speed_under");
fromMyClip("man_uner_mini_mc");
fromMyClip("locked_mc");
speed_up.visible = (rotate_up.visible = false);
from_begin_btn.visible = false;
select_border_mc.visible = false;
select_border_mc.mouseEnabled = false;
man_uner_mini_mc.visible = false;
man_uner_mc.gotoAndPlay(random(man_uner_mc.totalFrames));
points_txt.visible = false;
locked_mc.visible = false;
locked_mc.mouseEnabled = false;
stop();
}
function get winDiff():WindowDifficult{
return ((menuScreen) ? menuScreen.winDiff : _myScreen.winDiff);
}
override function beforeDelete(){
man_mc.removeEventListener(MouseEvent.CLICK, onClickMe);
man_quad_mc.removeEventListener(MouseEvent.CLICK, onClickMe);
man_mc.removeEventListener(MouseEvent.MOUSE_OVER, onManMouseOver);
man_quad_mc.removeEventListener(MouseEvent.MOUSE_OVER, onManMouseOver);
man_mc.removeEventListener(MouseEvent.MOUSE_OUT, onManMouseOut);
man_quad_mc.removeEventListener(MouseEvent.MOUSE_OUT, onManMouseOut);
from_begin_btn.removeEventListener(MouseEvent.CLICK, fromBegin);
speed_up.removeEventListener(MouseEvent.CLICK, upSpeed);
rotate_up.removeEventListener(MouseEvent.CLICK, upRotate);
locked_mc.playHere_btn.removeEventListener(MouseEvent.CLICK, onClickMe);
}
public function set objPerson(_arg1:Person):void{
var _local2:Number;
_objPerson = _arg1;
points_txt.text = ((Lang.txt("points") + ": ") + _objPerson.evolutionSumPoints.toString());
_local2 = Math.round(((_objPerson.professionalLevel - _objPerson.fullLevel) * 3));
level_txt.text = (("Level " + (_objPerson.fullLevel + 0)) + ((_local2)==0) ? "" : ("." + (_local2 + 0)));
speed_prog.Percent = viewPercent(_objPerson.percentVDown);
speed_prog.Name = Lang.txt("power");
rotate_prog.Percent = viewPercent(_objPerson.percentRotateSpeed);
rotate_prog.Name = Lang.txt("rotation");
man_mc.gotoAndStop((_objPerson.myInd + 1));
stars_mc.gotoAndStop(_objPerson.StarsFrame);
}
function onManMouseOver(_arg1){
man_uner_mc.alpha = 0.9;
}
function getGame():Game{
return ((skillsScreen) ? skillsScreen.myGame : (menuScreen) ? menuScreen.myGame : _myScreen.myGame);
}
function upSpeed(_arg1){
if ((_objPerson.percentVDown + percPlus) < 100){
_objPerson.percentVDown = (_objPerson.percentVDown + percPlus);
} else {
_objPerson.percentVDown = 100;
};
afterUp();
}
public function set myScreen(_arg1:ScreenSelectPerson):void{
_myScreen = _arg1;
name_txt.text = "";
man_mc.buttonMode = true;
man_quad_mc.buttonMode = true;
man_mc.addEventListener(MouseEvent.CLICK, onClickMe);
man_quad_mc.addEventListener(MouseEvent.CLICK, onClickMe);
man_mc.addEventListener(MouseEvent.MOUSE_OVER, onManMouseOver);
man_quad_mc.addEventListener(MouseEvent.MOUSE_OVER, onManMouseOver);
man_mc.addEventListener(MouseEvent.MOUSE_OUT, onManMouseOut);
man_quad_mc.addEventListener(MouseEvent.MOUSE_OUT, onManMouseOut);
from_begin_btn.visible = true;
from_begin_btn.addEventListener(MouseEvent.CLICK, fromBegin);
locked_mc.playHere_btn.addEventListener(MouseEvent.CLICK, onClickMe);
}
function onClickMe(_arg1:MouseEvent){
var _local2:Game;
var _local3:Sprite;
_local2 = getGame();
if (isLocked){
Game.goToSponsorPlay();
return;
};
_local3 = ((_arg1)==null) ? null : (_arg1.currentTarget as Sprite);
IcoElement.curPerson = (_local2.pers = this._objPerson);
if (((!((_local2.pers._difficultAdd == -1))) && ((((_local3 == man_mc)) || ((_local3 == man_quad_mc)))))){
_local2.goMenu();
} else {
winDiff.showMe();
};
}
function onManMouseOut(_arg1){
man_uner_mc.alpha = 1;
}
public function get isLocked():Boolean{
return (_isLocked);
}
function fromBegin(_arg1:MouseEvent){
onClickMe(_arg1);
}
function showUps(_arg1:ScreenSkillUp){
skillsScreen = _arg1;
name_txt.text = "";
points_txt.visible = false;
if (_objPerson.percentRotateSpeed < 100){
rotate_up.visible = true;
};
if (_objPerson.percentVDown < 100){
speed_up.visible = true;
};
if (((!(rotate_up.visible)) && (!(speed_up.visible)))){
afterUp();
};
speed_up.addEventListener(MouseEvent.CLICK, upSpeed);
rotate_up.addEventListener(MouseEvent.CLICK, upRotate);
}
public function set myMenu2Screen(_arg1:ScreenMenu):void{
menuScreen = _arg1;
name_txt.text = "";
}
function afterUp(){
_objPerson.evolutionPoints[_objPerson.indEvolutionPoints] = (_objPerson.evolutionPoints[_objPerson.indEvolutionPoints] + (skillsScreen.myGame.lastResult + skillsScreen.myGame.bonusPoints));
_objPerson.professionalLevel = (_objPerson.professionalLevel + Person.dLevel);
objPerson = _objPerson;
if (_objPerson.isNewStar){
};
speed_up.visible = (rotate_up.visible = false);
skillsScreen.afterUpParam();
}
public function set isLocked(_arg1:Boolean):void{
_isLocked = _arg1;
locked_mc.visible = true;
rotate_under.visible = false;
speed_under.visible = false;
rotate_prog.visible = false;
speed_prog.visible = false;
level_txt.visible = false;
from_begin_btn.visible = false;
}
function showMinimalistic(){
}
function viewPercent(_arg1:Number):Number{
return ((100 - ((100 - _arg1) * 2)));
}
function upRotate(_arg1){
if ((_objPerson.percentRotateSpeed + percPlus) < 100){
_objPerson.percentRotateSpeed = (_objPerson.percentRotateSpeed + percPlus);
} else {
_objPerson.percentRotateSpeed = 100;
};
afterUp();
}
}
}//package
Section 59
//ElectroBeep (ElectroBeep)
package {
import flash.media.*;
public dynamic class ElectroBeep extends Sound {
}
}//package
Section 60
//game (game)
package {
public dynamic class game extends Game {
}
}//package
Section 61
//Game (Game)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import Doc.*;
import flash.ui.*;
public class Game extends Base {
var isGaming:Boolean;
public var sound_no_btn_:SimpleButton;
var sound_no_btn:SimpleButton;
public var fon_men_mc_:MovieClip;
var modeGame:String;
public var screen_container_mc_:MovieClip;
public var batut_mc_:MovieClip;
var song_txt:TextField;
var batut_mc:MovieClip;
var _userName:String;
var musInGame:SoundFabric;
public var causeOfLoose:String;
public var lastResult:Number;// = 0
var cap_txt:TextField;
public var blur_gray_mc_:MovieClip;
var caption_mc:MovieClip;
var saver:Saver;
var splashFon_mc:MovieClip;
var splashFon2_mc:MovieClip;
public var loveToJump_mc_:MovieClip;
public var splashFon_mc_:MovieClip;
var currentWindow:WindowOnScreen;
protected var _currentNextBtn:MyBtn;
private var _bestContest:Number;
public var song_txt_:TextField;
public var mouse_mc_:MovieClip;
var pers:Person;
var loveToJump_mc:MovieClip;
public var sound_yes_btn_:SimpleButton;
var screen_container_mc:MovieClip;
var underSndPause_mc:MovieClip;
var newVol:int;
var contestPoints:Number;
var blur_gray_mc:MovieClip;
public var fon_mc_:MovieClip;
var musicBoxes_mc:MovieClip;
var myLevel:Level;
var menuMusics:Array;
var currentScreen:Base;
public var underSndPause_mc_:MovieClip;
var _complete1career:Boolean;
var fon_mc:MovieClip;
public var musicBoxes_mc_:MovieClip;
public var copyright_txt_:TextField;
var mouse_mc:MovieClip;
var fon_men_mc:MovieClip;
var isMainMenuStart:Boolean;// = true
var upFrame;// = 4
var _visualQuality:String;
public var caption_mc_:MovieClip;
private var _bestFree:Number;
var contestNum:Number;
var sound_yes_btn:SimpleButton;
private var qualities:Object;
public var splashFon2_mc_:MovieClip;
public var bonusPoints:Number;// = 0
public var copyright_btn:SimpleButton;
var modeGameWorldContest:Boolean;// = false
public var copyright_txt:TextField;
static const DEVELOPER_SITE:String = "http://flashteam.ru";
static const CONTEST_COUNT:Number = 3;
static const SPONSOR_DOWNLOAD:String = "http://www.candystand.com/shared-games?utm_source=love-2-jump-2&utm_medium=link&utm_campaign=love-2-jump-2-vrl";
public static const BONUS_MINIMUM_LEVEL:Number = 0.33;
static const INSTANT_DOWNLOAD:String = "http://www.candystand.com/play/love-2-jump-2?utm_source=love-2-jump-2&utm_medium=link&utm_campaign=love-2-jump-2-vrl";
static const SPONSOR_PLAY:String = "http://www.candystand.com/play/love-2-jump-2?utm_source=love-2-jump-2&utm_medium=link&utm_campaign=love-2-jump-2-vrl";
static const SPONSOR_MAIN:String = "http://www.candystand.com/index.do?utm_source=love-2-jump-2&utm_medium=link&utm_campaign=love-2-jump-2-vrl";
static var projectName:String = "LoveToJump_2.00";
public function Game(){
lastResult = 0;
bonusPoints = 0;
modeGameWorldContest = false;
menuMusics = ["Chucky", "Melodic"];
upFrame = 4;
isMainMenuStart = true;
super();
qualities = {low:[StageQuality.LOW, StageQuality.LOW], high:[StageQuality.HIGH, StageQuality.MEDIUM]};
TheShape.initAllShapes();
fromMyClip("screen_container_mc");
fromMyClip("cap_txt");
fromMyClip("loveToJump_mc");
fromMyClip("caption_mc");
fromMyClip("sound_no_btn");
fromMyClip("sound_yes_btn");
fromMyClip("song_txt");
fromMyClip("copyright_txt");
fromMyClip("fon_men_mc");
fromMyClip("underSndPause_mc");
fromMyClip("blur_gray_mc");
fromMyClip("fon_mc");
fromMyClip("musicBoxes_mc");
fromMyClip("mouse_mc");
fromMyClip("batut_mc");
fromMyClip("splashFon_mc");
fromMyClip("splashFon2_mc");
cap_txt = (caption_mc.getChildByName("cap_txt_") as TextField);
fon_men_mc.addFrameScript(0, setMensForThisLevel);
fon_mc.stop();
saver = new Saver("AllGame");
saver.isAutoSave = true;
_bestFree = saver.getData("bestFree", 0);
_bestContest = saver.getData("bestContest", 0);
_userName = saver.getData("userName", "L2Jumper");
_visualQuality = saver.getData("visualQuality", StageQuality.HIGH);
_complete1career = saver.getData("_complete1career", false);
stage.quality = visualQuality;
Lang.init(saver.getData("lang", 0));
copyright_txt.htmlText = ("(c) " + hrefTo("Vadim Pecherskiy"));
copyright_btn.addEventListener(MouseEvent.CLICK, gotoDeveloperSite);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
batut_mc.buttonMode = true;
batut_mc.addEventListener(MouseEvent.ROLL_OVER, onRollOverSponsor);
batut_mc.addEventListener(MouseEvent.ROLL_OUT, onRollOutSponsor);
batut_mc.addEventListener(MouseEvent.CLICK, onClickSponsor);
batut_mc.hitArea = batut_mc.hit_mc;
splashFon_mc.mouseEnabled = (splashFon2_mc.mouseEnabled = (blur_gray_mc.mouseEnabled = false));
mouse_mc.startDrag(true);
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
mouse_mc.mouseEnabled = false;
showMyMouse(null);
sound_no_btn.visible = false;
sound_no_btn.addEventListener(MouseEvent.CLICK, onClickSound);
sound_yes_btn.addEventListener(MouseEvent.CLICK, onClickSound);
song_txt.addEventListener(MouseEvent.CLICK, setGameMusicClick);
newVol = saver.getData("vol", 1);
if (newVol == 0){
onClickSound(new MouseEvent("a"));
};
goMainMenu();
}
public function set userName(_arg1:String):void{
_userName = _arg1;
saver.setData("userName", _userName);
}
function onRollOutSponsor(_arg1){
if (isGaming){
return;
};
upBatut();
}
function goSelect(_arg1:String=null){
var _local2:ScreenSelectPerson;
_local2 = createClassObj("ScreenSelectPerson");
_local2.myGame = this;
_local2.whereBack = _arg1;
swapFrame(_local2);
Caption = "select";
setFonFrame(1);
}
function goAfterLevel(_arg1:Boolean){
var _local2:ScreenAfterLevel;
_local2 = createClassObj("ScreenAfterLevel");
_local2.myGame = this;
_local2.isLevelGood = _arg1;
swapFrame(_local2);
setFonFrame(2);
setBackMy(true, true, true, false);
}
function setMusicVolume(){
if (musInGame != null){
musInGame.setVol((newVol * 0.5));
};
}
function goSponsorSplash(){
var _local1:ScreenSponsorSplash;
_local1 = createClassObj("screenSponsorSplash");
_local1.myGame = this;
swapFrame(_local1);
Caption = "";
setBackMy(false, false, false, false);
}
function setFonFrame(_arg1:Number, _arg2:Boolean=false){
fon_mc.gotoAndStop(_arg1);
musicBoxes_mc.visible = _arg2;
}
function onKeyPress(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == Keyboard.ENTER)) || ((_arg1.keyCode == Keyboard.NUMPAD_ENTER)))){
clickCurrentNext();
};
}
function goRecords(_arg1:Boolean=false, _arg2:Boolean=false){
var _local3:ScreenRecords;
_local3 = createClassObj("ScreenRecords");
_local3.myGame = this;
_local3.isFromMenu = _arg1;
_local3.isFromMenu2 = _arg2;
ScreenRecords.recordTableNum = (modeGameWorldContest) ? ScreenRecords.RECORDS_CONTEST : ((modeGame == "quick")) ? ScreenRecords.RECORDS_FREESTYLE : ScreenRecords.RECORDS_CAREER;
swapFrame(_local3);
Caption = "records_world";
setFonFrame(2);
}
function goMenu(_arg1:Boolean=false){
var _local2:ScreenMenu;
_local2 = createClassObj("ScreenMenu");
_local2.myGame = this;
_local2.isFirst = isMainMenuStart;
_local2.isMainMenu = _arg1;
swapFrame(_local2);
Caption = "";
setBackMy(false);
setFonFrame(1, true);
splashFon2_mc.visible = true;
}
private function get bestFree():Number{
return (_bestFree);
}
private function get bestContest():Number{
return (_bestContest);
}
function goCredits(){
var _local1:WindowCredits;
_local1 = createClassObj("winCredits");
_local1.myGame = this;
showWinOnScreen(_local1, true);
}
private function showMyMouse(_arg1:MouseEvent):void{
Mouse.hide();
mouse_mc.visible = true;
stage.addEventListener(MouseEvent.CLICK, showMyMouse);
}
function playBatut(){
batut_mc.play();
}
public function get currentNextBtn():MyBtn{
return (_currentNextBtn);
}
function setBackLevel(){
setBackMy(false, false, false, true);
setFonFrame(2, true);
fon_men_mc.gotoAndStop(1);
}
function goSkillUp(){
var _local1:ScreenSkillUp;
if (pers.professionalLevel >= 5){
startGame();
return;
};
_local1 = createClassObj("ScreenSkillUp");
_local1.myGame = this;
swapFrame(_local1);
Caption = "skillUp";
setFonFrame(2);
setBackMy(true, true, true, false);
}
function goEnd(){
var _local1:ScreenEnd;
Caption = "end";
_local1 = createClassObj("ScreenEnd");
_local1.myGame = this;
swapFrame(_local1);
setFonFrame(2);
setBackMy(true, true, true, false);
}
private function set bestFree(_arg1:Number):void{
_bestFree = _arg1;
saver.setData("bestFree", _bestFree);
}
function soundPlay(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:Boolean=false){
var _local5:SoundFabric;
if (newVol != 0){
_local5 = new SoundFabric(_arg1, _arg3, 1, (_arg2 * newVol));
};
if (_arg4){
if (musInGame != null){
musInGame.setVol(0);
};
if (_local5 != null){
_local5.sChannel.addEventListener(Event.SOUND_COMPLETE, onCompleteSound);
};
};
}
function setGameMusicClick(_arg1:MouseEvent){
setGameMusic(null, true);
}
public function get userName():String{
return (_userName);
}
function setGameMusic(_arg1:String=null, _arg2:Boolean=false){
var _local3:String;
if ((((currentScreen is Level)) || (_arg2))){
if (musInGame != null){
musInGame.stop();
};
musInGame = null;
};
if (((((!((currentScreen is Level))) && ((musInGame == null)))) || (_arg2))){
_local3 = (_arg1) ? _arg1 : menuMusics[Base.random(menuMusics.length)];
musInGame = new SoundFabric(_local3, 0, 100000, 1);
setMusicVolume();
song_txt.text = _local3;
};
}
function onRollOverSponsor(_arg1){
if (isGaming){
return;
};
batut_mc.gotoAndPlay(2);
}
public function set complete1career(_arg1:Boolean):void{
_complete1career = _arg1;
saver.setData("_complete1career", _complete1career);
}
private function set bestContest(_arg1:Number):void{
_bestContest = _arg1;
saver.setData("bestContest", _bestContest);
}
function showRealMouse(){
Mouse.show();
mouse_mc.visible = false;
stage.removeEventListener(MouseEvent.CLICK, showMyMouse);
}
public function set visualQuality(_arg1:String):void{
_visualQuality = _arg1;
saver.setData("visualQuality", _visualQuality);
}
function get lockedCharacter():Boolean{
if (DocClass.iAm.isOnSponsorSite){
return (false);
};
if (complete1career){
return (false);
};
return (true);
}
function setMensForThisLevel(){
var _local1:*;
_local1 = 0;
while (_local1 <= 5) {
if (pers.fullLevel < _local1){
fon_men_mc[("man" + _local1)].visible = false;
};
_local1++;
};
}
public function set bestResultThisMode(_arg1:Number):void{
if (modeGameWorldContest){
bestContest = _arg1;
} else {
bestFree = _arg1;
};
}
function moveMouse(_arg1:MouseEvent){
mouse_mc.x = mouseX;
mouse_mc.y = mouseY;
_arg1.updateAfterEvent();
}
public function clickCurrentNext(){
if (currentNextBtn != null){
currentNextBtn.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
public function set currentNextBtn(_arg1:MyBtn):void{
_currentNextBtn = _arg1;
if (_currentNextBtn){
_currentNextBtn.Active = true;
};
}
function flushPerson(){
if (pers){
pers.so.flush();
};
}
function startGame(_arg1:ClipPerson=null){
if (_arg1 != null){
pers = _arg1._objPerson;
};
trace(pers);
if ((((pers.professionalLevel >= Game.BONUS_MINIMUM_LEVEL)) && (pers.getEducation(ScreenLetsStart.GUIDE_BONUS)))){
pers.setEducation(ScreenLetsStart.GUIDE_BONUS, false);
goLetsStart(ScreenLetsStart.GUIDE_BONUS);
return;
};
if (((modeGameWorldContest) && (pers.getEducation(ScreenLetsStart.GUIDE_CONTEST)))){
pers.setEducation(ScreenLetsStart.GUIDE_CONTEST, false);
goLetsStart(ScreenLetsStart.GUIDE_CONTEST);
return;
};
myLevel = null;
myLevel = createClassObj("level");
myLevel.myGame = this;
myLevel.myMode = modeGame;
myLevel.modeWorldContest = modeGameWorldContest;
myLevel.contestNum = contestNum;
myLevel.person = pers;
swapFrame(myLevel);
isGaming = true;
Caption = "";
underSndPause_mc.gotoAndStop(2);
}
function goLetsStart(_arg1:Number){
var _local2:ScreenLetsStart;
_local2 = createClassObj("ScreenLetsStart");
_local2.myGame = this;
_local2.guideType = _arg1;
swapFrame(_local2);
Caption = "";
setFonFrame(1);
}
function upBatut(){
batut_mc.gotoAndPlay((upFrame + 1));
}
function swapFrame(_arg1:Base){
var _local2:Boolean;
_local2 = (currentScreen is Level);
if (currentScreen){
currentNextBtn = null;
currentScreen.beforeDelete();
screen_container_mc.removeChild(currentScreen);
currentScreen = null;
};
isGaming = false;
setBackMy(true);
splashFon_mc.visible = false;
splashFon2_mc.visible = false;
underSndPause_mc.gotoAndStop(1);
batut_mc.gotoAndStop(1);
showMyMouse(null);
screen_container_mc.addChild((currentScreen = _arg1));
stage.focus = stage;
setGameMusic(null, _local2);
currentScreen.afterCreate();
}
function set Caption(_arg1:String){
cap_txt.text = ((_arg1)!="") ? Lang.cap(_arg1) : _arg1;
caption_mc.visible = !((_arg1 == ""));
}
public function get complete1career():Boolean{
return (_complete1career);
}
public function get visualQuality():String{
return (_visualQuality);
}
function onClickSound(_arg1:MouseEvent){
if (_arg1.target != sound_no_btn){
newVol = 0;
sound_no_btn.visible = true;
sound_yes_btn.visible = false;
} else {
newVol = 1;
sound_no_btn.visible = false;
sound_yes_btn.visible = true;
};
setMusicVolume();
saver.setData("vol", newVol);
}
function get nowQualities():Array{
return (qualities["high"]);
}
public function get bestResultThisMode():Number{
return ((modeGameWorldContest) ? bestContest : bestFree);
}
function onCompleteSound(_arg1){
setMusicVolume();
}
function goMainMenu(){
var _local1:ScreenMainMenu;
_local1 = createClassObj("ScreenMainMenu");
_local1.myGame = this;
_local1.isFirst = isMainMenuStart;
swapFrame(_local1);
Caption = "";
setBackMy(false);
setFonFrame(1, true);
splashFon_mc.visible = true;
}
function onClickSponsor(_arg1){
if (isGaming){
upBatut();
} else {
batut_mc.gotoAndPlay(2);
};
soundPlay("ElectroBeep");
goToSponsorMain();
}
function showWinOnScreen(_arg1:WindowOnScreen, _arg2:Boolean=true){
if (_arg2){
addChild((currentWindow = _arg1));
currentWindow.afterCreate();
} else {
currentWindow.beforeDelete();
removeChild(currentWindow);
currentWindow = null;
currentScreen.showScreenCurrentBtns();
};
}
function setBackMy(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Boolean=true){
blur_gray_mc.visible = _arg1;
loveToJump_mc.visible = _arg2;
caption_mc.x = (_arg3) ? -80 : 380;
batut_mc.visible = _arg4;
fon_men_mc.gotoAndStop(2);
}
public static function gotoDeveloperSite(_arg1=null){
goToLink(DEVELOPER_SITE);
}
public static function goToSponsorMain(_arg1=null){
goToLink(SPONSOR_MAIN);
}
public static function goToSponsorPlay(_arg1=null){
goToLink(SPONSOR_PLAY);
}
public static function goToDeveloperDownload(_arg1=null){
goToLink(INSTANT_DOWNLOAD);
}
public static function goToLink(_arg1:String):void{
var _local2:URLRequest;
_local2 = new URLRequest(_arg1);
navigateToURL(_local2, "_blank");
}
public static function goToSponsorDownload(_arg1=null){
goToLink(SPONSOR_DOWNLOAD);
}
}
}//package
Section 62
//Graph_L2J2_10_Symbol90 (Graph_L2J2_10_Symbol90)
package {
public dynamic class Graph_L2J2_10_Symbol90 extends MyBtn {
}
}//package
Section 63
//Graph_L2J2_12_Symbol88 (Graph_L2J2_12_Symbol88)
package {
public dynamic class Graph_L2J2_12_Symbol88 extends MyBtn {
}
}//package
Section 64
//Graph_L2J2_12_Symbol88copy (Graph_L2J2_12_Symbol88copy)
package {
public dynamic class Graph_L2J2_12_Symbol88copy extends MyBtn {
}
}//package
Section 65
//Graph_L2J2_13_Symbol87 (Graph_L2J2_13_Symbol87)
package {
public dynamic class Graph_L2J2_13_Symbol87 extends MyBtn {
}
}//package
Section 66
//Graph_L2J2_14_Symbol86 (Graph_L2J2_14_Symbol86)
package {
public dynamic class Graph_L2J2_14_Symbol86 extends MyBtn {
}
}//package
Section 67
//Graph_L2J2_15_Symbol85 (Graph_L2J2_15_Symbol85)
package {
public dynamic class Graph_L2J2_15_Symbol85 extends MyBtn {
}
}//package
Section 68
//Graph_L2J2_29_Symbol72 (Graph_L2J2_29_Symbol72)
package {
public dynamic class Graph_L2J2_29_Symbol72 extends MyBtn {
}
}//package
Section 69
//Graph_L2J2_32_Symbol66 (Graph_L2J2_32_Symbol66)
package {
public dynamic class Graph_L2J2_32_Symbol66 extends MyBtn {
}
}//package
Section 70
//Graph_L2J2_33_Symbol65 (Graph_L2J2_33_Symbol65)
package {
public dynamic class Graph_L2J2_33_Symbol65 extends MyBtn {
}
}//package
Section 71
//Graph_L2J2_6_Symbol94 (Graph_L2J2_6_Symbol94)
package {
public dynamic class Graph_L2J2_6_Symbol94 extends MyBtn {
}
}//package
Section 72
//Graph_L2J2_7_Symbol93 (Graph_L2J2_7_Symbol93)
package {
public dynamic class Graph_L2J2_7_Symbol93 extends MyBtn {
}
}//package
Section 73
//Graph_L2J2_8_Symbol92 (Graph_L2J2_8_Symbol92)
package {
public dynamic class Graph_L2J2_8_Symbol92 extends MyBtn {
}
}//package
Section 74
//Graph_L2J2_9_Symbol91 (Graph_L2J2_9_Symbol91)
package {
public dynamic class Graph_L2J2_9_Symbol91 extends MyBtn {
}
}//package
Section 75
//Graph_L2J2_back (Graph_L2J2_back)
package {
public dynamic class Graph_L2J2_back extends MyBtn {
}
}//package
Section 76
//Graph_L2J2_career2 (Graph_L2J2_career2)
package {
public dynamic class Graph_L2J2_career2 extends MyBtn {
}
}//package
Section 77
//Graph_L2J2_change_jumper2 (Graph_L2J2_change_jumper2)
package {
public dynamic class Graph_L2J2_change_jumper2 extends MyBtn {
}
}//package
Section 78
//Graph_L2J2_competition (Graph_L2J2_competition)
package {
public dynamic class Graph_L2J2_competition extends MyBtn {
}
}//package
Section 79
//Graph_L2J2_contest2 (Graph_L2J2_contest2)
package {
public dynamic class Graph_L2J2_contest2 extends MyBtn {
}
}//package
Section 80
//Graph_L2J2_credits2 (Graph_L2J2_credits2)
package {
public dynamic class Graph_L2J2_credits2 extends MyBtn {
}
}//package
Section 81
//Graph_L2J2_download_game2 (Graph_L2J2_download_game2)
package {
public dynamic class Graph_L2J2_download_game2 extends MyBtn {
}
}//package
Section 82
//Graph_L2J2_download_gameReal (Graph_L2J2_download_gameReal)
package {
public dynamic class Graph_L2J2_download_gameReal extends MyBtn {
}
}//package
Section 83
//Graph_L2J2_freestyle (Graph_L2J2_freestyle)
package {
public dynamic class Graph_L2J2_freestyle extends MyBtn {
}
}//package
Section 84
//Graph_L2J2_jump (Graph_L2J2_jump)
package {
public dynamic class Graph_L2J2_jump extends MyBtn {
}
}//package
Section 85
//Graph_L2J2_jump2 (Graph_L2J2_jump2)
package {
public dynamic class Graph_L2J2_jump2 extends MyBtn {
}
}//package
Section 86
//Graph_L2J2_lang2 (Graph_L2J2_lang2)
package {
public dynamic class Graph_L2J2_lang2 extends MyBtn {
}
}//package
Section 87
//Graph_L2J2_main_menu2 (Graph_L2J2_main_menu2)
package {
public dynamic class Graph_L2J2_main_menu2 extends MyBtn {
}
}//package
Section 88
//Graph_L2J2_menu3 (Graph_L2J2_menu3)
package {
public dynamic class Graph_L2J2_menu3 extends MyBtn {
}
}//package
Section 89
//Graph_L2J2_miss_education3 (Graph_L2J2_miss_education3)
package {
public dynamic class Graph_L2J2_miss_education3 extends MyBtn {
}
}//package
Section 90
//Graph_L2J2_more_games2 (Graph_L2J2_more_games2)
package {
public dynamic class Graph_L2J2_more_games2 extends MyBtn {
}
}//package
Section 91
//Graph_L2J2_moregames2Thin (Graph_L2J2_moregames2Thin)
package {
public dynamic class Graph_L2J2_moregames2Thin extends MyBtn {
}
}//package
Section 92
//Graph_L2J2_play (Graph_L2J2_play)
package {
public dynamic class Graph_L2J2_play extends MyBtn {
}
}//package
Section 93
//Graph_L2J2_play2 (Graph_L2J2_play2)
package {
public dynamic class Graph_L2J2_play2 extends MyBtn {
}
}//package
Section 94
//Graph_L2J2_sponsor (Graph_L2J2_sponsor)
package {
public dynamic class Graph_L2J2_sponsor extends MyBtn {
}
}//package
Section 95
//Graph_L2J2_submit_record2 (Graph_L2J2_submit_record2)
package {
public dynamic class Graph_L2J2_submit_record2 extends MyBtn {
}
}//package
Section 96
//Graph_L2J2_try_again3 (Graph_L2J2_try_again3)
package {
public dynamic class Graph_L2J2_try_again3 extends MyBtn {
}
}//package
Section 97
//Graph_L2J2_world_competition2 (Graph_L2J2_world_competition2)
package {
public dynamic class Graph_L2J2_world_competition2 extends MyBtn {
}
}//package
Section 98
//Graph_L2J2_world_freestyle (Graph_L2J2_world_freestyle)
package {
public dynamic class Graph_L2J2_world_freestyle extends MyBtn {
}
}//package
Section 99
//Graph_L2J2_world_records2 (Graph_L2J2_world_records2)
package {
public dynamic class Graph_L2J2_world_records2 extends MyBtn {
}
}//package
Section 100
//Guitar (Guitar)
package {
import flash.media.*;
public dynamic class Guitar extends Sound {
}
}//package
Section 101
//ico_shape (ico_shape)
package {
public dynamic class ico_shape extends IcoShape {
}
}//package
Section 102
//icoElement (icoElement)
package {
public dynamic class icoElement extends IcoElement {
}
}//package
Section 103
//IcoElement (IcoElement)
package {
import flash.events.*;
import flash.display.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
public class IcoElement extends Base {
public var bonus_txt_:TextField;
var x_txt:TextField;
public var back_mc_:MovieClip;
public var graphShape_mc_:MovieClip;
var bonus_txt:TextField;
public var fon2_mc_:MovieClip;
var startPoint:Point;
var graphShape_mc:MovieClip;
public var arrow_mc_:MovieClip;
var showFon:Boolean;// = false
var nextElement:IcoElement;
var sideName:String;
var k_txt:TextField;
protected var _isDone:Boolean;// = false
var fon2_mc:MovieClip;
public var fon_mc_:MovieClip;
var myLevel:Level;
public var k_txt_:TextField;
var fon_mc:MovieClip;
var person:Person;
public var youMade_txt_:TextField;
var shortSpecName:String;// = ""
var youMade_txt:TextField;
var glow_mc:MovieClip;
var isShowKey:Boolean;// = true
var arrow_mc:MovieClip;
var elem:TheShape;
var intDisapp:int;
var shortRot:Number;
public var glow_mc_:MovieClip;
var spec_txt:TextField;
var back_mc:MovieClip;
public var spec_txt_:TextField;
static var curPerson:Person;
static var curElement:IcoElement;
public function IcoElement(){
var _local1:BlurFilter;
shortSpecName = "";
isShowKey = true;
showFon = false;
_isDone = false;
super();
fromMyClip("x_txt");
fromMyClip("spec_txt");
fromMyClip("k_txt");
fromMyClip("youMade_txt");
fromMyClip("bonus_txt");
fromMyClip("arrow_mc");
fromMyClip("back_mc");
fromMyClip("graphShape_mc");
fromMyClip("glow_mc");
fromMyClip("fon_mc");
fromMyClip("fon2_mc");
bonus_txt.text = "";
glow_mc.visible = false;
fon_mc.visible = false;
fon2_mc.visible = false;
_local1 = new BlurFilter(0, 0, 1);
if (person == null){
person = curPerson;
generateRandom(person.professionalLevel, 999);
};
cacheAsBitmap = true;
}
function showYouMade(){
youMade_txt.text = (Lang.txt("youMade") + "");
}
function disappearInSomeTime(_arg1:Number){
intDisapp = setTimeout(disappearFull, (_arg1 * 1000));
}
private function showMeCurrent(_arg1:Boolean=true){
glow_mc.visible = _arg1;
if (_arg1){
myLevel.icoSpecial_mc.visible = true;
myLevel.icoSpecial_mc.showMyStateSpecial(this);
} else {
myLevel.icoSpecial_mc.visible = false;
};
}
function generateRandom(_arg1:Number, _arg2:Number){
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
sideName = ((Math.random())>0.5) ? "front" : "back";
if (person.kAllowShapes < 2){
_local3 = 0;
} else {
_local3 = (Base.random((person.kAllowShapes - 1)) + 1);
};
elem = TheShape.allShapes[person.allowShapes[_local3]];
_local4 = ((_arg2)==999) ? 0 : person.getDifficultAdd(myLevel.myMode, myLevel.modeWorldContest);
_arg1 = person.professionalLevel;
_local5 = ((elem.speedRotate - 1) * ((_arg1 * 0.2) + 1.3));
_local6 = ((_arg1 + _local4) / 2);
shortRot = Math.round(((_local6 + _local5) + (Math.random() * 0.5)));
showMe();
}
function get hashName(){
return (getHashName(sideName, shortRot, elem, shortSpecName));
}
function onCompleteAlphaDecrease(){
Tweener.removeAllTweens();
}
function disappearFull(){
clearTimeout(intDisapp);
alpha = 0;
dalpha(null);
}
function get colorTrans():ColorTransform{
var _local1:Boolean;
_local1 = ((shortRot % 2) == 0);
return (new ColorTransform(1, (_local1) ? 1 : 0.6, (_local1) ? 1 : 0));
}
function get hashNotSpecName(){
return (getHashName(sideName, shortRot, elem, ""));
}
function showMyStateSpecial(_arg1:IcoElement=null){
if (_arg1 != null){
sideName = _arg1.sideName;
elem = _arg1.elem;
shortRot = _arg1.shortRot;
};
showMe();
back_mc.visible = false;
graphShape_mc.visible = (shortRot == 0);
arrow_mc.visible = (k_txt.visible = (shortRot > 0));
graphShape_mc.x = (k_txt.x + 0);
alpha = 0.9;
Tweener.addTween(this, {alpha:0, time:0.7, transition:"easeInCubic", onComplete:onCompleteAlphaDecrease});
}
function setDone(){
_isDone = true;
alpha = 0;
}
function showBonusText(_arg1:String, _arg2:Number){
bonus_txt.text = (((_arg1 + " +") + _arg2.toString()) + "!");
bonus_txt.setTextFormat(new TextFormat(null, null, 0xFFFFFF), 0, _arg1.length);
}
function showMe(){
graphShape_mc.gotoAndStop(elem.myName);
k_txt.text = shortRot.toString();
arrow_mc.gotoAndStop(((sideName)=="back") ? 1 : 2);
arrow_mc.visible = (shortRot >= 1);
fon2_mc.visible = (fon_mc.visible = showFon);
k_txt.transform.colorTransform = colorTrans;
arrow_mc.transform.colorTransform = colorTrans;
if (isShowKey){
if (elem.myName == "straight"){
spec_txt.text = "";
} else {
spec_txt.text = "";
};
} else {
spec_txt.text = "";
};
if (shortSpecName != ""){
spec_txt.text = specNames(shortSpecName);
};
}
function dalpha(_arg1){
alpha = (alpha - 0.05);
if (alpha <= 0){
alpha = 0;
removeEventListener(Event.ENTER_FRAME, dalpha);
parent.removeChild(this);
};
}
function showJumpPoints(_arg1:String){
youMade_txt.text = _arg1;
}
function becomeCurrent(){
if (curElement != null){
curElement.showMeCurrent(false);
curElement = null;
};
curElement = this;
this.showMeCurrent(true);
}
public function get isDone():Boolean{
return (_isDone);
}
function savePosition(){
startPoint = new Point(x, y);
}
static function specNames(_arg1:String){
return (Lang.txt(_arg1));
}
private static function getHashName(_arg1:String, _arg2:Number, _arg3:TheShape, _arg4:String):String{
return ((((((_arg2)>0) ? _arg1 : "" + _arg2.toString()) + _arg3.myName) + ((_arg4)!="") ? ("_" + _arg4) : ""));
}
}
}//package
Section 104
//IcoShape (IcoShape)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class IcoShape extends Base {
protected var myShape_s:String;
public var back_mc_:MovieClip;
var toY:Number;
var interf:InterfaceMan;
public var graphShape_mc_:MovieClip;
public var spec_text_txt_:TextField;
var myKey_s:String;
var toX:Number;
var spec_text_txt:TextField;
var blinkK;// = 1
var tGo:Number;// = 0
var blinkT;// = 0
var graphShape_mc:MovieClip;
var myInd:Number;
var shape:TheShape;
var tAll:Number;// = 30
var toScale:Number;
var modeBtn:Boolean;// = false
var fromScale:Number;
var fromX:Number;
var fromY:Number;
static var activeShapeBtn:IcoShape;
static var dxBtns:Number = 0;
static var dyBtns:Number = 40;
static var startXBtns:Number = 10;
static var startYBtns:Number = 90;
public function IcoShape(){
modeBtn = false;
blinkT = 0;
blinkK = 1;
tAll = 30;
tGo = 0;
super();
scaleX = (scaleY = 0.75);
fromMyClip("spec_text_txt");
fromMyClip("graphShape_mc");
spec_text_txt.text = "";
stop();
}
function going(_arg1){
var _local2:Number;
tGo++;
_local2 = (tAll - tGo);
scaleX = (scaleY = (((fromScale * _local2) + (toScale * tGo)) / tAll));
x = (((fromX * _local2) + (toX * tGo)) / tAll);
y = (((fromY * _local2) + (toY * tGo)) / tAll);
if (tGo == tAll){
removeEventListener(Event.ENTER_FRAME, going);
};
}
function setModeBtn(_arg1:Number){
modeBtn = true;
myInd = _arg1;
x = (startXBtns + (myInd * dxBtns));
y = (startYBtns + (myInd * dyBtns));
scaleX = (scaleY = 0.6);
}
function blinking(_arg1){
if (blinkT > 10){
blinkK = -(blinkK);
alpha = 0;
} else {
if (blinkT < 0){
blinkK = -(blinkK);
alpha = 1;
removeEventListener(Event.ENTER_FRAME, blinking);
addEventListener(Event.ENTER_FRAME, going);
};
};
blinkT = (blinkT + blinkK);
}
function set shapeText(_arg1:String){
myShape_s = _arg1;
shape = TheShape.allShapes[myShape_s];
graphShape_mc.gotoAndStop(myShape_s);
}
}
}//package
Section 105
//InformWindow (InformWindow)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
public class InformWindow extends Base {
public var guide_controls_mc_:MovieClip;
var in_mc:MovieClip;
var guide_controls_mc:MovieClip;
var tStay;// = 5
var x_txt:TextField;
var text:String;
var myLevel:Level;
public var x_txt_:TextField;
var t;// = 0
var startFiltersNum:Number;
var nowEduStadium:Number;
var newText:String;
static var helpWins:Array;
static var kNextEdu:Number = 2;
public function InformWindow(){
tStay = 5;
t = 0;
super();
fromMyClip("in_mc");
fromMyClip("x_txt");
fromMyClip("guide_controls_mc");
visible = false;
mouseEnabled = false;
mouseChildren = false;
x_txt.text = "";
startFiltersNum = x_txt.filters.length;
myInit();
}
protected function blinkOnce(_arg1){
t++;
if (t < 0){
alpha = ((tStay - t) / tStay);
} else {
if (t < (tStay * 2)){
x_txt.text = newText;
alpha = ((t - tStay) / tStay);
} else {
alpha = 1;
visible = true;
removeEventListener(Event.ENTER_FRAME, blinkOnce);
addFilter();
};
};
}
function minusFilter(){
var _local1:Array;
if (x_txt.filters.length == (startFiltersNum + 1)){
_local1 = x_txt.filters;
_local1.pop();
x_txt.filters = _local1;
};
}
function showKey(_arg1:String, _arg2:Boolean){
var _local3:Sprite;
trace("showKey ", _arg1, _arg2);
_local3 = (guide_controls_mc[("bt_" + _arg1)] as Sprite);
_local3.alpha = (_arg2) ? 0.7 : 0.2;
}
function showKeys(_arg1:Array){
var _local2:Array;
var _local3:*;
var _local4:*;
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
guide_controls_mc.visible = false;
return;
};
guide_controls_mc.visible = true;
_local2 = ["left", "right", "up", "down"];
_local3 = 0;
while (_local3 < _local2.length) {
showKey(_local2[_local3], false);
_local3++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
showKey(_arg1[_local4], true);
_local4++;
};
}
function addFilter(){
var _local1:Array;
if (x_txt.filters.length == startFiltersNum){
_local1 = x_txt.filters;
_local1.push(new GlowFilter(0xFFFFFF, 1, 2, 2, 1));
x_txt.filters = _local1;
};
}
function setGuide(_arg1:Person, _arg2:Level, _arg3:Number){
var _local4:Object;
var _local5:String;
var _local6:Array;
var _local7:Array;
var _local8:int;
var _local9:Object;
var _local10:IcoElement;
if (nowEduStadium == _arg3){
return;
};
myLevel = _arg2;
nowEduStadium = _arg3;
_local4 = helpWins[_arg3];
if (_local4 == null){
myLevel.missEducation(null);
return;
};
text = _local4.text;
_local5 = _local4.addShape;
if (_arg3 == 0){
_arg1.setStandardShapes(1);
};
if (_local5 != null){
trace("!!!!");
_arg1.addAllowShape();
};
myLevel.cleanManInterfaceAndElements();
myLevel.stadyEdu();
_local6 = ((_local4.element)!=null) ? [_local4.element] : _local4.elements_arr;
if (_local6 != null){
_local7 = myLevel.generateLevel(_local6.length);
_local8 = 0;
while (_local8 < _local6.length) {
_local9 = _local6[_local8];
if (_local9 != null){
trace(TheShape.allShapes[_local9.elem]);
_local10 = _local7[_local8];
_local10.sideName = _local9.sideName;
_local10.shortRot = _local9.shortRot;
_local10.elem = TheShape.allShapes[_local9.elem];
_local10.person = _arg1;
_local10.showMe();
if (_local8 == 0){
myLevel.nowElems = new Object();
};
trace(_local10.hashName);
myLevel.nowElems[_local10.hashName] = _local10;
};
_local8++;
};
myLevel.icoSpecial_mc.showMyStateSpecial(_local7[0]);
};
showKeys(_local4.btns);
show();
}
function show(){
newText = text;
visible = true;
t = 999999;
blinkOnce(null);
t = 0;
addEventListener(Event.ENTER_FRAME, blinkOnce);
minusFilter();
}
static function t(_arg1:String):String{
return ((Lang.txt(_arg1) + " "));
}
static function ts(_arg1:String):String{
return ((("" + Lang.txt(_arg1)) + " "));
}
static function myInit(){
helpWins = [{element:null, text:t("startEducation"), addShape:null}, {element:null, text:((((t("hold") + ts("left")) + t("or_")) + ts("right")) + t("toRotate")), btns:["left", "right"], addShape:null}, {element:null, text:((((t("stand") + t("beStraight")) + t("before")) + t("every_new_")) + t("jump")), addShape:null}, {element:{shortRot:0, elem:"pike"}, text:(((t("hold") + ts("up")) + t("inFlight")) + t("toShape")), btns:["up"], addShape:"pike"}, {element:{sideName:"front", shortRot:1, elem:"tuck"}, text:(((((t("hold") + ts("left")) + t("and")) + ts("up")) + t("toRotate")) + t("inSomeShape")), btns:["left", "up"], addShape:"tuck"}, {element:{sideName:"back", shortRot:1, elem:"pike"}, text:((((((t("hold") + ts("right")) + t("and")) + ts("up")) + t("toRotate")) + t("back")) + t("inSomeShape")), btns:["right", "up"], addShape:null}, {elements_arr:[{sideName:"back", shortRot:0, elem:"pike"}, {sideName:"front", shortRot:1, elem:"tuck"}, {sideName:"back", shortRot:1, elem:"straddle"}], text:t("exec2"), addShape:"straddle"}];
}
}
}//package
Section 106
//interfaceMan (interfaceMan)
package {
public dynamic class interfaceMan extends InterfaceMan {
}
}//package
Section 107
//InterfaceMan (InterfaceMan)
package {
import flash.events.*;
import flash.ui.*;
public class InterfaceMan extends Base {
var myMan:Man;
var notDigit:Number;// = 1
var isQuickRotate:Boolean;// = false
var isQuickSpeed:Boolean;// = false
var randomShapeNow:String;
var person:Person;
var bonusName:String;
var keyUnBonusAlternative:uint;
var shapeButtons:Array;
var shapeInd:Number;// = 0
var keyForCurrentElement:uint;
var keyUniversalBonus:uint;
var isSlowMotion:Boolean;// = false
var randomShapePrev:String;
public function InterfaceMan(){
shapeButtons = [];
shapeInd = 0;
notDigit = 1;
isSlowMotion = false;
isQuickRotate = false;
isQuickSpeed = false;
super();
keyForCurrentElement = Keyboard.UP;
keyUniversalBonus = Keyboard.SPACE;
keyUnBonusAlternative = Keyboard.DOWN;
}
function initMy(){
var _local1:*;
var _local2:*;
var _local3:String;
var _local4:IcoShape;
stage.focus = stage;
removeKeyListeners();
addKeyListeners();
_local1 = 0;
while (_local1 < shapeButtons.length) {
removeChild(shapeButtons[_local1]);
_local1++;
};
shapeButtons = [];
_local2 = 0;
while (_local2 < person.allowShapes.length) {
_local3 = person.allowShapes[_local2];
_local4 = new (Base.getClass("ico_shape"));
_local4.setModeBtn(_local2);
_local4.myKey_s = TheShape.keyByIndex(_local2);
_local4.shapeText = _local3;
_local4.interf = this;
_local4.visible = false;
addChild(_local4);
shapeButtons.push(_local4);
_local2++;
};
setShape(TheShape.straight);
}
function slowMotion(_arg1:Boolean){
if (_arg1 != isSlowMotion){
isSlowMotion = _arg1;
myMan.myLevelL.slowMotion(_arg1);
};
}
function pressShape(){
var _local1:Level;
_local1 = (myMan.myLevel as Level);
if (((!((_local1.myMode == "quick"))) && (!(_local1.isGoodFullMode)))){
setShape_s(IcoElement.curElement.elem.myName);
} else {
if (randomShapeNow == null){
do {
randomShapeNow = myMan.person.getMyRandomShape();
} while (randomShapePrev == randomShapeNow);
};
setShape_s(randomShapeNow);
};
}
function removeKeyListeners(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, lookKeyBoard);
stage.removeEventListener(KeyboardEvent.KEY_UP, lookKeyUp);
}
function enableBonus(_arg1:Boolean){
if (bonusName == null){
return;
};
myMan.myLevelL.enableBonus(bonusName, _arg1);
bonusName = null;
}
function getBonus(_arg1:String){
bonusName = _arg1;
}
function releaseBonus(){
enableBonus(false);
}
function stopInterFace(){
setShape_s(person.allowShapes[0]);
myMan.rotate(0);
removeKeyListeners();
}
function releaseRotate(_arg1:Boolean){
myMan.rotate(0);
}
function quickSpeed(_arg1:Boolean){
if (_arg1 != isQuickSpeed){
isQuickSpeed = _arg1;
myMan.myLevelL.quickSpeed(_arg1);
};
}
function lookKeyUp(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case Keyboard.LEFT:
case Keyboard.RIGHT:
releaseRotate((_arg1.keyCode == Keyboard.LEFT));
break;
case keyUniversalBonus:
case keyUnBonusAlternative:
releaseBonus();
break;
case keyForCurrentElement:
releaseShape();
break;
default:
switch (_arg1.charCode){
case "a".charCodeAt(0):
case "A".charCodeAt(0):
case "d".charCodeAt(0):
case "D".charCodeAt(0):
releaseRotate((((_arg1.charCode == "a".charCodeAt(0))) || ((_arg1.charCode == "A".charCodeAt(0)))));
break;
case "s".charCodeAt(0):
case "S".charCodeAt(0):
releaseBonus();
break;
case "w".charCodeAt(0):
case "W".charCodeAt(0):
releaseShape();
break;
default:
if (ifPressAllowNum(_arg1)){
setShape(TheShape.straight);
};
break;
};
break;
};
}
function setShape(_arg1:TheShape){
var _local2:*;
if (IcoShape.activeShapeBtn != null){
IcoShape.activeShapeBtn.gotoAndStop(1);
};
_local2 = 0;
while (_local2 < shapeButtons.length) {
if ((shapeButtons[_local2] as IcoShape).shape == _arg1){
IcoShape.activeShapeBtn = shapeButtons[_local2];
IcoShape.activeShapeBtn.gotoAndStop(2);
shapeInd = _local2;
break;
};
_local2++;
};
myMan.gotoShape(_arg1);
}
function lookKeyBoard(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case Keyboard.LEFT:
case Keyboard.RIGHT:
pressRotate((_arg1.keyCode == Keyboard.LEFT));
break;
case keyUniversalBonus:
case keyUnBonusAlternative:
pressBonus();
break;
case keyForCurrentElement:
pressShape();
break;
default:
switch (_arg1.charCode){
case "a".charCodeAt(0):
case "A".charCodeAt(0):
case "d".charCodeAt(0):
case "D".charCodeAt(0):
pressRotate((((_arg1.charCode == "a".charCodeAt(0))) || ((_arg1.charCode == "A".charCodeAt(0)))));
break;
case "s".charCodeAt(0):
case "S".charCodeAt(0):
pressBonus();
break;
case "w".charCodeAt(0):
case "W".charCodeAt(0):
pressShape();
break;
default:
if (ifPressAllowNum(_arg1)){
shapeInd = ((_arg1.keyCode - 49) + notDigit);
setShape_s(person.allowShapes[shapeInd]);
};
break;
};
break;
};
}
function quickRotation(_arg1:Boolean){
if (_arg1 != isQuickRotate){
isQuickRotate = _arg1;
myMan.myLevelL.quickRotation(_arg1);
};
}
function setShape_s(_arg1:String){
setShape(TheShape.allShapes[_arg1]);
}
function pressBonus(){
enableBonus(true);
}
function ifPressAllowNum(_arg1:KeyboardEvent):Boolean{
return ((((((_arg1.keyCode >= 49)) && ((_arg1.keyCode < 58)))) && (((_arg1.keyCode - 49) < (person.allowShapes.length - notDigit)))));
}
function pressRotate(_arg1:Boolean){
myMan.rotate((_arg1) ? -1 : 1);
}
function releaseShape(){
randomShapePrev = randomShapeNow;
randomShapeNow = null;
setShape(TheShape.straight);
}
function addKeyListeners(){
stage.addEventListener(KeyboardEvent.KEY_DOWN, lookKeyBoard);
stage.addEventListener(KeyboardEvent.KEY_UP, lookKeyUp);
}
}
}//package
Section 108
//L2_arm2 (L2_arm2)
package {
public dynamic class L2_arm2 extends BodyPart {
}
}//package
Section 109
//L2_body (L2_body)
package {
public dynamic class L2_body extends BodyPart {
}
}//package
Section 110
//L2_foot2 (L2_foot2)
package {
public dynamic class L2_foot2 extends BodyPart {
}
}//package
Section 111
//L2_hand2 (L2_hand2)
package {
public dynamic class L2_hand2 extends BodyPart {
}
}//package
Section 112
//L2_head2 (L2_head2)
package {
public dynamic class L2_head2 extends BodyPart {
}
}//package
Section 113
//L2_heap2 (L2_heap2)
package {
public dynamic class L2_heap2 extends BodyPart {
}
}//package
Section 114
//L2_leg2 (L2_leg2)
package {
public dynamic class L2_leg2 extends BodyPart {
}
}//package
Section 115
//L2_shoulder2 (L2_shoulder2)
package {
public dynamic class L2_shoulder2 extends BodyPart {
}
}//package
Section 116
//Lang (Lang)
package {
public class Lang {
var spa:String;
var rus:String;
var ger:String;
var eng:String;
protected static var Buttons:Object;
protected static var allowLangs:Array = ["eng"];
protected static var Texts:Object;
protected static var Captions:Object;
static var curLang:String;
protected static var _curLangInd:Number;
public function Lang(_arg1:String, _arg2:String=null, _arg3:String=null, _arg4:String=null){
eng = _arg1;
spa = (_arg4) ? _arg4 : _arg1;
ger = (_arg3) ? _arg3 : _arg1;
rus = (_arg2) ? _arg2 : _arg1;
}
function get text():String{
return (this[curLang]);
}
static function swapLanguage(_arg1:Number=-1):Number{
if (_arg1 == -1){
curLangInd++;
if (curLangInd >= allowLangs.length){
curLangInd = 0;
};
} else {
curLangInd = _arg1;
};
curLang = allowLangs[curLangInd];
return (curLangInd);
}
static function get curLangInd():Number{
return (_curLangInd);
}
static function btn(_arg1:String):String{
var _local2:Lang;
_local2 = (Buttons[_arg1] as Lang);
if (_local2 != null){
return (_local2.text);
};
return (txt(_arg1));
}
static function txt(_arg1:String):String{
var _local2:Lang;
_local2 = (Texts[_arg1] as Lang);
if (_local2 != null){
return (_local2.text);
};
return (_arg1);
}
static function cap(_arg1:String):String{
var _local2:Lang;
_local2 = (Captions[_arg1] as Lang);
if (_local2 != null){
return (_local2.text);
};
return (txt(_arg1));
}
static function set curLangInd(_arg1:Number){
_curLangInd = _arg1;
}
static function init(_arg1:Number=-1){
swapLanguage(_arg1);
Buttons = {myCarrier:new Lang("My Career", "Моя карьера"), freeStyle:new Lang("World Freestyle", "Мировой фристайл"), worldCompetition:new Lang("World competition", "Мировое соревнование"), next:new Lang("Next", "Дальше"), menu:new Lang("Menu", "Меню"), mainMenu:new Lang("Main menu", "Главное меню"), play:new Lang(" Play", " Игра"), download:new Lang("Embed game", "Загрузить игру"), moreGames:new Lang("More games", "Ещё игры"), newGame:new Lang("New game", "Новая игра"), changePers:new Lang("Change jumper", "Сменить прыгуна"), toStar:new Lang("Competition!", "Соревнование!"), exit:new Lang("Exit", "Выход"), again:new Lang("Again", "Ещё раз"), cancel:new Lang("Cancel", "Отмена"), submit:new Lang("Submit record", "Выложить рекорд"), go_jump:new Lang("Jump!", "Вперёд!"), missEdu:new Lang("Skip Training", "Пропустить обучение")};
Captions = {victory:new Lang("Victory!", "Победа!"), skillUp:new Lang("Level up", "Повышение уровня"), selectNewElement:new Lang("Select new element", "Выберите новый элемент"), select:new Lang("Select jumper", "Выберите прыгуна"), guide:new Lang("Guide", "Руководство пользователя"), end:new Lang("Finish", "Конец"), levelGood:new Lang("Level complete!", "Уровень пройден!"), levelBad:new Lang("Level fail...", "Уровень не пройден...")};
Texts = {records_free:new Lang("Freestyle records", "Рекорды фристайла"), records_world:new Lang("World records", "Мировые рекорды"), name1:new Lang("Mariana", "Мариана"), name2:new Lang("Arashi", "Араши"), name3:new Lang("Alena", "Алёна"), name4:new Lang("Brayan", "Браян"), evolution:new Lang("Evolution", "Прогресс"), langName:new Lang(" English", " Русский"), myBest:new Lang("My best", "Личный рекорд"), newRec:new Lang("New record!", "Новый рекорд!"), result:new Lang("My result", "Мой результат"), credits:new Lang("Credits", "Авторы"), enterName:new Lang("Enter your name", "Введите Ваше имя"), tryAgain:new Lang("Try again", "Ещё раз"), SelectDif:new Lang("Select difficulty", "Выберите сложность"), diff_easy:new Lang("Easy", "Лёгкая"), diff_normal:new Lang("Normal", "Нормальная"), diff_hard:new Lang("Hard", "Трудная"), time:new Lang("Time", "Время"), and:new Lang("and", "и"), in_:new Lang("in", "в"), or_:new Lang("or", "или"), repeat:new Lang("repeated", "повтор"), power:new Lang("Power", "Сила"), rotation:new Lang("Rotation", "Вращение"), points:new Lang("Points", "Очки"), points2:new Lang("points", "очков"), pointsLevel:new Lang("Points for level", "Очков за уровень"), pointsBonusTime:new Lang("Time bonus", "Бонус за время"), pointsTotal:new Lang("Total points", "Всего очков"), down:new Lang("down", "вниз"), up:new Lang("up", "вверх"), left:new Lang("left", "влево"), right:new Lang("right", "вправо"), space:new Lang("space", "пробел"), funClub:new Lang("Fan-zone", "Фан-клуб"), youMade:new Lang("You made", "Вы сделали"), creditsText0:new Lang("<font color='#FFFFFF'>Develop</font> \r ", "Разработка - "), creditsText1:new Lang(("\r\r" + "<font color='#FFFFFF'>Graphics</font> \r "), (" \n" + "Графика - ")), creditsText2:new Lang(((" \r\r" + "<font color='#FFFFFF'>Sounds</font> \r FlashKit.com \r\r") + "<font color='#FFFFFF'>Team</font> \r "), ((" \n" + "Музыка - FlashKit.com \n") + "Команда - ")), front:new Lang("front", "вперёд"), back:new Lang("back", "назад"), ballin:new Lang("on the back", "на спину"), ballout:new Lang("from the back", "со спины"), bonus_slowMotion:new Lang("Slow Motion", "Замедление времени"), bonus_quickSpeed:new Lang("Big Power", "Большая сила"), bonus_quickRotation:new Lang("Quick Rotation", "Быстрое вращение"), startEducation:new Lang("Let us start Training!", "Начнём обучение!"), stand:new Lang("stand", "станьте"), beStraight:new Lang("straight", "прямо"), before:new Lang("before", "перед"), every_new_:new Lang("every new", "каждым новым"), jump:new Lang("jump", "прыжком"), elementsOnTop:new Lang("Elements, that you need to do, will appear overhead.", "Элементы, которые Вам нужно сделать, появляются наверху."), exec1elementOnTop:new Lang("Execute element overhead. ", "Выполните элемент наверху. "), hold:new Lang("Hold", "Держите"), inFlight:new Lang("in flight", "в полёте"), toShape:new Lang("to pose", "чтобы принять какое-то положение"), inSomeShape:new Lang("in some pose", "в каком-нибудь положении"), toRotate:new Lang("to rotate", "чтобы сделать оборот"), guide:new Lang((" \nStart Your Career!\n\n" + " Ececute <u>imperative</u> elements. \n\n Then get more points in <u>freestyle</u>. \n\n"), (" Выполните обязательные элементы. После этого Вам нужно набрать дополнительно очки в фристайле. \n\n" + " Если Вы делаете элементы подряд, Вы получаете COMBO-очки.")), guide_bonus:new Lang(((" Touch bonus line to <u>earn</u> bonuses. Press" + " \n\n\nto <u>use</u> bonus!\n\n") + " <u>Tip</u>: stand straight to jump higher so you can reach the bonus line."), (" Попробуйте игровые бонусы!\n\n Чтобы получить бонус, коснитесь бонусной линии вверху.\n\n" + " Нажмите ВНИЗ, чтобы использовать бонус.")), guide_contest:new Lang(((((" <u>World competition</u> consist of 3 rounds:\n\n" + "<font color='#C75A12'>1. Complete big imperative program.</font>\n\n") + "<font color='#F4F41B'>2. Complete short imperative program and get more points.</font>\n\n") + "<font color='#DAFBBB'>3. Enjoy freestyle!</font>\n\n") + " <u>ATTENTION!</u> If you dont complete any round, you come back to the beginning of competition. Good luck!"), (((" Мировое соревнование состоит из 3 этапов:\n\n" + "1. Выполните большую обязательную программу.\n\n") + "2. Выполните короткую обязательную программу и наберите достаточно очков.\n\n") + "3. Фристайл!\n\n")), tipNeed1star:new Lang("You need 1 medal", "Требуется 1 медаль"), tipNeed2star:new Lang("You need 2 medals", "Требуется 2 медали"), tipNeed3star:new Lang("You need 3 medals", "Требуется 3 медали"), tipNeed4star:new Lang("You need 4 medals", "Требуется 4 медали"), tipNeed5star:new Lang("You need 5 medals", "Требуется 5 медалей"), tipFullStart:new Lang("Start", "Начать"), tipFullContinue:new Lang("Continue", "Продолжить"), tipFull:new Lang("Start more difficult game?", "Начать более сложную игру?"), tipFreestyleDescr:new Lang("Just freestyle", ""), tipContestDescr:new Lang("3 Rounds to beat the high score!", "3 уровня без права на ошибку :)"), tryHard:new Lang("Try high difficulty ;)", "Попробуйте высокую сложность ;)"), keyBonus:new Lang("press DOWN or SPACE key to use bonus", "нажмите клавишу ВНИЗ или ПРОБЕЛ"), badLanding:new Lang("Bad landing", "Неправильное приземление"), allDone:new Lang("Now freestyle!", "А теперь - фристайл!"), exec2:new Lang("Execute 3 imperative elements", "Выполните 3 обязательных элемента"), readyContestNum:new Lang("Ready to round", "Готовы к уровню"), contestFinish1:new Lang("Round 1 complete"), contestFinish2:new Lang("Round 2 complete"), flyFromBatut:new Lang("You flight out from trampoline!", "Вы вылетели с батута!"), badFullMode:new Lang("Imperative program not complete", "Обязательная программа не выполнена"), notEnoughScore:new Lang("You need more points to progress", "Вы набрали недостаточно очков"), tuck:new Lang("Tuck", "Группировка"), pike:new Lang("Pike", "Согнувшись"), straight:new Lang("Straight", "Прогнувшись"), straddle:new Lang("Straddle", "Шпагат"), tilt:new Lang("Tilt", "Наклон"), swallow:new Lang("Swallow", "Ласточка"), wheel:new Lang("Wheel", "Колесо"), ring:new Lang("Ring", "Кольцо"), triangle:new Lang("Triangle", "Треугольник"), fife:new Lang("Fife", "Дудка"), freefall:new Lang("Free fall", "Свободное падение"), hurdle:new Lang("Hurdle", "Барьер"), prayer:new Lang("Prayer", "Молитва"), knees:new Lang("Knees", "Колени")};
}
}
}//package
Section 117
//level (level)
package {
public dynamic class level extends Level {
}
}//package
Section 118
//Level (Level)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class Level extends ManScreen {
const TIME_BONUS:Number = 7;
public var exit_btn_:Graph_L2J2_menu3;
public var try_again_btn_:Graph_L2J2_try_again3;
var tBonus:Number;
public var allDone_mc_:MovieClip;
var myMan:Man;
public var myMan_:man;
public var time_txt_:TextField;
public var total_txt_:TextField;
public var batut_pre_mc_:MovieClip;
public var pause_btn_:MovieClip;
var stars_mc:MovieClip;
var intervalT:Number;
var bonusNow:String;
public var batut_mc_:MovieClip;
public var nextElementPointer_mc_:MovieClip;
var batut_mc:MovieClip;
var nextElementPointer_mc:MovieClip;
var timeAtStart:Number;
var scoreMin:Number;
var modeWorldContest:Boolean;
public var interfMan_:interfaceMan;
var performanceScore:Number;
public var nextEdu_btn_:Graph_L2J2_33_Symbol65;
var imperativeCount:Number;
var intEndLevel:Number;
var pauseBlocker_mc:MovieClip;
var allDone_mc:MovieClip;
public var elem_txt_:TextField;
public var bigText_txt_:TextField;
var fpsK:Number;// = 1
public var stars_mc_:MovieClip;
var infWindowUnder_mc:MovieClip;
var pause_btn:MovieClip;
public var quality_btn_:MovieClip;
var bonusLine_mc:MovieClip;
var tModeContest;// = 40
var perfWereAlready:Object;
var isPause:Boolean;// = false
var total_txt:TextField;
var isGoodFullMode:Boolean;
var fps:Number;
var nextEl:IcoElement;
var showYouMadeK;// = 10
var quality_btn:MovieClip;
var quickRotationK:Number;// = 1
var tQuickMode;// = 30
public var quality_txt_:TextField;
var quality_txt:TextField;
var quickSpeedK:Number;// = 1
public var icoSpecial_mc_:icoElement;
var bad_txt:TextField;
var lastPoints:Number;
var miss_education_btn:MyBtn;
var person:Person;
var icoSpecial_mc:IcoElement;
public var bonusEffect_mc_:MovieClip;
public var miss_education_btn_:Graph_L2J2_miss_education3;
var infWindow_mc:InformWindow;
var tFullMode;// = 25
var clock_mc:MovieClip;
var myMode:String;
public var infWindowUnder_mc_:MovieClip;
var try_again_btn:MyBtn;
public var infWindow_mc_:InformWindow;
var isBonusNow:Boolean;// = false
var bigText_txt:TextField;
var nowElems:Object;
var bonusEffect_mc:MovieClip;
var fullT:Number;
var exit_btn:MyBtn;
var myGame:Game;
var elem_txt:TextField;
var pointsK;// = 10
public var levelBack_mc:MovieClip;
public var clock_mc_:MovieClip;
var contestNum:Number;
var levelEnding:Boolean;// = false
var batut_pre_mc:MovieClip;
public var bad_txt_:TextField;
public var pauseBlocker_mc_:MovieClip;
var nextEdu_btn:MyBtn;
var interfMan:InterfaceMan;
var eduNum:Number;// = 0
public var bonusLine_mc_:MovieClip;
var time_txt:TextField;
static const BONUS_POWER:String = "quickSpeed";
static const BONUS_SLOMO:String = "slowMotion";
static const bonusNames:Array = [BONUS_SLOMO, BONUS_POWER, BONUS_ROTATION];
static const BONUS_ROTATION:String = "quickRotation";
public function Level(){
tFullMode = 25;
tQuickMode = 30;
tModeContest = 40;
eduNum = 0;
isPause = false;
fpsK = 1;
quickSpeedK = 1;
quickRotationK = 1;
isBonusNow = false;
levelEnding = false;
pointsK = 10;
showYouMadeK = 10;
super();
trace(this);
}
function updateTimer(_arg1){
var _local2:Number;
fullT = (fullT - (fpsK / fps));
if (fullT <= 0){
fullT = 0;
endThisLevel();
};
if (isBonusNow){
tBonus = (tBonus - (1 / fps));
if (tBonus <= 0){
tBonus = 0;
onBonusTimer(null);
};
};
_local2 = Math.ceil(fullT);
time_txt.text = _local2.toString();
clock_mc.gotoAndStop((Math.round(((1 - (_local2 / timeAtStart)) * clock_mc.totalFrames)) - 1));
}
override function beforeDelete(){
clearInterval(intEndLevel);
quality_btn.removeEventListener(MouseEvent.CLICK, clickQuality);
quality_btn.removeEventListener(MouseEvent.ROLL_OVER, showTipQualityYes);
quality_btn.removeEventListener(MouseEvent.ROLL_OUT, showTipQualityNo);
exit_btn.removeEventListener(MouseEvent.CLICK, exitClick);
miss_education_btn.removeEventListener(MouseEvent.CLICK, missEducation);
try_again_btn.removeEventListener(MouseEvent.CLICK, tryAgain);
nextEdu_btn.removeEventListener(MouseEvent.CLICK, nextEdu);
pauseBlocker_mc.removeEventListener(MouseEvent.CLICK, pauseOff);
pause_btn.removeEventListener(MouseEvent.CLICK, pauseChange);
stopTimerManInterface();
nowElems = null;
myMan.beforeDelete();
IcoElement.curElement = null;
}
function missEducation(_arg1){
person.setStandardShapes(4);
myMan.g = myMan.startG;
person.isEducation = false;
myGame.saver.setData("wasEdu1", true);
myGame.goLetsStart(ScreenLetsStart.GUIDE_COMMON);
}
function getNextActiveElement(_arg1:Boolean=false):IcoElement{
var _local2:IcoElement;
_local2 = IcoElement.curElement;
if (_arg1){
_local2 = _local2.nextElement;
if (_local2 == null){
return (null);
};
};
while (((!((_local2.nextElement == null))) && (_local2.isDone))) {
_local2 = _local2.nextElement;
};
if (_local2.isDone){
return (null);
};
return (_local2);
}
function stopAllBeforeQuit(_arg1:String){
stopTimerManInterface();
if (_arg1 != null){
bigText_txt.text = Lang.txt(_arg1);
};
intEndLevel = setInterval(endThisLevel, 2000);
}
function setCurrentElement(_arg1:IcoElement){
_arg1.becomeCurrent();
_arg1.back_mc.alpha = 1;
nextEl = getNextActiveElement(true);
showLabelNext(false);
}
function clickQuality(_arg1){
var _local2:Number;
_local2 = ((quality_btn.currentFrame)==1) ? 2 : 1;
quality_btn.gotoAndStop(_local2);
stage.quality = ((_local2)==1) ? StageQuality.HIGH : StageQuality.MEDIUM;
myGame.visualQuality = stage.quality;
showTipQuality(true);
}
function quickSpeed(_arg1:Boolean){
bonusVisual(BONUS_POWER, _arg1);
if (_arg1){
quickSpeedK = 1.2;
} else {
quickSpeedK = 1;
};
}
function enableBonus(_arg1:String, _arg2:Boolean){
bonusLine_mc.visible = false;
switch (_arg1){
case BONUS_SLOMO:
slowMotion(_arg2);
break;
case BONUS_POWER:
quickSpeed(_arg2);
break;
case BONUS_ROTATION:
quickRotation(_arg2);
break;
};
isBonusNow = _arg2;
myMan.showBonus(_arg2, _arg1);
if (_arg2){
bonusNow = _arg1;
tBonus = TIME_BONUS;
myGame.soundPlay("Techno", 0.3);
} else {
myGame.soundPlay("Slide", 0.5);
};
}
function showTipQualityYes(_arg1){
showTipQuality(true);
}
function getBonus(){
var _local1:String;
_local1 = bonusNames[random(bonusNames.length)];
bonusVisual(_local1, true, true);
interfMan.getBonus(_local1);
}
function showTipQualityNo(_arg1){
showTipQuality(false);
}
function addIcoElecent(_arg1:Number, _arg2:Number, _arg3:Number=0):IcoElement{
var _local4:IcoElement;
var _local5:Number;
var _local6:Number;
_local4 = new (Base.getClass("icoElement"));
addChildAt(_local4, (getChildIndex(bonusEffect_mc) + 1));
_local4.scaleX = (_local4.scaleY = 0.9);
_local4.x = (310 + (85 * (((-(_arg2) / 2) + _arg1) + 0.5)));
if (person.isEducation){
_local4.x = (_local4.x - 200);
};
_local4.y = 10;
_local4.savePosition();
_local4.myLevel = this;
_local4.person = person;
_local5 = 0;
_local6 = 20;
do {
_local4.generateRandom(person.professionalLevel, _arg1);
_local5++;
} while (((!((nowElems[_local4.hashName] == null))) && ((_local5 < _local6))));
if (_local5 >= _local6){
removeChild(_local4);
return (null);
};
nowElems[_local4.hashName] = _local4;
return (_local4);
}
function quickRotation(_arg1:Boolean){
bonusVisual(BONUS_ROTATION, _arg1);
if (_arg1){
quickRotationK = 1.15;
} else {
quickRotationK = 1;
};
}
function onHitBatut(){
myGame.playBatut();
}
function tryAgain(_arg1){
myGame.startGame();
}
function showTipQuality(_arg1:Boolean){
quality_txt.text = (_arg1) ? ("Quality: " + myGame.visualQuality) : "";
}
function onUpBatut(){
myGame.upBatut();
}
function stadyEdu(){
if ((((myMode == "full")) && (person.isEducation))){
infWindow_mc.setGuide(person, this, eduNum);
};
}
function showPts(){
total_txt.text = (((Lang.txt("pointsTotal") + " ") + performanceScore.toString()) + ((scoreMin)>0) ? ("/" + scoreMin) : "");
}
function bonusVisual(_arg1:String, _arg2:Boolean, _arg3:Boolean=false){
bonusEffect_mc.visible = _arg2;
bonusEffect_mc.bonusDown_mc.visible = !(_arg3);
bonusEffect_mc.tip_txt.visible = _arg3;
bonusEffect_mc.tip_txt.text = ((person.professionalLevel <= 2)) ? Lang.txt("keyBonus") : "\n\n\nBonus";
bonusEffect_mc.bonus_text_mc.gotoAndPlay(1);
bonusEffect_mc.bonus_text_mc.in_mc.x_txt.text = Lang.txt(("bonus_" + _arg1));
bonusEffect_mc.gotoAndStop(_arg1);
bonusEffect_mc.bonusDown_mc.gotoAndStop(_arg1);
}
function cleanManInterfaceAndElements(){
var _local1:*;
isGoodFullMode = false;
perfWereAlready = new Object();
performanceScore = 0;
for (_local1 in nowElems) {
if (nowElems[_local1]){
removeChild(nowElems[_local1]);
};
};
nowElems = [];
elem_txt.text = "";
if (!person.isEducation){
showPts();
};
interfMan.initMy();
}
function endThisLevel(){
levelEnding = true;
myGame.lastResult = performanceScore;
if (!isGoodFullMode){
myGame.causeOfLoose = "badFullMode";
} else {
if (performanceScore < scoreMin){
myGame.causeOfLoose = "notEnoughScore";
} else {
myGame.causeOfLoose = null;
};
};
if ((((myMode == "quick")) || (modeWorldContest))){
myGame.goEnd();
} else {
myGame.goAfterLevel(isGoodFullMode);
};
}
function lookBonus(){
if (((bonusLine_mc.hitTestObject(myMan)) && (bonusLine_mc.visible))){
bonusLine_mc.visible = false;
getBonus();
};
}
function stopTimerManInterface(_arg1:Boolean=true){
if (_arg1){
removeEventListener(Event.ENTER_FRAME, updateTimer);
myMan.removeLeisteners();
interfMan.stopInterFace();
} else {
addEventListener(Event.ENTER_FRAME, updateTimer);
myMan.addLeisteners();
interfMan.addKeyListeners();
};
}
function showAllDone(_arg1:Boolean=true){
if (allDone_mc.visible){
return;
};
allDone_mc.visible = true;
((allDone_mc.getChildByName("in_mc_") as MovieClip).getChildByName("x_txt_") as TextField).text = Lang.txt("allDone");
allDone_mc.gotoAndPlay(1);
icoSpecial_mc.visible = false;
if (_arg1){
myGame.soundPlay("Ting", 2);
};
}
function slowMotion(_arg1:Boolean){
bonusVisual(BONUS_SLOMO, _arg1);
if (_arg1){
fpsK = 0.7;
} else {
fpsK = 1;
};
}
function exitClick(_arg1){
myGame.goMenu();
}
function generateLevel(_arg1:Number, _arg2:Number=0):Array{
var _local3:Array;
var _local4:IcoElement;
var _local5:*;
var _local6:IcoElement;
var _local7:String;
trace(("generateLevel try " + _arg2));
_local3 = [];
nowElems = new Object();
_local4 = null;
_local5 = (_arg1 - 1);
while (_local5 >= 0) {
_local6 = addIcoElecent(_local5, _arg1, (_arg2 * 10));
if (_local6 == null){
if (_arg2 < 10){
for (_local7 in nowElems) {
removeChild(nowElems[_local7]);
};
nowElems = null;
IcoElement.curElement = null;
return (null);
} else {
_local5 = 0;
_local6 = _local4;
};
} else {
_local3.splice(0, 0, _local6);
if (_local4 != null){
_local6.nextElement = _local4;
};
_local4 = _local6;
};
if (_local5 == 0){
setCurrentElement(_local6);
};
_local5--;
};
return (_local3);
}
function manFlyFromBatut(){
isGoodFullMode = false;
performanceScore = 0;
stopAllBeforeQuit("flyFromBatut");
}
function beforeBatut(){
showLabelNext();
}
function pauseChange(_arg1){
isPause = !(isPause);
pauseBlocker_mc.visible = isPause;
stopTimerManInterface(isPause);
pause_btn.gotoAndStop((isPause) ? 2 : 1);
}
function showLabelNext(_arg1:Boolean=true){
if (nextEl){
nextElementPointer_mc.visible = false;
nextElementPointer_mc.x = nextEl.x;
};
}
function pauseOff(_arg1){
if (isPause){
pauseChange(_arg1);
};
}
function messageGoodJump(_arg1:String, _arg2:Number, _arg3:TheShape, _arg4:Number, _arg5:String){
var _local6:Number;
var _local7:String;
var _local8:Number;
var _local9:Number;
var _local10:IcoElement;
var _local11:String;
var _local12:String;
var _local13:Boolean;
var _local14:String;
var _local15:IcoElement;
var _local16:IcoElement;
var _local17:*;
var _local18:*;
var _local19:Number;
var _local20:Number;
bad_txt.text = "";
_local6 = Math.round(_arg4);
_local7 = _local6.toString();
_local8 = 0;
_local9 = (pointsK + (_arg3.fullRotateBonus * 2));
_local6 = (_local6 * _local9);
_local6 = Math.round(_local6);
_local10 = new (Base.getClass("icoElement"));
_local10.x = 30;
_local10.y = 300;
_local10.scaleX = (_local10.scaleY = 1);
_local10.sideName = _arg1;
_local10.shortRot = _arg2;
_local10.elem = _arg3;
_local10.person = myMan.person;
_local10.shortSpecName = _arg5;
_local10.isShowKey = false;
_local10.showFon = true;
_local10.showMe();
addChild(_local10);
_local11 = _local10.hashName;
_local12 = _local10.hashNotSpecName;
_local13 = !(person.isEducation);
_local14 = "";
if (!person.isEducation){
_local14 = "";
};
showLabelNext(false);
if (perfWereAlready[_local11] == null){
perfWereAlready = new Object();
perfWereAlready[_local11] = 1;
if (_local13){
_local14 = (_local14 + ((("+ " + _local7) + " x ") + (_local9 * 1).toString()));
};
if (((((_local13) && ((lastPoints > 0)))) && ((_local6 > 0)))){
_local8 = Math.round(((lastPoints + _local6) / 2));
_local10.showBonusText("In a row!", _local8);
};
performanceScore = (performanceScore + (_local6 + _local8));
if (nowElems[_local12] != null){
_local15 = (nowElems[_local12] as IcoElement);
_local15.setDone();
_local16 = getNextActiveElement(false);
if (_local16){
setCurrentElement(_local16);
};
isGoodFullMode = true;
for (_local17 in nowElems) {
if (!(nowElems[_local17] as IcoElement).isDone){
isGoodFullMode = false;
};
};
if (isGoodFullMode){
if (person.isEducation){
eduNum++;
stadyEdu();
} else {
showAllDone();
for (_local18 in nowElems) {
(nowElems[_local18] as IcoElement).visible = false;
};
};
};
};
} else {
_local6 = 0;
_local19 = 0;
if (_local13){
_local14 = (_local14 + (("" + Lang.txt("repeat")) + ""));
performanceScore = (performanceScore + _local19);
};
};
icoSpecial_mc.showMyStateSpecial();
if ((((showYouMadeK-- > 0)) && (person.isEducation))){
_local10.showYouMade();
_local10.disappearInSomeTime(2);
} else {
if (_local13){
_local10.showJumpPoints(_local14);
};
_local10.disappearInSomeTime(1);
};
lastPoints = _local6;
if (_local13){
showPts();
};
if ((((((((myMode == "full")) && (!(modeWorldContest)))) && (isGoodFullMode))) && ((performanceScore >= scoreMin)))){
_local20 = person.timeBonusPoints(modeWorldContest, fullT, timeAtStart);
trace(("BONUS:" + _local20));
myGame.bonusPoints = _local20;
endThisLevel();
return;
};
if (((((((!(isBonusNow)) && (!(person.isEducation)))) && ((person.professionalLevel >= Game.BONUS_MINIMUM_LEVEL)))) && ((((myMode == "quick")) || ((myMode == "full")))))){
bonusLine_mc.visible = true;
};
}
function onBonusTimer(_arg1){
enableBonus(bonusNow, false);
bonusNow = null;
}
function nextEdu(_arg1){
if (eduNum == InformWindow.kNextEdu){
myMan.g = myMan.startG;
myMan.cleanOneJumpSaves();
nextEdu_btn.visible = false;
myGame.currentNextBtn = null;
};
eduNum++;
stadyEdu();
}
function messageBadJump(_arg1:String){
lastPoints = 0;
bad_txt.text = _arg1;
icoSpecial_mc.showMyStateSpecial();
bonusLine_mc.visible = false;
}
override function afterCreate(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:Number;
fromMyClip("infWindow_mc");
fromMyClip("interfMan");
fromMyClip("myMan");
fromMyClip("exit_btn");
fromMyClip("nextEdu_btn");
fromMyClip("miss_education_btn");
fromMyClip("try_again_btn");
fromMyClip("batut_mc");
fromMyClip("batut_pre_mc");
fromMyClip("elem_txt");
fromMyClip("total_txt");
fromMyClip("time_txt");
fromMyClip("bad_txt");
fromMyClip("clock_mc");
fromMyClip("allDone_mc");
fromMyClip("icoSpecial_mc");
fromMyClip("nextElementPointer_mc");
fromMyClip("bonusEffect_mc");
fromMyClip("bonusLine_mc");
fromMyClip("bigText_txt");
fromMyClip("pause_btn");
fromMyClip("pauseBlocker_mc");
fromMyClip("infWindowUnder_mc");
fromMyClip("stars_mc");
fromMyClip("quality_btn");
fromMyClip("quality_txt");
myGame.setBackLevel();
myGame.setGameMusic("Guitar", true);
quality_btn.gotoAndStop(((stage.quality.toLowerCase() == StageQuality.HIGH)) ? 1 : 2);
quality_btn.addEventListener(MouseEvent.CLICK, clickQuality);
quality_btn.addEventListener(MouseEvent.ROLL_OVER, showTipQualityYes);
quality_btn.addEventListener(MouseEvent.ROLL_OUT, showTipQualityNo);
quality_txt.text = "";
myGame.lastResult = 0;
myGame.bonusPoints = 0;
if (((!(person.isEducation)) || ((myMode == "quick")))){
_local3 = (modeWorldContest) ? 5 : person.professionalLevel;
imperativeCount = (5 + Math.floor(((_local3 / 2) + 0.7)));
timeAtStart = Math.round((1.5 * ((myMode == "full")) ? (modeWorldContest) ? tModeContest : (tFullMode + Math.round((_local3 * 2))) : tQuickMode));
scoreMin = person.minimumPointsThisLevel(modeWorldContest);
if (modeWorldContest){
switch (contestNum){
case 0:
imperativeCount = (imperativeCount * 0.9);
scoreMin = (scoreMin * 0);
timeAtStart = (timeAtStart * 0.8);
break;
case 1:
imperativeCount = (imperativeCount * 0.5);
scoreMin = (scoreMin * 0.7);
timeAtStart = (timeAtStart * 0.6);
break;
case 2:
imperativeCount = (imperativeCount * 0);
scoreMin = (scoreMin * 0);
timeAtStart = (timeAtStart * 0.4);
break;
};
imperativeCount = Math.round(imperativeCount);
scoreMin = Math.round(scoreMin);
timeAtStart = Math.round(timeAtStart);
} else {
if (person._getDifficultAdd() >= 1){
timeAtStart = (timeAtStart * 0.85);
timeAtStart = Math.round(timeAtStart);
};
};
if (imperativeCount > 8){
imperativeCount = 8;
};
if (myMode == "quick"){
scoreMin = 0;
};
fullT = timeAtStart;
fps = stage.frameRate;
addEventListener(Event.ENTER_FRAME, updateTimer);
updateTimer(null);
};
interfMan.person = person;
interfMan.myMan = myMan;
myMan.person = person;
myMan.myLevel = this;
if (person.isEducation){
myMan.g = 0;
};
myMan.batut = batut_mc;
myMan.batut_pre_mc = batut_pre_mc;
myMan.afterCreate();
exit_btn.addEventListener(MouseEvent.CLICK, exitClick);
miss_education_btn.addEventListener(MouseEvent.CLICK, missEducation);
try_again_btn.addEventListener(MouseEvent.CLICK, tryAgain);
nextEdu_btn.addEventListener(MouseEvent.CLICK, nextEdu);
time_txt.mouseEnabled = (elem_txt.mouseEnabled = (total_txt.mouseEnabled = false));
allDone_mc.visible = false;
nextEdu_btn.visible = person.isEducation;
icoSpecial_mc.visible = false;
icoSpecial_mc.myLevel = this;
icoSpecial_mc.person = person;
nextElementPointer_mc.visible = false;
bonusEffect_mc.visible = false;
bonusLine_mc.visible = false;
bigText_txt.text = "";
bad_txt.text = "";
stars_mc.gotoAndStop(person.StarsFrame);
stars_mc.visible = false;
_local1 = (person.percentVDown / 100);
_local2 = (400 * _local1);
bonusLine_mc.y = (batut_mc.y - _local2);
cleanManInterfaceAndElements();
if ((((myMode == "quick")) || (person.isEducation))){
nowElems = [];
} else {
_local5 = 0;
do {
var _temp1 = _local5;
_local5 = (_local5 + 1);
_local4 = generateLevel(imperativeCount, _temp1);
} while (_local4 == null);
};
if (((!((myMode == "full"))) || (!(person.isEducation)))){
miss_education_btn.visible = false;
} else {
try_again_btn.visible = false;
};
if (((modeWorldContest) && ((myGame.contestNum > 0)))){
try_again_btn.visible = false;
};
if (!myGame.saver.getData("wasEdu1", false)){
miss_education_btn.visible = false;
};
if (person.isEducation){
time_txt.visible = false;
clock_mc.visible = false;
myGame.currentNextBtn = nextEdu_btn;
};
stadyEdu();
if (((((modeWorldContest) && ((imperativeCount == 0)))) || ((myMode == "quick")))){
isGoodFullMode = true;
showAllDone(false);
};
pauseBlocker_mc.buttonMode = true;
pauseBlocker_mc.visible = false;
pauseBlocker_mc.mouseEnabled = true;
pauseBlocker_mc.useHandCursor = true;
pauseBlocker_mc.addEventListener(MouseEvent.CLICK, pauseOff);
pause_btn.addEventListener(MouseEvent.CLICK, pauseChange);
pause_btn.buttonMode = true;
}
}
}//package
Section 119
//man (man)
package {
public dynamic class man extends Man {
}
}//package
Section 120
//Man (Man)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import MyParticle.*;
public class Man extends Base {
var particleControllerRotations:Array;
var startG:Number;// = 10
var justWatHitBatut:Number;// = 0
var foot2_mc:BodyPart;
var startX:Number;
var wasShape:TheShape;
var hip_mc:BodyPart;
var arm_mc:BodyPart;
var head_mc:BodyPart;
var shoulder2_mc:BodyPart;
var g;
var nowShape:TheShape;
var particleControllerSpeeds:Array;
var _person:Person;
var pointerLeg1_mc:MovieClip;
var v;// = 0
var kRotateSpeedDest:Number;// = 0
var ballLand:Number;// = 0
var dx:Number;// = 0
var shoulder_mc:BodyPart;
var dy;
var pointerHand1_mc:MovieClip;
var manLevelPointer_mc:MovieClip;
var isRotation:Boolean;// = false
var hip2_mc:BodyPart;
var pointerLeg2_mc:MovieClip;
var gk;// = 0.00055
var angleApproxStraight:Number;// = 40
var body_in:MovieClip;
var onJumpRotates:Number;// = 0
var foot_mc:BodyPart;
var power_mc:MovieClip;
var warnSoonBatut:Boolean;// = false
var pointerHand2_mc:MovieClip;
var isBadHit:Boolean;// = false
var myLevel:ManScreen;
var batutDownAlready:Boolean;// = false
var arm2_mc:BodyPart;
var body_mc:BodyPart;
var showingBonus:String;// = null
var hand_mc:BodyPart;
var leg_mc:BodyPart;
var oneJumpElems:Array;
public var body_mc_:L2_body;
var batut:MovieClip;
var bodyPartNames:Array;
var wasBadHit:Boolean;// = false
var hand2_mc:BodyPart;
var particleControllerSlomo:ParticleController;
var kRotateSpeedMy:Number;// = 0
var leg2_mc:BodyPart;
var batut_pre_mc:MovieClip;
var myHeight:Number;
var rotation_mc:MovieClip;
public function Man(){
var _local1:Array;
bodyPartNames = ["body", "head", "shoulder", "arm", "hand", "shoulder2", "arm2", "hand2", "hip", "leg", "foot", "hip2", "leg2", "foot2"];
startG = 10;
v = 0;
g = startG;
gk = 0.00055;
angleApproxStraight = 40;
kRotateSpeedDest = 0;
kRotateSpeedMy = 0;
justWatHitBatut = 0;
warnSoonBatut = false;
isBadHit = false;
wasBadHit = false;
ballLand = 0;
oneJumpElems = [];
onJumpRotates = 0;
dx = 0;
showingBonus = null;
isRotation = false;
batutDownAlready = false;
super();
trace(this);
myHeight = parent.getChildByName(name).height;
startX = x;
fromMyClip("body_mc");
head_mc = body_mc.childParts["head_mc"];
shoulder_mc = body_mc.childParts["shoulder_mc"];
arm_mc = shoulder_mc.childParts["arm_mc"];
hand_mc = arm_mc.childParts["hand_mc"];
shoulder2_mc = body_mc.childParts["shoulder2_mc"];
arm2_mc = shoulder2_mc.childParts["arm_mc"];
hand2_mc = arm2_mc.childParts["hand_mc"];
hip_mc = body_mc.childParts["hip_mc"];
leg_mc = hip_mc.childParts["leg_mc"];
foot_mc = leg_mc.childParts["foot_mc"];
hip2_mc = body_mc.childParts["hip2_mc"];
leg2_mc = hip2_mc.childParts["leg_mc"];
foot2_mc = leg2_mc.childParts["foot_mc"];
body_in = (body_mc.getChildByName("in_mc_") as MovieClip);
pointerHand1_mc = shoulder_mc["manLevelPointer_mc_"];
pointerHand2_mc = shoulder2_mc["manLevelPointer_mc_"];
pointerLeg1_mc = hip_mc["manLevelPointer_mc_"];
pointerLeg2_mc = hip2_mc["manLevelPointer_mc_"];
_local1 = [pointerHand1_mc, pointerHand2_mc, pointerLeg1_mc, pointerLeg2_mc];
_local1.forEach(hideIt);
}
override function beforeDelete(){
removeLeisteners();
particleControllerRotations.forEach(followFlase);
particleControllerSpeeds.forEach(followFlase);
particleControllerSlomo.isFollow = false;
particleControllerRotations = null;
particleControllerSpeeds = null;
particleControllerSlomo = null;
}
function hideIt(_arg1:MovieClip, _arg2:int, _arg3:Array){
_arg1.visible = false;
}
function get myLevelL():Level{
return ((myLevel as Level));
}
function cleanOneJumpSaves(){
oneJumpElems = [];
onJumpRotates = 0;
}
function priceOneJump(){
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:TheShape;
var _local5:*;
var _local6:String;
var _local7:Number;
var _local8:String;
var _local9:*;
var _local10:*;
var _local11:TheShape;
_local1 = "";
for (_local2 in oneJumpElems) {
_local1 = (_local1 + ((oneJumpElems[_local2] as TheShape).myName + " "));
};
_local3 = rotatesForAngle(onJumpRotates);
if (oneJumpElems.length == 0){
return;
};
_local5 = 0;
while (_local5 < oneJumpElems.length) {
_local11 = (oneJumpElems[_local5] as TheShape);
if ((((_local4 == null)) || ((_local11.hardIndex < _local4.hardIndex)))){
_local4 = _local11;
};
_local5++;
};
_local6 = _local4.myName;
_local7 = Math.floor((_local3 + 0.25));
_local8 = ((onJumpRotates)>0) ? "back" : "front";
_local9 = "";
_local10 = "";
if (ballLand == 2){
_local10 = "ballin";
} else {
if (ballLand == 1){
_local10 = "ballout";
};
};
if (((!(isBadHit)) && (!(wasBadHit)))){
(myLevel as Level).messageGoodJump(_local8, _local7, _local4, _local3, _local10);
} else {
(myLevel as Level).messageBadJump((isBadHit) ? (Lang.txt("badLanding") + "...") : "");
};
}
function doSomething(){
hip_mc.rotate(130);
}
function followFlase(_arg1:ParticleController, _arg2:int, _arg3:Array){
_arg1.isFollow = false;
}
public function set person(_arg1:Person):void{
var _local2:*;
var _local3:String;
var _local4:BodyPart;
_person = _arg1;
_local2 = 0;
while (_local2 < bodyPartNames.length) {
_local3 = bodyPartNames[_local2];
_local4 = (this[(_local3 + "_mc")] as BodyPart);
_local4.gotoAndStop((_person.myInd + 1));
_local4.myMan = this;
_local2++;
};
manLevelPointer_mc = ((_person.myInd)==0) ? pointerLeg1_mc : pointerHand1_mc;
manLevelPointer_mc.visible = true;
manLevelPointer_mc.gotoAndStop((_person.fullLevel + 1));
}
function followTrue(_arg1:ParticleController, _arg2:int, _arg3:Array){
_arg1.isFollow = true;
}
function showIt(_arg1:MovieClip, _arg2:int, _arg3:Array){
_arg1.visible = true;
}
function showBonus(_arg1:Boolean, _arg2:String){
showingBonus = (_arg1) ? _arg2 : null;
switch (_arg2){
case Level.BONUS_POWER:
if (!_arg1){
particleControllerSpeeds.forEach(followFlase);
} else {
if (batutDownAlready){
particleControllerSpeeds.forEach(followTrue);
};
};
break;
case Level.BONUS_ROTATION:
if (!_arg1){
particleControllerRotations.forEach(followFlase);
};
break;
case Level.BONUS_SLOMO:
particleControllerSlomo.isFollow = _arg1;
break;
};
}
function jumping(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:Rectangle;
var _local7:Rectangle;
var _local8:*;
var _local9:Number;
var _local10:*;
var _local11:Number;
var _local12:Number;
var _local13:*;
var _local14:*;
var _local15:Number;
var _local16:Number;
wasBadHit = isBadHit;
_local2 = dy;
_local3 = (((myLevelL.fpsK / myLevelL.quickSpeedK) * g) * gk);
v = (v + _local3);
dy = ((myLevelL.fpsK * v) * myHeight);
y = (y + dy);
x = (x + (myLevelL.fpsK * dx));
if ((((dy > 0)) && ((_local2 <= 0)))){
batutDownAlready = false;
if (showingBonus == Level.BONUS_POWER){
particleControllerSpeeds.forEach(followFlase);
};
};
loofIfSoonBatut();
if (body_mc.hitTestObject(batut)){
if (Math.abs((x - startX)) > 170){
myLevelL.manFlyFromBatut();
};
if (isBadLandingMc(batut)){
isBadHit = true;
gotoShape(TheShape.tuck, true);
} else {
isBadHit = false;
if (wasBadHit){
gotoShape(TheShape.beforeFlightUp);
};
};
if (body_in.hitTestObject(batut)){
ballLand = 2;
};
_local4 = 100;
if (nowShape.isApproxStraight){
_local9 = 1.5;
rotation = Math.round(rotation);
_local10 = (rotation % 90);
if (_local10 < 0){
_local10 = (_local10 + 90);
};
if (_local10 > 45){
_local10 = (90 - _local10);
};
_local11 = ((rotation)>0) ? ((rotation)<90) ? 1 : -1 : ((rotation)>-90) ? -1 : 1;
_local12 = (((_local10 / 45) * _local9) * _local11);
_local13 = 30;
_local4 = ((100 - _local13) + ((_local13 * (45 - _local10)) / 45));
_local14 = kRotateSpeedDest;
rotate(_local12);
kRotateSpeedDest = _local14;
};
_local5 = Math.sqrt(person.vDown);
if ((((nowShape == TheShape.beforeFlightUp)) && ((Math.abs(rotation) >= angleApproxStraight)))){
v = (-(_local5) * TheShape.straight.speedDownK);
} else {
v = (-(_local5) * nowShape.speedDownK);
};
v = ((v * _local4) / 100);
beginNewFlight();
justWatHitBatut = 3;
if (myLevelL.levelEnding){
return;
};
_local6 = this.getBounds(myLevel);
_local7 = batut.getBounds(myLevel);
_local8 = (_local6.bottom - _local7.y);
y = (y - (_local8 - 3));
if (showingBonus == Level.BONUS_POWER){
particleControllerSpeeds.forEach(followTrue);
};
if (!myLevelL.person.isEducation){
_local15 = ((((rotation > -90)) && ((rotation < 90)))) ? rotation : ((rotation)>0) ? (rotation - 180) : (180 + rotation);
if (Math.abs(_local15) > 45){
_local15 = (((_local15 > 0)) ? 1 : -1 * (90 - Math.abs(_local15)));
};
_local16 = 0.5;
if (((x - startX) * _local15) < 0){
_local16 = Math.ceil((Math.abs((x - startX)) / 40));
};
dx = ((_local15 / 45) * _local16);
};
};
if (justWatHitBatut > 0){
justWatHitBatut = (justWatHitBatut - (myLevelL.fpsK * 1));
if (justWatHitBatut <= 0){
(myLevel as Level).onUpBatut();
};
};
myLevelL.lookBonus();
}
public function get person():Person{
return (_person);
}
function rotating(_arg1){
var _local2:Number;
var _local3:*;
var _local4:*;
_local2 = (kRotateSpeedDest - kRotateSpeedMy);
kRotateSpeedMy = (kRotateSpeedMy + (((myLevelL.fpsK * myLevelL.quickRotationK) * _local2) / 12));
_local3 = ((myLevelL.fpsK * person.rotateSpeed) * myLevelL.quickRotationK);
_local4 = ((_local3 * kRotateSpeedMy) * (((nowShape.speedRotate * body_mc.stepPhaze) / BodyPart.steps) + ((wasShape.speedRotate * (BodyPart.steps - body_mc.stepPhaze)) / BodyPart.steps)));
rotation = (rotation + _local4);
onJumpRotates = (onJumpRotates + _local4);
if (Math.abs(kRotateSpeedDest) < 0.01){
isRotation = false;
if (showingBonus == Level.BONUS_ROTATION){
particleControllerRotations.forEach(followFlase);
};
} else {
isRotation = true;
if (showingBonus == Level.BONUS_ROTATION){
particleControllerRotations.forEach(followTrue);
};
};
}
function rotate(_arg1:Number){
if (_arg1 == kRotateSpeedDest){
return;
};
kRotateSpeedDest = _arg1;
if (Math.abs(_arg1) > 0){
rotating(null);
};
}
function loofIfSoonBatut(){
if (((((((batut.y - y) <= (myHeight * 2.5))) && (!(warnSoonBatut)))) && ((v > 0)))){
if ((((nowShape.myName == "straight")) && ((Math.abs(rotation) < angleApproxStraight)))){
warnSoonBatut = true;
gotoShape(TheShape.beforeFlightUp);
(myLevel as Level).beforeBatut();
};
};
if (((body_mc.hitTestObject(batut_pre_mc)) && (!(batutDownAlready)))){
(myLevel as Level).onHitBatut();
batutDownAlready = true;
};
}
private function initParticles():void{
var _local1:Sprite;
var _local2:Array;
var _local3:Number;
var _local4:*;
var _local5:ParticleController;
_local1 = myLevelL;
particleControllerRotations = new Array();
particleControllerSpeeds = new Array();
_local2 = [foot_mc, foot2_mc, foot_mc, foot2_mc];
_local3 = 2;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = new ParticleController();
_local5.followMc = _local2[_local4];
_local5.partDx = 10;
_local5.partDy = 20;
_local5.canvasMc = _local1;
_local5.everyNtimes = 1;
if (_local4 < _local3){
_local5.cacheMotion = "particleRotate_";
particleControllerRotations.push(_local5);
} else {
_local5.cacheMotion = "particleSpeed_";
particleControllerSpeeds.push(_local5);
};
_local4++;
};
particleControllerSlomo = new ParticleController();
particleControllerSlomo.followMc = this;
particleControllerSlomo.partDx = 0;
particleControllerSlomo.partDy = 70;
particleControllerSlomo.canvasMc = _local1;
particleControllerSlomo.cacheMotion = "particleSlomo";
particleControllerSlomo.Drandom = 0;
particleControllerSlomo.everyNtimes = 1;
}
function beginNewFlight(){
if (nowShape.myName == "beforeFlightUp"){
gotoShape(TheShape.straight);
};
priceOneJump();
if (ballLand > 0){
ballLand--;
};
warnSoonBatut = false;
cleanOneJumpSaves();
}
function isBadLandingMc(_arg1:MovieClip):Boolean{
return (((((arm_mc.hitTestObject(_arg1)) || (hand_mc.hitTestObject(_arg1)))) || (head_mc.hitTestObject(_arg1))));
}
function addLeisteners(){
addEventListener(Event.ENTER_FRAME, rotating);
addEventListener(Event.ENTER_FRAME, jumping);
}
function removeLeisteners(){
removeEventListener(Event.ENTER_FRAME, rotating);
removeEventListener(Event.ENTER_FRAME, jumping);
}
override function afterCreate(){
addLeisteners();
initParticles();
}
function gotoShape(_arg1:TheShape, _arg2:Boolean=false){
var _local3:*;
var _local4:String;
var _local5:*;
if (_arg1 == nowShape){
return;
};
if (_arg1 != TheShape.beforeFlightUp){
oneJumpElems.push(_arg1);
};
wasShape = ((nowShape)!=null) ? nowShape : _arg1;
nowShape = _arg1;
_local3 = 0;
while (_local3 < bodyPartNames.length) {
_local4 = bodyPartNames[_local3];
_local5 = _arg1[(_local4 + "_n")];
if (_local5 == Infinity){
_local5 = _arg1[(_local4.substr(0, (_local4.length - 1)) + "_n")];
};
(this[(_local4 + "_mc")] as BodyPart).rotate(_local5, _arg2);
_local3++;
};
}
static function rotatesForAngle(_arg1:Number):Number{
var _local2:*;
_local2 = 4;
return (Math.abs((_arg1 / 360)));
}
}
}//package
Section 121
//ManScreen (ManScreen)
package {
public class ManScreen extends Base {
}
}//package
Section 122
//Melodic (Melodic)
package {
import flash.media.*;
public dynamic class Melodic extends Sound {
}
}//package
Section 123
//Metallic (Metallic)
package {
import flash.media.*;
public dynamic class Metallic extends Sound {
}
}//package
Section 124
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 125
//MrGuit (MrGuit)
package {
import flash.media.*;
public dynamic class MrGuit extends Sound {
}
}//package
Section 126
//MyBtn (MyBtn)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class MyBtn extends Base {
var sHit:Sprite;
var x_txt:TextField;
var text:String;
public var back_mc_:MovieClip;
public var x_txt_:TextField;
var myAppearClip:DisplayObject;
public var active_mc_:MovieClip;
var isActive:Boolean;// = false
public function MyBtn(){
var _local1:Rectangle;
isActive = false;
super();
stop();
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
addEventListener(MouseEvent.MOUSE_OUT, mouseUp);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addEventListener(MouseEvent.MOUSE_UP, mouseOver);
addEventListener(Event.REMOVED_FROM_STAGE, deleteListeners);
sHit = new Sprite();
addChild(sHit);
mouseOver(null);
_local1 = this.getBounds(this);
sHit.graphics.beginFill(0, 0.01);
sHit.graphics.drawRect(_local1.x, _local1.y, _local1.width, _local1.height);
sHit.graphics.endFill();
hitArea = sHit;
mouseUp(null);
Active = Active;
}
function get Active():Boolean{
return (isActive);
}
function get AvtiveMc():Sprite{
return ((this["active_mc"] as Sprite));
}
function mouseUp(_arg1){
gotoAndStop(1);
highHitAreaIfDown();
}
function mouseOver(_arg1){
gotoAndStop(2);
highHitAreaIfDown();
}
function set Active(_arg1:Boolean){
isActive = _arg1;
if (isActiveMc){
AvtiveMc.visible = isActive;
};
}
function hideBeforeAppear(){
}
function appear(){
}
public function set Text(_arg1:String){
text = _arg1;
fromMyClip("x_txt");
x_txt.text = Lang.btn(text);
x_txt.mouseEnabled = false;
}
public function get Text():String{
return (text);
}
function get isActiveMc():Boolean{
return (!((this["active_mc"] == null)));
}
function highHitAreaIfDown(){
}
function deleteListeners(_arg1:Event){
removeEventListener(MouseEvent.MOUSE_OVER, mouseOver);
removeEventListener(MouseEvent.MOUSE_OUT, mouseUp);
removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
removeEventListener(MouseEvent.MOUSE_UP, mouseOver);
removeEventListener(Event.REMOVED_FROM_STAGE, deleteListeners);
}
function mouseDown(_arg1){
gotoAndStop(3);
highHitAreaIfDown();
}
}
}//package
Section 127
//myBtnBig (myBtnBig)
package {
public dynamic class myBtnBig extends MyBtn {
}
}//package
Section 128
//MyProgressBar (MyProgressBar)
package {
import flash.display.*;
import flash.text.*;
public class MyProgressBar extends Base {
public var name_txt_:TextField;
var startW:Number;
public var rect_mc_:MovieClip;
var name_txt:TextField;
protected var perc:Number;
public function MyProgressBar(){
fromMyClip("name_txt");
name_txt.mouseEnabled = false;
startW = width;
stop();
}
function set Name(_arg1:String){
name_txt.text = ((_arg1 + ": ") + perc.toString());
}
function set Percent(_arg1:Number){
perc = _arg1;
gotoAndStop((Math.round((perc / 5)) + 1));
}
}
}//package
Section 129
//particleRotate_ (particleRotate_)
package {
import MyParticle.*;
public dynamic class particleRotate_ extends Particle {
}
}//package
Section 130
//particleSlomo (particleSlomo)
package {
import MyParticle.*;
public dynamic class particleSlomo extends Particle {
}
}//package
Section 131
//particleSpeed_ (particleSpeed_)
package {
import MyParticle.*;
public dynamic class particleSpeed_ extends Particle {
}
}//package
Section 132
//Person (Person)
package {
public class Person extends Saver {
var myInd:Number;
var _professionalLevel:Number;
var _difficultAdd:Number;
var _education:Array;
var evolutionPoints:Array;
var _percentRotateSpeed:Number;
var _percentVDown:Number;
var _allowShapes:Array;
var _minShapes:Number;
var _name:String;
var initVars:Object;
var myInitObj:Object;
static const defaultPersons:Array = [{percVDown:60, percRotateSpeed:70, name:"1", profLevel:0, _difficultAdd:-1, _allowShapes:[], minShapes:1, evolutionPoints:[], _education:[true, true, true]}, {percVDown:65, percRotateSpeed:65, name:"2", profLevel:0, _difficultAdd:-1, _allowShapes:[], minShapes:1, evolutionPoints:[], _education:[true, true, true]}];
static var kLevels:Number = 5;
protected static var maxVDown:Number = 0.0077;
protected static var maxRotateSpeed:Number = 26;
static var dLevel:Number = 0.33;
public function Person(_arg1:String, _arg2:String, _arg3:Object, _arg4:Number){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Array;
var _local9:*;
initVars = {_name:"name", _minShapes:"minShapes", _percentVDown:"percVDown", _percentRotateSpeed:"percRotateSpeed", _professionalLevel:"profLevel", _education:"_education", evolutionPoints:"evolutionPoints", _allowShapes:"_allowShapes", _difficultAdd:"_difficultAdd"};
super(((_arg1 + "_") + _arg2));
myInitObj = new Object();
for (_local5 in initVars) {
_local6 = _arg3[initVars[_local5]];
if ((_local6 is Array)){
_local7 = new Array();
_local8 = (_local6 as Array);
_local9 = 0;
while (_local9 < _local8.length) {
_local7[_local9] = _local8[_local9];
_local9++;
};
} else {
_local7 = _local6;
};
myInitObj[initVars[_local5]] = _local7;
getMyProperty(_local5, _local7);
};
afterInit();
}
public function get rotateSpeed():Number{
return (((maxRotateSpeed * _percentRotateSpeed) / 100));
}
public function set difficultAdd(_arg1:Number):void{
_difficultAdd = _arg1;
saveMyProperty("_difficultAdd");
}
function get isNewStar():Boolean{
return ((professionalLevel == Math.round(professionalLevel)));
}
function setStandardShapes(_arg1:Number){
_allowShapes = TheShape.allShapeElements.slice(0, _arg1);
saveMyProperty("_allowShapes");
}
function afterInit(){
if ((((_allowShapes == null)) || ((kAllowShapes < myInitObj.minShapes)))){
setStandardShapes(myInitObj.minShapes);
};
}
function getMyRandomShape():String{
return (allowShapes[(Base.random((kAllowShapes - 1)) + 1)]);
}
public function get professionalLevel():Number{
return (_professionalLevel);
}
function fromBegin(){
var _local1:*;
for (_local1 in initVars) {
this[_local1] = myInitObj[initVars[_local1]];
saveMyProperty(_local1);
};
afterInit();
}
public function get isEducation():Boolean{
return (getEducation(ScreenLetsStart.GUIDE_COMMON));
}
public function get percentRotateSpeed():Number{
return (_percentRotateSpeed);
}
function setShapeForIndex(_arg1:Number, _arg2:Number){
_allowShapes[_arg1] = TheShape.allShapeElements[_arg2];
saveMyProperty("_allowShapes");
}
function get StarsFrame():Number{
return ((6 - fullLevel));
}
public function get kAllowShapes():Number{
return (_allowShapes.length);
}
function get fullLevel():Number{
return (Math.floor(professionalLevel));
}
public function get allowShapes():Array{
return (_allowShapes);
}
public function getDifficultAdd(_arg1:String, _arg2:Boolean):Number{
var _local3:*;
if ((((_arg1 == "free")) || ((_arg2 == true)))){
return (0.5);
};
_local3 = _getDifficultAdd();
return (((_local3 < 0)) ? 0 : _local3);
}
public function set professionalLevel(_arg1:Number):void{
_professionalLevel = _arg1;
if ((Math.ceil(_professionalLevel) - _professionalLevel) < 0.05){
_professionalLevel = Math.round(_professionalLevel);
};
saveMyProperty("_professionalLevel");
}
public function set isEducation(_arg1:Boolean):void{
setEducation(ScreenLetsStart.GUIDE_COMMON, _arg1);
}
public function get vDown():Number{
return (((maxVDown * _percentVDown) / 100));
}
function get evolutionSumPoints():Number{
var _local1:Number;
var _local2:*;
var _local3:*;
_local1 = 0;
_local2 = 0;
while (_local2 < Person.kLevels) {
_local3 = evolutionPoints[_local2];
if (_local3 != null){
_local1 = (_local1 + _local3);
} else {
break;
};
_local2++;
};
return (_local1);
}
function timeBonusPoints(_arg1:Boolean, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
_local4 = minimumPointsThisLevel(_arg1);
return (Math.round((((_local4 * _arg2) / _arg3) * 1.5)));
}
public function set percentRotateSpeed(_arg1:Number):void{
_percentRotateSpeed = _arg1;
saveMyProperty("_percentRotateSpeed");
}
function get indEvolutionPoints():Number{
var _local1:Number;
_local1 = (Math.ceil((professionalLevel + dLevel)) - 1);
return (_local1);
}
function get willNewStar():Boolean{
return ((Math.abs(((professionalLevel + 0.33) - Math.round(professionalLevel))) < 0.1));
}
public function set percentVDown(_arg1:Number):void{
_percentVDown = _arg1;
saveMyProperty("_percentVDown");
}
function addAllowShape(_arg1:Number=-1){
var _local2:Number;
_local2 = ((_arg1)!=-1) ? _arg1 : kAllowShapes;
_allowShapes.push(TheShape.allShapeElements[_local2]);
saveMyProperty("_allowShapes");
}
public function setEducation(_arg1:Number, _arg2:Boolean){
_education[_arg1] = _arg2;
saveMyProperty("_education");
}
public function get percentVDown():Number{
return (_percentVDown);
}
function minimumPointsThisLevel(_arg1:Boolean):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = 10;
_local3 = getDifficultAdd("full", _arg1);
_local4 = ((_local3 + 2) / 3);
return ((Math.round(((((professionalLevel + 1) * 140) * _local4) / _local2)) * _local2));
}
public function getEducation(_arg1:Number):Boolean{
return (_education[_arg1]);
}
public function _getDifficultAdd():Number{
return (_difficultAdd);
}
static function getCharachter(_arg1:Number, _arg2:Game):Person{
var _local3:*;
var _local4:Person;
_local3 = defaultPersons[_arg1];
_local4 = new Person(escape(_arg2.userName), _local3.name, _local3, _arg1);
_local4.myInd = _arg1;
return (_local4);
}
}
}//package
Section 133
//plus_new (plus_new)
package {
import flash.display.*;
public dynamic class plus_new extends SimpleButton {
}
}//package
Section 134
//plusMegaNew (plusMegaNew)
package {
import flash.display.*;
public dynamic class plusMegaNew extends SimpleButton {
}
}//package
Section 135
//progBar (progBar)
package {
public dynamic class progBar extends MyProgressBar {
}
}//package
Section 136
//progBarNew (progBarNew)
package {
public dynamic class progBarNew extends MyProgressBar {
}
}//package
Section 137
//Reminder (Reminder)
package {
import flash.media.*;
public dynamic class Reminder extends Sound {
}
}//package
Section 138
//Saver (Saver)
package {
import flash.net.*;
public class Saver {
var isAutoSave:Boolean;// = false
var myName:String;
var onSaving:Boolean;// = true
var so:SharedObject;
public function Saver(_arg1:String){
onSaving = true;
isAutoSave = false;
super();
myName = _arg1;
init();
}
public function getData(_arg1:String, _arg2){
var _local3:*;
_local3 = so.data[_arg1];
if ((((_local3 == null)) && (!((_arg2 == null))))){
trace((("\"" + _arg1) + "\" is null"));
_local3 = _arg2;
setData(_arg1, _local3);
};
return (_local3);
}
function saveMyProperty(_arg1:String){
setData(_arg1, this[_arg1]);
}
protected function init(){
so = SharedObject.getLocal(((Game.projectName + "_") + myName));
}
public function setData(_arg1:String, _arg2){
if (onSaving){
so.data[_arg1] = _arg2;
};
if (((isAutoSave) && (onSaving))){
so.flush();
};
}
function getMyProperty(_arg1:String, _arg2=null){
this[_arg1] = getData(_arg1, _arg2);
}
}
}//package
Section 139
//ScreenAfterLevel (ScreenAfterLevel)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import Doc.*;
public class ScreenAfterLevel extends Base {
public var again_btn_:Graph_L2J2_8_Symbol92;
public var pointsLevel_txt_:TextField;
var pTot_txt:TextField;
var next_btn:MyBtn;
var causeOfLoose_txt:TextField;
public var causeOfLoose_txt_:TextField;
var isLevelGood:Boolean;// = false
public var menu_btn_:Graph_L2J2_7_Symbol93;
public var pointsBonus_txt_:TextField;
var spirits_mc:MovieClip;
public var pLev_txt_:TextField;
public var next_btn_:Graph_L2J2_6_Symbol94;
public var spirits_mc_:MovieClip;
var menu_btn:MyBtn;
var pointsTotal_txt:TextField;
var levelCompl_mc:MovieClip;
var sponsor_big_btn:SimpleButton;
public var pBonus_txt_:TextField;
public var pointsTotal_txt_:TextField;
public var pTot_txt_:TextField;
var pLev_txt:TextField;
var pointsBonus_txt:TextField;
var pBonus_txt:TextField;
var myGame:Game;
var pointsLevel_txt:TextField;
public var sponsor_big_btn_:SimpleButton;
var again_btn:MyBtn;
public function ScreenAfterLevel(){
isLevelGood = false;
super();
fromMyClip("menu_btn");
fromMyClip("next_btn");
fromMyClip("again_btn");
fromMyClip("spirits_mc");
fromMyClip("pointsLevel_txt");
fromMyClip("pointsTotal_txt");
fromMyClip("pLev_txt");
fromMyClip("pTot_txt");
fromMyClip("causeOfLoose_txt");
fromMyClip("pBonus_txt");
fromMyClip("pointsBonus_txt");
fromMyClip("sponsor_big_btn");
}
override function beforeDelete(){
menu_btn.removeEventListener(MouseEvent.CLICK, goMenu);
next_btn.removeEventListener(MouseEvent.CLICK, goNext);
again_btn.removeEventListener(MouseEvent.CLICK, goAgain);
sponsor_big_btn.removeEventListener(MouseEvent.CLICK, goSponsor);
}
function goAgain(_arg1){
myGame.startGame();
}
private function goSponsor(_arg1:MouseEvent):void{
Game.goToSponsorMain();
}
function goMenu(_arg1){
myGame.goMenu();
}
function goNext(_arg1){
myGame.goSkillUp();
}
override function afterCreate(){
var _local1:Number;
var _local2:*;
menu_btn.addEventListener(MouseEvent.CLICK, goMenu);
next_btn.addEventListener(MouseEvent.CLICK, goNext);
again_btn.addEventListener(MouseEvent.CLICK, goAgain);
sponsor_big_btn.addEventListener(MouseEvent.CLICK, goSponsor);
next_btn.visible = true;
again_btn.visible = true;
if (myGame.myLevel.performanceScore < myGame.pers.minimumPointsThisLevel(myGame.modeGameWorldContest)){
isLevelGood = false;
};
if (((((DocClass.iAm.isKongregateOrSimilar) && (!(DocClass.iAm.isOnSponsorSite)))) || (isLevelGood))){
sponsor_big_btn.visible = false;
};
myGame.Caption = (isLevelGood) ? "levelGood" : "levelBad";
_local1 = myGame.myLevel.performanceScore;
if (isLevelGood){
again_btn.visible = false;
myGame.currentNextBtn = next_btn;
causeOfLoose_txt.text = "";
} else {
myGame.myLevel.performanceScore = 0;
next_btn.visible = false;
myGame.currentNextBtn = again_btn;
causeOfLoose_txt.text = Lang.txt(myGame.causeOfLoose);
};
pLev_txt.text = Lang.txt("pointsLevel");
pBonus_txt.text = Lang.txt("pointsBonusTime");
pTot_txt.text = Lang.txt("pointsTotal");
_local2 = myGame.pers.indEvolutionPoints;
if (myGame.pers.evolutionPoints[_local2] == null){
myGame.pers.evolutionPoints[_local2] = 0;
};
pointsLevel_txt.text = ((_local1.toString() + " / ") + myGame.pers.minimumPointsThisLevel(myGame.modeGameWorldContest).toString());
pointsBonus_txt.text = myGame.bonusPoints.toString();
pointsTotal_txt.text = (myGame.pers.evolutionSumPoints + (isLevelGood) ? (myGame.lastResult + myGame.bonusPoints) : 0).toString();
spirits_mc.gotoAndStop(((isLevelGood) ? "good" : "bad" + (myGame.pers.myInd + 1)));
menu_btn.visible = !(isLevelGood);
if (((myGame.pers.willNewStar) && (isLevelGood))){
myGame.soundPlay("MrGuit", 0.7, 0, true);
};
}
}
}//package
Section 140
//ScreenEnd (ScreenEnd)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ScreenEnd extends Base {
public var newRec_txt_:TextField;
public var again_btn_:Graph_L2J2_8_Symbol92;
var next_btn:MyBtn;
public var myBestCap_txt_:TextField;
public var myBest_txt_:TextField;
var points_txt:TextField;
var pointsCap_txt:TextField;
public var pointsCap_txt_:TextField;
public var menu_btn_:Graph_L2J2_7_Symbol93;
var spirits_mc:MovieClip;
var myBest_txt:TextField;
public var next_btn_:Graph_L2J2_6_Symbol94;
var againORnext_txt:TextField;
public var submit_btn_:Graph_L2J2_submit_record2;
public var spirits_mc_:MovieClip;
var menu_btn:MyBtn;
var newRec_txt:TextField;
public var againORnext_txt_:TextField;
var myBestCap_txt:TextField;
var submit_btn:MyBtn;
var scorePart:Number;
var myGame:Game;
public var points_txt_:TextField;
var scoreTotal:Number;
var again_btn:MyBtn;
public function ScreenEnd(){
fromMyClip("menu_btn");
fromMyClip("again_btn");
fromMyClip("next_btn");
fromMyClip("submit_btn");
fromMyClip("points_txt");
fromMyClip("pointsCap_txt");
fromMyClip("myBest_txt");
fromMyClip("myBestCap_txt");
fromMyClip("newRec_txt");
fromMyClip("againORnext_txt");
fromMyClip("spirits_mc");
}
override function beforeDelete(){
menu_btn.removeEventListener(MouseEvent.CLICK, goMenu);
again_btn.removeEventListener(MouseEvent.CLICK, goAgainOrNext);
next_btn.removeEventListener(MouseEvent.CLICK, goAgainOrNext);
submit_btn.removeEventListener(MouseEvent.CLICK, goSubmit);
}
function goNext(_arg1){
myGame.startGame();
}
function goMenu(_arg1){
myGame.goMenu();
}
function get isNextContestBtn():Boolean{
return ((((myGame.contestNum < (Game.CONTEST_COUNT - 1))) && ((scorePart > 0))));
}
function goSubmit(_arg1){
myGame.goRecords();
}
function goAgainOrNext(_arg1){
if (myGame.modeGameWorldContest){
if (isNextContestBtn){
myGame.contestNum++;
myGame.contestPoints = scoreTotal;
} else {
myGame.contestNum = 0;
myGame.contestPoints = 0;
};
};
myGame.startGame();
}
override function afterCreate(){
var _local1:Boolean;
scorePart = myGame.myLevel.performanceScore;
pointsCap_txt.text = (Lang.txt("points") + ":");
points_txt.text = scorePart.toString();
againORnext_txt.text = "";
if (((myGame.modeGameWorldContest) && (((!(myGame.myLevel.isGoodFullMode)) || ((myGame.myLevel.performanceScore < myGame.myLevel.scoreMin)))))){
scorePart = 0;
};
scoreTotal = ((myGame.modeGameWorldContest) ? myGame.contestPoints : 0 + scorePart);
myGame.lastResult = scoreTotal;
submit_btn.visible = false;
next_btn.visible = false;
myGame.currentNextBtn = again_btn;
menu_btn.addEventListener(MouseEvent.CLICK, goMenu);
again_btn.addEventListener(MouseEvent.CLICK, goAgainOrNext);
next_btn.addEventListener(MouseEvent.CLICK, goAgainOrNext);
submit_btn.addEventListener(MouseEvent.CLICK, goSubmit);
if (myGame.modeGameWorldContest){
if (isNextContestBtn){
again_btn.visible = false;
next_btn.visible = true;
againORnext_txt.text = (((Lang.txt("readyContestNum") + " ") + (myGame.contestNum + 2)) + "?");
myGame.Caption = ("contestFinish" + (myGame.contestNum + 1));
} else {
if (myGame.causeOfLoose != null){
againORnext_txt.text = Lang.txt(myGame.causeOfLoose);
};
};
myBestCap_txt.text = Lang.txt("pointsTotal");
myBest_txt.text = scoreTotal.toString();
} else {
myBestCap_txt.text = Lang.txt("myBest");
myBest_txt.text = myGame.bestResultThisMode.toString();
};
if (((!(myGame.modeGameWorldContest)) || ((myGame.contestNum >= (Game.CONTEST_COUNT - 1))))){
if (scoreTotal > myGame.bestResultThisMode){
myGame.bestResultThisMode = scoreTotal;
newRec_txt.text = Lang.txt("newRec");
myGame.soundPlay("MrGuit", 0.7, 0, true);
};
submit_btn.visible = (scorePart > 0);
};
_local1 = ((!(myGame.modeGameWorldContest)) || ((scorePart > 0)));
spirits_mc.gotoAndStop(((_local1) ? "good" : "bad" + (myGame.pers.myInd + 1)));
}
}
}//package
Section 141
//ScreenLetsStart (ScreenLetsStart)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ScreenLetsStart extends Base {
public var guide_controls_mc_:MovieClip;
var guide_controls_mc:MovieClip;
var next_btn:MyBtn;
public var guide_contest_mc_:MovieClip;
public var guideType:Number;
public var guide_txt_:TextField;
public var next_btn_:Graph_L2J2_jump;
var guide_bonus_mc:MovieClip;
var myGame:Game;
var guide_txt:TextField;
var guide_contest_mc:MovieClip;
public var guide_bonus_mc_:MovieClip;
public static const GUIDE_CONTEST:Number = 2;
public static const GUIDE_BONUS:Number = 1;
public static const GUIDE_COMMON:Number = 0;
public function ScreenLetsStart(){
fromMyClip("next_btn");
fromMyClip("guide_txt");
fromMyClip("guide_controls_mc");
fromMyClip("guide_bonus_mc");
fromMyClip("guide_contest_mc");
guide_controls_mc.visible = false;
guide_bonus_mc.visible = false;
guide_contest_mc.visible = false;
}
override function beforeDelete(){
next_btn.removeEventListener(MouseEvent.CLICK, onNext);
}
function onNext(_arg1){
myGame.startGame();
}
override function afterCreate(){
switch (guideType){
case GUIDE_COMMON:
guide_txt.htmlText = Lang.txt("guide");
guide_controls_mc.visible = true;
break;
case GUIDE_BONUS:
guide_txt.htmlText = Lang.txt("guide_bonus");
guide_bonus_mc.visible = true;
break;
case GUIDE_CONTEST:
guide_txt.htmlText = Lang.txt("guide_contest");
guide_contest_mc.visible = true;
break;
};
next_btn.addEventListener(MouseEvent.CLICK, onNext);
myGame.currentNextBtn = next_btn;
myGame.flushPerson();
}
}
}//package
Section 142
//ScreenMainMenu (ScreenMainMenu)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import Doc.*;
public class ScreenMainMenu extends Base {
var ico_play:MovieClip;
public var credits_btn_:Graph_L2J2_credits2;
var winUserName_mc:MovieClip;
public var embed_btn_:Graph_L2J2_download_game2;
var moreGames_btn:MyBtn;
var myButtons:Array;
var okUser_btn:MyBtn;
var credits_btn:MyBtn;
var delayShowButtons:Array;
var download_btn:MyBtn;
public var moreGames_btn_:Graph_L2J2_more_games2;
var under_mc:MovieClip;
public var ico_play_:MovieClip;
var cancelUser_btn:MyBtn;
public var records_btn_:Graph_L2J2_world_records2;
var game_btn:MyBtn;
var userNameCap_txt:TextField;
public var game_btn_:Graph_L2J2_play2;
var isShowUserName:Boolean;// = false
var isFirst:Boolean;
var myGame:Game;
public var winUserName_mc_:MovieClip;
var userName_txt:TextField;
public var download_btn_:Graph_L2J2_download_gameReal;
var records_btn:MyBtn;
var embed_btn:MyBtn;
public function ScreenMainMenu(){
isShowUserName = false;
super();
fromMyClip("winUserName_mc");
userName_txt = (winUserName_mc.getChildByName("userName_txt_") as TextField);
userNameCap_txt = (winUserName_mc.getChildByName("userNameCap_txt_") as TextField);
okUser_btn = (winUserName_mc.getChildByName("okUser_btn_") as MyBtn);
cancelUser_btn = (winUserName_mc.getChildByName("cancelUser_btn_") as MyBtn);
records_btn = (winUserName_mc.getChildByName("records_btn_") as MyBtn);
under_mc = (winUserName_mc.getChildByName("under_mc_") as MovieClip);
fromMyClip("ico_play");
ico_play.mouseEnabled = false;
under_mc.buttonMode = true;
under_mc.useHandCursor = false;
myButtons = [okUser_btn, cancelUser_btn, fromMyClip("credits_btn"), fromMyClip("moreGames_btn"), fromMyClip("download_btn"), fromMyClip("embed_btn"), fromMyClip("records_btn"), fromMyClip("game_btn")];
delayShowButtons = [game_btn, records_btn, download_btn, embed_btn, moreGames_btn, credits_btn];
game_btn.myAppearClip = ico_play;
}
function showUserName(_arg1:MouseEvent){
var _local2:Boolean;
_local2 = !((_arg1.currentTarget == cancelUser_btn));
userName_txt.text = myGame.userName;
userNameCap_txt.text = Lang.txt("enterName");
showUserName_inner(_local2);
}
override function beforeDelete(){
credits_btn.removeEventListener(MouseEvent.CLICK, showCredits);
game_btn.removeEventListener(MouseEvent.CLICK, showUserName);
cancelUser_btn.removeEventListener(MouseEvent.CLICK, showUserName);
okUser_btn.removeEventListener(MouseEvent.CLICK, goMenu);
records_btn.removeEventListener(MouseEvent.CLICK, goRecords);
download_btn.removeEventListener(MouseEvent.CLICK, downloadGame);
embed_btn.removeEventListener(MouseEvent.CLICK, embedGame);
moreGames_btn.removeEventListener(MouseEvent.CLICK, moreGamesGo);
}
override function showScreenCurrentBtns(){
myGame.currentNextBtn = (isShowUserName) ? okUser_btn : game_btn;
}
function showUserName_inner(_arg1:Boolean){
if (_arg1){
stage.focus = userName_txt;
userName_txt.setSelection((userName_txt.length + 1), (userName_txt.length + 1));
} else {
stage.focus = stage;
};
isShowUserName = _arg1;
showScreenCurrentBtns();
winUserName_mc.visible = _arg1;
}
function moreGamesGo(_arg1:MouseEvent=null):void{
Game.goToSponsorMain();
}
function embedGame(_arg1:MouseEvent=null):void{
Game.goToSponsorDownload();
}
function goRecords(_arg1){
myGame.goRecords(true);
}
function downloadGame(_arg1:MouseEvent=null):void{
Game.goToDeveloperDownload();
}
function goMenu(_arg1){
myGame.isMainMenuStart = false;
trace([myGame.userName, userName_txt.text, myGame.pers]);
myGame.userName = userName_txt.text;
myGame.goSelect();
}
function showCredits(_arg1){
myGame.goCredits();
}
override function afterCreate(){
credits_btn.addEventListener(MouseEvent.CLICK, showCredits);
game_btn.addEventListener(MouseEvent.CLICK, showUserName);
cancelUser_btn.addEventListener(MouseEvent.CLICK, showUserName);
okUser_btn.addEventListener(MouseEvent.CLICK, goMenu);
records_btn.addEventListener(MouseEvent.CLICK, goRecords);
download_btn.addEventListener(MouseEvent.CLICK, downloadGame);
embed_btn.addEventListener(MouseEvent.CLICK, embedGame);
moreGames_btn.addEventListener(MouseEvent.CLICK, moreGamesGo);
download_btn.visible = !(DocClass.iAm.isOnSponsorSite);
showUserName_inner(false);
}
}
}//package
Section 143
//ScreenMenu (ScreenMenu)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import Doc.*;
public class ScreenMenu extends Base {
public var full_game_btn_:Graph_L2J2_career2;
var winDiff:WindowDifficult;
public var credits_btn_:Graph_L2J2_credits2;
var moreGames_btn:MyBtn;
var isMainMenu:Boolean;
var download_btn:MyBtn;
public var tipFull2_txt_:TextField;
var full_game_btn:MyBtn;
var delayShowButtons:Array;
var mainMenu_btn:MyBtn;
var tipFull_txt:TextField;
var man_mc:ClipPerson;
var quick_game_btn:MyBtn;
public var mainMenu_btn_:Graph_L2J2_main_menu2;
var tipQuick_txt:TextField;
public var download_btn_:Graph_L2J2_download_gameReal;
var records_btn:MyBtn;
public var man_mc_:clipPerson;
public var embed_btn_:Graph_L2J2_download_game2;
var credits_btn:MyBtn;
public var tipFull_txt_:TextField;
public var changePers_btn_:Graph_L2J2_change_jumper2;
var changePers_btn:MyBtn;
public var records_btn_:Graph_L2J2_world_records2;
var tipFull2_txt:TextField;
public var moreGames_btn_:Graph_L2J2_moregames2Thin;
var isFirst:Boolean;
var myGame:Game;
var full2_game_btn:MyBtn;
public var quick_game_btn_:Graph_L2J2_freestyle;
public var full2_game_btn_:Graph_L2J2_contest2;
var embed_btn:MyBtn;
public var tipQuick_txt_:TextField;
public function ScreenMenu(){
fromMyClip("quick_game_btn");
fromMyClip("full_game_btn");
fromMyClip("full2_game_btn");
fromMyClip("mainMenu_btn");
fromMyClip("changePers_btn");
fromMyClip("man_mc");
fromMyClip("tipQuick_txt");
fromMyClip("tipFull_txt");
fromMyClip("tipFull2_txt");
fromMyClip("credits_btn");
fromMyClip("moreGames_btn");
fromMyClip("download_btn");
fromMyClip("embed_btn");
fromMyClip("records_btn");
delayShowButtons = [full_game_btn, full2_game_btn, quick_game_btn, changePers_btn, mainMenu_btn];
full_game_btn.myAppearClip = tipFull_txt;
quick_game_btn.myAppearClip = tipQuick_txt;
quick_game_btn.myAppearClip = tipFull2_txt;
}
override function beforeDelete(){
quick_game_btn.removeEventListener(MouseEvent.CLICK, gotoGame);
full_game_btn.removeEventListener(MouseEvent.CLICK, gotoGame);
full2_game_btn.removeEventListener(MouseEvent.CLICK, gotoGame);
full_game_btn.removeEventListener(MouseEvent.CLICK, fromBegin);
mainMenu_btn.removeEventListener(MouseEvent.CLICK, gotoMain);
changePers_btn.removeEventListener(MouseEvent.CLICK, goSelect);
winDiff.beforeDelete();
man_mc.beforeDelete();
credits_btn.removeEventListener(MouseEvent.CLICK, showCredits);
records_btn.removeEventListener(MouseEvent.CLICK, goRecords);
download_btn.removeEventListener(MouseEvent.CLICK, downloadGame);
embed_btn.removeEventListener(MouseEvent.CLICK, embedGame);
moreGames_btn.removeEventListener(MouseEvent.CLICK, moreGamesGo);
}
function goSelect(_arg1){
myGame.goSelect("menu");
}
function setVisualDisable(_arg1:MovieClip){
_arg1.enabled = false;
_arg1.mouseEnabled = false;
_arg1.mouseChildren = false;
_arg1.transform.colorTransform = new ColorTransform(0.5, 0.5, 0.5);
}
private function goRecords(_arg1:MouseEvent):void{
myGame.goRecords(false, true);
}
private function embedGame(_arg1:MouseEvent):void{
Game.goToSponsorDownload();
}
private function moreGamesGo(_arg1:MouseEvent):void{
Game.goToSponsorMain();
}
private function downloadGame(_arg1:MouseEvent):void{
Game.goToDeveloperDownload();
}
private function showCredits(_arg1:MouseEvent):void{
myGame.goCredits();
}
function selectDiffClick(_arg1:Boolean){
if (!_arg1){
return;
};
goGameMode("full", false);
}
function fromBegin(_arg1){
goSelect(_arg1);
}
function goGameMode(_arg1:String, _arg2:Boolean){
myGame.modeGame = _arg1;
myGame.modeGameWorldContest = _arg2;
myGame.contestNum = (_arg2) ? 0 : -1;
myGame.contestPoints = 0;
myGame.startGame();
}
function gotoMain(_arg1:MouseEvent){
myGame.goMainMenu();
}
function gotoGame(_arg1:MouseEvent){
var _local2:String;
var _local3:Boolean;
_local3 = false;
switch (_arg1.currentTarget){
case quick_game_btn:
_local2 = "quick";
break;
case full_game_btn:
_local2 = "full";
break;
case full2_game_btn:
_local2 = "full";
_local3 = true;
break;
};
goGameMode(_local2, _local3);
}
override function afterCreate(){
var _local1:Number;
myGame.flushPerson();
quick_game_btn.addEventListener(MouseEvent.CLICK, gotoGame);
full_game_btn.addEventListener(MouseEvent.CLICK, gotoGame);
full2_game_btn.addEventListener(MouseEvent.CLICK, gotoGame);
mainMenu_btn.addEventListener(MouseEvent.CLICK, gotoMain);
changePers_btn.addEventListener(MouseEvent.CLICK, goSelect);
man_mc.objPerson = myGame.pers;
man_mc.myMenu2Screen = this;
man_mc.showMinimalistic();
if (myGame.pers.professionalLevel >= 5){
full_game_btn.removeEventListener(MouseEvent.CLICK, gotoGame);
full_game_btn.addEventListener(MouseEvent.CLICK, fromBegin);
tipFull_txt.text = Lang.txt("tipFull");
} else {
if (myGame.pers.professionalLevel == 0){
tipFull_txt.text = Lang.txt("tipFullStart");
} else {
tipFull_txt.text = Lang.txt("tipFullContinue");
};
};
if (myGame.pers.professionalLevel < 1){
setVisualDisable(quick_game_btn);
tipQuick_txt.text = Lang.txt("tipNeed1star");
} else {
myGame.currentNextBtn = full_game_btn;
myGame.currentNextBtn = quick_game_btn;
tipQuick_txt.text = Lang.txt("tipFreestyleDescr");
};
_local1 = 1;
if (myGame.pers.professionalLevel < _local1){
full2_game_btn.Active = false;
setVisualDisable(full2_game_btn);
tipFull2_txt.text = Lang.txt((("tipNeed" + _local1) + "star"));
myGame.currentNextBtn = full_game_btn;
} else {
myGame.currentNextBtn = full2_game_btn;
tipFull2_txt.text = Lang.txt("tipContestDescr");
};
addChild((winDiff = new (Base.getClass("winDifficult"))));
winDiff.myGame = myGame;
winDiff.selectHandler = selectDiffClick;
winDiff.afterCreate();
credits_btn.addEventListener(MouseEvent.CLICK, showCredits);
records_btn.addEventListener(MouseEvent.CLICK, goRecords);
embed_btn.addEventListener(MouseEvent.CLICK, embedGame);
download_btn.addEventListener(MouseEvent.CLICK, downloadGame);
moreGames_btn.addEventListener(MouseEvent.CLICK, moreGamesGo);
download_btn.visible = !(DocClass.iAm.isOnSponsorSite);
}
}
}//package
Section 144
//ScreenRecords (ScreenRecords)
package {
import flash.events.*;
import flash.display.*;
import mochi.as3.*;
import flash.text.*;
public class ScreenRecords extends Base {
public var again_btn_:Graph_L2J2_8_Symbol92;
var points_txt:TextField;
var pointsMy_txt:TextField;
var isFromMenu2:Boolean;
var tabsUner_mc:MovieClip;
public var tab0:MovieClip;
public var tab1:MovieClip;
public var tab2:MovieClip;
public var menu_btn_:Graph_L2J2_7_Symbol93;
var submitScore:Number;
public var tabsUner_mc_:MovieClip;
var menu_btn:MyBtn;
var isFromMenu:Boolean;
var myGame:Game;
var submitName:String;
var again_btn:MyBtn;
static const RECORDS_CONTEST:Number = 1;
static const RECORDS_FREESTYLE:Number = 2;
static const RECORDS_CAREER:Number = 0;
static const BOARD_IDS:Array = ["2d937e66e3ee70a4", "f3e1dacaa5395010", "0f9fdd2642f96301"];
static var recordTableNum:Number = 0;
public function ScreenRecords(){
fromMyClip("menu_btn");
fromMyClip("again_btn");
fromMyClip("tabsUner_mc");
tabsUner_mc.stop();
}
override function beforeDelete(){
var _local1:*;
var _local2:MovieClip;
menu_btn.removeEventListener(MouseEvent.CLICK, goMenu);
again_btn.removeEventListener(MouseEvent.CLICK, goAgain);
_local1 = 0;
while (_local1 < BOARD_IDS.length) {
_local2 = tab(_local1);
_local2.removeEventListener(MouseEvent.CLICK, pressTab);
_local1++;
};
}
function gotoTab(){
var leaderBoardObj:Object;
tabsUner_mc.gotoAndStop((recordTableNum + 1));
leaderBoardObj = {clip:root["mochi_recs_mc"], onDisplay:function (){
}, onClose:onErrorOrClose, onError:onErrorOrClose, hideDoneButton:true, res:"750x690"};
leaderBoardObj.boardID = BOARD_IDS[recordTableNum];
trace(("recordTableNum=" + recordTableNum));
if (submitName){
leaderBoardObj.score = submitScore;
leaderBoardObj.name = submitName;
submitName = null;
};
MochiScores.closeLeaderboard();
MochiScores.showLeaderboard(leaderBoardObj);
}
function goAgain(_arg1){
MochiScores.closeLeaderboard();
myGame.startGame();
}
function pressTab(_arg1:MouseEvent){
var _local2:MovieClip;
var _local3:*;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = 0;
while (_local3 < BOARD_IDS.length) {
if (_local2 == tab(_local3)){
recordTableNum = _local3;
gotoTab();
break;
};
_local3++;
};
}
function onErrorOrClose(_arg1=null){
}
function tab(_arg1:Number):MovieClip{
return ((this[("tab" + _arg1)] as MovieClip));
}
function goMenu(_arg1){
MochiScores.closeLeaderboard();
if (isFromMenu){
myGame.goMainMenu();
} else {
if (isFromMenu2){
myGame.goMenu();
} else {
myGame.goMenu();
};
};
}
override function afterCreate(){
var _local1:*;
var _local2:MovieClip;
myGame.showRealMouse();
menu_btn.addEventListener(MouseEvent.CLICK, goMenu);
again_btn.addEventListener(MouseEvent.CLICK, goAgain);
_local1 = 0;
while (_local1 < BOARD_IDS.length) {
_local2 = tab(_local1);
_local2.buttonMode = true;
_local2.addEventListener(MouseEvent.CLICK, pressTab);
_local1++;
};
if (((isFromMenu) || (isFromMenu2))){
again_btn.visible = false;
myGame.currentNextBtn = menu_btn;
} else {
if (recordTableNum == RECORDS_CAREER){
again_btn.visible = false;
myGame.currentNextBtn = menu_btn;
} else {
again_btn.visible = true;
myGame.currentNextBtn = again_btn;
};
submitScore = myGame.lastResult;
submitName = ((myGame.userName.length >= 2)) ? myGame.userName : (myGame.userName + "! ");
};
gotoTab();
}
}
}//package
Section 145
//ScreenSelectPerson (ScreenSelectPerson)
package {
import flash.events.*;
public class ScreenSelectPerson extends Base {
var winDiff:WindowDifficult;
public var menu_btn_:Graph_L2J2_29_Symbol72;
var whereBack:String;
var menu_btn:MyBtn;
var myGame:Game;
var persons:Array;
public function ScreenSelectPerson(){
persons = [];
super();
fromMyClip("menu_btn");
}
override function beforeDelete(){
var _local1:*;
var _local2:ClipPerson;
menu_btn.removeEventListener(MouseEvent.CLICK, onMenu);
winDiff.beforeDelete();
_local1 = 0;
while (_local1 < persons.length) {
_local2 = persons[_local1];
_local2.beforeDelete();
_local1++;
};
persons = null;
}
function onMenu(_arg1){
if (whereBack == "menu"){
myGame.goMenu();
} else {
myGame.goMainMenu();
};
}
function selectDiffClick(_arg1:Boolean){
if (!_arg1){
return;
};
myGame.goMenu();
}
override function afterCreate(){
var _local1:*;
var _local2:ClipPerson;
menu_btn.addEventListener(MouseEvent.CLICK, onMenu);
_local1 = 0;
while (_local1 < Person.defaultPersons.length) {
_local2 = new (Base.getClass("clipPerson"));
if (((myGame.lockedCharacter) && ((_local1 == 1)))){
_local2.isLocked = true;
};
persons.push(_local2);
_local2.myScreen = this;
_local2.x = (150 + (_local1 * 310));
_local2.y = 180;
_local2.objPerson = Person.getCharachter(_local1, myGame);
addChild(_local2);
_local1++;
};
addChild((winDiff = new (Base.getClass("winDifficult"))));
winDiff.myGame = myGame;
winDiff.selectHandler = selectDiffClick;
winDiff.afterCreate();
}
}
}//package
Section 146
//ScreenSkillUp (ScreenSkillUp)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class ScreenSkillUp extends Base {
var competition_btn:MyBtn;
public var nextGo_btn_:Graph_L2J2_6_Symbol94;
var next_btn:MyBtn;
public var competition_btn_:Graph_L2J2_competition;
public var appearMedal_mc_:MovieClip;
public var menu_btn_:Graph_L2J2_7_Symbol93;
var spirits_mc:MovieClip;
var nextGo_btn:MyBtn;
public var next_btn_:Graph_L2J2_jump2;
public var spirits_mc_:MovieClip;
var pers_mc:ClipPerson;
var menu_btn:MyBtn;
var appearMedal_mc:MovieClip;
public var corner_mc_:MovieClip;
var men_mc:MovieClip;
public var men_mc_:MovieClip;
var myGame:Game;
var manLevelPointer_mc:MovieClip;
public var pers_mc_:clipPerson;
var btnsPlus:Array;
var intShowPlusElement:int;
public var manLevelPointer_mc_:MovieClip;
var corner_mc:MovieClip;
public function ScreenSkillUp(){
fromMyClip("pers_mc");
fromMyClip("next_btn");
fromMyClip("nextGo_btn");
fromMyClip("competition_btn");
fromMyClip("menu_btn");
fromMyClip("spirits_mc");
fromMyClip("men_mc");
fromMyClip("manLevelPointer_mc");
fromMyClip("corner_mc");
fromMyClip("appearMedal_mc");
menu_btn.visible = (appearMedal_mc.visible = (competition_btn.visible = (corner_mc.visible = (next_btn.visible = (nextGo_btn.visible = false)))));
men_mc.visible = false;
next_btn.addEventListener(MouseEvent.CLICK, onNext);
nextGo_btn.addEventListener(MouseEvent.CLICK, onNext);
competition_btn.addEventListener(MouseEvent.CLICK, onNext);
menu_btn.addEventListener(MouseEvent.CLICK, onMenu);
manLevelPointer_mc.visible = false;
}
override function beforeDelete(){
next_btn.removeEventListener(MouseEvent.CLICK, onNext);
nextGo_btn.removeEventListener(MouseEvent.CLICK, onNext);
competition_btn.removeEventListener(MouseEvent.CLICK, onNext);
menu_btn.removeEventListener(MouseEvent.CLICK, onMenu);
pers_mc.beforeDelete();
}
function afterUpParam(){
myGame.soundPlay("Metallic", 0.7);
if (!myGame.pers.isNewStar){
afterUpParam3();
} else {
appearMedal_mc.visible = true;
appearMedal_mc.gotoAndPlay(("got" + myGame.pers.fullLevel));
intShowPlusElement = setTimeout(showPlusElement, ((myGame.pers.fullLevel)==1) ? 2500 : 3000);
myGame.soundPlay("Reminder", 0.8);
};
}
function onNext(_arg1){
if (myGame.pers.isNewStar){
if (myGame.pers.professionalLevel >= 5){
myGame.lastResult = myGame.pers.evolutionSumPoints;
myGame.complete1career = true;
myGame.goRecords();
} else {
myGame.startGame();
};
} else {
myGame.startGame();
};
}
function afterUpParam3(){
myGame.soundPlay("Metallic", 1);
if (pers_mc._objPerson.willNewStar){
myGame.currentNextBtn = competition_btn;
competition_btn.visible = true;
} else {
if ((((Math.abs((pers_mc._objPerson.professionalLevel - Game.BONUS_MINIMUM_LEVEL)) <= 0.1)) || ((pers_mc._objPerson.fullLevel >= 5)))){
myGame.currentNextBtn = nextGo_btn;
nextGo_btn.visible = true;
} else {
myGame.currentNextBtn = next_btn;
next_btn.visible = true;
};
};
menu_btn.visible = true;
corner_mc.visible = true;
}
function onSelectElement(_arg1:MouseEvent){
var _local2:*;
var _local3:SimpleButton;
var _local4:Number;
_local2 = 0;
while (_local2 < btnsPlus.length) {
_local3 = btnsPlus[_local2];
_local3.removeEventListener(MouseEvent.CLICK, onSelectElement);
_local3.visible = false;
if (_arg1.target == _local3){
_local4 = _local3["myElementIndex"];
myGame.pers.setShapeForIndex((myGame.pers.kAllowShapes - 1), _local4);
myGame.flushPerson();
} else {
_local3["btShape"].visible = false;
};
_local2++;
};
afterUpParam3();
}
function afterUpParam2(){
}
function showPlusElement(){
var _local1:Person;
var _local2:*;
var _local3:Number;
var _local4:Object;
var _local5:*;
var _local6:Number;
var _local7:String;
var _local8:IcoShape;
var _local9:SimpleButton;
clearTimeout(intShowPlusElement);
appearMedal_mc.visible = false;
_local1 = myGame.pers;
trace(_local1.professionalLevel);
btnsPlus = new Array();
if (_local1.isNewStar){
myGame.Caption = Lang.cap("selectNewElement");
myGame.setBackMy(true, true, false);
spirits_mc.visible = false;
men_mc.visible = true;
_local2 = _local1.kAllowShapes;
_local3 = 0;
_local4 = new Object();
_local5 = 0;
while (_local5 < _local1.allowShapes.length) {
_local4[_local1.allowShapes[_local5]] = 1;
_local5++;
};
while (_local3 < 3) {
_local6 = (Base.random((TheShape.allShapeElements.length - 4)) + 4);
_local7 = TheShape.allShapeElements[_local6];
if (_local4[_local7] != null){
} else {
trace(("r->" + _local6));
if (_local3 == 0){
myGame.pers.addAllowShape(_local6);
};
_local4[_local7] = 1;
_local3++;
_local8 = new (Base.getClass("ico_shape"));
_local8.myKey_s = TheShape.keyByIndex(_local2);
_local8.shapeText = TheShape.allShapeElements[_local6];
_local8.spec_text_txt.text = Lang.txt(TheShape.allShapeElements[_local6]);
_local8.scaleX = (_local8.scaleY = 1);
_local8.x = 450;
_local8.y = (200 + ((_local3 - 1) * 100));
_local9 = new (Base.getClass("plusMegaNew"));
_local9.x = (_local8.x + 120);
_local9.y = (_local8.y - 10);
_local9.addEventListener(MouseEvent.CLICK, onSelectElement);
btnsPlus.push(_local9);
addChild(_local8);
addChild(_local9);
_local9["myElementIndex"] = _local6;
_local9["btShape"] = _local8;
};
};
};
}
function onMenu(_arg1){
myGame.goMenu();
}
override function afterCreate(){
pers_mc.objPerson = myGame.pers;
pers_mc.showUps(this);
spirits_mc.gotoAndStop(("good" + (myGame.pers.myInd + 1)));
}
}
}//package
Section 147
//screenSponsorSplash (screenSponsorSplash)
package {
public dynamic class screenSponsorSplash extends ScreenSponsorSplash {
}
}//package
Section 148
//ScreenSponsorSplash (ScreenSponsorSplash)
package {
import flash.events.*;
import flash.display.*;
import Doc.*;
public class ScreenSponsorSplash extends Base {
var play_other_btn:MyBtn;
public var bumper_btn:SimpleButton;
var play_game_btn:MyBtn;
public var bumper_mc_:MovieClip;
var myGame:Game;
var frameLateBtns:Number;
var bumper_mc:MovieClip;
public function ScreenSponsorSplash(){
afterCreate();
}
override function beforeDelete(){
bumper_btn.removeEventListener(MouseEvent.CLICK, goToSponsorMain);
bumper_mc.addFrameScript(frameLateBtns, null);
}
private function goToSponsorMain(_arg1:MouseEvent):void{
Game.goToSponsorMain(_arg1);
}
public function goNext(){
bumper_mc.stop();
beforeDelete();
parent.removeChild(this);
DocClass.iAm.afterSponsorSplash();
}
override function afterCreate(){
bumper_btn.addEventListener(MouseEvent.CLICK, goToSponsorMain);
bumper_mc = bumper_mc_;
frameLateBtns = (bumper_mc.totalFrames - 1);
bumper_mc.addFrameScript(frameLateBtns, goNext);
}
}
}//package
Section 149
//Slide (Slide)
package {
import flash.media.*;
public dynamic class Slide extends Sound {
}
}//package
Section 150
//SoundFabric (SoundFabric)
package {
import flash.utils.*;
import flash.media.*;
public class SoundFabric {
var isPlay:Boolean;
var sound_str:String;
var loops:Number;// = 1
var sChannel:SoundChannel;
var s:Sound;
var offsetMs:Number;// = 0
var vol:Number;// = 1
public function SoundFabric(_arg1:String, _arg2:Number=0, _arg3:Number=1, _arg4:Number=1){
offsetMs = 0;
loops = 1;
vol = 1;
super();
sound_str = _arg1;
offsetMs = _arg2;
loops = _arg3;
vol = _arg4;
s = new (getDefinitionByName(sound_str));
play();
}
function stop(){
isPlay = false;
sChannel.stop();
}
function setVol(_arg1){
var _local2:SoundTransform;
vol = _arg1;
_local2 = sChannel.soundTransform;
_local2.volume = vol;
sChannel.soundTransform = _local2;
}
function play(){
isPlay = true;
sChannel = s.play(offsetMs, loops);
setVol(vol);
}
}
}//package
Section 151
//star (star)
package {
import flash.display.*;
public dynamic class star extends MovieClip {
public var in_mc_:MovieClip;
}
}//package
Section 152
//Techno (Techno)
package {
import flash.media.*;
public dynamic class Techno extends Sound {
}
}//package
Section 153
//TheShape (TheShape)
package {
public class TheShape {
var arm2_n:Number;// = INF
var shoulder2_n:Number;// = INF
var arm_n:Number;// = 0
var fullRotateBonus:Number;// = 2
var shoulder_n:Number;// = 0
var body_n:Number;// = 0
var hand2_n:Number;// = INF
var leg2_n:Number;// = INF
public var myName:String;
var speedRotate:Number;// = 1
var isApproxStraight:Boolean;// = false
var head_n:Number;// = 0
var speedDownK:Number;// = 1
var foot_n:Number;// = 0
var hand_n:Number;// = 0
var hip2_n:Number;// = INF
var foot2_n:Number;// = INF
var hardIndex:Number;// = 3
var leg_n:Number;// = 0
var hip_n:Number;// = 0
static var straight:TheShape;
static var fife:TheShape;
static var triangle:TheShape;
static var straddle:TheShape;
static var beforeFlightUp:TheShape;
protected static var staightToe:Number = 50;
static var pike:TheShape;
static var knees:TheShape;
static var wheel:TheShape;
static var allShapeElements:Array = ["straight", "tuck", "pike", "straddle", "tilt", "swallow", "wheel", "triangle", "fife", "hurdle", "prayer", "knees"];
static var swallow:TheShape;
static var prayer:TheShape;
static var tuck:TheShape;
static var allShapes:Object;
static var ring:TheShape;
static var hurdle:TheShape;
static var tilt:TheShape;
public function TheShape(_arg1:String){
body_n = 0;
head_n = 0;
arm_n = 0;
foot_n = 0;
hand_n = 0;
hip_n = 0;
leg_n = 0;
shoulder_n = 0;
arm2_n = Infinity;
foot2_n = Infinity;
hand2_n = Infinity;
hip2_n = Infinity;
leg2_n = Infinity;
shoulder2_n = Infinity;
speedRotate = 1;
speedDownK = 1;
hardIndex = 3;
fullRotateBonus = 2;
isApproxStraight = false;
super();
myName = _arg1;
}
static function initAllShapes(){
var straightSpecialSpeedRotate:Number;
allShapes = new Object();
straightSpecialSpeedRotate = 0.8;
var _local2 = (straight = (allShapes["straight"] = new TheShape("straight")));
with (_local2) {
hardIndex = 999;
isApproxStraight = true;
fullRotateBonus = 1;
speedRotate = straightSpecialSpeedRotate;
shoulder_n = 50;
arm_n = 100;
foot_n = -(staightToe);
};
_local2 = (beforeFlightUp = (allShapes["beforeFlightUp"] = new TheShape("beforeFlightUp")));
with (_local2) {
isApproxStraight = true;
speedDownK = 1.85;
fullRotateBonus = 1;
speedRotate = straightSpecialSpeedRotate;
body_n = -5;
shoulder_n = -40;
arm_n = 85;
hip_n = 20;
leg_n = -30;
foot_n = 10;
};
_local2 = (tuck = (allShapes["tuck"] = new TheShape("tuck")));
with (_local2) {
hardIndex = 1;
fullRotateBonus = 0;
speedRotate = 1.4;
body_n = -20;
head_n = -30;
shoulder_n = -10;
arm_n = 60;
hip_n = 120;
leg_n = -130;
foot_n = -(staightToe);
};
_local2 = (pike = (allShapes["pike"] = new TheShape("pike")));
with (_local2) {
hardIndex = 2;
speedRotate = 1.2;
fullRotateBonus = 1;
body_n = -20;
head_n = -15;
shoulder_n = 20;
arm_n = 85;
hip_n = 135;
foot_n = -(staightToe);
};
_local2 = (straddle = (allShapes["straddle"] = new TheShape("straddle")));
with (_local2) {
isApproxStraight = true;
shoulder_n = -55;
arm_n = 110;
shoulder2_n = 60;
arm2_n = 20;
hip_n = 90;
hip2_n = -95;
foot_n = -(staightToe);
};
_local2 = (tilt = (allShapes["tilt"] = new TheShape("tilt")));
with (_local2) {
speedRotate = 1.2;
fullRotateBonus = 1;
hip_n = 115;
foot_n = 25;
shoulder_n = -70;
shoulder2_n = 70;
arm2_n = 20;
};
_local2 = (swallow = (allShapes["swallow"] = new TheShape("swallow")));
with (_local2) {
hip_n = 40;
foot_n = -(staightToe);
hip2_n = -80;
leg2_n = -50;
foot2_n = 0;
shoulder_n = 40;
arm_n = 80;
shoulder2_n = -80;
arm2_n = 30;
};
_local2 = (wheel = (allShapes["wheel"] = new TheShape("wheel")));
with (_local2) {
hip_n = 40;
foot_n = -30;
shoulder_n = -120;
hip2_n = -(hip_n);
foot2_n = -(foot_n);
shoulder2_n = -(shoulder_n);
};
_local2 = (ring = (allShapes["ring"] = new TheShape("ring")));
with (_local2) {
speedRotate = 1.2;
fullRotateBonus = 1;
hip_n = -80;
leg_n = -105;
foot_n = -(staightToe);
shoulder_n = 220;
arm_n = 70;
hand_n = 30;
head_n = 30;
};
_local2 = (triangle = (allShapes["triangle"] = new TheShape("triangle")));
with (_local2) {
speedRotate = 1.2;
fullRotateBonus = 1;
hip_n = 115;
foot_n = 20;
shoulder_n = 75;
};
_local2 = (fife = (allShapes["fife"] = new TheShape("fife")));
with (_local2) {
speedRotate = 1.1;
fullRotateBonus = 1.5;
hip_n = 75;
leg_n = -95;
shoulder_n = 40;
arm_n = 60;
shoulder2_n = 80;
hand2_n = 10;
};
_local2 = (hurdle = (allShapes["hurdle"] = new TheShape("hurdle")));
with (_local2) {
speedRotate = 1.1;
fullRotateBonus = 1.5;
hip_n = 110;
foot_n = 25;
shoulder_n = 60;
arm_n = 20;
hip2_n = -60;
leg2_n = -80;
foot2_n = 0;
shoulder2_n = -70;
arm2_n = 30;
};
_local2 = (prayer = (allShapes["prayer"] = new TheShape("prayer")));
with (_local2) {
speedRotate = 1.1;
fullRotateBonus = 1.5;
leg_n = -95;
foot_n = -(staightToe);
shoulder_n = 40;
arm_n = 110;
head_n = -30;
};
_local2 = (knees = (allShapes["knees"] = new TheShape("knees")));
with (_local2) {
speedRotate = 1.2;
fullRotateBonus = 1;
head_n = -20;
hip_n = 90;
leg_n = -155;
foot_n = -(staightToe);
shoulder_n = -5;
arm_n = 30;
};
}
static function keyByIndex(_arg1:Number):String{
return (((_arg1)==0) ? "" : _arg1.toString());
}
}
}//package
Section 154
//Ting (Ting)
package {
import flash.media.*;
public dynamic class Ting extends Sound {
}
}//package
Section 155
//winCredits (winCredits)
package {
public dynamic class winCredits extends WindowCredits {
}
}//package
Section 156
//winDifficult (winDifficult)
package {
public dynamic class winDifficult extends WindowDifficult {
}
}//package
Section 157
//WindowCredits (WindowCredits)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class WindowCredits extends WindowOnScreen {
public var link2_btn:SimpleButton;
public var menu_btn_:Graph_L2J2_back;
var credits_txt:TextField;
public var credits_txt_:TextField;
public var under_mc_:MovieClip;
public var link1_btn:SimpleButton;
public function WindowCredits(){
fromMyClip("credits_txt");
credits_txt.htmlText = (((((Lang.txt("creditsText0") + hrefTo("Vadim Pecherskiy")) + Lang.txt("creditsText1")) + hrefTo("Maxim Yurchenko", "mailto:maxim-777-m@ya.ru")) + Lang.txt("creditsText2")) + hrefTo("Flashteam.ru"));
link1_btn.addEventListener(MouseEvent.CLICK, goLink1);
link2_btn.addEventListener(MouseEvent.CLICK, goLink2);
}
override function beforeDelete(){
super.beforeDelete();
link1_btn.removeEventListener(MouseEvent.CLICK, goLink1);
link2_btn.removeEventListener(MouseEvent.CLICK, goLink2);
}
private function goLink2(_arg1:MouseEvent):void{
Game.goToLink("mailto:maxim-777-m@ya.ru");
}
private function goLink3(_arg1:MouseEvent):void{
Game.goToLink("http://flashkit.com");
}
function flashtemru(_arg1=null){
}
private function goLink4(_arg1:MouseEvent):void{
Game.gotoDeveloperSite();
}
private function goLink1(_arg1:MouseEvent):void{
Game.gotoDeveloperSite();
}
}
}//package
Section 158
//WindowDifficult (WindowDifficult)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class WindowDifficult extends Base {
var SelectDifCap_txt:TextField;
var diff_hard_btn:MyBtn;
var cancel_btn:MyBtn;
public var SelectDifCap_txt_:TextField;
var under_mc:MovieClip;
public var cancel_btn_:Graph_L2J2_12_Symbol88;
var diff_easy_btn:MyBtn;
public var diff_hard_btn_:Graph_L2J2_15_Symbol85;
public var diff_normal_btn_:Graph_L2J2_14_Symbol86;
public var under_mc_:MovieClip;
var diff_normal_btn:MyBtn;
var selectHandler:Function;
var myGame:Game;
public var diff_easy_btn_:Graph_L2J2_13_Symbol87;
public function WindowDifficult(){
visible = false;
diff_hard_btn = (getChildByName("diff_hard_btn_") as MyBtn);
diff_normal_btn = (getChildByName("diff_normal_btn_") as MyBtn);
diff_easy_btn = (getChildByName("diff_easy_btn_") as MyBtn);
cancel_btn = (getChildByName("cancel_btn_") as MyBtn);
under_mc = (getChildByName("under_mc_") as MovieClip);
SelectDifCap_txt = (getChildByName("SelectDifCap_txt_") as TextField);
under_mc.mouseEnabled = true;
diff_easy_btn.visible = false;
}
override function beforeDelete(){
diff_easy_btn.removeEventListener(MouseEvent.CLICK, selectDiffClick);
diff_normal_btn.removeEventListener(MouseEvent.CLICK, selectDiffClick);
diff_hard_btn.removeEventListener(MouseEvent.CLICK, selectDiffClick);
cancel_btn.removeEventListener(MouseEvent.CLICK, selectDiffClick);
}
function showMe(_arg1:Boolean=true){
visible = _arg1;
}
function selectDiffClick(_arg1){
var _local2:Boolean;
_local2 = !((_arg1.currentTarget == cancel_btn));
if (_local2){
myGame.pers.fromBegin();
};
switch (_arg1.currentTarget){
case diff_normal_btn:
myGame.pers.difficultAdd = 0.4;
break;
case diff_hard_btn:
myGame.pers.difficultAdd = 1.1;
break;
case cancel_btn:
break;
};
visible = false;
selectHandler.call(null, _local2);
}
override function afterCreate(){
SelectDifCap_txt.text = Lang.txt("SelectDif");
diff_easy_btn.addEventListener(MouseEvent.CLICK, selectDiffClick);
diff_normal_btn.addEventListener(MouseEvent.CLICK, selectDiffClick);
diff_hard_btn.addEventListener(MouseEvent.CLICK, selectDiffClick);
cancel_btn.addEventListener(MouseEvent.CLICK, selectDiffClick);
}
}
}//package
Section 159
//WindowOnScreen (WindowOnScreen)
package {
import flash.events.*;
import flash.display.*;
public class WindowOnScreen extends Base {
var under_mc:MovieClip;
var menu_btn:MyBtn;
var myGame:Game;
public function WindowOnScreen(){
under_mc = (getChildByName("under_mc_") as MovieClip);
under_mc.mouseEnabled = true;
}
override function beforeDelete(){
menu_btn.removeEventListener(MouseEvent.CLICK, toMenu);
}
function showMe(_arg1:Boolean=true){
visible = _arg1;
if (!_arg1){
myGame.showWinOnScreen(this, false);
};
}
function toMenu(_arg1){
showMe(false);
}
override function afterCreate(){
fromMyClip("menu_btn");
menu_btn.addEventListener(MouseEvent.CLICK, toMenu);
myGame.currentNextBtn = menu_btn;
myGame.swapChildren(this, myGame.mouse_mc);
}
}
}//package