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;
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
//PM_PRNG (de.polygonal.math.PM_PRNG)
package de.polygonal.math {
public class PM_PRNG {
public static var seed:uint = now.getTime();
public static var now:Date = new Date();
public function PM_PRNG(){
var _local1:Date = new Date();
}
public static function nextDoubleRange(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * nextDouble())));
}
public static function nextDouble():Number{
return ((gen() / 2147483647));
}
private static function gen():uint{
return ((seed = ((seed * 16807) % 2147483647)));
}
public static function nextIntRange(_arg1:Number, _arg2:Number):uint{
_arg1 = (_arg1 - 0.4999);
_arg2 = (_arg2 + 0.4999);
return (Math.round((_arg1 + ((_arg2 - _arg1) * nextDouble()))));
}
public static function nextInt():uint{
return (gen());
}
}
}//package de.polygonal.math
Section 10
//ARROW1AREA_106 (JellyCandle_fla.ARROW1AREA_106)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class ARROW1AREA_106 extends MovieClip {
public function ARROW1AREA_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 11
//ARROW2AREA_108 (JellyCandle_fla.ARROW2AREA_108)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class ARROW2AREA_108 extends MovieClip {
public function ARROW2AREA_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 12
//ARROW2AREA_81 (JellyCandle_fla.ARROW2AREA_81)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class ARROW2AREA_81 extends MovieClip {
public function ARROW2AREA_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 13
//BUTTONDONE_62 (JellyCandle_fla.BUTTONDONE_62)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class BUTTONDONE_62 extends MovieClip {
public function BUTTONDONE_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 14
//CANDLE_99 (JellyCandle_fla.CANDLE_99)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CANDLE_99 extends MovieClip {
public function CANDLE_99(){
addFrameScript(0, frame1, 41, frame42, 143, frame144, 174, frame175, 277, frame278, 308, frame309, 402, frame403);
}
function frame175(){
stop();
CGame2.GetInstance().endAnimasi();
}
function frame144(){
stop();
CGame2.GetInstance().endAnimasi();
}
function frame1(){
stop();
}
function frame278(){
stop();
CGame2.GetInstance().endAnimasi();
}
function frame403(){
stop();
CGame2.GetInstance().endAnimasi();
}
function frame42(){
stop();
CGame2.GetInstance().endAnimasi();
}
function frame309(){
stop();
CGame2.GetInstance().endAnimasi();
}
}
}//package JellyCandle_fla
Section 15
//CANDLECOLOR_140 (JellyCandle_fla.CANDLECOLOR_140)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CANDLECOLOR_140 extends MovieClip {
public function CANDLECOLOR_140(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 16
//CANDLERIBBON_141 (JellyCandle_fla.CANDLERIBBON_141)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CANDLERIBBON_141 extends MovieClip {
public function CANDLERIBBON_141(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 17
//CORAL1_110 (JellyCandle_fla.CORAL1_110)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CORAL1_110 extends MovieClip {
public function CORAL1_110(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 18
//CORAL2_103 (JellyCandle_fla.CORAL2_103)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CORAL2_103 extends MovieClip {
public function CORAL2_103(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 19
//didi_logo_32 (JellyCandle_fla.didi_logo_32)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class didi_logo_32 extends MovieClip {
public var fButton:MovieClip;
public function didi_logo_32(){
addFrameScript(0, frame1);
}
function frame1(){
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.didigames.com/");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package JellyCandle_fla
Section 20
//didi_source_backfds_5 (JellyCandle_fla.didi_source_backfds_5)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class didi_source_backfds_5 extends MovieClip {
public var fButton:SimpleButton;
public function didi_source_backfds_5(){
addFrameScript(0, frame1);
}
function frame1(){
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.didigames.com/");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package JellyCandle_fla
Section 21
//ESSENTIAL1_77 (JellyCandle_fla.ESSENTIAL1_77)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class ESSENTIAL1_77 extends MovieClip {
public function ESSENTIAL1_77(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 22
//EXAMPLE_139 (JellyCandle_fla.EXAMPLE_139)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class EXAMPLE_139 extends MovieClip {
public var mItem11:MovieClip;
public var mItem0:MovieClip;
public var mItem1:MovieClip;
public var mItem2:MovieClip;
public var mItem3:MovieClip;
public var mItem4:MovieClip;
public var mItem5:MovieClip;
public var mItem6:MovieClip;
public var mItem7:MovieClip;
public var mItem8:MovieClip;
public var mItem9:MovieClip;
public var mRibbon:MovieClip;
public var mColor:MovieClip;
public var mItem10:MovieClip;
public function EXAMPLE_139(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 23
//GELWAX1_76 (JellyCandle_fla.GELWAX1_76)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class GELWAX1_76 extends MovieClip {
public function GELWAX1_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 24
//ITEMLIST_114 (JellyCandle_fla.ITEMLIST_114)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class ITEMLIST_114 extends MovieClip {
public var mItem1:MovieClip;
public var mItem2:MovieClip;
public var mItem3:MovieClip;
public var mItem4:MovieClip;
public var mItem5:MovieClip;
public var mItem6:MovieClip;
public var mItem7:MovieClip;
public var mItem8:MovieClip;
public var mItem9:MovieClip;
public var mItem0:MovieClip;
public function ITEMLIST_114(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 25
//LIQUIDGEL1_78 (JellyCandle_fla.LIQUIDGEL1_78)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class LIQUIDGEL1_78 extends MovieClip {
public function LIQUIDGEL1_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 26
//Lloadingy_2 (JellyCandle_fla.Lloadingy_2)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class Lloadingy_2 extends MovieClip {
public var a:int;
public var bar:MovieClip;
public var mc:MovieClip;
public function Lloadingy_2(){
addFrameScript(0, frame1, 88, frame89, 90, frame91, 264, frame265);
}
public function myover(_arg1:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, myloadmovie);
mc.play();
play();
}
function frame1(){
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, myloadmovie);
this.loaderInfo.addEventListener(Event.COMPLETE, myover);
}
function frame91(){
a = 1;
}
function frame265(){
stop();
(parent as MovieClip).gotoAndStop(2);
}
function frame89(){
a = 1;
trace(a);
}
public function myloadmovie(_arg1:ProgressEvent):void{
var _local2:Number = (_arg1.bytesLoaded / _arg1.bytesTotal);
var _local3:Number = Math.round((_local2 * 100));
trace(_local3);
bar.loading_animation.gotoAndStop(int(_local3));
}
}
}//package JellyCandle_fla
Section 27
//MusicBtn_41 (JellyCandle_fla.MusicBtn_41)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class MusicBtn_41 extends MovieClip {
public function MusicBtn_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 28
//PAN_73 (JellyCandle_fla.PAN_73)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class PAN_73 extends MovieClip {
public function PAN_73(){
addFrameScript(0, frame1, 32, frame33, 95, frame96, 258, frame259, 319, frame320);
}
function frame320(){
stop();
CGame1.GetInstance().endAnimasi();
}
function frame259(){
stop();
CGame1.GetInstance().endAnimasi();
}
function frame96(){
stop();
CGame1.GetInstance().endAnimasi();
}
function frame1(){
stop();
}
function frame33(){
stop();
CGame1.GetInstance().endAnimasi();
}
}
}//package JellyCandle_fla
Section 29
//PRELOADERDIDI_1 (JellyCandle_fla.PRELOADERDIDI_1)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import caurina.transitions.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class PRELOADERDIDI_1 extends MovieClip {
public function PRELOADERDIDI_1(){
addFrameScript(0, frame1, 1, frame2);
}
public function gotoMainMenu(){
Main.GetInstance().gotoAndStop("mainMenu");
}
function frame1(){
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.CLICK, Global.moreGames);
stop();
}
function frame2(){
Tweener.addTween(this, {time:4, transition:"linear", onComplete:gotoMainMenu});
}
}
}//package JellyCandle_fla
Section 30
//QualityBtn_42 (JellyCandle_fla.QualityBtn_42)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class QualityBtn_42 extends MovieClip {
public function QualityBtn_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 31
//SAND1_109 (JellyCandle_fla.SAND1_109)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class SAND1_109 extends MovieClip {
public function SAND1_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 32
//SFXBtn_43 (JellyCandle_fla.SFXBtn_43)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class SFXBtn_43 extends MovieClip {
public function SFXBtn_43(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package JellyCandle_fla
Section 33
//STOVESWITCH_85 (JellyCandle_fla.STOVESWITCH_85)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class STOVESWITCH_85 extends MovieClip {
public function STOVESWITCH_85(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 34
//Timeline_7 (JellyCandle_fla.Timeline_7)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class Timeline_7 extends MovieClip {
public var fButton:MovieClip;
public function Timeline_7(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
if ((parent as MovieClip).a == 1){
play();
} else {
stop();
};
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
function frame60(){
stop();
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.didigames.com/");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package JellyCandle_fla
Section 35
//TODOLIST_98 (JellyCandle_fla.TODOLIST_98)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class TODOLIST_98 extends MovieClip {
public function TODOLIST_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 36
//TODOLIST1_60 (JellyCandle_fla.TODOLIST1_60)
package JellyCandle_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class TODOLIST1_60 extends MovieClip {
public function TODOLIST1_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package JellyCandle_fla
Section 37
//bgm (bgm)
package {
import flash.media.*;
public dynamic class bgm extends Sound {
}
}//package
Section 38
//button (button)
package {
import flash.media.*;
public dynamic class button extends Sound {
}
}//package
Section 39
//CBannedWin (CBannedWin)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CBannedWin extends MovieClip {
public var mBtn:SimpleButton;
public function CBannedWin(){
addFrameScript(0, frame1);
}
public function GotoSapi(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.lazybanana.com");
navigateToURL(_local2);
}
function frame1(){
mBtn.addEventListener(MouseEvent.MOUSE_DOWN, GotoSapi);
}
}
}//package
Section 40
//CBaseMovieClip (CBaseMovieClip)
package {
import flash.events.*;
import flash.display.*;
public class CBaseMovieClip extends MovieClip {
public var mEventType:String;
public function CBaseMovieClip(_arg1:String){
mEventType = _arg1;
}
public function AddDispatcher():void{
Main.GetInstance().addEventListener(mEventType, Update, false, 0, true);
}
public function Update(_arg1:Event){
}
public function RemoveDispatcher(){
Main.GetInstance().removeEventListener(mEventType, Update);
}
}
}//package
Section 41
//CChallenge (CChallenge)
package {
import flash.display.*;
public dynamic class CChallenge extends MovieClip {
public var mNext:MovieClip;
}
}//package
Section 42
//CCongratulations (CCongratulations)
package {
import flash.display.*;
public dynamic class CCongratulations extends MovieClip {
public var mPrint:MovieClip;
public var mLit:MovieClip;
public var mLitIT:MovieClip;
public var mPlayAgain:MovieClip;
public var mMoreGames:MovieClip;
}
}//package
Section 43
//CDecorate (CDecorate)
package {
import flash.display.*;
public dynamic class CDecorate extends MovieClip {
public var mNext:MovieClip;
}
}//package
Section 44
//CExample (CExample)
package {
import flash.display.*;
import flash.text.*;
public dynamic class CExample extends MovieClip {
public var mExample:MovieClip;
public var mOK:MovieClip;
public var tCtrExample:TextField;
}
}//package
Section 45
//CGame1 (CGame1)
package {
import flash.events.*;
import flash.display.*;
public class CGame1 extends CBaseMovieClip {
public const ESSENTIAL = 2;
public const LIQUID_GEL = 1;
public const GEL_WAX = 0;
public const SPEED_TERMOMETER = 0.25;
public var mSwitch:MovieClip;
public var mArrowStir:MovieClip;
public var mPause:MovieClip;
public var mDone:MovieClip;
public var mItem0:MovieClip;
public var mItem1:MovieClip;
public var mItem2:MovieClip;
public var mSound:MovieClip;
public var mCursor:MovieClip;
public var mSpoon:MovieClip;
public var mToDoList:MovieClip;
public var mTermometer:MovieClip;
public var isAnimasi:Boolean;
public var mWindow:MovieClip;
public var mFire:MovieClip;
public var mRecipe:MovieClip;
public var mItemPick:MovieClip;
public var mPan:MovieClip;
private static var CGameGlobal:CGame1;
public function CGame1(){
super("update");
CGameGlobal = this;
mTermometer.mBar.x = -(mTermometer.mBar.width);
mArrowStir.visible = false;
mArrowStir.useHandCursor = true;
mArrowStir.buttonMode = true;
mCursor.alpha = 0;
Global.setMouseEnabled(mCursor, false);
setEventListener();
mFire.visible = false;
Global.setMouseEnabled(this[("mItem" + GEL_WAX)], true);
Global.setMouseEnabled(mSwitch, false);
Global.setMouseEnabled(mDone, false);
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function nextGame(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game1", "Game2");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function pauseGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_PAUSED;
if (isAnimasi){
mPan.stop();
};
if (_arg1){
mWindow = new CPause();
addChild(mWindow);
Global.setButton(mWindow.mResume);
Global.setButton(mWindow.mMainMenu);
Global.setButton(mWindow.mMoreGames);
mWindow.mResume.addEventListener(MouseEvent.MOUSE_DOWN, resumeGame, false, 0, true);
mWindow.mMainMenu.addEventListener(MouseEvent.MOUSE_DOWN, backMainMenu, false, 0, true);
mWindow.mMoreGames.addEventListener(MouseEvent.MOUSE_DOWN, Global.moreGames, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function updateTermometer(){
mTermometer.mBar.x = (mTermometer.mBar.x + SPEED_TERMOMETER);
if (mTermometer.mBar.x > 0){
mTermometer.mBar.x = 0;
Main.GetInstance().mState = Main.STATE_PAUSED;
};
if (((((((mTermometer.mBar.hitTestObject(mTermometer.mArea2)) && (this[("mItem" + GEL_WAX)].isAdd))) && ((mSwitch.currentFrame == 1)))) && (!(mItemPick)))){
mSwitch.gotoAndStop(2);
Global.setMouseEnabled(mSwitch, true);
} else {
if (((((((mTermometer.mBar.hitTestObject(mTermometer.mArea3)) && (this[("mItem" + GEL_WAX)].isAdd))) && (!(this[("mItem" + LIQUID_GEL)].isAdd)))) && (!(mItemPick)))){
this[("mItem" + LIQUID_GEL)].gotoAndStop(2);
Global.setMouseEnabled(this[("mItem" + LIQUID_GEL)], true);
} else {
if (((((mTermometer.mBar.hitTestObject(mTermometer.mArea4)) && (this[("mItem" + LIQUID_GEL)].isAdd))) && (!(mArrowStir.visible)))){
mArrowStir.visible = true;
} else {
if (((((mTermometer.mBar.hitTestObject(mTermometer.mArea5)) && (!(mArrowStir.parent)))) && ((mSwitch.currentFrame == 3)))){
mSwitch.gotoAndStop(4);
Global.setMouseEnabled(mSwitch, true);
} else {
if (((((((mTermometer.mBar.hitTestObject(mTermometer.mArea6)) && ((mSwitch.currentFrame == 5)))) && (!(this[("mItem" + ESSENTIAL)].isAdd)))) && (!(mItemPick)))){
this[("mItem" + ESSENTIAL)].gotoAndStop(2);
Global.setMouseEnabled(this[("mItem" + ESSENTIAL)], true);
};
};
};
};
};
if (((mTermometer.mBar.hitTestObject(mTermometer.mArea2)) && (!(this[("mItem" + GEL_WAX)].isAdd)))){
gameOver();
} else {
if (((mTermometer.mBar.hitTestObject(mTermometer.mArea3)) && ((mSwitch.currentFrame == 2)))){
gameOver();
} else {
if (((mTermometer.mBar.hitTestObject(mTermometer.mArea4)) && (!(this[("mItem" + LIQUID_GEL)].isAdd)))){
gameOver();
} else {
if (((mTermometer.mBar.hitTestObject(mTermometer.mArea5)) && (mArrowStir.parent))){
gameOver();
} else {
if (((mTermometer.mBar.hitTestObject(mTermometer.mArea6)) && ((mSwitch.currentFrame == 4)))){
gameOver();
};
};
};
};
};
}
private function closeRecipe(_arg1:MouseEvent){
resumeGame(null);
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function setEventListener(){
Global.setButton(mRecipe);
Global.setButton(mPause);
Global.setButton(mSound);
Global.setButton(mDone);
mRecipe.addEventListener(MouseEvent.MOUSE_DOWN, showRecipe, false, 0, true);
mPause.addEventListener(MouseEvent.MOUSE_DOWN, pauseGame, false, 0, true);
mSound.addEventListener(MouseEvent.MOUSE_DOWN, toggleMusic, false, 0, true);
mDone.addEventListener(MouseEvent.MOUSE_DOWN, nextGame, false, 0, true);
var _local1:int;
while (_local1 <= 2) {
this[("mItem" + _local1)].isAdd = false;
Global.setButton(this[("mItem" + _local1)]);
Global.setMouseEnabled(this[("mItem" + _local1)], false);
this[("mItem" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, pickItem, false, 0, true);
_local1++;
};
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
Global.setButton(mSwitch);
Global.setButton(mPan);
mPan.addEventListener(MouseEvent.MOUSE_DOWN, onDownPan, false, 0, true);
mSwitch.addEventListener(MouseEvent.MOUSE_DOWN, onDownSwitch, false, 0, true);
}
private function onDownSwitch(_arg1:MouseEvent){
if (!mFire.visible){
mFire.visible = true;
} else {
if (mFire.visible){
mFire.visible = false;
};
};
mSwitch.nextFrame();
mToDoList.nextFrame();
Global.setMouseEnabled(mSwitch, false);
}
private function toggleMusic(_arg1:MouseEvent){
Main.GetInstance().mOptionBar.ToggleMusic();
Main.GetInstance().mOptionBar.ToggleSFX();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function checkItem(_arg1:int){
if (((!(mTermometer.mBar.hitTestObject(mTermometer.mArea1))) && ((_arg1 == GEL_WAX)))){
return (false);
};
if (((!(mTermometer.mBar.hitTestObject(mTermometer.mArea3))) && ((_arg1 == LIQUID_GEL)))){
return (false);
};
if (((!(mTermometer.mBar.hitTestObject(mTermometer.mArea6))) && ((_arg1 == ESSENTIAL)))){
return (false);
};
return (true);
}
private function backMainMenu(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game1", "MainMenu");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function onDownPan(_arg1:MouseEvent){
if (((!(mItemPick)) || (isAnimasi))){
return;
};
if (!checkItem(mItemPick.name.substr(5, 1))){
gameOver();
} else {
mPan.play();
isAnimasi = true;
};
mItemPick.isAdd = true;
mItemPick.visible = false;
mToDoList.nextFrame();
}
private function resumeGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_GAME;
if (isAnimasi){
mPan.play();
};
if (_arg1){
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function pickItem(_arg1:MouseEvent){
mItemPick = _arg1.currentTarget;
mItemPick.tempX = mItemPick.x;
mItemPick.tempY = mItemPick.y;
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
mItemPick.nextFrame();
mPan.nextFrame();
addChild(mItemPick);
Global.setMouseEnabled(mItemPick, false);
}
private function tryAgain(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game1", "Game1");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
override public function Update(_arg1:Event){
updateTermometer();
}
private function showRecipe(_arg1:MouseEvent){
pauseGame(null);
mWindow = new CRecipe();
addChild(mWindow);
Global.setButton(mWindow.mClose);
mWindow.mClose.addEventListener(MouseEvent.MOUSE_DOWN, closeRecipe, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function gameOver(){
pauseGame(null);
mWindow = new CGameOver();
addChild(mWindow);
Global.setButton(mWindow.mTryAgain);
mWindow.mTryAgain.addEventListener(MouseEvent.MOUSE_DOWN, tryAgain, false, 0, true);
}
public function endAnimasi(){
isAnimasi = false;
if (mItemPick){
mItemPick.visible = true;
mItemPick.x = mItemPick.tempX;
mItemPick.y = mItemPick.tempY;
mItemPick.gotoAndStop(4);
mItemPick = null;
};
if (!mSpoon.visible){
mSpoon.visible = true;
};
if (mPan.currentFrame == mPan.totalFrames){
Main.GetInstance().mState = Main.STATE_PAUSED;
mDone.gotoAndStop(2);
Global.setMouseEnabled(mDone, true);
};
}
private function onMouseMove(_arg1:MouseEvent){
if (mItemPick){
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
};
if (((((mArrowStir.visible) && (mArrowStir.parent))) && (!(isAnimasi)))){
if (mArrowStir.mArea.currentFrame == mArrowStir.mArea.totalFrames){
mPan.play();
isAnimasi = true;
mArrowStir.visible = false;
mSpoon.visible = false;
mToDoList.nextFrame();
mArrowStir.parent.removeChild(mArrowStir);
} else {
if (mArrowStir.mArea.hitTestObject(mCursor)){
mArrowStir.mArea.nextFrame();
};
};
};
mCursor.x = _arg1.stageX;
mCursor.y = _arg1.stageY;
}
public static function GetInstance():CGame1{
return (CGameGlobal);
}
}
}//package
Section 46
//CGame2 (CGame2)
package {
import flash.events.*;
import flash.display.*;
public class CGame2 extends CBaseMovieClip {
public const ADD_SAND = 4;
public const USE_ZINK_WICK = 3;
public const ADD_JELLY_WAX = 6;
public const GLUE_THE_BASE = 2;
public const ADD_CORAL_TOY = 5;
public const PULL_STICK = 7;
public var mPause:MovieClip;
public var mDone:MovieClip;
public var mSand:MovieClip;
public var mArrow3:MovieClip;
public var mArrow1:MovieClip;
public var mArrow2:MovieClip;
public var mSound:MovieClip;
public var mCursor:MovieClip;
public var mToDoList:MovieClip;
public var isAnimasi:Boolean;
public var mWindow:MovieClip;
public var mGlue:MovieClip;
public var mCoral:MovieClip;
public var mCandle:MovieClip;
public var mRecipe:MovieClip;
public var mItemPick:MovieClip;
private static var CGameGlobal:CGame2;
public function CGame2(){
super("update");
CGameGlobal = this;
mCursor.alpha = 0;
mArrow2.visible = false;
mArrow3.visible = false;
Global.setMouseEnabled(mCursor, false);
Global.setMouseEnabled(mCandle, false);
Global.setMouseEnabled(mCoral, false);
Global.setMouseEnabled(mSand, false);
Global.setMouseEnabled(mDone, false);
setEventListener();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function nextGame(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game2", "Game3");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function onDownCandle(_arg1:MouseEvent){
if (((!(mItemPick)) || (isAnimasi))){
return;
};
mCandle.play();
mItemPick.visible = false;
mItemPick.x = mItemPick.tempX;
mItemPick.y = mItemPick.tempY;
mItemPick.gotoAndStop(mItemPick.totalFrames);
mItemPick = null;
mToDoList.nextFrame();
Global.setMouseEnabled(mCandle, false);
}
private function pauseGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_PAUSED;
if (isAnimasi){
mCandle.stop();
};
if (_arg1){
mWindow = new CPause();
addChild(mWindow);
Global.setButton(mWindow.mResume);
Global.setButton(mWindow.mMainMenu);
Global.setButton(mWindow.mMoreGames);
mWindow.mResume.addEventListener(MouseEvent.MOUSE_DOWN, resumeGame, false, 0, true);
mWindow.mMainMenu.addEventListener(MouseEvent.MOUSE_DOWN, backMainMenu, false, 0, true);
mWindow.mMoreGames.addEventListener(MouseEvent.MOUSE_DOWN, Global.moreGames, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function closeRecipe(_arg1:MouseEvent){
resumeGame(null);
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function setEventListener(){
Global.setButton(mRecipe);
Global.setButton(mPause);
Global.setButton(mSound);
Global.setButton(mDone);
mRecipe.addEventListener(MouseEvent.MOUSE_DOWN, showRecipe, false, 0, true);
mPause.addEventListener(MouseEvent.MOUSE_DOWN, pauseGame, false, 0, true);
mSound.addEventListener(MouseEvent.MOUSE_DOWN, toggleMusic, false, 0, true);
mDone.addEventListener(MouseEvent.MOUSE_DOWN, showChallenge, false, 0, true);
Global.setButton(mCandle);
Global.setButton(mSand);
Global.setButton(mCoral);
mCandle.addEventListener(MouseEvent.MOUSE_DOWN, onDownCandle, false, 0, true);
mSand.addEventListener(MouseEvent.MOUSE_DOWN, pickItem, false, 0, true);
mCoral.addEventListener(MouseEvent.MOUSE_DOWN, pickItem, false, 0, true);
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
}
private function toggleMusic(_arg1:MouseEvent){
Main.GetInstance().mOptionBar.ToggleMusic();
Main.GetInstance().mOptionBar.ToggleSFX();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function backMainMenu(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game2", "MainMenu");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function resumeGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_GAME;
if (isAnimasi){
mCandle.play();
};
if (_arg1){
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function pickItem(_arg1:MouseEvent){
mItemPick = _arg1.currentTarget;
mItemPick.tempX = mItemPick.x;
mItemPick.tempY = mItemPick.y;
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
mItemPick.nextFrame();
mCandle.nextFrame();
addChild(mItemPick);
Global.setMouseEnabled(mItemPick, false);
Global.setMouseEnabled(mCandle, true);
}
private function showChallenge(_arg1:MouseEvent){
mWindow = new CChallenge();
addChild(mWindow);
Global.setButton(mWindow.mNext);
mWindow.mNext.addEventListener(MouseEvent.MOUSE_DOWN, nextGame, false, 0, true);
}
override public function Update(_arg1:Event){
}
private function showRecipe(_arg1:MouseEvent){
pauseGame(null);
mWindow = new CRecipe();
addChild(mWindow);
Global.setButton(mWindow.mClose);
mWindow.mClose.addEventListener(MouseEvent.MOUSE_DOWN, closeRecipe, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
}
public function endAnimasi(){
isAnimasi = false;
switch (mToDoList.currentFrame){
case GLUE_THE_BASE:
mArrow2.visible = true;
break;
case USE_ZINK_WICK:
mSand.gotoAndStop(2);
Global.setMouseEnabled(mSand, true);
break;
case ADD_SAND:
mSand.visible = true;
mCoral.gotoAndStop(2);
Global.setMouseEnabled(mCoral, true);
break;
case ADD_CORAL_TOY:
mArrow2.mArea.gotoAndStop(1);
mArrow2.visible = true;
break;
case ADD_JELLY_WAX:
mArrow3.visible = true;
break;
};
if (mCandle.currentFrame == mCandle.totalFrames){
mDone.gotoAndStop(2);
Global.setMouseEnabled(mDone, true);
};
}
private function onMouseMove(_arg1:MouseEvent){
if (mItemPick){
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
};
if (mArrow1.visible){
if (mArrow1.mArea.currentFrame == mArrow1.mArea.totalFrames){
mCandle.play();
isAnimasi = true;
mArrow1.visible = false;
mGlue.visible = false;
mToDoList.nextFrame();
} else {
if (mArrow1.mArea.hitTestObject(mCursor)){
mArrow1.mArea.nextFrame();
};
};
} else {
if (mArrow2.visible){
if (mArrow2.mArea.currentFrame == mArrow2.mArea.totalFrames){
mCandle.play();
isAnimasi = true;
mArrow2.visible = false;
mToDoList.nextFrame();
} else {
if (mArrow2.mArea.hitTestObject(mCursor)){
mArrow2.mArea.nextFrame();
};
};
} else {
if (mArrow3.visible){
if (mArrow3.mArea.currentFrame == mArrow3.mArea.totalFrames){
mCandle.play();
isAnimasi = true;
mArrow3.visible = false;
mToDoList.nextFrame();
} else {
if (mArrow3.mArea.hitTestObject(mCursor)){
mArrow3.mArea.nextFrame();
};
};
};
};
};
mCursor.x = _arg1.stageX;
mCursor.y = _arg1.stageY;
}
public static function GetInstance():CGame2{
return (CGameGlobal);
}
}
}//package
Section 47
//CGame3 (CGame3)
package {
import flash.events.*;
import flash.display.*;
import caurina.transitions.*;
import de.polygonal.math.*;
import flash.text.*;
import flash.filters.*;
public class CGame3 extends CBaseMovieClip {
public var mPause:MovieClip;
public var mDone:MovieClip;
public var ctrExample:int;
public var item:Array;
public var mExample2:MovieClip;
public var goal:int;
public var mItem:MovieClip;
public var score:int;
public var mSound:MovieClip;
public var mSetting:MovieClip;
public var mScore:MovieClip;
public var tGoal:TextField;
public var exampleList:Array;
public var mItemSelect:MovieClip;
public var mWindow:MovieClip;
public var mExample:MovieClip;
public var scoreList:Array;
public var mCandle:MovieClip;
public var mRecipe:MovieClip;
public var mItemPick:MovieClip;
public var example:int;
public var tScore:TextField;
private static var CGameGlobal:CGame3;
public function CGame3(){
item = new Array();
exampleList = [0, 1, 2, 3, 4, 5, 6, 7];
scoreList = new Array();
super("update");
CGameGlobal = this;
score = 0;
goal = 2500;
tScore.text = 0;
tGoal.text = goal;
randomExample();
mExample.alpha = 0;
setEventListener();
Global.setMouseEnabled(mCandle.mColor, false);
Global.setMouseEnabled(mExample, false);
Global.setMouseEnabled(mDone, false);
showExample();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function nextGame(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game3", "Game4");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function onOverItem(_arg1:MouseEvent){
_arg1.currentTarget.filters = [new GlowFilter(5457729, (alpha = 1), (blurX = 5), (blurY = 5), (strength = 5))];
}
private function pauseGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_PAUSED;
if (_arg1){
mWindow = new CPause();
addChild(mWindow);
Global.setButton(mWindow.mResume);
Global.setButton(mWindow.mMainMenu);
Global.setButton(mWindow.mMoreGames);
mWindow.mResume.addEventListener(MouseEvent.MOUSE_DOWN, resumeGame, false, 0, true);
mWindow.mMainMenu.addEventListener(MouseEvent.MOUSE_DOWN, backMainMenu, false, 0, true);
mWindow.mMoreGames.addEventListener(MouseEvent.MOUSE_DOWN, Global.moreGames, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function onDownCandle(_arg1:MouseEvent){
if (!mItemPick){
return;
};
mItemSelect = mItemPick;
mItemPick = null;
mCandle.addChild(mItemSelect);
mItemSelect.x = (mItemSelect.x - mCandle.x);
mItemSelect.y = (mItemSelect.y - mCandle.y);
mItemSelect.filters = [new GlowFilter(5457729, (alpha = 1), (blurX = 5), (blurY = 5), (strength = 5))];
mCandle.setChildIndex(mItemSelect, (mCandle.numChildren - 3));
var _local2:int;
while (_local2 < item.length) {
Global.setMouseEnabled(item[_local2], true);
_local2++;
};
item.push(mItemSelect);
if (item.length == (Data.example[example].length - 2)){
mItem.gotoAndStop(2);
Global.setMouseEnabled(mItem, false);
Global.setMouseEnabled(mDone, true);
};
}
private function showScore(){
if (mScore){
mScore.parent.removeChild(mScore);
mScore = null;
scoreList.splice(0, 1);
};
if (!scoreList.length){
if (ctrExample < 3){
nextExample();
} else {
if (score >= goal){
showDecorate();
} else {
if (score < goal){
gameOver();
};
};
};
return;
};
mScore = new CScore();
mScore.tValue.text = ("+" + String(scoreList[0].value));
mScore.x = (mCandle.x + scoreList[0].x);
mScore.y = (mCandle.y + scoreList[0].y);
score = (score + scoreList[0].value);
tScore.text = score;
addChild(mScore);
Tweener.addTween(mScore, {time:0.5, y:(mScore.y - 20), transition:"linear", onComplete:showScore});
Main.GetInstance().mOptionBar.PlaySFX("score");
}
private function onOutItem(_arg1:MouseEvent){
_arg1.currentTarget.filters = [];
}
private function setEventListener(){
var _local1:int;
Global.setButton(mRecipe);
Global.setButton(mPause);
Global.setButton(mSound);
Global.setButton(mDone);
mRecipe.addEventListener(MouseEvent.MOUSE_DOWN, showRecipe, false, 0, true);
mPause.addEventListener(MouseEvent.MOUSE_DOWN, pauseGame, false, 0, true);
mSound.addEventListener(MouseEvent.MOUSE_DOWN, toggleMusic, false, 0, true);
mDone.addEventListener(MouseEvent.MOUSE_DOWN, checkScore, false, 0, true);
mCandle.addEventListener(MouseEvent.MOUSE_DOWN, onDownCandle, false, 0, true);
_local1 = 0;
while (_local1 < mItem.numChildren) {
Global.setButton(mItem[("mItem" + _local1)]);
mItem[("mItem" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, pickItem, false, 0, true);
_local1++;
};
_local1 = 0;
while (_local1 < mSetting.numChildren) {
Global.setButton(mSetting[("mB" + _local1)]);
mSetting[("mB" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, editItem, false, 0, true);
_local1++;
};
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
}
private function showExample(){
mWindow = new CExample();
mWindow.tCtrExample.text = ctrExample;
mWindow.mExample.gotoAndStop((example + 1));
mWindow.mExample.mRibbon.gotoAndStop(Data.example[example][(Data.example[example].length - 2)]);
mWindow.mExample.mColor.gotoAndStop(Data.example[example][(Data.example[example].length - 1)]);
addChild(mWindow);
Global.setButton(mWindow.mOK);
mWindow.mOK.addEventListener(MouseEvent.MOUSE_DOWN, closeExample, false, 0, true);
}
private function randomExample(){
var _local1:int = PM_PRNG.nextIntRange(0, (exampleList.length - 1));
example = exampleList[_local1];
exampleList.splice(_local1, 1);
ctrExample++;
mExample.gotoAndStop((example + 1));
mExample.mRibbon.gotoAndStop(Data.example[example][(Data.example[example].length - 2)]);
mExample.mColor.gotoAndStop(Data.example[example][(Data.example[example].length - 1)]);
mExample2.gotoAndStop((example + 1));
mExample2.mRibbon.gotoAndStop(Data.example[example][(Data.example[example].length - 2)]);
mExample2.mColor.gotoAndStop(Data.example[example][(Data.example[example].length - 1)]);
}
private function onMouseMove(_arg1:MouseEvent){
if (mItemPick){
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
};
}
private function showDecorate(){
mWindow = new CDecorate();
addChild(mWindow);
Global.setButton(mWindow.mNext);
mWindow.mNext.addEventListener(MouseEvent.MOUSE_DOWN, nextGame, false, 0, true);
}
private function toggleMusic(_arg1:MouseEvent){
Main.GetInstance().mOptionBar.ToggleMusic();
Main.GetInstance().mOptionBar.ToggleSFX();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function selectItem(_arg1:MouseEvent){
if (mItemSelect){
mItemSelect.filters = [];
mItemSelect.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
Global.setMouseEnabled(mItemSelect, true);
};
mItemSelect = _arg1.currentTarget;
Global.setMouseEnabled(mItemSelect, false);
mItemSelect.removeEventListener(MouseEvent.MOUSE_OUT, onOutItem);
}
private function backMainMenu(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game3", "MainMenu");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function closeRecipe(_arg1:MouseEvent){
resumeGame(null);
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function editItem(_arg1:MouseEvent){
var _local3:int;
if (mItemPick){
return;
};
var _local2:int = _arg1.currentTarget.name.substr(2, (_arg1.currentTarget.name.length - 2));
switch (_local2){
case Data.ZOOM_IN:
if (!mItemSelect){
return;
};
if (mItemSelect.scaleX < 0){
mItemSelect.scaleX = -(mItemSelect.scaleX);
if (mItemSelect.scaleX <= 2){
mItemSelect.scaleX = (mItemSelect.scaleX + 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY + 0.05);
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
} else {
if (mItemSelect.scaleX <= 2){
mItemSelect.scaleX = (mItemSelect.scaleX + 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY + 0.05);
};
};
break;
case Data.ZOOM_OUT:
if (!mItemSelect){
return;
};
if (mItemSelect.scaleX < 0){
mItemSelect.scaleX = -(mItemSelect.scaleX);
if (mItemSelect.scaleX >= 0.5){
mItemSelect.scaleX = (mItemSelect.scaleX - 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY - 0.05);
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
} else {
if (mItemSelect.scaleX >= 0.5){
mItemSelect.scaleX = (mItemSelect.scaleX - 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY - 0.05);
};
};
break;
case Data.ROTATE_RIGHT:
if (!mItemSelect){
return;
};
mItemSelect.rotation = (mItemSelect.rotation + 5);
break;
case Data.ROTATE_LEFT:
if (!mItemSelect){
return;
};
mItemSelect.rotation = (mItemSelect.rotation - 5);
break;
case Data.FORWARD:
if (!mItemSelect){
return;
};
if (mCandle.getChildIndex(mItemSelect) < (mCandle.numChildren - 3)){
mCandle.setChildIndex(mItemSelect, (mCandle.getChildIndex(mItemSelect) + 1));
};
break;
case Data.BACKWARD:
if (!mItemSelect){
return;
};
if (mCandle.getChildIndex(mItemSelect) > 1){
mCandle.setChildIndex(mItemSelect, (mCandle.getChildIndex(mItemSelect) - 1));
};
break;
case Data.FIRST_LAYER:
if (!mItemSelect){
return;
};
mCandle.setChildIndex(mItemSelect, (mCandle.numChildren - 3));
break;
case Data.LAST_LAYER:
if (!mItemSelect){
return;
};
mCandle.setChildIndex(mItemSelect, 1);
break;
case Data.FLIP:
if (!mItemSelect){
return;
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
break;
case Data.COLOR:
if (mCandle.mColor.currentFrame < mCandle.mColor.totalFrames){
mCandle.mColor.nextFrame();
} else {
mCandle.mColor.gotoAndStop(1);
};
break;
case Data.RIBBON:
if (mCandle.mRibbon.currentFrame < mCandle.mRibbon.totalFrames){
mCandle.mRibbon.nextFrame();
} else {
mCandle.mRibbon.gotoAndStop(1);
};
break;
case Data.DELETE:
mItem.gotoAndStop(1);
Global.setMouseEnabled(mItem, true);
mItemSelect.parent.removeChild(mItemSelect);
item.splice(item.indexOf(mItemSelect), 1);
mItemSelect = null;
break;
case Data.RESET:
mItem.gotoAndStop(1);
Global.setMouseEnabled(mItem, true);
_local3 = 0;
while (_local3 < item.length) {
item[_local3].parent.removeChild(item[_local3]);
_local3++;
};
item.splice(0, item.length);
mItemSelect = null;
break;
};
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function closeExample(_arg1:MouseEvent){
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function pickItem(_arg1:MouseEvent){
if (mItemPick){
mItemPick.parent.removeChild(mItemPick);
};
if (mItemSelect){
mItemSelect.filters = [];
mItemSelect.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
Global.setMouseEnabled(mItemSelect, true);
};
mItemPick = new CItem();
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
mItemPick.gotoAndStop((int(_arg1.currentTarget.name.substr(5, 1)) + 1));
addChild(mItemPick);
mItemPick.useHandCursor = true;
mItemPick.buttonMode = true;
mItemPick.addEventListener(MouseEvent.MOUSE_OVER, onOverItem, false, 0, true);
mItemPick.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
mItemPick.addEventListener(MouseEvent.MOUSE_DOWN, selectItem, false, 0, true);
Global.setMouseEnabled(mItemPick, false);
var _local2:int;
while (_local2 < item.length) {
Global.setMouseEnabled(item[_local2], false);
_local2++;
};
}
private function tryAgain(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game3", "Game3");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function gameOver(){
mWindow = new CGameOver();
addChild(mWindow);
Global.setButton(mWindow.mTryAgain);
mWindow.mTryAgain.addEventListener(MouseEvent.MOUSE_DOWN, tryAgain, false, 0, true);
}
override public function Update(_arg1:Event){
}
private function showRecipe(_arg1:MouseEvent){
pauseGame(null);
mWindow = new CRecipe();
addChild(mWindow);
Global.setButton(mWindow.mClose);
mWindow.mClose.addEventListener(MouseEvent.MOUSE_DOWN, closeRecipe, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function resumeGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_GAME;
if (_arg1){
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function checkScore(_arg1:MouseEvent){
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
Global.setMouseEnabled(mDone, false);
Global.setMouseEnabled(mSetting, false);
if (mItemSelect){
mItemSelect.filters = [];
mItemSelect = null;
Global.setMouseEnabled(mCandle, false);
};
var _local2:Array = new Array();
var _local3:Object = new Object();
_local6 = 0;
while (_local6 < (Data.example[example].length - 2)) {
_local2.push(false);
_local6++;
};
_local6 = 0;
while (_local6 < item.length) {
_local4 = 50;
_local7 = 0;
while (_local7 < (Data.example[example].length - 2)) {
if (_local2[_local7]){
} else {
if ((((((item[_local6].currentFrame == Data.example[example][_local7])) && ((_local4 > Global.Distance(item[_local6].x, item[_local6].y, mExample[("mItem" + _local7)].x, mExample[("mItem" + _local7)].y))))) && (item[_local6].hitTestObject(mExample[("mItem" + _local7)])))){
_local4 = Global.Distance(item[_local6].x, item[_local6].y, mExample[("mItem" + _local7)].x, mExample[("mItem" + _local7)].y);
_local5 = _local7;
};
};
_local7++;
};
if (_local4 < 50){
_local2[_local5] = true;
};
_local3 = new Object();
_local3.value = ((50 - _local4) * 2);
_local3.x = item[_local6].x;
_local3.y = item[_local6].y;
scoreList.push(_local3);
_local6++;
};
_local3 = new Object();
_local3.value = ((mCandle.mRibbon.currentFrame == mExample.mRibbon.currentFrame)) ? 100 : 0;
_local3.x = mCandle.mRibbon.x;
_local3.y = mCandle.mRibbon.y;
scoreList.push(_local3);
_local3 = new Object();
_local3.value = ((mCandle.mColor.currentFrame == mExample.mColor.currentFrame)) ? 100 : 0;
_local3.x = mCandle.mColor.x;
_local3.y = mCandle.mColor.y;
scoreList.push(_local3);
showScore();
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function nextExample(){
var _local1:int;
while (_local1 < item.length) {
item[_local1].parent.removeChild(item[_local1]);
_local1++;
};
item.splice(0, item.length);
mItem.gotoAndStop(1);
Global.setMouseEnabled(mItem, true);
Global.setMouseEnabled(mCandle, true);
Global.setMouseEnabled(mSetting, true);
randomExample();
showExample();
}
public static function GetInstance():CGame3{
return (CGameGlobal);
}
}
}//package
Section 48
//CGame4 (CGame4)
package {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public class CGame4 extends CBaseMovieClip {
public var mPause:MovieClip;
public var mWindow:MovieClip;
public var mDone:MovieClip;
public var item:Array;
public var mCandle:MovieClip;
public var mRecipe:MovieClip;
public var mItem:MovieClip;
public var mItemPick:MovieClip;
public var mSound:MovieClip;
public var mSetting:MovieClip;
public var mItemSelect:MovieClip;
private static var CGameGlobal:CGame4;
public function CGame4(){
item = new Array();
super("update");
CGameGlobal = this;
setEventListener();
Global.setMouseEnabled(mCandle.mColor, false);
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function print(_arg1:MouseEvent){
mWindow.mPlayAgain.visible = false;
mWindow.mPrint.visible = false;
mWindow.mLitIT.visible = false;
mWindow.mMoreGames.visible = false;
Main.GetInstance().print(this);
mWindow.mPlayAgain.visible = true;
mWindow.mPrint.visible = true;
mWindow.mLitIT.visible = true;
mWindow.mMoreGames.visible = true;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function pauseGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_PAUSED;
if (_arg1){
mWindow = new CPause();
addChild(mWindow);
Global.setButton(mWindow.mResume);
Global.setButton(mWindow.mMainMenu);
Global.setButton(mWindow.mMoreGames);
mWindow.mResume.addEventListener(MouseEvent.MOUSE_DOWN, resumeGame, false, 0, true);
mWindow.mMainMenu.addEventListener(MouseEvent.MOUSE_DOWN, backMainMenu, false, 0, true);
mWindow.mMoreGames.addEventListener(MouseEvent.MOUSE_DOWN, Global.moreGames, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
};
}
private function onOverItem(_arg1:MouseEvent){
_arg1.currentTarget.filters = [new GlowFilter(5457729, (alpha = 1), (blurX = 5), (blurY = 5), (strength = 5))];
}
private function onDownCandle(_arg1:MouseEvent){
if (!mItemPick){
return;
};
mItemSelect = mItemPick;
mItemPick = null;
mCandle.addChild(mItemSelect);
mItemSelect.x = (mItemSelect.x - mCandle.x);
mItemSelect.y = (mItemSelect.y - mCandle.y);
mItemSelect.filters = [new GlowFilter(5457729, (alpha = 1), (blurX = 5), (blurY = 5), (strength = 5))];
mCandle.setChildIndex(mItemSelect, (mCandle.numChildren - 3));
var _local2:int;
while (_local2 < item.length) {
Global.setMouseEnabled(item[_local2], true);
_local2++;
};
item.push(mItemSelect);
}
private function pickItem(_arg1:MouseEvent){
if (mItemPick){
mItemPick.parent.removeChild(mItemPick);
};
if (mItemSelect){
mItemSelect.filters = [];
mItemSelect.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
Global.setMouseEnabled(mItemSelect, true);
};
mItemPick = new CItem();
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
mItemPick.gotoAndStop((int(_arg1.currentTarget.name.substr(5, 1)) + 1));
addChild(mItemPick);
mItemPick.useHandCursor = true;
mItemPick.buttonMode = true;
mItemPick.addEventListener(MouseEvent.MOUSE_OVER, onOverItem, false, 0, true);
mItemPick.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
mItemPick.addEventListener(MouseEvent.MOUSE_DOWN, selectItem, false, 0, true);
Global.setMouseEnabled(mItemPick, false);
var _local2:int;
while (_local2 < item.length) {
Global.setMouseEnabled(item[_local2], false);
_local2++;
};
}
private function resumeGame(_arg1:MouseEvent){
Main.GetInstance().mState = Main.STATE_GAME;
if (_arg1){
mWindow.parent.removeChild(mWindow);
mWindow = null;
};
}
private function showCongratulations(_arg1:MouseEvent){
mWindow = new CCongratulations();
addChild(mWindow);
mWindow.mLit.visible = false;
Global.setButton(mWindow.mPlayAgain);
Global.setButton(mWindow.mPrint);
Global.setButton(mWindow.mLitIT);
Global.setButton(mWindow.mMoreGames);
mWindow.mPlayAgain.addEventListener(MouseEvent.MOUSE_DOWN, playAgain, false, 0, true);
mWindow.mPrint.addEventListener(MouseEvent.MOUSE_DOWN, print, false, 0, true);
mWindow.mLitIT.addEventListener(MouseEvent.MOUSE_DOWN, lit, false, 0, true);
mWindow.mMoreGames.addEventListener(MouseEvent.MOUSE_DOWN, Global.moreGames, false, 0, true);
addChild(mCandle);
addChild(mWindow.mLit);
mCandle.x = 633.95;
mCandle.y = 408.25;
mCandle.scaleX = 0.9;
mCandle.scaleY = 0.9;
}
private function playAgain(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game4", "Game1");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function onOutItem(_arg1:MouseEvent){
_arg1.currentTarget.filters = [];
}
private function showRecipe(_arg1:MouseEvent){
pauseGame(null);
mWindow = new CRecipe();
addChild(mWindow);
Global.setButton(mWindow.mClose);
mWindow.mClose.addEventListener(MouseEvent.MOUSE_DOWN, closeRecipe, false, 0, true);
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function setEventListener(){
var _local1:int;
Global.setButton(mRecipe);
Global.setButton(mPause);
Global.setButton(mSound);
Global.setButton(mDone);
mRecipe.addEventListener(MouseEvent.MOUSE_DOWN, showRecipe, false, 0, true);
mPause.addEventListener(MouseEvent.MOUSE_DOWN, pauseGame, false, 0, true);
mSound.addEventListener(MouseEvent.MOUSE_DOWN, toggleMusic, false, 0, true);
mDone.addEventListener(MouseEvent.MOUSE_DOWN, showCongratulations, false, 0, true);
mCandle.addEventListener(MouseEvent.MOUSE_DOWN, onDownCandle, false, 0, true);
_local1 = 0;
while (_local1 < mItem.numChildren) {
Global.setButton(mItem[("mItem" + _local1)]);
mItem[("mItem" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, pickItem, false, 0, true);
_local1++;
};
_local1 = 0;
while (_local1 < mSetting.numChildren) {
Global.setButton(mSetting[("mB" + _local1)]);
mSetting[("mB" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, editItem, false, 0, true);
_local1++;
};
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
}
private function closeRecipe(_arg1:MouseEvent){
resumeGame(null);
mWindow.parent.removeChild(mWindow);
mWindow = null;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function selectItem(_arg1:MouseEvent){
if (mItemSelect){
mItemSelect.filters = [];
mItemSelect.addEventListener(MouseEvent.MOUSE_OUT, onOutItem, false, 0, true);
Global.setMouseEnabled(mItemSelect, true);
};
mItemSelect = _arg1.currentTarget;
Global.setMouseEnabled(mItemSelect, false);
mItemSelect.removeEventListener(MouseEvent.MOUSE_OUT, onOutItem);
}
override public function Update(_arg1:Event){
}
private function toggleMusic(_arg1:MouseEvent){
Main.GetInstance().mOptionBar.ToggleMusic();
Main.GetInstance().mOptionBar.ToggleSFX();
if (Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(1);
} else {
if (!Main.GetInstance().mOptionBar.mBgmFlag){
mSound.gotoAndStop(2);
};
};
}
private function onMouseMove(_arg1:MouseEvent){
if (mItemPick){
mItemPick.x = _arg1.stageX;
mItemPick.y = _arg1.stageY;
};
}
private function lit(_arg1:MouseEvent){
mWindow.mLit.visible = true;
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function editItem(_arg1:MouseEvent){
var _local3:int;
if (mItemPick){
return;
};
var _local2:int = _arg1.currentTarget.name.substr(2, (_arg1.currentTarget.name.length - 2));
switch (_local2){
case Data.ZOOM_IN:
if (!mItemSelect){
return;
};
if (mItemSelect.scaleX < 0){
mItemSelect.scaleX = -(mItemSelect.scaleX);
if (mItemSelect.scaleX <= 1.5){
mItemSelect.scaleX = (mItemSelect.scaleX + 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY + 0.05);
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
} else {
if (mItemSelect.scaleX <= 1.5){
mItemSelect.scaleX = (mItemSelect.scaleX + 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY + 0.05);
};
};
break;
case Data.ZOOM_OUT:
if (!mItemSelect){
return;
};
if (mItemSelect.scaleX < 0){
mItemSelect.scaleX = -(mItemSelect.scaleX);
if (mItemSelect.scaleX >= 0.5){
mItemSelect.scaleX = (mItemSelect.scaleX - 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY - 0.05);
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
} else {
if (mItemSelect.scaleX >= 0.5){
mItemSelect.scaleX = (mItemSelect.scaleX - 0.05);
mItemSelect.scaleY = (mItemSelect.scaleY - 0.05);
};
};
break;
case Data.ROTATE_RIGHT:
if (!mItemSelect){
return;
};
mItemSelect.rotation = (mItemSelect.rotation + 5);
break;
case Data.ROTATE_LEFT:
if (!mItemSelect){
return;
};
mItemSelect.rotation = (mItemSelect.rotation - 5);
break;
case Data.FORWARD:
if (!mItemSelect){
return;
};
if (mCandle.getChildIndex(mItemSelect) < (mCandle.numChildren - 3)){
mCandle.setChildIndex(mItemSelect, (mCandle.getChildIndex(mItemSelect) + 1));
};
break;
case Data.BACKWARD:
if (!mItemSelect){
return;
};
if (mCandle.getChildIndex(mItemSelect) > 1){
mCandle.setChildIndex(mItemSelect, (mCandle.getChildIndex(mItemSelect) - 1));
};
break;
case Data.FIRST_LAYER:
if (!mItemSelect){
return;
};
mCandle.setChildIndex(mItemSelect, (mCandle.numChildren - 3));
break;
case Data.LAST_LAYER:
if (!mItemSelect){
return;
};
mCandle.setChildIndex(mItemSelect, 1);
break;
case Data.FLIP:
if (!mItemSelect){
return;
};
mItemSelect.scaleX = -(mItemSelect.scaleX);
break;
case Data.COLOR:
if (mCandle.mColor.currentFrame < mCandle.mColor.totalFrames){
mCandle.mColor.nextFrame();
} else {
mCandle.mColor.gotoAndStop(1);
};
break;
case Data.RIBBON:
if (mCandle.mRibbon.currentFrame < mCandle.mRibbon.totalFrames){
mCandle.mRibbon.nextFrame();
} else {
mCandle.mRibbon.gotoAndStop(1);
};
break;
case Data.DELETE:
mItemSelect.parent.removeChild(mItemSelect);
item.splice(item.indexOf(mItemSelect), 1);
mItemSelect = null;
break;
case Data.RESET:
_local3 = 0;
while (_local3 < item.length) {
item[_local3].parent.removeChild(item[_local3]);
_local3++;
};
item.splice(0, item.length);
mItemSelect = null;
break;
};
Main.GetInstance().mOptionBar.PlaySFX("button");
}
private function backMainMenu(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("Game3", "MainMenu");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
public static function GetInstance():CGame4{
return (CGameGlobal);
}
}
}//package
Section 49
//CGameOver (CGameOver)
package {
import flash.display.*;
public dynamic class CGameOver extends MovieClip {
public var mTryAgain:MovieClip;
}
}//package
Section 50
//CItem (CItem)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class CItem extends MovieClip {
public function CItem(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 51
//CMainMenu (CMainMenu)
package {
import flash.events.*;
import flash.display.*;
public class CMainMenu extends MovieClip {
public var mPlayGame:MovieClip;
public var mMoreGames:MovieClip;
public function CMainMenu(){
Global.setButton(mPlayGame);
Global.setButton(mMoreGames);
mPlayGame.addEventListener(MouseEvent.MOUSE_UP, playGame, false, 0, true);
mMoreGames.addEventListener(MouseEvent.MOUSE_UP, Global.moreGames, false, 0, true);
}
private function playGame(_arg1:MouseEvent){
Main.GetInstance().changeWindowFromTo("MainMenu", "Game1");
Main.GetInstance().mOptionBar.PlaySFX("button");
}
}
}//package
Section 52
//COptionBar (COptionBar)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.utils.*;
public class COptionBar extends MovieClip {
public var mMusic:MovieClip;
private var mSfxChannel:Array;
public var mQuality:MovieClip;
public var mSFX:MovieClip;
private var mBgm:Sound;
public var mPopUp:MovieClip;
public var mBgmFlag:Boolean;
private var mBgmChannel:SoundChannel;
private var mSfxFlag:Boolean;// = true
private var mBgmVol:Number;// = 1
public static var Global:COptionBar;
public function COptionBar(_arg1:int=0, _arg2:int=0, _arg3:String=null, _arg4:Number=0.5){
var _local5:Class;
super();
Global = this;
mBgmVol = _arg4;
this.x = _arg1;
this.y = _arg2;
if (_arg3){
_local5 = (getDefinitionByName(_arg3) as Class);
if (_local5){
mBgm = new (_local5);
};
};
mPopUp.mouseEnabled = false;
mMusic.buttonMode = true;
mMusic.useHandCursor = true;
mSFX.buttonMode = true;
mSFX.useHandCursor = true;
mQuality.buttonMode = true;
mQuality.useHandCursor = true;
mMusic.addEventListener(MouseEvent.MOUSE_OVER, MusicOver, false, 0, true);
mMusic.addEventListener(MouseEvent.MOUSE_OUT, MusicOut, false, 0, true);
mMusic.addEventListener(MouseEvent.MOUSE_UP, ToggleMusic, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_OVER, SFXOver, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_OUT, SFXOut, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_UP, ToggleSFX, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_OVER, QualityOver, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_OUT, QualityOut, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_UP, ToggleQuality, false, 0, true);
if (((mBgm) && (!((Main.GetInstance().mState == Main.STATE_PRELOADER))))){
StartBGM();
};
mSfxChannel = new Array();
MusicOut(null);
SFXOut(null);
trace("init option bar");
}
public function ToggleSFX_OFF():void{
var _local1:int;
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
if (mSfxFlag){
mSfxFlag = false;
if (mSfxChannel){
_local1 = 0;
while (_local1 < mSfxChannel.length) {
mSfxChannel[_local1].stop();
_local1++;
};
};
};
mSfxFlag = false;
}
public function StopSFX(_arg1:int){
mSfxChannel[_arg1].stop();
}
private function MusicOut(_arg1:MouseEvent):void{
if (!mBgmFlag){
mMusic.gotoAndStop(2);
} else {
mMusic.gotoAndStop(1);
};
HidePopUp();
}
private function HidePopUp(){
mPopUp.alpha = 0;
}
public function ToggleMusic_ON(_arg1:MouseEvent=null):void{
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
StartBGM();
}
public function PlaySFX(_arg1:String, _arg2:Number=0.5):int{
if (!mSfxFlag){
return;
};
var _local3:Class = (getDefinitionByName(_arg1) as Class);
var _local4:Sound = new (_local3);
var _local5:SoundTransform = new SoundTransform(_arg2, 0);
var _local6:SoundChannel = _local4.play(0, 1, _local5);
mSfxChannel.push(_local6);
return ((mSfxChannel.length - 1));
}
private function QualityOver(_arg1:MouseEvent):void{
mQuality.gotoAndStop(2);
ShowPopUp((("Quality: " + Main.GetInstance().stage.quality) + " (B)"));
}
private function SFXOver(_arg1:MouseEvent):void{
if (!mSfxFlag){
mSFX.gotoAndStop(4);
} else {
mSFX.gotoAndStop(3);
};
ShowPopUp("Toggle SFX (N)");
}
public function ToggleMusic(_arg1:MouseEvent=null):void{
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
trace("toggle Music");
if (((mBgmFlag) && (mBgmChannel))){
mBgmFlag = false;
mBgmChannel.stop();
} else {
StartBGM();
};
if (_arg1 != null){
MusicOver(null);
} else {
MusicOut(null);
};
}
public function ToggleMusic_OFF(_arg1:MouseEvent=null):void{
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
mBgmFlag = false;
mBgmChannel.stop();
}
public function ChangeBGMVol(_arg1:Number){
mBgmVol = _arg1;
mBgmChannel.soundTransform = new SoundTransform(mBgmVol, 0);
}
private function StartBGM(){
trace(("start bgm : " + mBgm));
if (!mBgm){
return;
};
mBgmFlag = true;
var _local1:SoundTransform = new SoundTransform(mBgmVol, 0);
mBgmChannel = mBgm.play(0, 999, _local1);
MusicOut(null);
}
private function SFXOut(_arg1:MouseEvent):void{
if (!mSfxFlag){
mSFX.gotoAndStop(2);
} else {
mSFX.gotoAndStop(1);
};
HidePopUp();
}
public function ToggleSFX_ON():void{
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
mSfxFlag = true;
}
private function ShowPopUp(_arg1:String){
if ((this.y - 50) <= 0){
mPopUp.y = 40;
} else {
mPopUp.y = -30;
};
mPopUp.alpha = 1;
mPopUp.mText.text = _arg1;
}
public function ToggleSFX(_arg1:MouseEvent=null):void{
var _local2:int;
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
if (mSfxFlag){
mSfxFlag = false;
if (mSfxChannel){
_local2 = 0;
while (_local2 < mSfxChannel.length) {
mSfxChannel[_local2].stop();
_local2++;
};
};
} else {
mSfxFlag = true;
};
if (_arg1 != null){
SFXOver(null);
} else {
SFXOut(null);
};
}
public function ToggleQuality(_arg1:MouseEvent=null):void{
switch (Main.GetInstance().stage.quality){
case "LOW":
Main.GetInstance().stage.quality = StageQuality.MEDIUM;
break;
case "MEDIUM":
Main.GetInstance().stage.quality = StageQuality.HIGH;
break;
case "HIGH":
Main.GetInstance().stage.quality = StageQuality.BEST;
break;
case "BEST":
Main.GetInstance().stage.quality = StageQuality.LOW;
break;
};
ShowPopUp((("Quality: " + Main.GetInstance().stage.quality) + " (B)"));
}
private function QualityOut(_arg1:MouseEvent):void{
mQuality.gotoAndStop(1);
HidePopUp();
}
private function MusicOver(_arg1:MouseEvent):void{
if (!mBgmFlag){
mMusic.gotoAndStop(4);
} else {
mMusic.gotoAndStop(3);
};
ShowPopUp("Toggle Music (M)");
}
public function ChangeBGM(_arg1:String=null){
var _local2:Class;
if (!_arg1){
return;
};
if (_arg1){
_local2 = (getDefinitionByName(_arg1) as Class);
mBgm = new (_local2);
};
if (((mBgmFlag) && (mBgmChannel))){
mBgmChannel.stop();
};
trace(("bgm flag : " + mBgmFlag));
if (mBgmFlag){
StartBGM();
};
}
}
}//package
Section 53
//CPause (CPause)
package {
import flash.display.*;
public dynamic class CPause extends MovieClip {
public var mResume:MovieClip;
public var mMainMenu:MovieClip;
public var mMoreGames:MovieClip;
}
}//package
Section 54
//CRecipe (CRecipe)
package {
import flash.display.*;
public dynamic class CRecipe extends MovieClip {
public var mClose:MovieClip;
}
}//package
Section 55
//CScore (CScore)
package {
import flash.display.*;
import flash.text.*;
public dynamic class CScore extends MovieClip {
public var tValue:TextField;
}
}//package
Section 56
//CTransisiScreen (CTransisiScreen)
package {
import flash.display.*;
public dynamic class CTransisiScreen extends MovieClip {
}
}//package
Section 57
//Data (Data)
package {
public class Data {
public static const ZOOM_IN = 0;
public static const MARBLE1 = 1;
public static const MARBLE2 = 2;
public static const MARBLE3 = 3;
public static const ROTATE_RIGHT = 2;
public static const RIBBON1 = 1;
public static const RIBBON2 = 2;
public static const RIBBON3 = 3;
public static const RIBBON4 = 4;
public static const FORWARD = 4;
public static const DELETE = 11;
public static const RESET = 12;
public static const STARFISH = 8;
public static const TURTLE = 9;
public static const DOLPHIN = 4;
public static const SEASHELL = 6;
public static const FIRST_LAYER = 6;
public static const COLOR = 9;
public static const SNAILSHELL = 7;
public static const LAST_LAYER = 7;
public static const ZOOM_OUT = 1;
public static const COLOR1 = 1;
public static const COLOR2 = 2;
public static const COLOR3 = 3;
public static const FISH = 5;
public static const COLOR4 = 4;
public static const BACKWARD = 5;
public static const RIBBON = 10;
public static const ROTATE_LEFT = 3;
public static const FISHHORSE = 10;
public static const FLIP = 8;
public static var example:Array = [[MARBLE3, MARBLE3, MARBLE3, MARBLE3, MARBLE2, MARBLE2, MARBLE2, DOLPHIN, DOLPHIN, SEASHELL, STARFISH, STARFISH, RIBBON1, COLOR1], [MARBLE1, MARBLE3, MARBLE3, MARBLE3, MARBLE1, MARBLE1, SNAILSHELL, FISHHORSE, FISHHORSE, RIBBON2, COLOR2], [MARBLE2, MARBLE2, MARBLE1, MARBLE1, SEASHELL, SEASHELL, TURTLE, TURTLE, RIBBON3, COLOR3], [MARBLE2, MARBLE2, MARBLE3, MARBLE3, FISH, FISH, SEASHELL, STARFISH, SNAILSHELL, RIBBON4, COLOR4], [MARBLE3, MARBLE3, MARBLE3, MARBLE3, MARBLE3, MARBLE3, FISH, DOLPHIN, SEASHELL, STARFISH, STARFISH, STARFISH, RIBBON1, COLOR1], [MARBLE1, MARBLE1, MARBLE1, MARBLE3, MARBLE3, MARBLE3, FISH, FISHHORSE, SNAILSHELL, SNAILSHELL, SNAILSHELL, RIBBON2, COLOR2], [MARBLE1, MARBLE2, MARBLE2, SEASHELL, SEASHELL, FISH, TURTLE, FISHHORSE, RIBBON3, COLOR3], [MARBLE2, MARBLE2, MARBLE3, FISH, FISH, SEASHELL, STARFISH, SNAILSHELL, TURTLE, FISHHORSE, RIBBON4, COLOR4]];
}
}//package
Section 58
//FPS (FPS)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import flash.system.*;
public dynamic class FPS extends MovieClip {
public var secondTime:Number;
public var prevSecondTime:Number;
public var frames:Number;
public var prevFrameTime:Number;
public var frameTime:Number;
public var iBar:MovieClip;
public var time:Number;
public var fps:String;
public var tf:TextField;
public function FPS(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
prevFrameTime = getTimer();
prevSecondTime = getTimer();
frames = 0;
fps = "...";
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(_arg1:Event):void{
time = getTimer();
frameTime = (time - prevFrameTime);
secondTime = (time - prevSecondTime);
if (secondTime >= 1000){
fps = frames.toString();
frames = 0;
prevSecondTime = time;
} else {
frames++;
};
prevFrameTime = time;
tf.text = (((((fps + " FPS / ") + frameTime) + " MS") + " - Memory : ") + System.totalMemory);
iBar.scaleX = (iBar.scaleX - ((iBar.scaleX - (frameTime / 10)) / 5));
}
}
}//package
Section 59
//Global (Global)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
public class Global {
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public static var STAGE_WIDTH = 600;
public static var STAGE_HEIGHT = 450;
public static function getIsoPoint(_arg1:Point):Point{
return (new Point((_arg1.x - _arg1.y), ((_arg1.x + _arg1.y) / 2)));
}
public static function htmlColorToAS(_arg1:String):uint{
var _local2 = "0x";
var _local3 = 1;
while (_local3 < _arg1.length) {
_local2 = _local2.concat(_arg1.charAt(_local3));
_local3++;
};
return (uint(_local2));
}
public static function Slope(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
return ((_local6 / _local5));
}
public static function RemoveButtonListener(_arg1:MovieClip){
_arg1.useHandCursor = false;
_arg1.buttonMode = false;
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, showGlow);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, hideGlow);
}
public static function DegToRad(_arg1:Number):Number{
return (((_arg1 / 180) * Math.PI));
}
public static function duplicateMovieClip(_arg1:MovieClip):MovieClip{
var _local4:Rectangle;
var _local2:Class = Object(_arg1).constructor;
var _local3:MovieClip = (new (_local2) as MovieClip);
_local3.transform = _arg1.transform;
_local3.filters = _arg1.filters;
_local3.cacheAsBitmap = _arg1.cacheAsBitmap;
_local3.opaqueBackground = _arg1.opaqueBackground;
if (_arg1.scale9Grid){
_local4 = _arg1.scale9Grid;
_local3.scale9Grid = _local4;
};
trace(_local3);
return (_local3);
}
public static function RadToDeg(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function Distance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((Math.pow((_arg3 - _arg1), 2) + Math.pow((_arg4 - _arg2), 2))));
}
public static function AngleOfTwoLines(_arg1:Object, _arg2:Object):Number{
var _local3:Number = _arg1.x1;
var _local4:Number = _arg1.y1;
var _local5:Number = _arg1.x2;
var _local6:Number = _arg1.y2;
var _local7:Number = _arg2.x1;
var _local8:Number = _arg2.y1;
var _local9:Number = _arg2.x2;
var _local10:Number = _arg2.y2;
var _local11:Number = Global.Slope(_local3, _local4, _local5, _local6);
var _local12:Number = Global.Slope(_local7, _local8, _local9, _local10);
return (Math.atan(((_local12 - _local11) / (1 + (_local11 * _local12)))));
}
public static function setMouseEnabled(_arg1:MovieClip, _arg2:Boolean){
_arg1.mouseChildren = _arg2;
_arg1.mouseEnabled = _arg2;
}
public static function clone(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function showGlow(_arg1:MouseEvent){
_arg1.currentTarget.filters = [new GlowFilter(0xFFFFFF, (alpha = 1), (blurX = 10), (blurY = 10), (strength = 10))];
}
public static function moreGames(_arg1:MouseEvent=null){
navigateToURL(new URLRequest("http://www.didigames.com/"));
}
public static function hideGlow(_arg1:MouseEvent){
_arg1.currentTarget.filters = [];
}
public static function AngleOfTwoDots(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
return (Math.atan2(_local6, _local5));
}
public static function setButton(_arg1:MovieClip){
_arg1.useHandCursor = true;
_arg1.buttonMode = true;
_arg1.addEventListener(MouseEvent.MOUSE_OVER, showGlow, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, hideGlow, false, 0, true);
}
public static function pythagoras(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2))));
}
public static function getMoneyString(_arg1:int):String{
var _local2 = "";
var _local3:String = _arg1;
var _local4:int;
var _local5:int = (_local3.length - 1);
while (_local5 >= 0) {
_local4++;
_local2 = (_local3.charAt(_local5) + _local2);
if ((_local4 % 3) == 0){
_local2 = ("," + _local2);
};
_local5--;
};
if (_local2.charAt(0) == ","){
return (_local2.substr(1, (_local2.length - 1)));
};
return (_local2);
}
public static function getFormatedString(_arg1:String, _arg2:Array, _arg3:String="%"):String{
var _local4:String;
for (_local4 in _arg2) {
_arg1 = _arg1.replace((_arg3 + _local4), _arg2[_local4]);
trace(_local4, _arg2[_local4]);
};
return (_arg1);
}
}
}//package
Section 60
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.printing.*;
import flash.system.*;
public dynamic class Main extends MovieClip {
private var mContextMenu:ContextMenu;
public var mPreloader:MovieClip;
private var mGame1:CGame1;
public var mBgmStartFlag:Boolean;// = false
private var mGame3:CGame3;
private var mGame4:CGame4;
private var mGame2:CGame2;
private var mBgm:SoundChannel;
public var bar:MovieClip;
public var mBgmFlag:Boolean;// = true
public var mState:int;
public var mFPSBar:MovieClip;
public var fromWindow:String;
private var mMainMenu:CMainMenu;
public var toWindow:String;
public var loadText:TextField;
private var mSfx:SoundChannel;
public var mSfxFlag:Boolean;// = true
public var mTransisiScreen:MovieClip;
public var mOptionBar:COptionBar;
public var mBannedWin:CBannedWin;
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public static var STATE_GAME = 1;
public static var STATE_FADEOUT = 5;
public static var STATE_PRELOADER = 0;
public static var MainGlobal:Main;
public static var STATE_FADEIN = 4;
public static var STATE_MAIN_MENU = 2;
public static var STATE_PAUSED = 3;
public function Main(){
mState = STATE_PRELOADER;
super();
addFrameScript(0, frame1, 15, frame16);
MainGlobal = this;
mState = STATE_MAIN_MENU;
Global.STAGE_HEIGHT = stage.stageHeight;
Global.STAGE_WIDTH = stage.stageWidth;
stage.addEventListener(FocusEvent.FOCUS_IN, OnKeyFocusChange, false, 0, true);
stage.addEventListener(Event.ADDED, OnAddedToStage, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp, false, 0, true);
stage.showDefaultContextMenu = false;
stage.quality = StageQuality.BEST;
}
private function isDomainNOTAllowed(_arg1:Array):Boolean{
var _local4:Number;
var _local2:LocalConnection = new LocalConnection();
var _local3:String = _local2.domain;
trace(("Domain : " + _local3));
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3 == _arg1[_local4]){
return (true);
};
_local4++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3.substr(-((_arg1[_local4].length + 1))) == ("." + _arg1[_local4])){
return (true);
};
_local4++;
};
return (false);
}
public function InitMainMenu(){
ShowWindow("MainMenu", "");
}
public function KillWindow(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=true){
var _local6:XML;
var _local7:String;
var _local4:String = ("C" + _arg1);
var _local5:String = ("m" + _arg1);
if (this[_local5]){
if (((this[_local5].parent) && (_arg3))){
this[_local5].parent.removeChild(this[_local5]);
};
if (_arg2){
_local6 = describeType(this[_local5]);
_local7 = _local6.method.@name.toXMLString();
if (_local7.indexOf("RemoveDispatcher") > -1){
this[_local5].RemoveDispatcher();
};
};
this[_local5] = null;
};
if (this[_local5] != null){
trace((("WARNING ### " + _arg1) + "Not null after Kill process"));
};
}
private function menuSelectHandler(_arg1:ContextMenuEvent){
}
public function changeWindowFromTo(_arg1:String, _arg2:String){
mState = Main.STATE_FADEIN;
fromWindow = _arg1;
toWindow = _arg2;
}
public function windowFadeOUT(){
mTransisiScreen.alpha = (mTransisiScreen.alpha - 0.05);
if (mTransisiScreen.alpha <= 0){
mTransisiScreen.parent.removeChild(mTransisiScreen);
mTransisiScreen = null;
if (toWindow == "Game1"){
mState = STATE_GAME;
} else {
if (toWindow == "Game2"){
mState = STATE_PAUSED;
} else {
if (toWindow == "Game3"){
mState = STATE_PAUSED;
} else {
if (toWindow == "Game4"){
mState = STATE_PAUSED;
} else {
if (toWindow == "MainMenu"){
mState = STATE_MAIN_MENU;
};
};
};
};
};
};
}
private function OnKeyFocusChange(_arg1:FocusEvent):void{
stage.focus = this.stage;
}
public function InitGame3(){
ShowWindow("Game3", "");
mGame3.AddDispatcher();
}
public function InitGame4(){
ShowWindow("Game4", "");
mGame4.AddDispatcher();
}
public function print(_arg1:MovieClip){
var _local2:PrintJob;
var _local3:PrintJobOptions;
var _local4:Number;
var _local5:Number;
var _local6:*;
_local3 = new PrintJobOptions();
_local3.printAsBitmap = true;
_local2 = new PrintJob();
if (_local2.start()){
_local4 = (_local2.pageWidth / 800);
_local5 = (_local2.pageHeight / 600);
_local6 = Math.min(_local4, _local5);
_arg1.scaleX = _local6;
_arg1.scaleY = _local6;
_local2.addPage(_arg1, null, _local3);
_arg1.scaleX = 1;
_arg1.scaleY = 1;
};
}
public function windowFadeIN(){
if (!mTransisiScreen){
ShowWindow("TransisiScreen", "");
mTransisiScreen.alpha = 0;
};
if (mTransisiScreen.alpha >= 1){
if (fromWindow == "MainMenu"){
killMainMenu();
} else {
if (fromWindow == "Game1"){
killGame1();
} else {
if (fromWindow == "Game2"){
killGame2();
} else {
if (fromWindow == "Game3"){
killGame3();
} else {
if (fromWindow == "Game4"){
killGame4();
};
};
};
};
};
if (toWindow == "MainMenu"){
InitMainMenu();
} else {
if (toWindow == "Game1"){
InitGame1();
} else {
if (toWindow == "Game2"){
InitGame2();
} else {
if (toWindow == "Game3"){
InitGame3();
} else {
if (toWindow == "Game4"){
InitGame4();
};
};
};
};
};
this.stage.setChildIndex(mTransisiScreen, (this.stage.numChildren - 1));
mState = STATE_FADEOUT;
return;
};
mTransisiScreen.alpha = (mTransisiScreen.alpha + 0.05);
}
private function isDomainAllowed(_arg1:Array):Boolean{
var _local4:Number;
var _local2:LocalConnection = new LocalConnection();
var _local3:String = _local2.domain;
trace(("Domain : " + _local3));
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3 == _arg1[_local4]){
return (true);
};
_local4++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3.substr(-((_arg1[_local4].length + 1))) == ("." + _arg1[_local4])){
return (true);
};
_local4++;
};
return (false);
}
public function onKeyUp(_arg1:KeyboardEvent){
if (mState != STATE_PRELOADER){
switch (_arg1.keyCode){
};
};
}
public function killMainMenu(){
mMainMenu.parent.removeChild(mMainMenu);
mMainMenu = null;
}
public function InitGame1(){
ShowWindow("Game1", "");
mGame1.AddDispatcher();
}
public function InitGame2(){
ShowWindow("Game2", "");
mGame2.AddDispatcher();
}
private function OnAddedToStage(_arg1:Event):void{
if (mOptionBar){
mOptionBar.parent.setChildIndex(mOptionBar, (mOptionBar.parent.numChildren - 1));
};
if (mFPSBar){
mFPSBar.parent.setChildIndex(mFPSBar, (mFPSBar.parent.numChildren - 1));
};
}
public function killGame3(){
mGame3.parent.removeChild(mGame3);
mGame3.RemoveDispatcher();
mGame3 = null;
}
public function killGame4(){
mGame4.parent.removeChild(mGame4);
mGame4.RemoveDispatcher();
mGame4 = null;
}
public function killGame2(){
mGame2.parent.removeChild(mGame2);
mGame2.RemoveDispatcher();
mGame2 = null;
}
public function CheckDomain(){
var _local3:*;
var _local1:Array = new Array("localhost");
var _local2:Array = new Array("ActiveX", "PlugIn", "StandAlone", "External");
if (!isDomainAllowed(_local1)){
trace("BANNED DOMAIN !!!");
if (_local3){
if (_local3.parent){
_local3.parent.removeChild(_local3);
};
_local3 = null;
};
_local3 = new CBannedWin();
this.stage.addChild(_local3);
} else {
trace("Allowed DOMAIN !!!");
};
}
public function killGame1(){
mGame1.parent.removeChild(mGame1);
mGame1.RemoveDispatcher();
mGame1 = null;
}
private function InitOnce(){
mOptionBar = new COptionBar(0, 0, "bgm");
stage.addChild(mOptionBar);
mOptionBar.visible = false;
mFPSBar = new FPS();
stage.addChild(mFPSBar);
mFPSBar.visible = false;
InitMainMenu();
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
};
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame, false, 0, true);
}
function frame16(){
InitOnce();
}
public function OnEnterFrame(_arg1:Event){
switch (mState){
case STATE_GAME:
RunStateGame();
break;
case STATE_PAUSED:
this.dispatchEvent(new Event("pause"));
break;
case STATE_FADEIN:
this.dispatchEvent(new Event("pause"));
windowFadeIN();
break;
case STATE_FADEOUT:
this.dispatchEvent(new Event("pause"));
windowFadeOUT();
break;
default:
break;
};
}
public function ToggleQuality():void{
switch (stage.quality){
case "LOW":
stage.quality = StageQuality.MEDIUM;
break;
case "MEDIUM":
stage.quality = StageQuality.HIGH;
break;
case "HIGH":
stage.quality = StageQuality.BEST;
break;
case "BEST":
stage.quality = StageQuality.LOW;
break;
default:
break;
};
}
public function ShowWindow(_arg1:String, _arg2:String){
var _local3:String = ((_arg2 + "C") + _arg1);
var _local4:String = ("m" + _arg1);
var _local5:Class = (getDefinitionByName(_local3) as Class);
if (_local5){
KillWindow(_local4);
this[_local4] = new (_local5);
this.stage.addChild(this[_local4]);
};
}
function frame1(){
stop();
}
private function isPlayerAllowed(_arg1:Array):Boolean{
var _local2:String = Capabilities.playerType;
trace(("PlayerType : " + _local2));
var _local3:Number = 0;
while (_local3 < _arg1.length) {
if (_local2 == _arg1[_local3]){
return (true);
};
_local3++;
};
return (false);
}
private function RunStateGame(){
this.dispatchEvent(new Event("update"));
}
public static function GetInstance():Main{
return (MainGlobal);
}
}
}//package
Section 61
//score (score)
package {
import flash.media.*;
public dynamic class score extends Sound {
}
}//package