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.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
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 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 updateFrame():void{
_currentTimeFrame++;
}
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.31.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 = {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;
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
//BlankPNG (BlankPNG)
package {
import flash.display.*;
public dynamic class BlankPNG extends BitmapData {
public function BlankPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 10
//Block (Block)
package {
import caurina.transitions.*;
import flash.display.*;
public class Block extends Sprite {
private var _numH:uint;
private var _color:uint;// = 0
private var _bmp:Bitmap;
private var _hitRect:Sprite;
public function Block(){
_bmp = new Bitmap();
super();
this.addChild(_bmp);
_hitRect = new Sprite();
_hitRect.graphics.beginFill(0xFF0000, 0);
_hitRect.graphics.drawRect(0, 0, 16, 16);
_hitRect.graphics.endFill();
this.addChild(_hitRect);
this.hitArea = _hitRect;
}
public function get color():uint{
return (_color);
}
public function get bmp():Bitmap{
return (_bmp);
}
public function get numH():uint{
return (_numH);
}
public function set bmp(_arg1:Bitmap):void{
_bmp = _arg1;
}
public function set numH(_arg1:uint):void{
_numH = _arg1;
}
public function set color(_arg1:uint):void{
_color = _arg1;
}
public function setBitmapData(_arg1:BitmapData):void{
Tweener.removeTweens(this);
this.alpha = 1;
_bmp.bitmapData = _arg1;
_bmp.x = (_bmp.y = 0);
_bmp.cacheAsBitmap = true;
}
}
}//package
Section 11
//BlockLine (BlockLine)
package {
import flash.display.*;
public class BlockLine extends Sprite {
private var _blockList:Array;
public function BlockLine(_arg1:uint){
_blockList = new Array(_arg1);
}
public function getBlockByNumber(_arg1:uint):Block{
return (_blockList[_arg1]);
}
public function get blockList():Array{
return (_blockList);
}
public function addBlockAt(_arg1:Block, _arg2:uint):void{
if (_blockList[_arg2] != null){
this.removeChild(_blockList[_arg2]);
};
_blockList[_arg2] = addChild(_arg1);
}
}
}//package
Section 12
//BlockPNG (BlockPNG)
package {
import flash.display.*;
public dynamic class BlockPNG extends BitmapData {
public function BlockPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 13
//BoneMC (BoneMC)
package {
import flash.display.*;
public dynamic class BoneMC extends MovieClip {
public var acceleration:Number;
public var point:int;
public function BoneMC(){
addFrameScript(0, frame1);
}
function frame1(){
point = 1;
}
}
}//package
Section 14
//BonePNG (BonePNG)
package {
import flash.display.*;
public dynamic class BonePNG extends BitmapData {
public function BonePNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 15
//BoneStar (BoneStar)
package {
import flash.display.*;
public dynamic class BoneStar extends MovieClip {
public function BoneStar(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 16
//BoxPNG (BoxPNG)
package {
import flash.display.*;
public dynamic class BoxPNG extends BitmapData {
public function BoxPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 17
//ChikuwaMC (ChikuwaMC)
package {
import flash.display.*;
public dynamic class ChikuwaMC extends MovieClip {
public var acceleration:Number;
public var point:int;
public function ChikuwaMC(){
addFrameScript(0, frame1);
}
function frame1(){
point = 1;
}
}
}//package
Section 18
//DrawrPNG (DrawrPNG)
package {
import flash.display.*;
public dynamic class DrawrPNG extends BitmapData {
public function DrawrPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 19
//JumpPNG (JumpPNG)
package {
import flash.display.*;
public dynamic class JumpPNG extends BitmapData {
public function JumpPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 20
//Main (Main)
package {
import flash.events.*;
import caurina.transitions.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
public class Main extends Sprite {
private var mapBMP:BitmapData;
private var fallSpeed:Number;// = 0
private var moveFlg:uint;// = 0
public var isEnd:Boolean;// = false
var mappingList:Object;
private var keyList:Array;
public var isStart:Boolean;// = false
private var player:Player;
public var score_mc:MovieClip;
private var nowHeight:uint;
private var mapAll:Map;
public static const COL_DUMMY_PIXIV_BLOCK:uint = 16512;
public static const COL_PIXIV_ITEM:uint = 0xFF;
private static const _STAGE_WIDTH:uint = 640;
private static const _STAGE_HEIGHT:uint = 640;
public static const COL_BONE_ITEM:uint = 0xFF0000;
public static const COL_BLANK:uint = 0xFFFFFF;
public static const COL_JUMP_BLOCK:uint = 0xFFFF;
public static const COL_DRAWR_ITEM:uint = 0xFF00;
public static const COL_NOMAL_BLOCK:uint = 0;
public static const COL_W_WIDE_BLOCK:uint = 0x808080;
public static const COL_W_WIDE_STEP:uint = 32832;
public static const COL_STEP_BLOCK:uint = 0xFF00FF;
public static const COL_BOX_BLOCK:uint = 0xFFFF00;
private static var _fillRectWidth:uint;
private static var _topHeight:uint = 0;
private static var _main:Main;
private static var _rectSize:uint;
private static var _fillRectHeight:uint;
private static var boneScore:int = 0;
public function Main(){
mappingList = {0:BlockPNG, 0xFF00FF:BlankPNG, 0xFFFFFF:BlankPNG, 0xFF:PixivPNG, 0xFF00:DrawrPNG, 0xFF0000:BonePNG, 0xFFFF00:BoxPNG, 0xFFFF:JumpPNG, 0x808080:WideBlockPNG, 32832:WideStepPNG, 16512:PixivPNG};
mapBMP = new StagePNG(0, 0);
mapAll = new Map();
keyList = [];
super();
_main = this;
keyList[Keyboard.LEFT] = 1;
keyList[Keyboard.RIGHT] = 2;
keyList[Keyboard.UP] = 4;
keyList[Keyboard.DOWN] = 8;
keyList[90] = 16;
_fillRectWidth = mapBMP.width;
_rectSize = Math.floor((STAGE_WIDTH / mapBMP.width));
_fillRectHeight = (Math.floor((STAGE_HEIGHT / rectSize)) + 1);
if ((STAGE_HEIGHT % rectSize) != 0){
_fillRectHeight++;
};
mapAll.name = "mapAll";
this.addChild(mapAll);
initMap();
initBlockLine();
initBlock();
Sprite(root).addChild(score_mc);
addScore(0);
this.addEventListener(Event.ENTER_FRAME, mapScroll);
initPlayer();
}
private function onKUp(_arg1:KeyboardEvent):void{
if (keyList[_arg1.keyCode]){
moveFlg = (moveFlg ^ keyList[_arg1.keyCode]);
};
if ((((moveFlg & keyList[Keyboard.UP])) || ((moveFlg & keyList[90])))){
} else {
player.jumpReady();
};
}
private function getImageNameFromColor(_arg1:uint):Class{
return (mappingList[_arg1]);
}
private function onKDown(_arg1:KeyboardEvent):void{
if (keyList[_arg1.keyCode]){
moveFlg = (moveFlg | keyList[_arg1.keyCode]);
};
if ((((moveFlg & keyList[Keyboard.UP])) || ((moveFlg & keyList[90])))){
player.jump();
} else {
player.jumpReady();
};
if ((((moveFlg & keyList[Keyboard.LEFT])) && (!((moveFlg & keyList[Keyboard.RIGHT]))))){
player.left();
} else {
if ((((moveFlg & keyList[Keyboard.RIGHT])) && (!((moveFlg & keyList[Keyboard.LEFT]))))){
player.right();
};
};
}
private function onMDown(_arg1:MouseEvent):void{
isStart = true;
player.jump();
}
private function updateMap():Boolean{
var _local2:Number;
var _local3:BlockLine;
var _local1:Boolean;
if (mapAll.y >= rectSize){
mapAll.y = 0;
mapAll.player.y = (mapAll.player.y + rectSize);
mapAll.player.oldPoint.y = (mapAll.player.oldPoint.y + rectSize);
_local2 = 0;
while (_local2 < fillRectHeight) {
_local3 = (mapAll.getChildByName(("blockLine" + _local2)) as BlockLine);
_local3.y = (_local3.y + rectSize);
if (_local3.y >= STAGE_HEIGHT){
_local3.y = -(rectSize);
updateblockLine(_local3, _local2);
_topHeight = _local2;
_local1 = (nowHeight <= 0);
};
_local2++;
};
};
return (!(_local1));
}
private function initPlayer():void{
player = new Player();
mapAll.addChild(player);
mapAll.player = player;
player.x = 320;
player.y = 400;
player.speed = -10;
player.bound = 0;
player.jumping = true;
player.hitArea = player._area_mc;
player.addEventListener(Event.ENTER_FRAME, player.onEFrame);
player.addEventListener(Event.ENTER_FRAME, player.walk);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMUp);
}
private function getLine(_arg1:uint):Array{
var _local4:uint;
var _local2:Array = new Array();
if (mapBMP == null){
return (null);
};
var _local3:uint;
while (_local3 < mapBMP.width) {
_local4 = mapBMP.getPixel(_local3, _arg1);
_local2.push(_local4);
_local3++;
};
if (_local2.length < mapBMP.width){
return (null);
};
return (_local2);
}
private function onMUp(_arg1:MouseEvent):void{
player.jumpReady();
}
private function initMap():void{
var _local2:BlockLine;
var _local1:uint;
while (_local1 < fillRectHeight) {
_local2 = new BlockLine(_fillRectWidth);
_local2.name = ("blockLine" + _local1);
_local2.y = (rectSize * (_local1 - 1));
mapAll.addChild(_local2);
_local1++;
};
}
public function addScore(_arg1:int):void{
boneScore = (boneScore + _arg1);
score_mc.txt.text = boneScore;
}
private function initBlock():void{
var _local2:BlockLine;
var _local3:Array;
var _local4:uint;
var _local5:Block;
var _local6:uint;
var _local7:Class;
nowHeight = (mapBMP.height - fillRectHeight);
var _local1:uint;
while (_local1 < fillRectHeight) {
_local2 = (mapAll.getChildByName(("blockLine" + _local1)) as BlockLine);
_local3 = getLine((nowHeight + _local1));
_local4 = 0;
while (_local4 < fillRectWidth) {
_local5 = _local2.getBlockByNumber(_local4);
_local6 = _local3[_local4];
_local7 = getImageNameFromColor(_local6);
if (_local7 != null){
_local5.setBitmapData(new _local7(0, 0));
_local5.color = _local6;
_local5.width = rectSize;
_local5.height = rectSize;
};
_local4++;
};
_local1++;
};
}
private function mapScroll(_arg1:Event):void{
var _local2:Point;
if (isStart){
_local2 = mapAll.localToGlobal(new Point(player.x, player.y));
if (_local2.y < 200){
mapAll.y = (mapAll.y + ((200 - _local2.y) / 8));
};
if (nowHeight <= rectSize){
mapAll.y = (mapAll.y + 1);
};
if (!updateMap()){
this.removeEventListener(Event.ENTER_FRAME, mapScroll);
setFountain(70);
};
};
}
private function initBlockLine():void{
var _local2:BlockLine;
var _local3:uint;
var _local4:Block;
var _local1:uint;
while (_local1 < fillRectHeight) {
_local2 = (mapAll.getChildByName(("blockLine" + _local1)) as BlockLine);
_local3 = 0;
while (_local3 < fillRectWidth) {
_local4 = new Block();
_local2.addBlockAt(_local4, _local3);
_local4.x = (rectSize * _local3);
_local3++;
};
_local1++;
};
}
private function setFountain(_arg1:uint):void{
var coinUpdate:Function;
var coinEnd:Function;
var coinEndLast:Function;
var coin_mc:*;
var randomX:Number;
var randomDelay:Number;
var num = _arg1;
coinUpdate = function (){
this.acceleration = (this.acceleration + 2);
this.y = (this.y + this.acceleration);
if (this.hitTestObject(player)){
if (this.visible == true){
addScore(this.point);
this.visible = false;
};
};
};
coinEnd = function (){
this.parent.removeChild(this);
};
coinEndLast = function (){
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, onMUp);
player.removeEventListener(Event.ENTER_FRAME, player.walk);
player.gotoAndStop("sit");
if (this.parent != null){
this.parent.removeChild(this);
Tweener.removeTweens(this);
};
isEnd = true;
};
Tweener.addTween(score_mc.total_mc, {time:4, x:-34.7});
var pattern:uint;
if ((((player.x >= 100)) && ((player.x <= 180)))){
pattern = 0;
} else {
if ((((player.x >= 460)) && ((player.x <= 540)))){
pattern = 1;
} else {
pattern = 2;
};
};
var i:uint;
while (i < num) {
if (pattern == 1){
coin_mc = new TetsuMC();
} else {
switch ((i % 10)){
case 0:
case 1:
case 2:
case 3:
case 4:
coin_mc = new ChikuwaMC();
break;
case 5:
case 6:
case 7:
case 8:
case 9:
coin_mc = new BoneMC();
break;
};
};
stage.addChild(coin_mc);
randomX = -280;
if (pattern == 0){
randomX = -280;
} else {
if (pattern == 1){
randomX = ((Math.random() * 640) - 320);
} else {
randomX = ((Math.random() * 480) - 240);
};
};
randomDelay = (i * 0.2);
coin_mc.x = (320 + (rectSize / 2));
coin_mc.y = (rectSize * 9);
coin_mc.acceleration = ((-(Math.random()) * 10) - 20);
coin_mc.rotation = (Math.random() * 360);
coin_mc.visible = false;
if (i == (num - 1)){
Tweener.addTween(coin_mc, {delay:randomDelay, time:2, x:(coin_mc.x + randomX), rotation:((Math.random() * 360) - 180), onStart:function (){
this.visible = true;
}, onUpdate:coinUpdate, onComplete:coinEndLast, transition:"linear"});
} else {
Tweener.addTween(coin_mc, {delay:randomDelay, time:2, x:(coin_mc.x + randomX), rotation:((Math.random() * 360) - 180), onStart:function (){
this.visible = true;
}, onUpdate:coinUpdate, onComplete:coinEnd, transition:"linear"});
};
i = (i + 1);
};
}
private function updateblockLine(_arg1:BlockLine, _arg2:uint){
var _local5:Block;
var _local6:uint;
var _local7:Class;
var _local3:Array = getLine(--nowHeight);
var _local4:Number = 0;
while (_local4 < fillRectWidth) {
_local5 = _arg1.getBlockByNumber(_local4);
_local6 = _local3[_local4];
_local5.color = _local6;
_local5.alpha = 1;
_local7 = getImageNameFromColor(_local6);
if (_local7 != null){
_local5.setBitmapData(new _local7(0, 0));
};
_local4++;
};
}
public static function get main():Main{
return (_main);
}
public static function get rectSize():uint{
return (_rectSize);
}
public static function get STAGE_WIDTH():uint{
return (_STAGE_WIDTH);
}
public static function get topHeight():uint{
return (_topHeight);
}
public static function get STAGE_HEIGHT():uint{
return (_STAGE_HEIGHT);
}
public static function get fillRectHeight():uint{
return (_fillRectHeight);
}
public static function get fillRectWidth():uint{
return (_fillRectWidth);
}
}
}//package
Section 21
//Map (Map)
package {
import flash.display.*;
public class Map extends Sprite {
private var _player:MovieClip;
private static var _map:Map;
public function Map(){
_map = Map.map;
if (Map.map == null){
_map = this;
};
}
public function get player():MovieClip{
return (_player);
}
public function set player(_arg1:MovieClip):void{
_player = _arg1;
}
public static function get map():Map{
return (_map);
}
}
}//package
Section 22
//PixivPNG (PixivPNG)
package {
import flash.display.*;
public dynamic class PixivPNG extends BitmapData {
public function PixivPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 23
//Player (Player)
package {
import flash.events.*;
import caurina.transitions.*;
import flash.display.*;
import flash.geom.*;
public class Player extends MovieClip {
private var moveVec:Point;
public var walkSpeed:Number;// = 5
public var speed;// = 0
private var jumpable:Boolean;// = true
public var _area_mc:MovieClip;
public var area_mc:MovieClip;
public var gSpeed:Number;// = 0.98
public var oldPoint:Point;
private var isWalking:Boolean;// = false
public var jumping:Boolean;// = true
public var jumpHeight:Number;// = 3
public var jumpSpeed:Number;
public var bound;// = 0.1
public function Player(){
jumpSpeed = Math.sqrt((((2 * gSpeed) * Main.rectSize) * (jumpHeight + 1)));
super();
addFrameScript(0, frame1);
this.addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true);
}
public function getGridPosition():void{
var _local1:Point = new Point();
_local1.x = Math.floor((this.x / Main.rectSize));
_local1.y = Math.floor(((this.y - (this.area_mc.height / 2)) / Main.rectSize));
}
public function jumpReady():void{
jumpable = true;
}
public function left(){
isWalking = true;
this.x = (this.x - this.walkSpeed);
this.scaleX = -1;
if (((!(jumping)) && (!((this.currentLabel == "walk"))))){
this.gotoAndStop("walk");
};
}
public function walk(_arg1:Event=null):void{
var _local2:Point = this.localToGlobal(new Point(0, 0));
_local2 = _local2.subtract(new Point(stage.mouseX, stage.mouseY));
var _local3 = "stand";
if ((((stage.mouseX < 0)) || ((stage.mouseX > Main.STAGE_HEIGHT)))){
return;
};
isWalking = true;
var _local4:Number = _local2.x;
if (_local2.x > 0){
if (_local2.x < 2){
this.scaleX = this.scaleX;
} else {
this.scaleX = -1;
_local3 = "walk";
};
if (_local2.x > 5){
_local4 = 5;
};
} else {
if (_local2.x > -2){
this.scaleX = this.scaleX;
} else {
this.scaleX = 1;
_local3 = "walk";
};
if (_local2.x < -5){
_local4 = -5;
};
};
this.x = (this.x - _local4);
if (((!(jumping)) && (!((this.currentLabel == _local3))))){
this.gotoAndStop(_local3);
};
}
public function getHitTestFlag():uint{
var _local11:BlockLine;
var _local12:Block;
var _local1:uint = 1;
var _local2:uint = 2;
var _local3:uint = 4;
var _local4:uint = 8;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:Map = Map.map;
var _local9:uint = getMapPosition().x;
var _local10:uint = getMapPosition().y;
var _local13:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0];
var _local14:Array = new Array(9);
_local11 = (_local8.getChildByName(("blockLine" + ((_local10 + Main.fillRectHeight) % Main.fillRectHeight))) as BlockLine);
_local12 = (_local11.getBlockByNumber((_local9 - 1)) as Block);
_local14[0] = _local12;
if (((((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (!((_local12.color == Main.COL_JUMP_BLOCK))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[0] = 1;
};
_local12 = (_local11.getBlockByNumber(_local9) as Block);
_local14[1] = _local12;
if (((((((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (!((_local12.color == Main.COL_JUMP_BLOCK))))) && (!((_local12.color == Main.COL_STEP_BLOCK))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[1] = 1;
};
_local12 = (_local11.getBlockByNumber((_local9 + 1)) as Block);
_local14[2] = _local12;
if (((((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (!((_local12.color == Main.COL_JUMP_BLOCK))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[2] = 1;
};
_local11 = (_local8.getChildByName(("blockLine" + (((_local10 + 1) + Main.fillRectHeight) % Main.fillRectHeight))) as BlockLine);
_local12 = (_local11.getBlockByNumber((_local9 - 1)) as Block);
_local14[3] = _local12;
if (((((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (!((_local12.color == Main.COL_JUMP_BLOCK))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[3] = 1;
};
_local12 = (_local11.getBlockByNumber(_local9) as Block);
if ((((_local12.color == Main.COL_BONE_ITEM)) && (this.area_mc.hitTestObject(_local12)))){
_local13[4] = 1;
getBone(_local12);
};
_local12 = (_local11.getBlockByNumber((_local9 + 1)) as Block);
_local14[5] = _local12;
if (((((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (!((_local12.color == Main.COL_JUMP_BLOCK))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[5] = 1;
};
_local11 = (_local8.getChildByName(("blockLine" + (((_local10 + 2) + Main.fillRectHeight) % Main.fillRectHeight))) as BlockLine);
_local12 = (_local11.getBlockByNumber((_local9 - 1)) as Block);
_local14[6] = _local12;
if (((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[6] = 1;
};
_local12 = (_local11.getBlockByNumber(_local9) as Block);
_local14[7] = _local12;
if (((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[7] = 1;
};
_local12 = (_local11.getBlockByNumber((_local9 + 1)) as Block);
_local14[8] = _local12;
if (((((!((_local12.color == Main.COL_BLANK))) && (!((_local12.color == Main.COL_BONE_ITEM))))) && (this.area_mc.hitTestObject(_local12)))){
_local13[8] = 1;
};
if (_local13[1] > 0){
if (moveVec.y < 0){
if (_local14[1].color == Main.COL_PIXIV_ITEM){
_local14[1].color = Main.COL_BONE_ITEM;
Block(_local14[1]).setBitmapData(new BonePNG(0, 0));
Tweener.addTween(_local14[1], {time:1, y:_local14[1].y, transition:"easeOutElastic"});
_local14[1].y = -20;
} else {
if (_local14[1].color == Main.COL_DRAWR_ITEM){
Block(_local14[1]).setBitmapData(new BonePNG(0, 0));
Tweener.addTween(_local14[1], {time:1, y:_local14[1].y, transition:"easeOutElastic"});
_local14[1].color = Main.COL_BONE_ITEM;
_local14[1].y = -20;
} else {
if (_local14[1].color == Main.COL_W_WIDE_BLOCK){
_local14[1].color = Main.COL_NOMAL_BLOCK;
Block(_local14[1]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[1].bmp, {time:1, y:0, transition:"easeOutElastic"});
_local14[1].bmp.y = -4;
if (_local14[0].color != Main.COL_NOMAL_BLOCK){
_local14[0].color = Main.COL_NOMAL_BLOCK;
Block(_local14[0]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[0].bmp, {time:1, x:0, transition:"easeInOut"});
_local14[0].bmp.x = 16;
};
if (_local14[2].color != Main.COL_NOMAL_BLOCK){
_local14[2].color = Main.COL_NOMAL_BLOCK;
Block(_local14[2]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[2].bmp, {time:1, x:0, transition:"easeInOut"});
_local14[2].bmp.x = -16;
};
};
};
};
this.y = ((_local14[1].parent.y + _local14[1].parent.height) + this.area_mc.height);
speed = 0;
};
};
if ((_local13[0] + _local13[3]) > 0){
this.x = ((_local14[0].x + _local14[0].width) + (this.hitArea.width / 2));
};
if ((_local13[2] + _local13[5]) > 0){
this.x = (_local14[2].x - (this.area_mc.width / 2));
};
if (_local13[7] > 0){
if (_local14[7].color == Main.COL_STEP_BLOCK){
_local14[7].color = Main.COL_NOMAL_BLOCK;
Block(_local14[7]).setBitmapData(new BlockPNG(0, 0));
} else {
if ((((_local14[7].color == Main.COL_JUMP_BLOCK)) && ((moveVec.y >= 0)))){
jumping = false;
jumpable = true;
jump((-(jumpSpeed) * 1.2));
Tweener.addTween(_local14[7].bmp, {time:1.5, y:0, transition:"easeOutElastic"});
_local14[7].bmp.y = -8;
} else {
if (_local14[7].color == Main.COL_W_WIDE_STEP){
_local14[7].color = Main.COL_NOMAL_BLOCK;
Block(_local14[7]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[7].bmp, {time:1, y:0, transition:"easeOutElastic"});
_local14[7].bmp.y = 4;
if (_local14[6].color != Main.COL_NOMAL_BLOCK){
_local14[6].color = Main.COL_NOMAL_BLOCK;
Block(_local14[6]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[6].bmp, {time:1, x:0, transition:"easeInOut"});
_local14[6].bmp.x = 16;
};
if (_local14[8].color != Main.COL_NOMAL_BLOCK){
_local14[8].color = Main.COL_NOMAL_BLOCK;
Block(_local14[8]).setBitmapData(new BlockPNG(0, 0));
Tweener.addTween(_local14[8].bmp, {time:1, x:0, transition:"easeInOut"});
_local14[8].bmp.x = -16;
};
};
};
};
if (moveVec.y > 0){
this.y = _local14[7].parent.y;
jumping = false;
speed = 0;
jumpable = true;
};
} else {
jumping = true;
};
return (_local5);
}
public function right(){
isWalking = true;
this.x = (this.x + this.walkSpeed);
this.scaleX = 1;
if (((!(jumping)) && (!((this.currentLabel == "walk"))))){
this.gotoAndStop("walk");
};
}
public function stand(){
if (this.currentLabel != "stand"){
this.gotoAndStop("stand");
};
}
public function onEFrame(_arg1:Event):void{
var _local2:Point = new Point(this.x, this.y);
if (oldPoint == null){
oldPoint = _local2;
};
moveVec = _local2.subtract(oldPoint);
if (jumping){
this.speed = (this.speed + gSpeed);
if (this.speed >= 20){
this.speed = 20;
};
this.y = (this.y + this.speed);
if (moveVec.y < 0){
this.gotoAndStop("jump");
} else {
this.gotoAndStop("down");
};
} else {
if (((Main.main.isEnd) && (!((this.currentLabel == "sit"))))){
this.gotoAndStop("sit");
};
};
getHitTestFlag();
if (this.y >= (Main.STAGE_HEIGHT + this.height)){
Main.main.addScore(-1);
this.y = this.height;
};
isWalking = false;
oldPoint = _local2;
}
private function onAdded(_arg1:Event):void{
this._area_mc = this.area_mc;
this.hitArea = this.area_mc;
this.area_mc.visible = false;
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
}
function frame1(){
stop();
}
private function isUntouchable(_arg1:Number):Boolean{
var _local2:Object = {0xFFFFFF:"背景", 0xFF00FF:"踏むと出る", 0xFF0000:"骨"};
return (Boolean(!((_local2[_arg1] == null))));
}
public function jump(_arg1=0){
if (((!(jumping)) && (jumpable))){
jumping = true;
jumpable = false;
if (_arg1 == 0){
_arg1 = -(jumpSpeed);
};
this.speed = _arg1;
};
}
public function getMapPosition():Point{
var _local1:Point = new Point();
_local1.x = Math.floor((this.x / Main.rectSize));
_local1.y = Math.floor(((this.y - (this.area_mc.height / 2)) / Main.rectSize));
if (_local1.x <= 1){
_local1.x = 1;
} else {
if (_local1.x >= (Main.fillRectWidth - 2)){
_local1.x = (Main.fillRectWidth - 2);
};
};
_local1.y = (Main.topHeight + _local1.y);
return (_local1);
}
private function getBone(_arg1:Block):void{
Main.main.addScore(1);
_arg1.color = 0xFFFFFF;
Tweener.addTween(_arg1, {time:2, alpha:0});
var _local2:MovieClip = new BoneStar();
_local2.blendMode = "add";
_local2.x = (_arg1.x + (_arg1.width / 2));
_local2.y = (_arg1.y + (_arg1.height / 2));
_arg1.parent.addChild(_local2);
}
}
}//package
Section 24
//StagePNG (StagePNG)
package {
import flash.display.*;
public dynamic class StagePNG extends BitmapData {
public function StagePNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 25
//TetsuMC (TetsuMC)
package {
import flash.display.*;
public dynamic class TetsuMC extends MovieClip {
public var acceleration:Number;
public var point:int;
public function TetsuMC(){
addFrameScript(0, frame1);
}
function frame1(){
point = -1;
}
}
}//package
Section 26
//WideBlockPNG (WideBlockPNG)
package {
import flash.display.*;
public dynamic class WideBlockPNG extends BitmapData {
public function WideBlockPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 27
//WideStepPNG (WideStepPNG)
package {
import flash.display.*;
public dynamic class WideStepPNG extends BitmapData {
public function WideStepPNG(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package