Section 1
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package caurina.transitions
Section 2
//Equations (caurina.transitions.Equations)
package caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package caurina.transitions
Section 3
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var originalValueComplete:Object;
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var hasModifier:Boolean;
public var valueComplete:Number;
public var extra:Object;
public var valueStart:Number;
public var modifierFunction:Function;
public var arrayIndex:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){
valueStart = _arg1;
valueComplete = _arg2;
originalValueComplete = _arg3;
arrayIndex = _arg4;
extra = _arg5;
isSpecialProperty = _arg6;
hasModifier = Boolean(_arg7);
modifierFunction = _arg7;
modifierParameters = _arg8;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("arrayIndex:" + String(arrayIndex)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("extra:" + String(extra)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("hasModifier:" + String(hasModifier)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 4
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var preProcess:Function;
public var setValue:Function;
public var getValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
preProcess = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("preProcess:" + String(preProcess)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 5
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier)
package caurina.transitions {
public class SpecialPropertyModifier {
public var getValue:Function;
public var modifyValues:Function;
public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){
modifyValues = _arg1;
getValue = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 6
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter)
package caurina.transitions {
public class SpecialPropertySplitter {
public var parameters:Array;
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){
splitValues = _arg1;
parameters = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 7
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
var _local6:SpecialProperty;
if (!_inited){
init();
};
_local6 = new SpecialProperty(_arg2, _arg3, _arg4, _arg5);
_specialPropertyList[_arg1] = _local6;
}
public static function init(... _args):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Array;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Function;
var _local9:TweenListObj;
var _local10:Number;
var _local11:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local4 = _arg1.concat();
} else {
_local4 = [_arg1];
};
_local5 = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local6 = (isNaN(_local5.time)) ? 0 : _local5.time;
_local7 = (isNaN(_local5.delay)) ? 0 : _local5.delay;
if (typeof(_local5.transition) == "string"){
_local11 = _local5.transition.toLowerCase();
_local8 = _transitionList[_local11];
} else {
_local8 = _local5.transition;
};
if (!Boolean(_local8)){
_local8 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local5.useFrames == true){
_local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams);
} else {
_local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams);
};
_local9.properties = null;
_local9.onStart = _local5.onStart;
_local9.onUpdate = _local5.onUpdate;
_local9.onComplete = _local5.onComplete;
_local9.onOverwrite = _local5.onOverwrite;
_local9.onStartParams = _local5.onStartParams;
_local9.onUpdateParams = _local5.onUpdateParams;
_local9.onCompleteParams = _local5.onCompleteParams;
_local9.onOverwriteParams = _local5.onOverwriteParams;
_local9.onStartScope = _local5.onStartScope;
_local9.onUpdateScope = _local5.onUpdateScope;
_local9.onCompleteScope = _local5.onCompleteScope;
_local9.onOverwriteScope = _local5.onOverwriteScope;
_local9.onErrorScope = _local5.onErrorScope;
_local9.isCaller = true;
_local9.count = _local5.count;
_local9.waitFrames = _local5.waitFrames;
_tweenList.push(_local9);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local10 = (_tweenList.length - 1);
updateTweenByIndex(_local10);
removeTweenByIndex(_local10);
};
_local3++;
};
return (true);
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
var _local3:Number;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local3 = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.31.71");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
updateFrame();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var cTime:Number;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
cTime = getCurrentTweeningTime(tTweening);
if (cTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(cTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (cTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope;
try {
tTweening.onStart.apply(eventScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "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(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope;
try {
tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_local3 = getCurrentTweeningTime(_tweenList[_local2]);
_tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var eventScope:Object;
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(eventScope, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace()));
};
} else {
if (!Boolean(pTweening.onError)){
printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace()));
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
_currentTimeFrame = 0;
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Object;
var _local12:Object;
var _local13:Function;
var _local14:Object;
var _local15:TweenListObj;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local6 = _arg1.concat();
} else {
_local6 = [_arg1];
};
_local7 = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
_local10 = new Array();
_local11 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
_local12 = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
return (true);
};
_local2++;
};
return (false);
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = getCurrentTweeningTime(_local2);
_local2.isPaused = true;
return (true);
}
public static function getCurrentTweeningTime(_arg1:Object):Number{
return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
_currentTimeFrame = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope;
try {
_tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 8
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var timeComplete:Number;
public var onStartParams:Array;
public var onUpdateScope:Object;
public var rounded:Boolean;
public var onUpdateParams:Array;
public var properties:Object;
public var onComplete:Function;
public var transitionParams:Object;
public var updatesSkipped:Number;
public var onStart:Function;
public var onOverwriteScope:Object;
public var skipUpdates:Number;
public var onStartScope:Object;
public var scope:Object;
public var transition:Function;
public var timePaused:Number;
public var onCompleteParams:Array;
public var timesCalled:Number;
public var isCaller:Boolean;
public var onError:Function;
public var onErrorScope:Object;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public var onCompleteScope:Object;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
transitionParams = _arg6;
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
_local2.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:Boolean;
var _local3:String;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = true;
for (_local3 in properties) {
if (!_local2){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local3].name));
_local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete));
_local1 = (_local1 + "]");
_local2 = false;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
_local1 = (_local1 + (", transitionParams:" + String(transitionParams)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (onStartScope){
_local1 = (_local1 + (", onStartScope:" + String(onStartScope)));
};
if (onUpdateScope){
_local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope)));
};
if (onCompleteScope){
_local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope)));
};
if (onOverwriteScope){
_local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope)));
};
if (onErrorScope){
_local1 = (_local1 + (", onErrorScope:" + String(onErrorScope)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (isCaller){
_local1 = (_local1 + (", isCaller:" + String(isCaller)));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (timesCalled){
_local1 = (_local1 + (", timesCalled:" + String(timesCalled)));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (hasStarted){
_local1 = (_local1 + (", hasStarted:" + String(hasStarted)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package caurina.transitions
Section 9
//instruct_Pizza_177 (pizzaPalace_fla.instruct_Pizza_177)
package pizzaPalace_fla {
import flash.events.*;
import flash.display.*;
public dynamic class instruct_Pizza_177 extends MovieClip {
public function instruct_Pizza_177(){
addFrameScript(122, frame123);
}
function frame123(){
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package pizzaPalace_fla
Section 10
//Pizza_176 (pizzaPalace_fla.Pizza_176)
package pizzaPalace_fla {
import flash.display.*;
public dynamic class Pizza_176 extends MovieClip {
public var demo:MovieClip;
}
}//package pizzaPalace_fla
Section 11
//pizzapalace_pizza_bigsaucesplatter_mc_258 (pizzaPalace_fla.pizzapalace_pizza_bigsaucesplatter_mc_258)
package pizzaPalace_fla {
import flash.display.*;
public dynamic class pizzapalace_pizza_bigsaucesplatter_mc_258 extends MovieClip {
public function pizzapalace_pizza_bigsaucesplatter_mc_258(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package pizzaPalace_fla
Section 12
//pizzapalace_topping_splat_mc_159 (pizzaPalace_fla.pizzapalace_topping_splat_mc_159)
package pizzaPalace_fla {
import flash.display.*;
public dynamic class pizzapalace_topping_splat_mc_159 extends MovieClip {
public function pizzapalace_topping_splat_mc_159(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package pizzaPalace_fla
Section 13
//TrayTopping_210 (pizzaPalace_fla.TrayTopping_210)
package pizzaPalace_fla {
import flash.display.*;
public dynamic class TrayTopping_210 extends MovieClip {
public function TrayTopping_210(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame25(){
stop();
}
function frame13(){
stop();
}
function frame17(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame22(){
stop();
}
function frame16(){
stop();
}
function frame8(){
stop();
}
function frame21(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame23(){
stop();
}
function frame24(){
stop();
}
function frame20(){
stop();
}
function frame11(){
stop();
}
}
}//package pizzaPalace_fla
Section 14
//playSound (utils.sound.playSound)
package utils.sound {
import flash.media.*;
import flash.utils.*;
public function playSound(_arg1:String, _arg2:Number=0, _arg3:int=0, _arg4:SoundTransform=null):SoundChannel{
var className = _arg1;
var startTime = _arg2;
var loops = _arg3;
var sndTransform = _arg4;
try {
return (new (getDefinitionByName(className)).play(startTime, loops, sndTransform));
} catch(error:Error) {
trace("-----------PLAY SOUND ERROR--------\n", error);
};
return (new SoundChannel());
}
}//package utils.sound
Section 15
//AbstractIntegratedActivity (AbstractIntegratedActivity)
package {
import flash.events.*;
import flash.display.*;
public class AbstractIntegratedActivity extends MovieClip {
public var ready_fn:Function;
private var _standaloneFramesWaited:uint;// = 0
protected var _standaloneWaitFrames:uint;// = 24
private var _availability:Boolean;// = false
public var playmatePlay_fn:Function;
protected var _gameType:String;
protected var _loaderParameters:Object;
protected var onAnimationComplete_fn:Function;
public function AbstractIntegratedActivity(_arg1="default"){
_availability = false;
_standaloneFramesWaited = 0;
_standaloneWaitFrames = 24;
super();
_gameType = _arg1;
announceAvailability();
checkLoadStatus();
}
protected function playmatePlay(_arg1:String, _arg2:Function=null):void{
var instruction = _arg1;
var animationCompleteCallBack = _arg2;
if (animationCompleteCallBack != null){
onAnimationComplete_fn = animationCompleteCallBack;
};
try {
playmatePlay_fn(instruction);
} catch(error:Error) {
handleAnimationComplete();
};
}
public function handleIrisOpeningEnd():void{
}
public function handleIrisOpeningBegin():void{
}
private function runStandalone():void{
announceAvailability();
loaderParameters = loaderInfo.parameters;
handleIrisOpeningBegin();
handleIrisOpeningEnd();
}
public function get gameType():String{
return (_gameType);
}
public function get availability():Boolean{
return (_availability);
}
protected function onLoaderParameters():void{
}
private function announceAvailability():void{
_availability = true;
dispatchEvent(new Event(Event.COMPLETE));
}
public function handleAnimationComplete():void{
try {
onAnimationComplete_fn();
onAnimationComplete_fn = null;
} catch(error:Error) {
};
}
private function checkLoadStatus():void{
if ((((loaderInfo.bytesLoaded == loaderInfo.bytesTotal)) && ((loaderInfo.bytesLoaded > 10)))){
onLoadComplete();
} else {
loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, int.MAX_VALUE);
};
}
protected function onLoadComplete(_arg1:Event=null):void{
var event = _arg1;
announceAvailability();
loaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
try {
ready_fn();
} catch(error:Error) {
addEventListener(Event.ENTER_FRAME, standaloneCheck);
};
}
public function set loaderParameters(_arg1:Object):void{
_loaderParameters = _arg1;
onLoaderParameters();
}
private function standaloneCheck(_arg1:Event):void{
var event = _arg1;
_standaloneFramesWaited++;
try {
ready_fn();
removeEventListener(Event.ENTER_FRAME, standaloneCheck);
return;
} catch(error:Error) {
if (_standaloneFramesWaited > _standaloneWaitFrames){
removeEventListener(Event.ENTER_FRAME, standaloneCheck);
runStandalone();
};
};
}
}
}//package
Section 16
//Avery (Avery)
package {
import flash.events.*;
public dynamic class Avery extends Customer {
public function Avery(){
addFrameScript(28, frame29, 83, frame84);
}
function frame84(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame29(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 17
//broccoli (broccoli)
package {
import flash.display.*;
public dynamic class broccoli extends MovieClip {
public function broccoli(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 18
//carrot (carrot)
package {
import flash.display.*;
public dynamic class carrot extends MovieClip {
public function carrot(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 19
//cheese (cheese)
package {
import flash.display.*;
public dynamic class cheese extends MovieClip {
public function cheese(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 20
//cookie (cookie)
package {
import flash.display.*;
public dynamic class cookie extends MovieClip {
public function cookie(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 21
//corn (corn)
package {
import flash.display.*;
public dynamic class corn extends MovieClip {
public function corn(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 22
//crayon (crayon)
package {
import flash.display.*;
public dynamic class crayon extends MovieClip {
public function crayon(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 23
//Customer (Customer)
package {
import flash.events.*;
import flash.display.*;
public class Customer extends MovieClip {
public static const START_NEW_GAME:String = "startNewGame";
public static const CUSTOMER_ENTERED:String = "customerEntered";
public function Customer():void{
stop();
addEventListener(Event.COMPLETE, customerEntered, false, 0, true);
}
public function enter():void{
gotoAndPlay("enter");
}
public function exit():void{
addEventListener(Event.COMPLETE, customerFullyExited, false, 0, true);
gotoAndPlay("exit");
}
private function customerEntered(_arg1:Event):void{
dispatchEvent(new Event(CUSTOMER_ENTERED));
}
private function customerFullyExited(_arg1:Event):void{
removeEventListener(Event.COMPLETE, customerFullyExited);
dispatchEvent(new Event(START_NEW_GAME));
}
}
}//package
Section 24
//CustomerSelection (CustomerSelection)
package {
public class CustomerSelection {
public static function randomCustomer():Customer{
var _local1:int;
var _local2:Customer;
_local1 = Math.ceil((Math.random() * 4));
switch (_local1){
case 1:
_local2 = new Avery();
break;
case 2:
_local2 = new Imogen();
break;
case 3:
_local2 = new Ernest();
break;
case 4:
_local2 = new Rachel();
break;
default:
trace("RANDOM CUSTOMER NOT SELECTED");
};
return (_local2);
}
}
}//package
Section 25
//dinosaur (dinosaur)
package {
import flash.display.*;
public dynamic class dinosaur extends MovieClip {
public function dinosaur(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 26
//egg (egg)
package {
import flash.display.*;
public dynamic class egg extends MovieClip {
public function egg(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 27
//Ernest (Ernest)
package {
import flash.events.*;
public dynamic class Ernest extends Customer {
public function Ernest(){
addFrameScript(28, frame29, 82, frame83);
}
function frame29(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame83(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 28
//fries (fries)
package {
import flash.display.*;
public dynamic class fries extends MovieClip {
public function fries(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 29
//GameType (GameType)
package {
public class GameType {
public static const CREATIVE:String = "game_type_creative";
public static const SCORING:String = "game_type_scoring";
}
}//package
Section 30
//gingerbread (gingerbread)
package {
import flash.display.*;
public dynamic class gingerbread extends MovieClip {
public function gingerbread(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 31
//hamburger (hamburger)
package {
import flash.display.*;
public dynamic class hamburger extends MovieClip {
public function hamburger(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 32
//hat (hat)
package {
import flash.display.*;
public dynamic class hat extends MovieClip {
public function hat(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 33
//icecream (icecream)
package {
import flash.display.*;
public dynamic class icecream extends MovieClip {
public function icecream(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 34
//Imogen (Imogen)
package {
import flash.events.*;
public dynamic class Imogen extends Customer {
public function Imogen(){
addFrameScript(28, frame29, 82, frame83);
}
function frame29(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame83(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 35
//IntegratedActivityCustomCursor (IntegratedActivityCustomCursor)
package {
import flash.display.*;
public dynamic class IntegratedActivityCustomCursor extends MovieClip {
public function IntegratedActivityCustomCursor(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package
Section 36
//MainView (MainView)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import utils.sound.*;
public class MainView extends MovieClip {
private var _currentThoughtBubble:ThoughtBubble;
private var _gameCounter:int;// = 1
public var tray:Tray;
private var _currentCustomer:Customer;
private var _bubbleTimer:Timer;
public var pizzaHolder_mc:MovieClip;
public var thoughtBubbleHolder_mc:MovieClip;
private var _pizza:Pizza;
private var _playmatePlay_fn:Function;
private var _thoughtBubbleType:int;// = 3
public var instructions:MovieClip;
public var _assignAnimationCompleteHandler_fn:Function;
public var customerHolder_mc:MovieClip;
public function MainView():void{
_thoughtBubbleType = 3;
_gameCounter = 1;
super();
instructions.demo.addEventListener(Event.COMPLETE, instructionsComplete, false, 0, true);
}
private function instructionsComplete(_arg1:Event):void{
instructions.demo.removeEventListener(Event.COMPLETE, instructionsComplete);
removeChild(instructions);
_currentThoughtBubble = new ThoughtBubbleThree();
animateInPizza();
characterSelection();
}
private function showThoughtBubble(_arg1:Event):void{
if (_currentThoughtBubble.ignoreIncorrectGuess){
return;
};
_currentThoughtBubble.visible = true;
_currentThoughtBubble.addEventListener(ThoughtBubble.THOUGHT_BUBBLE_OPEN_COMPLETE, startBubbleOpenTimer, false, 0, true);
_currentThoughtBubble.openThoughtBubble();
}
public function destoryOldItems():void{
if (_pizza){
pizzaHolder_mc.removeChild(_pizza);
};
if (_currentCustomer){
customerHolder_mc.removeChild(_currentCustomer);
};
if (_currentThoughtBubble){
_currentThoughtBubble.gotoAndStop(1);
thoughtBubbleHolder_mc.removeChild(_currentThoughtBubble);
};
}
private function showToppings(_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, showToppings);
_arg1.target.stop();
tray.showToppingSelections();
}
private function startBubbleOpenTimer(_arg1:Event):void{
_bubbleTimer = new Timer(2000, 1);
_bubbleTimer.addEventListener(TimerEvent.TIMER_COMPLETE, closeBubble, false, 0, true);
_bubbleTimer.start();
}
private function startNewGame(_arg1:Event):void{
_currentCustomer.removeEventListener(Customer.START_NEW_GAME, startNewGame);
_playmatePlay_fn("gameReplayed");
_gameCounter++;
destoryOldItems();
if (_gameCounter < 4){
_thoughtBubbleType = 3;
_currentThoughtBubble = new ThoughtBubbleThree();
};
if ((((_gameCounter > 3)) && ((_gameCounter < 7)))){
_thoughtBubbleType = 4;
_currentThoughtBubble = new ThoughtBubbleFour();
};
if (_gameCounter >= 7){
_thoughtBubbleType = 5;
_currentThoughtBubble = new ThoughtBubbleFive();
};
tray.destroy();
animateInPizza();
characterSelection();
}
private function thoughtBubbleCloseComplete(_arg1:Event):void{
_currentThoughtBubble.removeEventListener(Event.COMPLETE, thoughtBubbleCloseComplete);
_currentThoughtBubble.visible = false;
}
public function set assignAnimationCompleteHandler_fn(_arg1:Function):void{
_assignAnimationCompleteHandler_fn = _arg1;
}
private function characterSelection():void{
_currentCustomer = CustomerSelection.randomCustomer();
customerHolder_mc.addChild(_currentCustomer);
_currentCustomer.addEventListener(Customer.CUSTOMER_ENTERED, startGame, false, 0, true);
_currentCustomer.play();
}
private function gameComplete(_arg1:Event):void{
_pizza.addEventListener(Event.COMPLETE, pizzaBoxComplete, false, 0, true);
_pizza.gotoAndPlay("boxPizza");
_playmatePlay_fn("gameCompletedWon");
playSound("PPVictory");
}
private function initialGameThoughtBubble(_arg1:Event):void{
_currentThoughtBubble.removeEventListener(ThoughtBubble.THOUGHT_BUBBLE_OPEN_COMPLETE, initialGameThoughtBubble);
_currentThoughtBubble.addEventListener(ThoughtBubble.THOUGHT_BUBBLE_CLOSE_COMPLETE, thoughtBubbleCloseComplete, false, 0, true);
_currentThoughtBubble.closeThoughtBubble();
}
private function incorrectSelection(_arg1:Event):void{
_playmatePlay_fn("missFailure");
playSound("PPWrongChoice");
}
private function pizzaBoxComplete(_arg1:Event):void{
_pizza.removeEventListener(Event.COMPLETE, pizzaBoxComplete);
if (((_currentThoughtBubble.ignoreIncorrectGuess) && (!(_currentThoughtBubble.closingBubble)))){
_currentThoughtBubble.closeThoughtBubble();
};
_currentCustomer.addEventListener(Customer.START_NEW_GAME, startNewGame, false, 0, true);
_currentCustomer.exit();
}
public function set playmatePlay_fn(_arg1:Function):void{
_playmatePlay_fn = _arg1;
}
private function startGame(_arg1:Event):void{
var _local2:Timer;
_currentCustomer.removeEventListener(Customer.CUSTOMER_ENTERED, startGame);
playSound("PPThoughtBubble");
_currentThoughtBubble.visible = true;
_currentThoughtBubble.addEventListener(ThoughtBubble.THOUGHT_BUBBLE_OPEN_COMPLETE, initialGameThoughtBubble, false, 0, true);
_currentThoughtBubble.openThoughtBubble();
_currentThoughtBubble.thoughtBubbleType = _thoughtBubbleType;
prepUniqueRandomToppings();
_currentThoughtBubble.setImages();
tray.addEventListener(Tray.SHOW_THOUGHT_BUBBLE, showThoughtBubble, false, 0, true);
tray.addEventListener(Tray.GAME_COMPLETE, gameComplete, false, 0, true);
tray.addEventListener(Tray.CORRECT_GUESS, correctSelection, false, 0, true);
tray.addEventListener(Tray.INCORRECT_GUESS, incorrectSelection, false, 0, true);
tray.selectedToppingChoices = _currentThoughtBubble.selectedThoughtBubbleToppings;
thoughtBubbleHolder_mc.addChild(_currentThoughtBubble);
_local2 = new Timer(2000, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, showToppings, false, 0, true);
_local2.start();
}
private function animateInPizza():void{
_pizza = new Pizza();
playSound("PPPlop");
tray.toppingsHolder = _pizza.toppingHolder_mc;
pizzaHolder_mc.addChild(_pizza);
}
private function closeBubble(_arg1:TimerEvent):void{
_bubbleTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, closeBubble);
_bubbleTimer.stop();
_bubbleTimer = null;
_currentThoughtBubble.addEventListener(ThoughtBubble.THOUGHT_BUBBLE_CLOSE_COMPLETE, thoughtBubbleCloseComplete, false, 0, true);
_currentThoughtBubble.closeThoughtBubble();
}
private function prepUniqueRandomToppings():void{
_currentThoughtBubble.thoughtBubbleToppings = tray.uniqueRandomNumberArray;
}
private function correctSelection(_arg1:Event):void{
var _local2:int;
_playmatePlay_fn("scoreSuccess");
_local2 = Math.ceil((Math.random() * 5));
switch (_local2){
case 1:
playSound("PPSuccess1");
break;
case 2:
playSound("PPSuccess2");
break;
case 3:
playSound("PPSuccess3");
break;
case 4:
playSound("PPSuccess4");
break;
case 5:
playSound("PPSuccess5");
break;
};
}
}
}//package
Section 37
//MultipleToppingAnimation (MultipleToppingAnimation)
package {
import flash.display.*;
public dynamic class MultipleToppingAnimation extends MovieClip {
public var topping1:ThoughtBubbleToppings;
public var topping3:ThoughtBubbleToppings;
public var topping2:ThoughtBubbleToppings;
public function MultipleToppingAnimation(){
addFrameScript(12, frame13, 26, frame27, 41, frame42, 55, frame56, 69, frame70);
}
function frame70(){
stop();
}
function frame13(){
stop();
}
function frame27(){
stop();
}
function frame42(){
stop();
}
function frame56(){
stop();
}
}
}//package
Section 38
//mushroom (mushroom)
package {
import flash.display.*;
public dynamic class mushroom extends MovieClip {
public function mushroom(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 39
//peanut (peanut)
package {
import flash.display.*;
public dynamic class peanut extends MovieClip {
}
}//package
Section 40
//pepperoni (pepperoni)
package {
import flash.display.*;
public dynamic class pepperoni extends MovieClip {
public function pepperoni(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 41
//pineapple (pineapple)
package {
import flash.display.*;
public dynamic class pineapple extends MovieClip {
public function pineapple(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 42
//Pizza (Pizza)
package {
import flash.events.*;
import flash.display.*;
public dynamic class Pizza extends MovieClip {
public var toppingHolder_mc:MovieClip;
public function Pizza(){
addFrameScript(11, frame12, 51, frame52);
}
function frame12(){
stop();
}
function frame52(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 43
//PizzaPalace (PizzaPalace)
package {
import flash.events.*;
public class PizzaPalace extends AbstractIntegratedActivity {
private var _mainView:MainView;
public function PizzaPalace():void{
super(GameType.SCORING);
}
private function added(_arg1:Event):void{
_mainView.removeEventListener(Event.ADDED_TO_STAGE, added);
}
override public function handleIrisOpeningBegin():void{
_mainView = new MainView();
_mainView.playmatePlay_fn = playmatePlay;
_mainView.assignAnimationCompleteHandler_fn = assignAnimationCompleteHandler;
_mainView.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addChildAt(_mainView, 0);
playmatePlay("gameStart");
}
public function assignAnimationCompleteHandler(_arg1:Function):void{
onAnimationComplete_fn = _arg1;
}
}
}//package
Section 44
//popcorn (popcorn)
package {
import flash.display.*;
public dynamic class popcorn extends MovieClip {
public function popcorn(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 45
//PPPlop (PPPlop)
package {
import flash.media.*;
public dynamic class PPPlop extends Sound {
}
}//package
Section 46
//PPSuccess1 (PPSuccess1)
package {
import flash.media.*;
public dynamic class PPSuccess1 extends Sound {
}
}//package
Section 47
//PPSuccess2 (PPSuccess2)
package {
import flash.media.*;
public dynamic class PPSuccess2 extends Sound {
}
}//package
Section 48
//PPSuccess3 (PPSuccess3)
package {
import flash.media.*;
public dynamic class PPSuccess3 extends Sound {
}
}//package
Section 49
//PPSuccess4 (PPSuccess4)
package {
import flash.media.*;
public dynamic class PPSuccess4 extends Sound {
}
}//package
Section 50
//PPSuccess5 (PPSuccess5)
package {
import flash.media.*;
public dynamic class PPSuccess5 extends Sound {
}
}//package
Section 51
//PPThinkItem (PPThinkItem)
package {
import flash.media.*;
public dynamic class PPThinkItem extends Sound {
}
}//package
Section 52
//PPThoughtBubble (PPThoughtBubble)
package {
import flash.media.*;
public dynamic class PPThoughtBubble extends Sound {
}
}//package
Section 53
//PPVictory (PPVictory)
package {
import flash.media.*;
public dynamic class PPVictory extends Sound {
}
}//package
Section 54
//PPWrongChoice (PPWrongChoice)
package {
import flash.media.*;
public dynamic class PPWrongChoice extends Sound {
}
}//package
Section 55
//pretzel (pretzel)
package {
import flash.display.*;
public dynamic class pretzel extends MovieClip {
public function pretzel(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 56
//Rachel (Rachel)
package {
import flash.events.*;
public dynamic class Rachel extends Customer {
public function Rachel(){
addFrameScript(28, frame29, 82, frame83);
}
function frame29(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame83(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 57
//sardines (sardines)
package {
import flash.display.*;
public dynamic class sardines extends MovieClip {
public function sardines(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 58
//shoes (shoes)
package {
import flash.display.*;
public dynamic class shoes extends MovieClip {
public function shoes(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 59
//soccerball (soccerball)
package {
import flash.display.*;
public dynamic class soccerball extends MovieClip {
public function soccerball(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 60
//sock (sock)
package {
import flash.display.*;
public dynamic class sock extends MovieClip {
public function sock(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 61
//star (star)
package {
import flash.display.*;
public dynamic class star extends MovieClip {
public function star(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 62
//ThoughtBubble (ThoughtBubble)
package {
import flash.events.*;
import flash.display.*;
public class ThoughtBubble extends MovieClip {
private var _selectedThoughtbubbleToppings:Array;
private var _possibleThoughtBubbleToppings:Array;
private var _thoughtBubbleType:int;
public var closingBubble:Boolean;// = false
public var ignoreIncorrectGuess:Boolean;// = false
public var topping1:ThoughtBubbleToppings;
public var topping3:ThoughtBubbleToppings;
public var topping4:ThoughtBubbleToppings;
public var topping5:ThoughtBubbleToppings;
public var topping2:ThoughtBubbleToppings;
public static const THOUGHT_BUBBLE_OPEN_COMPLETE:String = "thoughtBubbleOpenComplete";
public static const THOUGHT_BUBBLE_CLOSE_COMPLETE:String = "thoughtBubbleCloseComplete";
public function ThoughtBubble():void{
ignoreIncorrectGuess = false;
closingBubble = false;
super();
stop();
_possibleThoughtBubbleToppings = new Array();
_selectedThoughtbubbleToppings = new Array();
}
public function get selectedThoughtBubbleToppings():Array{
return (_selectedThoughtbubbleToppings.concat());
}
private function balloonCloseComplete(_arg1:Event):void{
ignoreIncorrectGuess = false;
closingBubble = false;
removeEventListener(Event.COMPLETE, balloonCloseComplete);
dispatchEvent(new Event(THOUGHT_BUBBLE_CLOSE_COMPLETE));
}
private function pickRandomToppings():void{
var _local1:Array;
var _local2:int;
_local1 = _possibleThoughtBubbleToppings;
while (_selectedThoughtbubbleToppings.length < _thoughtBubbleType) {
_local2 = (Math.ceil((Math.random() * _local1.length)) - 1);
_selectedThoughtbubbleToppings.push(_local1[_local2]);
_local1.splice(_local2, 1);
};
}
public function set thoughtBubbleToppings(_arg1:Array):void{
_possibleThoughtBubbleToppings = _arg1;
pickRandomToppings();
}
private function balloonOpenComplete(_arg1:Event):void{
ignoreIncorrectGuess = true;
removeEventListener(Event.COMPLETE, balloonOpenComplete);
dispatchEvent(new Event(THOUGHT_BUBBLE_OPEN_COMPLETE));
}
public function setImages():void{
switch (_thoughtBubbleType){
case 3:
trace("set the toppings");
topping1.gotoAndStop(_selectedThoughtbubbleToppings[0].toString());
topping2.gotoAndStop(_selectedThoughtbubbleToppings[1].toString());
topping3.gotoAndStop(_selectedThoughtbubbleToppings[2].toString());
break;
case 4:
topping1.gotoAndStop(_selectedThoughtbubbleToppings[0].toString());
topping2.gotoAndStop(_selectedThoughtbubbleToppings[1].toString());
topping3.gotoAndStop(_selectedThoughtbubbleToppings[2].toString());
topping4.gotoAndStop(_selectedThoughtbubbleToppings[3].toString());
break;
case 5:
topping1.gotoAndStop(_selectedThoughtbubbleToppings[0].toString());
topping2.gotoAndStop(_selectedThoughtbubbleToppings[1].toString());
topping3.gotoAndStop(_selectedThoughtbubbleToppings[2].toString());
topping4.gotoAndStop(_selectedThoughtbubbleToppings[3].toString());
topping5.gotoAndStop(_selectedThoughtbubbleToppings[4].toString());
break;
default:
trace("set images not caught");
};
}
public function set thoughtBubbleType(_arg1:int):void{
_thoughtBubbleType = _arg1;
}
public function openThoughtBubble():void{
ignoreIncorrectGuess = true;
closingBubble = false;
addEventListener(Event.COMPLETE, balloonOpenComplete, false, 0, true);
gotoAndPlay("balloonAppears");
}
public function closeThoughtBubble():void{
ignoreIncorrectGuess = true;
closingBubble = true;
addEventListener(Event.COMPLETE, balloonCloseComplete, false, 0, true);
gotoAndPlay("balloonDisappears");
}
}
}//package
Section 63
//ThoughtBubbleFive (ThoughtBubbleFive)
package {
import flash.events.*;
public dynamic class ThoughtBubbleFive extends ThoughtBubble {
public function ThoughtBubbleFive(){
addFrameScript(169, frame170, 176, frame177);
}
function frame170(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame177(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 64
//ThoughtBubbleFour (ThoughtBubbleFour)
package {
import flash.events.*;
public dynamic class ThoughtBubbleFour extends ThoughtBubble {
public function ThoughtBubbleFour(){
addFrameScript(147, frame148, 154, frame155);
}
function frame155(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame148(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 65
//ThoughtBubbleThree (ThoughtBubbleThree)
package {
import flash.events.*;
public dynamic class ThoughtBubbleThree extends ThoughtBubble {
public function ThoughtBubbleThree(){
addFrameScript(136, frame137, 143, frame144);
}
function frame144(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
function frame137(){
dispatchEvent(new Event(Event.COMPLETE));
stop();
}
}
}//package
Section 66
//ThoughtBubbleToppings (ThoughtBubbleToppings)
package {
import flash.display.*;
public dynamic class ThoughtBubbleToppings extends MovieClip {
public function ThoughtBubbleToppings(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame25(){
stop();
}
function frame13(){
stop();
}
function frame17(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame22(){
stop();
}
function frame16(){
stop();
}
function frame8(){
stop();
}
function frame21(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame23(){
stop();
}
function frame24(){
stop();
}
function frame20(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 67
//tomato (tomato)
package {
import flash.display.*;
public dynamic class tomato extends MovieClip {
public function tomato(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 68
//ToppingTray (ToppingTray)
package {
import flash.display.*;
public dynamic class ToppingTray extends MovieClip {
public var topping:MovieClip;
public function ToppingTray(){
addFrameScript(1, frame2, 9, frame10, 11, frame12, 19, frame20, 21, frame22, 29, frame30);
}
function frame10(){
stop();
}
function frame12(){
stop();
}
function frame20(){
stop();
}
function frame22(){
stop();
}
function frame2(){
stop();
}
function frame30(){
stop();
}
}
}//package
Section 69
//Tray (Tray)
package {
import flash.events.*;
import caurina.transitions.*;
import flash.display.*;
import flash.utils.*;
public class Tray extends MovieClip {
private var _trays:Array;
private var _allToppings:Array;
public var toppingsHolder:MovieClip;
private var _selectedToppings:Array;
private var _trayHolder:Sprite;
private var _randomNumberArray:Array;
private var _incorrectCount:int;// = 0
private var _tray2:ToppingTray;
private var _tray3:ToppingTray;
private var _tray6:ToppingTray;
private var _tray7:ToppingTray;
private var _tray1:ToppingTray;
private var _tray8:ToppingTray;
private var _tray4:ToppingTray;
private var _tray5:ToppingTray;
private var _boxPizzaTimer:Timer;
private var _correctToppingCount:int;// = 0
public static const CORRECT_GUESS:String = "correctGuess";
public static const SHOW_THOUGHT_BUBBLE:String = "showThoughtBubble";
public static const GAME_COMPLETE:String = "gameComplete";
public static const INCORRECT_GUESS:String = "incorrectGuess";
public function Tray():void{
_tray1 = new ToppingTray();
_tray2 = new ToppingTray();
_tray3 = new ToppingTray();
_tray4 = new ToppingTray();
_tray5 = new ToppingTray();
_tray6 = new ToppingTray();
_tray7 = new ToppingTray();
_tray8 = new ToppingTray();
_correctToppingCount = 0;
_incorrectCount = 0;
super();
addFrameScript(9, frame10, 19, frame20);
_allToppings = new Array("broccoli", "carrot", "cheese", "cookie", "crayon", "dinosaur", "egg", "fries", "gingerbread", "hamburger", "hat", "icecream", "mushroom", "peanut", "pepperoni", "pineapple", "popcorn", "pretzel", "sardines", "shoes", "soccerball", "sock", "star", "tomato", "corn");
getUniqueRandomNumber();
_trayHolder = new Sprite();
_trayHolder.x = 10.6;
_trayHolder.y = 9.2;
addChild(_trayHolder);
_trays = new Array(_tray1, _tray2, _tray3, _tray4, _tray5, _tray6, _tray7, _tray8);
}
public function destroy():void{
var _local1:int;
_local1 = 0;
while (_local1 < _trays.length) {
_trays[_local1].gotoAndStop("off");
_trays[_local1].removeEventListener(MouseEvent.CLICK, toppingTrayClicked);
_trays[_local1].removeEventListener(MouseEvent.ROLL_OVER, toppingTrayOver);
_trays[_local1].removeEventListener(MouseEvent.ROLL_OUT, toppingTrayOut);
_correctToppingCount = 0;
_incorrectCount = 0;
_trayHolder.removeChild(_trays[_local1]);
while (toppingsHolder.numChildren) {
toppingsHolder.removeChildAt(0);
};
_local1++;
};
}
public function get uniqueRandomNumberArray():Array{
return (_randomNumberArray.concat());
}
public function set selectedToppingChoices(_arg1:Array):void{
_selectedToppings = _arg1;
}
private function getUniqueRandomNumber():void{
var _local1:int;
_randomNumberArray = new Array();
while (_randomNumberArray.length < 8) {
_local1 = Math.ceil((Math.random() * 25));
if (_randomNumberArray.indexOf(_local1) == -1){
_randomNumberArray.push(_local1);
};
};
}
private function toppingTrayClicked(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:MovieClip;
var _local6:MultipleToppingAnimation;
_local2 = 0;
_local3 = 0;
while (_local3 < _selectedToppings.length) {
if (_arg1.target.topping.currentFrame == _selectedToppings[_local3]){
_correctToppingCount++;
dispatchEvent(new Event(CORRECT_GUESS));
_arg1.target.removeEventListener(MouseEvent.ROLL_OVER, toppingTrayOver);
_arg1.target.removeEventListener(MouseEvent.ROLL_OUT, toppingTrayOut);
_arg1.target.removeEventListener(MouseEvent.CLICK, toppingTrayClicked);
_arg1.target.gotoAndStop("onPizza");
if ((((((((((((_arg1.target.topping.currentFrame == 6)) || ((_arg1.target.topping.currentFrame == 8)))) || ((_arg1.target.topping.currentFrame == 10)))) || ((_arg1.target.topping.currentFrame == 11)))) || ((_arg1.target.topping.currentFrame == 20)))) || ((_arg1.target.topping.currentFrame == 21)))){
_local4 = _allToppings[(_arg1.target.topping.currentFrame - 1)];
_local5 = (new (getDefinitionByName(_local4)) as MovieClip);
toppingsHolder.addChild(_local5);
} else {
_local6 = new MultipleToppingAnimation();
_local6.stop();
_local6.gotoAndPlay(("topping" + _correctToppingCount));
toppingsHolder.addChild(_local6);
_local6.topping1.gotoAndStop(_arg1.target.topping.currentFrame);
_local6.topping2.gotoAndStop(_arg1.target.topping.currentFrame);
_local6.topping3.gotoAndStop(_arg1.target.topping.currentFrame);
};
if (_correctToppingCount == _selectedToppings.length){
_boxPizzaTimer = new Timer(2000, 1);
_boxPizzaTimer.addEventListener(TimerEvent.TIMER_COMPLETE, fireGameComplete, false, 0, true);
_boxPizzaTimer.start();
disableAllButtons();
};
break;
} else {
_local2++;
if (_local2 == _selectedToppings.length){
dispatchEvent(new Event(INCORRECT_GUESS));
dispatchEvent(new Event(SHOW_THOUGHT_BUBBLE));
};
};
_local3++;
};
}
function frame20(){
stop();
}
public function showToppingSelections():void{
var _local1:int;
var _local2:int;
_local1 = 88;
_local2 = 0;
while (_local2 < _trays.length) {
_trays[_local2].topping.mouseEnabled = false;
_trays[_local2].topping.mouseChildren = false;
_trays[_local2].topping.gotoAndStop(_randomNumberArray[_local2].toString());
_trays[_local2].alpha = 0;
_trays[_local2].gotoAndStop(1);
_trayHolder.addChild(_trays[_local2]);
Tweener.addTween(_trays[_local2], {alpha:1, time:0.5, delay:(_local2 * 0.125)});
_trays[_local2].addEventListener(MouseEvent.CLICK, toppingTrayClicked, false, 0, true);
_trays[_local2].addEventListener(MouseEvent.ROLL_OVER, toppingTrayOver, false, 0, true);
_trays[_local2].addEventListener(MouseEvent.ROLL_OUT, toppingTrayOut, false, 0, true);
_trays[_local2].x = (_local2 * _local1);
_local2++;
};
}
private function fireGameComplete(_arg1:TimerEvent):void{
_boxPizzaTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, fireGameComplete);
_boxPizzaTimer.stop();
_boxPizzaTimer = null;
dispatchEvent(new Event(GAME_COMPLETE));
}
private function disableAllButtons():void{
var _local1:int;
_local1 = 0;
while (_local1 < _trays.length) {
_trays[_local1].removeEventListener(MouseEvent.CLICK, toppingTrayClicked);
_trays[_local1].removeEventListener(MouseEvent.ROLL_OVER, toppingTrayOver);
_trays[_local1].removeEventListener(MouseEvent.ROLL_OUT, toppingTrayOut);
_local1++;
};
}
private function toppingTrayOver(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("over");
}
function frame10(){
stop();
}
private function toppingTrayOut(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("off");
}
}
}//package