Section 1
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function getObjectLength(_arg1:Object):uint{
var _local3:String;
var _local2:uint;
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 _local3:Object;
var _local5:String;
var _local2:Object = {};
var _local4:int;
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 _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
var _local8:Number = (((!(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 = (((!(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 = (((!(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 = (((!(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 _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(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 _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(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 modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var valueComplete:Number;
public var modifierFunction:Function;
public var extra:Object;
public var valueStart:Number;
public var hasModifier:Boolean;
public var arrayIndex:Number;
public var originalValueComplete:Object;
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 = "\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 = 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 getValue:Function;
public var preProcess:Function;
public var setValue: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 = "";
_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 = "";
_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 = "";
_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.display.*;
import flash.events.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
public static var autoOverwrite:Boolean = true;
private static var _engineExists:Boolean = false;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyModifierList:Object;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
if (!_inited){
init();
};
var _local4:SpecialPropertyModifier = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
if (!_inited){
init();
};
var _local6:SpecialProperty = 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 _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];
};
var _local5:Object = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local6:Number = (isNaN(_local5.time)) ? 0 : _local5.time;
var _local7:Number = (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 _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local4:uint;
var _local5:SpecialPropertySplitter;
var _local6:Array;
var _local7:uint;
var _local3:Array = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
if (_specialPropertySplitterList[_args[_local4]]){
_local5 = _specialPropertySplitterList[_args[_local4]];
_local6 = _local5.splitValues(_arg1, null);
_local7 = 0;
while (_local7 < _local6.length) {
_local3.push(_local6[_local7].name);
_local7++;
};
} else {
_local3.push(_args[_local4]);
};
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local5:uint;
var _local6:String;
var _local7:Boolean;
var _local3:TweenListObj = _tweenList[_arg1];
var _local4:TweenListObj = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
var _local3:Number = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.33.74");
}
public static function onEnterFrame(_arg1:Event):void{
updateTime();
updateFrame();
var _local2:Boolean;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
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 tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
var isOver:Boolean;
var cTime:Number = 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 _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_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 _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_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 _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];
};
var _local7:Object = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time;
var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay;
var _local10:Array = new Array();
var _local11:Object = {overwrite:true, time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
var _local12:Object = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
if (((_local7.overwrite == undefined)) ? autoOverwrite : _local7.overwrite){
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
};
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local4:Boolean;
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;
if (!Boolean(_tweenList)){
return ([]);
};
var _local4:Array = 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 = _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;
if (!Boolean(_tweenList)){
return (0);
};
var _local3:Number = 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 removedLocally:Boolean;
var i:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
var removed:Boolean;
var tl:uint = _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{
if (!_inited){
init();
};
var _local4:SpecialPropertySplitter = 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 _local4:uint;
var _local3:Array = 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 _local4:uint;
var _local3:Array = 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 hasStarted:Boolean;
public var onUpdate:Function;
public var useFrames:Boolean;
public var count:Number;
public var onOverwriteParams:Array;
public var timeStart: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 isCaller:Boolean;
public var timePaused:Number;
public var transition:Function;
public var onCompleteParams:Array;
public var onError:Function;
public var timesCalled:Number;
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 _local3:String;
var _local2:TweenListObj = 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 _local3:String;
var _local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
var _local2:Boolean;
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 _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local2:Object = _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
//SoundManager (fangxu.manager.SoundManager)
package fangxu.manager {
import flash.events.*;
import flash.media.*;
public class SoundManager {
public var effectsOn:Boolean;
public var musicOn:Boolean;
private var _isSound:Boolean;// = true
private var _channel:SoundChannel;
private var _sound:Sound;
private static var instance:SoundManager;
private static var key:Boolean = false;
public function SoundManager(){
if (!key){
throw (new Error("单例,请用 getInstance() 取实例!"));
};
key = false;
musicOn = true;
effectsOn = true;
}
public function start():void{
if (_sound != null){
_channel = _sound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, this.onSoundEnd);
};
}
public function startSound(_arg1:Class){
if (_channel != null){
this.clear();
};
_sound = new (_arg1);
this.start();
}
public function stop():void{
if (_channel != null){
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, this.onSoundEnd);
};
}
private function onSoundEnd(_arg1:Event):void{
_channel.removeEventListener(Event.SOUND_COMPLETE, this.onSoundEnd);
this.start();
if (_isSound){
_channel.soundTransform = new SoundTransform(1);
} else {
_channel.soundTransform = new SoundTransform(0);
};
}
public function clear():void{
this.stop();
_sound = null;
_channel = null;
_isSound = true;
}
public function stopSound():void{
_channel.stop();
_isSound = false;
}
public static function getInstance():SoundManager{
if (SoundManager.instance == null){
key = true;
SoundManager.instance = new (SoundManager);
};
return (SoundManager.instance);
}
}
}//package fangxu.manager
Section 10
//TimeManager (fangxu.manager.TimeManager)
package fangxu.manager {
import flash.events.*;
import flash.utils.*;
public class TimeManager {
private var _completeFn:Function;
private var _timer:Timer;
private var _timerFn:Function;
private var _isTimeOn:Boolean;// = false
private static var instance:TimeManager;
private static var key:Boolean = false;
public function TimeManager(){
if (!key){
throw (new Error("单例,请用 getInstance() 取实例!"));
};
key = false;
_isTimeOn = false;
}
public function start():void{
if (_timer != null){
_isTimeOn = true;
_timer.start();
};
}
public function stop():void{
if (_timer != null){
_isTimeOn = false;
_timer.stop();
};
}
public function clear():void{
if (_timer != null){
_isTimeOn = false;
_timer.removeEventListener(TimerEvent.TIMER, _timerFn);
_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, _completeFn);
_timer.stop();
_timer = null;
};
}
public function reStart(_arg1:uint):void{
if (_timer != null){
this.clear();
};
_isTimeOn = true;
_timer = new Timer(1000, _arg1);
_timer.addEventListener(TimerEvent.TIMER, _timerFn);
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, _completeFn);
_timer.start();
}
public function adStart(_arg1:uint, _arg2:Function, _arg3:Function):void{
this._timerFn = _arg2;
this._completeFn = _arg3;
if (_timer == null){
_isTimeOn = true;
_timer = new Timer(1000, _arg1);
_timer.addEventListener(TimerEvent.TIMER, _timerFn);
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, _completeFn);
_timer.start();
} else {
this.clear();
};
}
public static function getInstance():TimeManager{
if (TimeManager.instance == null){
key = true;
TimeManager.instance = new (TimeManager);
};
return (TimeManager.instance);
}
}
}//package fangxu.manager
Section 11
//IntUtil (fangxu.util.IntUtil)
package fangxu.util {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package fangxu.util
Section 12
//MD5 (fangxu.util.MD5)
package fangxu.util {
import flash.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package fangxu.util
Section 13
//MainBase (fangxu.MainBase)
package fangxu {
import flash.display.*;
import flash.events.*;
import fangxu.manager.*;
public class MainBase extends Sprite {
private var _bMusic:Boolean;
var _mcPause;
private var _mouseSprite:Sprite;
public var mStage:Stage;
var _mcNLevel;
private var _bPause:Boolean;
private var _bSound:Boolean;
public var mRoot;
private var _bNLevel:Boolean;
public function initBase(_arg1:Stage, _arg2=null){
this.mRoot = _arg2;
this.mStage = _arg1;
}
public function set bMusic(_arg1:Boolean):void{
_bMusic = _arg1;
}
public function get mouseSprite():Sprite{
return (_mouseSprite);
}
public function get bSound():Boolean{
return (_bSound);
}
public function rmMouseSprite():Boolean{
try {
trace("rmMouseSprite", _mouseSprite.parent);
_mouseSprite.parent.removeChild(_mouseSprite);
} catch(e) {
trace(e);
return (false);
};
return (true);
}
public function set mouseSprite(_arg1:Sprite):void{
_mouseSprite = _arg1;
}
public function set bSound(_arg1:Boolean):void{
_bSound = _arg1;
}
public function nextLevel(_arg1:Class, _arg2:Boolean=true, _arg3:Function=null, _arg4:Function=null):void{
var mcClass = _arg1;
var bNLevel = _arg2;
var onNLevel = _arg3;
var outNLevel = _arg4;
_bNLevel = bNLevel;
if (bNLevel){
if (_mcNLevel == null){
_mcNLevel = new (mcClass);
_mcNLevel.x = ((mStage.stageWidth / 2) - (_mcNLevel.width / 2));
_mcNLevel.y = ((mStage.stageHeight / 2) - (_mcNLevel.height / 2));
mStage.addChild(_mcNLevel);
if ((_mcNLevel.btNextLevel is MovieClip)){
_mcNLevel.btNextLevel.buttonMode = true;
};
_mcNLevel.btNextLevel.addEventListener(MouseEvent.CLICK, function (){
nextLevel(mcClass, false, onNLevel, outNLevel);
});
};
adMouseSprite(mStage);
_mcNLevel.visible = true;
mStage.swapChildren(_mcNLevel, _mouseSprite);
TimeManager.getInstance().stop();
if (_bMusic){
SoundManager.getInstance().stop();
};
if (onNLevel != null){
onNLevel(_mcNLevel);
};
} else {
rmMouseSprite();
_mcNLevel.visible = false;
TimeManager.getInstance().start();
if (_bMusic){
SoundManager.getInstance().start();
};
if (outNLevel != null){
outNLevel();
};
};
}
public function get bMusic():Boolean{
return (_bMusic);
}
public function adMouseSprite(_arg1=null, _arg2:Number=0, _arg3:uint=0x9900):Sprite{
var _local4:Number;
var _local5:Number;
trace("adMouseSprite", _arg1);
if (_arg1 == null){
_arg1 = this.mStage;
_local4 = _arg1.stageWidth;
_local5 = _arg1.stageHeight;
} else {
_local4 = _arg1.width;
_local5 = _arg1.height;
};
var _local6:Sprite = new Sprite();
_local6.graphics.beginFill(_arg3);
_local6.graphics.drawRect(0, 0, _local4, _local5);
_local6.graphics.endFill();
_local6.alpha = _arg2;
_arg1.addChild(_local6);
mouseSprite = _local6;
return (_local6);
}
public function set bPause(_arg1:Boolean):void{
_bPause = _arg1;
}
public function set bNLevel(_arg1:Boolean):void{
_bNLevel = _arg1;
}
public function get bPause():Boolean{
return (_bPause);
}
public function pause(_arg1:Class, _arg2:Boolean=true, _arg3:Function=null, _arg4:Function=null):void{
var mcClass = _arg1;
var bPause = _arg2;
var onPause = _arg3;
var outPause = _arg4;
_bPause = bPause;
if (bPause){
if (_mcPause == null){
_mcPause = new (mcClass);
_mcPause.x = ((mStage.stageWidth / 2) - (_mcPause.width / 2));
_mcPause.y = ((mStage.stageHeight / 2) - (_mcPause.height / 2));
mStage.addChild(_mcPause);
_mcPause.btContinue.addEventListener(MouseEvent.CLICK, function (){
pause(mcClass, false, onPause, outPause);
});
};
adMouseSprite(mStage);
_mcPause.visible = true;
mStage.swapChildren(_mcPause, _mouseSprite);
TimeManager.getInstance().stop();
if (_bMusic){
SoundManager.getInstance().stop();
};
if (onPause != null){
onPause();
};
} else {
rmMouseSprite();
_mcPause.visible = false;
TimeManager.getInstance().start();
if (_bMusic){
SoundManager.getInstance().start();
};
if (outPause != null){
outPause();
};
};
}
public function get bNLevel():Boolean{
return (_bNLevel);
}
}
}//package fangxu
Section 14
//Config (game.Config)
package game {
public class Config {
public static const MAX_LEVEL:int = 10;
public static function getTime(_arg1:int=1):int{
var _local2 = 60;
switch (_arg1){
case 1:
_local2 = 50;
break;
case 2:
_local2 = 70;
break;
case 3:
_local2 = 90;
break;
case 4:
_local2 = 110;
break;
case 5:
_local2 = 130;
break;
case 6:
_local2 = 150;
break;
case 7:
_local2 = 170;
break;
case 8:
_local2 = 200;
break;
case 9:
_local2 = 250;
break;
case 10:
_local2 = 300;
break;
};
return (_local2);
}
public static function getMap(_arg1:int=1):Class{
var _local2:Class = Map1;
switch (_arg1){
case 1:
_local2 = Map1;
break;
case 2:
_local2 = Map2;
break;
case 3:
_local2 = Map3;
break;
case 4:
_local2 = Map4;
break;
case 5:
_local2 = Map5;
break;
case 6:
_local2 = Map6;
break;
case 7:
_local2 = Map7;
break;
case 8:
_local2 = Map8;
break;
case 9:
_local2 = Map9;
break;
case 10:
_local2 = Map10;
break;
};
return (_local2);
}
}
}//package game
Section 15
//Hero (game.Hero)
package game {
import flash.display.*;
public class Hero extends MovieClip {
public var speed:Number;
public var time:MovieClip;
public var other:MovieClip;
public var oldx:Number;
public var gravity:Number;
public var jumpSpeed:Number;
public var man:MovieClip;
public var jumpStart:Number;
}
}//package game
Section 16
//Loading (game.Loading)
package game {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Loading {
private var _root;
private var _func:Function;
private var _channel:SoundChannel;
private var _loadSound:Sound;
private var _channel2:SoundChannel;
private var _loadSound2:Sound;
private var _mc:MovieClip;
public function Loading(_arg1, _arg2:MovieClip, _arg3:Function){
var _r = _arg1;
var _mc = _arg2;
var _callBack = _arg3;
super();
this._root = _r;
this._mc = _mc;
this._func = _callBack;
_mc.mcLoader1.visible = true;
_mc.mcLoader2.visible = false;
_mc.mcLoader2.mc_9_loading.visible = false;
_mc.mcLoader2.mc_9_loading.gotoAndStop(1);
_root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_root.loaderInfo.addEventListener(Event.COMPLETE, loadEnd);
_mc.mcLoader2.btSkip.addEventListener(MouseEvent.CLICK, function (){
if (_channel){
_channel.stop();
};
if (_channel2){
_channel2.stop();
};
_mc.mcLoader2.mc_9_loading.visible = false;
_mc.mcLoader2.mc_9_loading.gotoAndStop(1);
if (_channel){
_channel.removeEventListener(Event.SOUND_COMPLETE, onLoadSoundEnd);
};
_mc.mcLoader2.removeEventListener(Event.ENTER_FRAME, frameListiser);
_func();
});
}
private function frameListiser(_arg1:Event):void{
if (_mc.mcLoader2.currentFrame == 77){
_mc.mcLoader2.mc_9_loading.visible = true;
_mc.mcLoader2.mc_9_loading.gotoAndPlay(1);
};
if (_mc.mcLoader2.currentFrame == 174){
if (_channel){
_channel.stop();
};
if (_channel2){
_channel2.stop();
};
_mc.mcLoader2.mc_9_loading.visible = false;
_mc.mcLoader2.mc_9_loading.gotoAndStop(1);
_mc.mcLoader2.removeEventListener(Event.ENTER_FRAME, frameListiser);
_func();
};
}
private function loadEnd(_arg1:Event):void{
trace("loadEnd");
_mc.txtLoaded.text = "";
_mc.mcLoading.visible = false;
_mc.mcLoader1.visible = false;
_mc.mcLoader2.visible = true;
_root.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
_root.loaderInfo.removeEventListener(Event.COMPLETE, loadEnd);
_loadSound = new LoadSound();
_channel = _loadSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, onLoadSoundEnd);
_mc.mcLoader2.addEventListener(Event.ENTER_FRAME, frameListiser);
}
private function onLoadSoundEnd(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, onLoadSoundEnd);
_channel = _loadSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, onLoadSoundEnd);
}
private function loadProgress(_arg1:ProgressEvent):void{
trace(_arg1.bytesLoaded, _arg1.bytesTotal);
var _local2:* = Math.floor(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
_mc.txtLoaded.text = (_local2 + "%");
}
}
}//package game
Section 17
//Map (game.Map)
package game {
import flash.display.*;
import flash.events.*;
public class Map extends MovieClip {
public var blueMCs:Array;
private var hitColor:String;
public var blueRims:Array;
public var blueFeathers:Array;
public var feathers:Array;
public var greenRimMCs:Array;
private var hitNumber:int;
public var redRimMCs:Array;
public var greenRims:Array;
public var blueRimMCs:Array;
public var greenMCs:Array;
private var _bottom:MovieClip;
public var redRims:Array;
public var movieClips:Array;
public var monsters:Array;
public var greenFeathers:Array;
public var redFeathers:Array;
private var _hero:MovieClip;
public var redMCs:Array;
private var _goal:MovieClip;
public function Map(){
feathers = [];
movieClips = [];
monsters = [];
greenFeathers = [];
blueFeathers = [];
redFeathers = [];
greenMCs = [];
blueMCs = [];
redMCs = [];
greenRims = [];
blueRims = [];
redRims = [];
greenRimMCs = [];
blueRimMCs = [];
redRimMCs = [];
hitColor = "";
hitNumber = 0;
}
public function mcMove(_arg1:int):void{
var _local2:MovieClip;
fnResetAll();
_local2 = (movieClips[_arg1] as MovieClip);
feathers[_arg1].visible = false;
_local2.gotoAndPlay(_local2.currentFrame);
}
private function fnTestHitFeathers():void{
var _local1:MovieClip;
for each (_local1 in greenFeathers) {
if (((_local1.visible) && (_hero.man.hitTestObject(_local1)))){
if (hitColor == "green"){
hitNumber++;
} else {
hitColor = "green";
hitNumber = 1;
fnReset(blueFeathers, blueMCs, blueRims, blueRimMCs);
fnReset(redFeathers, redMCs, redRims, redRimMCs);
};
_local1.visible = false;
childHero(hitNumber, 1);
fnMcAction(greenMCs, greenRims, greenRimMCs);
dispatchEvent(new MapEvent(MapEvent.FEATHER));
};
};
for each (_local1 in blueFeathers) {
if (((_local1.visible) && (_hero.man.hitTestObject(_local1)))){
if (hitColor == "blue"){
hitNumber++;
} else {
hitColor = "blue";
hitNumber = 1;
fnReset(greenFeathers, greenMCs, greenRims, greenRimMCs);
fnReset(redFeathers, redMCs, redRims, redRimMCs);
};
_local1.visible = false;
childHero(hitNumber, 2);
fnMcAction(blueMCs, blueRims, blueRimMCs);
dispatchEvent(new MapEvent(MapEvent.FEATHER));
};
};
for each (_local1 in redFeathers) {
if (((_local1.visible) && (_hero.man.hitTestObject(_local1)))){
if (hitColor == "red"){
hitNumber++;
} else {
hitColor = "red";
hitNumber = 1;
fnReset(blueFeathers, blueMCs, blueRims, blueRimMCs);
fnReset(greenFeathers, greenMCs, greenRims, greenRimMCs);
};
_local1.visible = false;
childHero(hitNumber, 3);
fnMcAction(redMCs, redRims, redRimMCs);
dispatchEvent(new MapEvent(MapEvent.FEATHER));
};
};
}
public function childBack(_arg1:int):void{
trace(_arg1);
}
public function superInit(_arg1:MovieClip, _arg2:MovieClip, _arg3:MovieClip):void{
this._hero = _arg1;
this._bottom = _arg2;
this._goal = _arg3;
}
public function childHero(_arg1:int, _arg2:int):void{
}
public function mcStop(_arg1:int):void{
feathers[_arg1].visible = true;
movieClips[_arg1].stop();
}
public function fnResetAll():void{
var _local1:MovieClip;
for each (_local1 in feathers) {
_local1.visible = true;
};
for each (_local1 in movieClips) {
_local1.stop();
};
for each (_local1 in greenFeathers) {
_local1.gotoAndStop(1);
_local1.visible = true;
};
for each (_local1 in blueFeathers) {
_local1.gotoAndStop(2);
_local1.visible = true;
};
for each (_local1 in redFeathers) {
_local1.gotoAndStop(3);
_local1.visible = true;
};
for each (_local1 in greenMCs) {
_local1.stop();
};
for each (_local1 in blueMCs) {
_local1.stop();
};
for each (_local1 in redMCs) {
_local1.stop();
};
for each (_local1 in greenRims) {
_local1.gotoAndStop(1);
_local1.visible = true;
};
for each (_local1 in blueRims) {
_local1.gotoAndStop(2);
_local1.visible = true;
};
for each (_local1 in redRims) {
_local1.gotoAndStop(3);
_local1.visible = true;
};
for each (_local1 in greenRimMCs) {
_local1.gotoAndStop(2);
_local1.visible = false;
};
for each (_local1 in blueRimMCs) {
_local1.gotoAndStop(2);
_local1.visible = false;
};
for each (_local1 in redRimMCs) {
_local1.gotoAndStop(2);
_local1.visible = false;
};
}
private function fnMcAction(_arg1:Array, _arg2:Array, _arg3:Array):void{
var _local4:MovieClip;
for each (_local4 in _arg1) {
if (_local4.featherNumber <= hitNumber){
_local4.gotoAndPlay(_local4.currentFrame);
};
};
for each (_local4 in _arg2) {
_local4.visible = false;
};
for each (_local4 in _arg3) {
_local4.gotoAndStop(1);
_local4.visible = true;
};
}
public function childEnterFrame():void{
}
public function start():void{
fnResetAll();
this.addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function fnReset(_arg1:Array, _arg2:Array, _arg3:Array, _arg4:Array):void{
var _local5:MovieClip;
for each (_local5 in _arg1) {
_local5.visible = true;
};
for each (_local5 in _arg2) {
_local5.stop();
};
for each (_local5 in _arg3) {
_local5.visible = true;
};
for each (_local5 in _arg4) {
_local5.gotoAndStop(2);
_local5.visible = false;
};
}
private function fnEnd(_arg1:MapEvent):void{
dispatchEvent(_arg1);
this.removeEventListener(Event.ENTER_FRAME, enterFrame);
}
private function enterFrame(_arg1:Event):void{
var _local2:MovieClip;
var _local3:int;
while (_local3 < feathers.length) {
_local2 = (feathers[_local3] as MovieClip);
if (((_local2.visible) && (_hero.man.hitTestObject(_local2)))){
mcMove(_local3);
childBack(_local3);
dispatchEvent(new MapEvent(MapEvent.FEATHER));
};
_local3++;
};
if (_bottom.hitTestObject(_hero.man)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_goal.hitTestObject(_hero.man)){
fnEnd(new MapEvent(MapEvent.HERO_GOAL));
return;
};
for each (_local2 in monsters) {
if (_local2.hitTestPoint((hero.x - 20), (hero.y - 5), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_local2.hitTestPoint((hero.x + 22), (hero.y - 5), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_local2.hitTestPoint((hero.x - 20), (hero.y - 75), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_local2.hitTestPoint((hero.x + 22), (hero.y - 75), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_local2.hitTestPoint((hero.x - 20), (hero.y - 38), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
if (_local2.hitTestPoint((hero.x + 22), (hero.y - 38), true)){
fnEnd(new MapEvent(MapEvent.HERO_DIE));
return;
};
};
fnTestHitFeathers();
childEnterFrame();
}
public function get hero():MovieClip{
return (_hero);
}
}
}//package game
Section 18
//Map1 (game.Map1)
package game {
import flash.display.*;
public class Map1 extends Map {
public var mcBottom:MovieClip;
public var sea:MovieClip;
public var goal:MovieClip;
public var startX:Number;// = 198.5
public var startY:Number;// = 162.9
public var map:MovieClip;
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.start();
}
}
}//package game
Section 19
//Map10 (game.Map10)
package game {
import flash.display.*;
public class Map10 extends Map {
public var goal:MovieClip;
public var rim10:MovieClip;
public var rim11:MovieClip;
public var rim12:MovieClip;
public var rim14:MovieClip;
public var rim15:MovieClip;
public var rim16:MovieClip;
public var rim13:MovieClip;
public var startX:Number;// = 185
public var sea:MovieClip;
public var startY:Number;// = -61
public var rim1:MovieClip;
public var rim2:MovieClip;
public var rim3:MovieClip;
public var rim4:MovieClip;
public var rim5:MovieClip;
public var mcBottom:MovieClip;
public var rim9:MovieClip;
public var rim6:MovieClip;
public var rim7:MovieClip;
public var rim8:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather4:MovieClip;
public var feather6:MovieClip;
public var feather3:MovieClip;
public var feather5:MovieClip;
public var map:MovieClip;
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.greenFeathers = [this.feather1, this.feather4];
this.blueFeathers = [this.feather2, this.feather5];
this.redFeathers = [this.feather3, this.feather6];
this.greenRims = [this.rim1, this.rim2, this.rim4, this.rim5, this.rim8];
this.greenRimMCs = [this.map.mc1, this.map.mc2, this.map.mc4, this.map.mc5, this.map.mc8];
this.blueRims = [this.rim3, this.rim10, this.rim11, this.rim12];
this.blueRimMCs = [this.map.mc3, this.map.mc10, this.map.mc11, this.map.mc12];
this.redRims = [this.rim6, this.rim7, this.rim9, this.rim13, this.rim14, this.rim15, this.rim16];
this.redRimMCs = [this.map.mc6, this.map.mc7, this.map.mc9, this.map.mc13, this.map.mc14, this.map.mc15, this.map.mc16];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
}
}//package game
Section 20
//Map2 (game.Map2)
package game {
import flash.display.*;
public class Map2 extends Map {
public var mcBottom:MovieClip;
public var feather:MovieClip;
public var sea:MovieClip;
public var goal:MovieClip;
public var startX:Number;// = 198.4
public var startY:Number;// = 148.7
public var map:MovieClip;
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.feathers = [this.feather];
this.movieClips = [this.map.mc1];
this.start();
this.feather.gotoAndStop(2);
}
}
}//package game
Section 21
//Map3 (game.Map3)
package game {
import flash.display.*;
public class Map3 extends Map {
public var mcBottom:MovieClip;
public var feather:MovieClip;
public var sea:MovieClip;
public var goal:MovieClip;
public var feather2:MovieClip;
public var startY:Number;// = 147.5
public var map:MovieClip;
public var startX:Number;// = 195.3
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.feathers = [this.feather, this.feather2];
this.movieClips = [this.map.mc1, this.map.mc2];
this.start();
this.feather.gotoAndStop(1);
this.feather2.gotoAndStop(2);
}
}
}//package game
Section 22
//Map4 (game.Map4)
package game {
import flash.display.*;
public class Map4 extends Map {
public var mcBottom:MovieClip;
public var map:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var feather4:MovieClip;
public var goal:MovieClip;
public var sea:MovieClip;
public var startY:Number;// = -76
public var startX:Number;// = -408
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.map.mc1.featherNumber = 1;
this.map.mc2.featherNumber = 2;
this.map.mc3.featherNumber = 1;
this.greenFeathers = [this.feather1, this.feather4];
this.redFeathers = [this.feather2, this.feather3];
this.greenMCs = [this.map.mc1, this.map.mc3];
this.redMCs = [this.map.mc2];
this.start();
}
}
}//package game
Section 23
//Map5 (game.Map5)
package game {
import flash.display.*;
public class Map5 extends Map {
public var sea:MovieClip;
public var goal:MovieClip;
public var rim1:MovieClip;
public var rim3:MovieClip;
public var mcBottom:MovieClip;
public var map:MovieClip;
public var rim2:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var feather4:MovieClip;
public var feather5:MovieClip;
public var feather6:MovieClip;
public var startY:Number;// = -394
public var startX:Number;// = -689
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.map.mc1.featherNumber = 1;
this.map.mc2.featherNumber = 1;
this.map.mc3.featherNumber = 2;
this.map.mc4.featherNumber = 1;
this.map.mc2.gotoAndStop(40);
this.greenFeathers = [this.feather1];
this.blueFeathers = [this.feather2, this.feather5];
this.redFeathers = [this.feather3, this.feather4, this.feather6];
this.greenMCs = [this.map.mc1];
this.blueMCs = [this.map.mc2, this.map.mc4];
this.redMCs = [this.map.mc3];
this.redRims = [this.rim1, this.rim2, this.rim3];
this.redRimMCs = [this.map.mc5, this.map.mc6, this.map.mc7];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
}
}//package game
Section 24
//Map6 (game.Map6)
package game {
import flash.display.*;
public class Map6 extends Map {
public var sea:MovieClip;
public var goal:MovieClip;
public var rim1:MovieClip;
public var rim3:MovieClip;
public var rim4:MovieClip;
public var rim5:MovieClip;
public var mcBottom:MovieClip;
public var rim2:MovieClip;
public var rim6:MovieClip;
public var rim7:MovieClip;
public var rim8:MovieClip;
public var rim9:MovieClip;
public var map:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var feather4:MovieClip;
public var startY:Number;// = -515
public var startX:Number;// = -339
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.greenFeathers = [this.feather1, this.feather4];
this.blueFeathers = [this.feather2];
this.redFeathers = [this.feather3];
this.greenRims = [this.rim1, this.rim2, this.rim3, this.rim4, this.rim9];
this.greenRimMCs = [this.map.mc1, this.map.mc2, this.map.mc3, this.map.mc4, this.map.mc9];
this.blueRims = [this.rim5, this.rim6, this.rim7];
this.blueRimMCs = [this.map.mc5, this.map.mc6, this.map.mc7];
this.redRims = [this.rim8];
this.redRimMCs = [this.map.mc8];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
}
}//package game
Section 25
//Map7 (game.Map7)
package game {
import flash.display.*;
public class Map7 extends Map {
public var sea:MovieClip;
public var goal:MovieClip;
public var rim1:MovieClip;
public var rim3:MovieClip;
public var rim4:MovieClip;
public var mcBottom:MovieClip;
public var map:MovieClip;
public var rim2:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var startX:Number;// = -158
public var startY:Number;// = -182
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.map.mc0.featherNumber = 1;
this.greenFeathers = [this.feather1, this.feather3];
this.blueFeathers = [this.feather2];
this.greenMCs = [this.map.mc0];
this.blueRims = [this.rim1, this.rim2, this.rim3, this.rim4];
this.blueRimMCs = [this.map.mc1, this.map.mc2, this.map.mc3, this.map.mc4];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
override public function childEnterFrame():void{
this.sea.y--;
}
}
}//package game
Section 26
//Map8 (game.Map8)
package game {
import flash.display.*;
public class Map8 extends Map {
public var feather10:MovieClip;
public var goal:MovieClip;
public var startX:Number;// = 40
public var startY:Number;// = -127
public var sea:MovieClip;
public var rim1:MovieClip;
public var rim2:MovieClip;
public var rim3:MovieClip;
public var rim4:MovieClip;
public var rim5:MovieClip;
public var mcBottom:MovieClip;
public var rim6:MovieClip;
public var rim8:MovieClip;
public var map:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var feather4:MovieClip;
public var feather5:MovieClip;
public var feather7:MovieClip;
public var feather1:MovieClip;
public var feather9:MovieClip;
public var rim7:MovieClip;
public var feather6:MovieClip;
public var rim9:MovieClip;
public var feather8:MovieClip;
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.greenFeathers = [this.feather1, this.feather5, this.feather7];
this.blueFeathers = [this.feather3, this.feather8];
this.redFeathers = [this.feather2, this.feather4, this.feather6, this.feather9, this.feather10];
this.greenRims = [this.rim5, this.rim6, this.rim9];
this.greenRimMCs = [this.map.mc5, this.map.mc6, this.map.mc9];
this.blueRims = [this.rim7, this.rim8];
this.blueRimMCs = [this.map.mc7, this.map.mc8];
this.redRims = [this.rim1, this.rim2, this.rim3, this.rim4];
this.redRimMCs = [this.map.mc1, this.map.mc2, this.map.mc3, this.map.mc4];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
}
}//package game
Section 27
//Map9 (game.Map9)
package game {
import flash.display.*;
public class Map9 extends Map {
public var startY:Number;// = -40
public var sea:MovieClip;
public var goal:MovieClip;
public var monster1:MovieClip;
public var monster2:MovieClip;
public var monster3:MovieClip;
public var rim1:MovieClip;
public var rim3:MovieClip;
public var rim4:MovieClip;
public var rim5:MovieClip;
public var mcBottom:MovieClip;
public var rim2:MovieClip;
public var rim6:MovieClip;
public var rim7:MovieClip;
public var map:MovieClip;
public var feather1:MovieClip;
public var feather2:MovieClip;
public var feather3:MovieClip;
public var feather4:MovieClip;
public var startX:Number;// = 167
override public function childHero(_arg1:int, _arg2:int):void{
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
if (_arg1 == 1){
hero.other.feather1.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 2){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
} else {
if (_arg1 == 3){
hero.other.feather1.feather.gotoAndStop(_arg2);
hero.other.feather2.feather.gotoAndStop(_arg2);
hero.other.feather3.feather.gotoAndStop(_arg2);
};
};
};
}
public function init(_arg1:MovieClip):void{
this.superInit(_arg1, this.mcBottom, this.goal);
this.monsters = [this.monster1, this.monster2, this.monster3];
this.greenFeathers = [this.feather1, this.feather4];
this.blueFeathers = [this.feather2];
this.redFeathers = [this.feather3];
this.greenRims = [this.rim1, this.rim5, this.rim6, this.rim7];
this.greenRimMCs = [this.map.mc1, this.map.mc5, this.map.mc6, this.map.mc7];
this.blueRims = [this.rim2];
this.blueRimMCs = [this.map.mc2];
this.redRims = [this.rim3, this.rim4];
this.redRimMCs = [this.map.mc3, this.map.mc4];
this.start();
}
override public function childBack(_arg1:int):void{
hero.other.feather1.feather.gotoAndStop(feathers[_arg1].currentFrame);
}
}
}//package game
Section 28
//MapEvent (game.MapEvent)
package game {
import flash.events.*;
public class MapEvent extends Event {
public static const FEATHER:String = "FEATHER";
public static const HERO_GOAL:String = "HERO_GOAL";
public static const HERO_DIE:String = "HERO_DIE";
public function MapEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("MapEvent", "type", "bubbles", "cancelable", "eventPhase"));
}
override public function clone():Event{
return (new MapEvent(type, bubbles, cancelable));
}
}
}//package game
Section 29
//feathers_85 (jumpjumpworld_gamesonly_fla.feathers_85)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class feathers_85 extends MovieClip {
public function feathers_85(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 30
//load_Mcloading_1 (jumpjumpworld_gamesonly_fla.load_Mcloading_1)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class load_Mcloading_1 extends MovieClip {
public var txtLoaded:TextField;
public var mcLoading:MovieClip;
public var mcLoader1:MovieClip;
public var mcLoader2:MovieClip;
public function load_Mcloading_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 31
//MainTimeline (jumpjumpworld_gamesonly_fla.MainTimeline)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
import flash.events.*;
import fangxu.manager.*;
import game.*;
import fangxu.util.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public dynamic class MainTimeline extends MovieClip {
public var txtScore:TextField;
public var txtLevel:TextField;
public var mcLoader:MovieClip;
public var btPause:SimpleButton;
public var btMenu:SimpleButton;
public var mcSound:MovieClip;
public var btPlayAgain:SimpleButton;
public var mcNextLevel:MCNextLevel;
public var btHighScore:SimpleButton;
public var btPlay:SimpleButton;
public var txtHeros:TextField;
public var totalScore;
public var btSubmitScore:SimpleButton;
public var btHelp:SimpleButton;
public var txtTimeScore:TextField;
public var btMoreGames:SimpleButton;
public var mcMusic:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
Security.allowDomain("*");
setTimeout(loader$1999, 1000);
}
function frame3(){
stop();
btPlay.addEventListener(MouseEvent.CLICK, function (){
nextFrame();
});
}
function frame1(){
stop();
new Loading(root, mcLoader, function (){
nextFrame();
});
}
function frame4(){
stop();
totalScore = 0;
mcNextLevel.visible = true;
mcNextLevel.x = 135;
mcNextLevel.y = -202;
btMenu.addEventListener(MouseEvent.CLICK, function (){
mcNextLevel.visible = false;
Main.getInstance(stage, root).destroy();
prevFrame();
prevFrame();
});
Main.getInstance(stage, root).init();
SoundManager.getInstance().startSound(GameSound);
}
function frame2(){
stop();
totalScore = 0;
btHelp.addEventListener(MouseEvent.CLICK, function (){
nextFrame();
});
btPlay.addEventListener(MouseEvent.CLICK, function (){
nextFrame();
nextFrame();
});
btHighScore.addEventListener(MouseEvent.CLICK, function ():void{
navigateToURL(new URLRequest("http://www.gamesonly.com.cn/highscore.php?game=jumpjumpworld"), "_blank");
});
btMoreGames.addEventListener(MouseEvent.CLICK, function ():void{
navigateToURL(new URLRequest("http://www.gamesonly.com.cn/"), "_blank");
});
SoundManager.getInstance().startSound(MainSound);
}
function frame5(){
stop();
txtScore.text = totalScore;
btSubmitScore.addEventListener(MouseEvent.CLICK, function ():void{
var _local1:* = totalScore;
var _local2:* = "jumpjumpworld";
var _local3:* = "www.gamesonly.com.cn";
var _local4:* = MD5.hash((((_local3 + _local2) + _local1) + "zygomaticgames"));
trace((((((("http://www.gamesonly.com.cn/highscore.php?game=" + _local2) + "&score=") + _local1) + "&otherparam=") + _local4) + ""));
});
btPlayAgain.addEventListener(MouseEvent.CLICK, function (){
prevFrame();
});
SoundManager.getInstance().startSound(MainSound);
}
function loader$1999(){
var _local1:* = new Loader();
this.addChild(_local1);
if (loaderInfo.url.indexOf("file:///") == -1){
_local1.load(new URLRequest("http://www.flashgame001.com/stats/analyze.php?type=1"));
};
}
}
}//package jumpjumpworld_gamesonly_fla
Section 32
//mcMusic_62 (jumpjumpworld_gamesonly_fla.mcMusic_62)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class mcMusic_62 extends MovieClip {
public function mcMusic_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 33
//mcSound_61 (jumpjumpworld_gamesonly_fla.mcSound_61)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class mcSound_61 extends MovieClip {
public function mcSound_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 34
//mcTime_______doubleclick_120 (jumpjumpworld_gamesonly_fla.mcTime_______doubleclick_120)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class mcTime_______doubleclick_120 extends MovieClip {
public function mcTime_______doubleclick_120(){
addFrameScript(64, frame65);
}
function frame65(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 35
//tiaoban_01_______doubleclick_80 (jumpjumpworld_gamesonly_fla.tiaoban_01_______doubleclick_80)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class tiaoban_01_______doubleclick_80 extends MovieClip {
public function tiaoban_01_______doubleclick_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 36
//tiaoban_02_______doubleclick_79 (jumpjumpworld_gamesonly_fla.tiaoban_02_______doubleclick_79)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class tiaoban_02_______doubleclick_79 extends MovieClip {
public function tiaoban_02_______doubleclick_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 37
//tiaoban_03_______doubleclick_83 (jumpjumpworld_gamesonly_fla.tiaoban_03_______doubleclick_83)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class tiaoban_03_______doubleclick_83 extends MovieClip {
public function tiaoban_03_______doubleclick_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 38
//Timeline_12 (jumpjumpworld_gamesonly_fla.Timeline_12)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class Timeline_12 extends MovieClip {
public function Timeline_12(){
addFrameScript(79, frame80);
}
function frame80(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 39
//Timeline_14 (jumpjumpworld_gamesonly_fla.Timeline_14)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class Timeline_14 extends MovieClip {
public function Timeline_14(){
addFrameScript(106, frame107);
}
function frame107(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 40
//Timeline_2 (jumpjumpworld_gamesonly_fla.Timeline_2)
package jumpjumpworld_gamesonly_fla {
import flash.display.*;
public dynamic class Timeline_2 extends MovieClip {
public var btSkip:SimpleButton;
public var mc_9_loading:MovieClip;
public function Timeline_2(){
addFrameScript(173, frame174);
}
function frame174(){
stop();
}
}
}//package jumpjumpworld_gamesonly_fla
Section 41
//DieSound (DieSound)
package {
import flash.media.*;
public dynamic class DieSound extends Sound {
}
}//package
Section 42
//FeatherSound (FeatherSound)
package {
import flash.media.*;
public dynamic class FeatherSound extends Sound {
}
}//package
Section 43
//GameSound (GameSound)
package {
import flash.media.*;
public dynamic class GameSound extends Sound {
}
}//package
Section 44
//HeroTimeSound (HeroTimeSound)
package {
import flash.media.*;
public dynamic class HeroTimeSound extends Sound {
}
}//package
Section 45
//LevelUpSound (LevelUpSound)
package {
import flash.media.*;
public dynamic class LevelUpSound extends Sound {
}
}//package
Section 46
//LoadSound (LoadSound)
package {
import flash.media.*;
public dynamic class LoadSound extends Sound {
}
}//package
Section 47
//LoadSound2 (LoadSound2)
package {
import flash.media.*;
public dynamic class LoadSound2 extends Sound {
}
}//package
Section 48
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import fangxu.manager.*;
import flash.utils.*;
import caurina.transitions.*;
import game.*;
import fangxu.util.*;
import fangxu.*;
import flash.ui.*;
public class Main extends MainBase {
private var level:uint;
private var heroH:Number;// = 80
private var isRight:Boolean;// = true
private var tHeroNum:int;
private var then:Number;
private var bInSea:Boolean;
private var vert:int;// = 0
private var mapStartY:Number;
private var timeOutId:uint;
private var nextLevelTime:Number;
private var isAlive:Boolean;// = true
private var isEnd:Boolean;
private var now:Number;
private var hitground:Boolean;// = false
private var map:MovieClip;
private var seaStartX:Number;
private var hitroof:Boolean;// = false
private var bHeroDie:Boolean;
private var currentTime:uint;
private var bFirst:Boolean;
private var timeDiff:Number;
private var mcMap:MovieClip;
private var hero:Hero;
private var keys:Object;
private var hori:int;// = 0
private static const WIDTH:Number = 650;
private static const HEIGHT:Number = 550;
private static var instance:Main;
public function Main(){
now = getTimer();
then = now;
super();
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (((((((bHeroDie) || (bNLevel))) || (bPause))) || (isEnd))){
return;
};
if (!keys[_arg1.keyCode]){
keys[_arg1.keyCode] = true;
};
}
public function destroy():void{
TimeManager.getInstance().clear();
fnClearInterval(null);
if (hero != null){
hero.parent.removeChild(hero);
};
if (mcMap != null){
mcMap.removeEventListener(MapEvent.HERO_DIE, fnHeroDie);
mcMap.removeEventListener(MapEvent.HERO_GOAL, fnHeroGoal);
mcMap.removeEventListener(MapEvent.FEATHER, fnFeather);
mcMap.parent.removeChild(mcMap);
mcMap = (map = null);
};
if (!bFirst){
bFirst = true;
this.removeEventListener(Event.ENTER_FRAME, enterFrame);
mStage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
mStage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
currentTime = 0;
bPause = false;
bNLevel = false;
}
private function updateTimer(_arg1:TimerEvent=null){
if (currentTime > 0){
mRoot.txtTimeScore.text = (currentTime * 40);
currentTime--;
};
}
private function enterFrame(_arg1:Event):void{
then = now;
now = getTimer();
timeDiff = ((now - then) / 25);
if (bNLevel){
return;
};
if (bHeroDie){
hero.y = (hero.y + 12);
if (hero.man.currentFrame != 5){
hero.man.gotoAndStop(5);
if (bSound){
new DieSound().play();
};
};
if (hero.y > (HEIGHT + heroH)){
bHeroDie = false;
start();
hero.other.visible = true;
if (tHeroNum <= 0){
end();
};
};
return;
};
if (!!(keys[Keyboard.LEFT])){
moveLeft();
} else {
if (!!(keys[Keyboard.RIGHT])){
moveRight();
} else {
if (((!(!(keys[Keyboard.SPACE]))) || (!(!(keys[Keyboard.UP]))))){
};
};
};
moveHero();
moveWorld();
if ((mcMap.y + mcMap.sea.y) < (hero.y + 35)){
if (!bInSea){
bInSea = true;
hero.time.visible = true;
hero.time.gotoAndPlay(1);
if (bSound){
new HeroTimeSound().play();
};
};
if ((((((((hero.time.currentFrame == 13)) || ((hero.time.currentFrame == 26)))) || ((hero.time.currentFrame == 39)))) || ((hero.time.currentFrame == 52)))){
if (bSound){
new HeroTimeSound().play();
};
};
if (hero.time.currentFrame == hero.time.totalFrames){
trace("die");
bInSea = false;
fnHeroDie();
};
} else {
if (bInSea){
bInSea = false;
hero.time.stop();
hero.time.visible = false;
};
};
}
public function init():void{
keys = new Object();
level = 0;
currentTime = 0;
timeOutId = 0;
tHeroNum = 5;
mapStartY = 220;
seaStartX = -106;
nextLevelTime = 1;
bFirst = true;
bHeroDie = false;
bInSea = false;
bSound = true;
bMusic = true;
bPause = false;
bNLevel = false;
isEnd = false;
initMC();
fnNextLevel();
}
private function fnHeroGoal(_arg1:MapEvent):void{
if (!bNLevel){
trace("goal");
bNLevel = true;
hero.man.gotoAndStop(4);
trace(hero.man.currentFrame);
hero.other.visible = false;
fnNextLevel();
};
}
private function keyUpHandler(_arg1:KeyboardEvent):void{
if (!!(keys[_arg1.keyCode])){
keys[_arg1.keyCode] = false;
};
}
private function fnHeroInit():void{
vert = -1;
hori = 0;
hero.x = (WIDTH / 2);
hero.y = (HEIGHT / 2);
hero.man.gotoAndStop(3);
hero.time.stop();
hero.time.visible = false;
hero.other.feather1.feather.gotoAndStop(4);
hero.other.feather2.feather.gotoAndStop(4);
hero.other.feather3.feather.gotoAndStop(4);
}
public function initMC():void{
hero = new Hero();
mRoot.addChild(hero);
mRoot.mcSound.buttonMode = true;
mRoot.mcSound.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
if (mRoot.mcSound.currentFrame == 1){
bSound = false;
mRoot.mcSound.nextFrame();
} else {
bSound = true;
mRoot.mcSound.prevFrame();
};
});
mRoot.mcMusic.buttonMode = true;
mRoot.mcMusic.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
if (mRoot.mcMusic.currentFrame == 1){
bMusic = false;
mRoot.mcMusic.nextFrame();
SoundManager.getInstance().clear();
} else {
bMusic = true;
mRoot.mcMusic.prevFrame();
SoundManager.getInstance().startSound(GameSound);
};
});
mRoot.mcNextLevel.buttonMode = true;
mRoot.mcNextLevel.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
var e = _arg1;
Tweener.addTween(mRoot.mcNextLevel, {y:-202, time:(nextLevelTime * 0.75), transition:"linear", onComplete:function (){
rmMouseSprite();
bNLevel = false;
hero.other.visible = true;
level++;
start();
}});
});
mRoot.btPause.addEventListener(MouseEvent.CLICK, function (){
pause(MCPause, true);
});
}
private function fnScore(_arg1:Number):void{
mRoot.totalScore = (mRoot.totalScore + _arg1);
mRoot.txtScore.text = mRoot.totalScore;
}
private function fnMapInit(_arg1:Class):void{
if (mcMap != null){
mcMap.removeEventListener(MapEvent.HERO_DIE, fnHeroDie);
mcMap.removeEventListener(MapEvent.HERO_GOAL, fnHeroGoal);
mcMap.parent.removeChild(mcMap);
};
mcMap = new (_arg1);
mRoot.addChild(mcMap);
mcMap.x = mcMap.startX;
mcMap.y = mcMap.startY;
map = mcMap.map;
mcMap.init(hero);
mcMap.addEventListener(MapEvent.HERO_DIE, fnHeroDie);
mcMap.addEventListener(MapEvent.HERO_GOAL, fnHeroGoal);
mcMap.addEventListener(MapEvent.FEATHER, fnFeather);
if (mRoot.getChildIndex(mcMap) > mRoot.getChildIndex(hero)){
mRoot.swapChildren(mcMap, hero);
};
}
private function heroDie():void{
hero.other.visible = false;
tHeroNum--;
mRoot.txtHeros.text = tHeroNum;
}
private function keyClear():void{
var _local1:*;
for (_local1 in keys) {
trace("key", _local1, keys[_local1]);
if (!!(keys[_local1])){
keys[_local1] = false;
};
};
}
private function fnFeather(_arg1:MapEvent):void{
trace("fnFeather");
if (bSound){
new FeatherSound().play();
};
}
private function moveHero():void{
var _local1:MovieClip = hero.man;
hitground = map.hitTestPoint(hero.x, hero.y, true);
hitroof = map.hitTestPoint(hero.x, (hero.y - heroH), true);
if (isAlive){
if (!!(keys[Keyboard.RIGHT])){
if (_local1.currentFrame != 2){
_local1.gotoAndStop(2);
};
hori = 5;
} else {
if (!!(keys[Keyboard.LEFT])){
if (_local1.currentFrame != 2){
_local1.gotoAndStop(2);
};
hori = -5;
} else {
if (hori > 0){
hori = (hori - 1);
} else {
if (hori < 0){
hori = (hori + 1);
} else {
if (hori == 0){
if (_local1.currentFrame != 1){
_local1.gotoAndStop(1);
};
};
};
};
};
};
if (vert != 0){
if (_local1.currentFrame != 3){
_local1.gotoAndStop(3);
};
};
};
if (!hitground){
vert = (vert + 1);
if (vert > 0){
if (map.hitTestPoint(hero.x, (hero.y + 2), true)){
hero.y = (hero.y + 2);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y + 4), true)){
hero.y = (hero.y + 4);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y + 6), true)){
hero.y = (hero.y + 6);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y + 8), true)){
hero.y = (hero.y + 8);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y + 10), true)){
hero.y = (hero.y + 10);
vert = 0;
};
};
};
};
};
} else {
if ((((vert < 0)) && (isAlive))){
if (map.hitTestPoint(hero.x, (hero.y - (heroH + 2)), true)){
hero.y = (hero.y + 2);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y - (heroH + 4)), true)){
hero.y = (hero.y + 4);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y - (heroH + 6)), true)){
hero.y = (hero.y + 6);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y - (heroH + 8)), true)){
hero.y = (hero.y + 8);
vert = 0;
} else {
if (map.hitTestPoint(hero.x, (hero.y - (heroH + 10)), true)){
hero.y = (hero.y + 10);
vert = 0;
};
};
};
};
};
};
};
};
hitground = map.hitTestPoint(hero.x, hero.y, true);
if (hitground){
vert = 0;
if (((((((!(!(keys[Keyboard.SPACE]))) || (!(!(keys[Keyboard.UP]))))) && (isAlive))) && (!(hitroof)))){
if (_local1.currentFrame != 3){
_local1.gotoAndStop(3);
};
vert = -8;
};
if (map.hitTestPoint(hero.x, (hero.y - 10), true)){
hero.y = (hero.y - 10);
} else {
if (map.hitTestPoint(hero.x, (hero.y - 8), true)){
hero.y = (hero.y - 8);
} else {
if (map.hitTestPoint(hero.x, (hero.y - 6), true)){
hero.y = (hero.y - 6);
} else {
if (map.hitTestPoint(hero.x, (hero.y - 4), true)){
hero.y = (hero.y - 4);
} else {
if (map.hitTestPoint(hero.x, (hero.y - 2), true)){
hero.y = (hero.y - 2);
};
};
};
};
};
};
hero.oldx = hero.x;
hero.y = (hero.y + (vert * timeDiff));
hero.x = (hero.x + (hori * timeDiff));
if (map.hitTestPoint((hero.x + 4), (hero.y - 5), true)){
hori = (hori - 1);
};
if (map.hitTestPoint((hero.x - 4), (hero.y - 5), true)){
hori = (hori + 1);
};
if (map.hitTestPoint((hero.x + hori), (hero.y - 20), true)){
hero.x = (hero.x + (hero.oldx - hero.x));
hori = 0;
if (_local1.currentFrame != 1){
_local1.gotoAndStop(1);
};
};
}
private function moveWorld():void{
var _local1:Number = 0;
var _local2:Number = 0;
if ((((hero.x > (WIDTH / 2))) || ((hero.x < (WIDTH / 2))))){
_local1 = ((WIDTH / 2) - hero.x);
mcMap.x = (mcMap.x + _local1);
hero.x = (hero.x + _local1);
mcMap.sea.x = (mcMap.sea.x - _local1);
};
if ((((hero.y > (HEIGHT / 2))) || ((hero.y < (HEIGHT / 2))))){
_local2 = ((HEIGHT / 2) - hero.y);
mcMap.y = (mcMap.y + _local2);
hero.y = (hero.y + _local2);
};
}
private function fnHeroDie(_arg1:MapEvent=null):void{
if (!bHeroDie){
trace("fnHeroDie");
bHeroDie = true;
hero.time.stop();
hero.time.visible = false;
heroDie();
};
}
private function moveRight(){
if (!isRight){
isRight = true;
hero.man.scaleX = (hero.man.scaleX * -1);
};
}
private function fnClearInterval(_arg1:MovieClip=null):void{
if (_arg1 != null){
_arg1.txtLevel.text = (level + 1);
};
}
private function end(_arg1:TimerEvent=null):void{
destroy();
isEnd = true;
mRoot.nextFrame();
}
private function fnSetInterval():void{
}
public function start():void{
keyClear();
mRoot.txtLevel.text = level;
currentTime = Config.getTime(level);
updateTimer();
if (bFirst){
bFirst = false;
this.addEventListener(Event.ENTER_FRAME, enterFrame);
mStage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
mStage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
TimeManager.getInstance().adStart(currentTime, updateTimer, fnNull);
} else {
TimeManager.getInstance().reStart(currentTime);
};
fnHeroInit();
fnMapInit(Config.getMap(level));
}
private function fnNull():void{
}
private function fnNextLevel():void{
if (((bSound) && ((level > 0)))){
new LevelUpSound().play();
};
if (level == 0){
mRoot.totalScore = 0;
fnScore(0);
} else {
fnScore((currentTime * 40));
};
if (level >= Config.MAX_LEVEL){
end();
return;
};
TimeManager.getInstance().stop();
adMouseSprite(mRoot);
mRoot.mcNextLevel.txtLevel.text = (level + 1);
mRoot.swapChildren(mRoot.mcNextLevel, mouseSprite);
Tweener.addTween(mRoot.mcNextLevel, {y:170, time:nextLevelTime, transition:"linear"});
}
private function moveLeft(){
if (isRight){
isRight = false;
hero.man.scaleX = (hero.man.scaleX * -1);
};
}
public static function getInstance(_arg1:Stage, _arg2=null):Main{
if (Main.instance == null){
Main.instance = new (Main);
Main.instance.initBase(_arg1, _arg2);
};
return (Main.instance);
}
}
}//package
Section 49
//MainSound (MainSound)
package {
import flash.media.*;
public dynamic class MainSound extends Sound {
}
}//package
Section 50
//MCNextLevel (MCNextLevel)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MCNextLevel extends MovieClip {
public var txtLevel:TextField;
public var btNextLevel:MovieClip;
}
}//package
Section 51
//MCPause (MCPause)
package {
import flash.display.*;
public dynamic class MCPause extends MovieClip {
public var btContinue:SimpleButton;
}
}//package