Section 1
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function 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 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));
}
}
}//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):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:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):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:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
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):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):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):Number{
return (((_arg1)==0) ? _arg2 : ((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5, _arg6));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5, _arg6));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):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):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):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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));
};
--_arg1;
return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
}
}//package caurina.transitions
Section 3
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var modifierParameters:Array;
public var valueComplete:Number;
public var modifierFunction:Function;
public var hasModifier:Boolean;
public var valueStart:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Array){
valueStart = _arg1;
valueComplete = _arg2;
hasModifier = Boolean(_arg3);
modifierFunction = _arg3;
modifierParameters = _arg4;
}
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 + ("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, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 4
//SpecialPropertiesDefault (caurina.transitions.SpecialPropertiesDefault)
package caurina.transitions {
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
public class SpecialPropertiesDefault {
public function SpecialPropertiesDefault(){
trace("SpecialProperties is a static class and should not be instantiated.");
}
public static function _sound_volume_get(_arg1:Object):Number{
return (_arg1.soundTransform.volume);
}
public static function _color_splitter(_arg1):Array{
var _local2:Array;
_local2 = new Array();
if (_arg1 == null){
_local2.push({name:"_color_ra", value:1});
_local2.push({name:"_color_rb", value:0});
_local2.push({name:"_color_ga", value:1});
_local2.push({name:"_color_gb", value:0});
_local2.push({name:"_color_ba", value:1});
_local2.push({name:"_color_bb", value:0});
} else {
_local2.push({name:"_color_ra", value:0});
_local2.push({name:"_color_rb", value:AuxFunctions.numberToR(_arg1)});
_local2.push({name:"_color_ga", value:0});
_local2.push({name:"_color_gb", value:AuxFunctions.numberToG(_arg1)});
_local2.push({name:"_color_ba", value:0});
_local2.push({name:"_color_bb", value:AuxFunctions.numberToB(_arg1)});
};
return (_local2);
}
public static function frame_get(_arg1:Object):Number{
return (_arg1.currentFrame);
}
public static function _sound_pan_get(_arg1:Object):Number{
return (_arg1.soundTransform.pan);
}
public static function _color_property_get(_arg1:Object, _arg2:Array):Number{
return (_arg1.transform.colorTransform[_arg2[0]]);
}
public static function _sound_volume_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
}
public static function _autoAlpha_get(_arg1:Object):Number{
return (_arg1.alpha);
}
public static function _filter_splitter(_arg1:BitmapFilter):Array{
var _local2:Array;
_local2 = new Array();
if ((_arg1 is BlurFilter)){
_local2.push({name:"_blur_blurX", value:BlurFilter(_arg1).blurX});
_local2.push({name:"_blur_blurY", value:BlurFilter(_arg1).blurY});
_local2.push({name:"_blur_quality", value:BlurFilter(_arg1).quality});
} else {
trace("??");
};
return (_local2);
}
public static function init():void{
Tweener.registerSpecialProperty("_frame", frame_get, frame_set);
Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["redMultiplier"]);
Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]);
Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["greenMultiplier"]);
Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]);
Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["blueMultiplier"]);
Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]);
Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["alphaMultiplier"]);
Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]);
Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [BlurFilter, "blurX"]);
Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [BlurFilter, "blurY"]);
Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [BlurFilter, "quality"]);
Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
}
public static function _sound_pan_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.pan = _arg2;
_arg1.soundTransform = _local3;
}
public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:ColorTransform;
_local4 = _arg1.transform.colorTransform;
_local4[_arg3[0]] = _arg2;
_arg1.transform.colorTransform = _local4;
}
public static function _filter_property_get(_arg1:Object, _arg2:Array):Number{
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local3 = _arg1.filters;
_local5 = _arg2[0];
_local6 = _arg2[1];
_local4 = 0;
while (_local4 < _local3.length) {
if ((((_local3[_local4] is BlurFilter)) && ((_local5 == BlurFilter)))){
return (_local3[_local4][_local6]);
};
_local4++;
};
switch (_local5){
case BlurFilter:
_local7 = {blurX:0, blurY:0, quality:NaN};
break;
};
return (_local7[_local6]);
}
public static function _bezier_get(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local5:uint;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg4.length == 1){
return ((_arg1 + (_arg3 * (((2 * (1 - _arg3)) * (_arg4[0] - _arg1)) + (_arg3 * (_arg2 - _arg1))))));
};
_local5 = Math.floor((_arg3 * _arg4.length));
_local6 = ((_arg3 - (_local5 * (1 / _arg4.length))) * _arg4.length);
if (_local5 == 0){
_local7 = _arg1;
_local8 = ((_arg4[0] + _arg4[1]) / 2);
} else {
if (_local5 == (_arg4.length - 1)){
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = _arg2;
} else {
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = ((_arg4[_local5] + _arg4[(_local5 + 1)]) / 2);
};
};
return ((_local7 + (_local6 * (((2 * (1 - _local6)) * (_arg4[_local5] - _local7)) + (_local6 * (_local8 - _local7))))));
}
public static function frame_set(_arg1:Object, _arg2:Number):void{
_arg1.gotoAndStop(Math.round(_arg2));
}
public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:Array;
var _local5:uint;
var _local6:Object;
var _local7:String;
var _local8:BitmapFilter;
_local4 = _arg1.filters;
_local6 = _arg3[0];
_local7 = _arg3[1];
_local5 = 0;
while (_local5 < _local4.length) {
if ((((_local4[_local5] is BlurFilter)) && ((_local6 == BlurFilter)))){
_local4[_local5][_local7] = _arg2;
_arg1.filters = _local4;
return;
};
_local5++;
};
if (_local4 == null){
_local4 = new Array();
};
switch (_local6){
case BlurFilter:
_local8 = new BlurFilter(0, 0);
break;
};
_local8[_local7] = _arg2;
_local4.push(_local8);
_arg1.filters = _local4;
}
public static function _autoAlpha_set(_arg1:Object, _arg2:Number):void{
_arg1.alpha = _arg2;
_arg1.visible = (_arg2 > 0);
}
public static function _colorTransform_splitter(_arg1):Array{
var _local2:Array;
_local2 = new Array();
if (_arg1 == null){
_local2.push({name:"_color_ra", value:1});
_local2.push({name:"_color_rb", value:0});
_local2.push({name:"_color_ga", value:1});
_local2.push({name:"_color_gb", value:0});
_local2.push({name:"_color_ba", value:1});
_local2.push({name:"_color_bb", value:0});
} else {
if (_arg1.ra != undefined){
_local2.push({name:"_color_ra", value:_arg1.ra});
};
if (_arg1.rb != undefined){
_local2.push({name:"_color_rb", value:_arg1.rb});
};
if (_arg1.ga != undefined){
_local2.push({name:"_color_ba", value:_arg1.ba});
};
if (_arg1.gb != undefined){
_local2.push({name:"_color_bb", value:_arg1.bb});
};
if (_arg1.ba != undefined){
_local2.push({name:"_color_ga", value:_arg1.ga});
};
if (_arg1.bb != undefined){
_local2.push({name:"_color_gb", value:_arg1.gb});
};
if (_arg1.aa != undefined){
_local2.push({name:"_color_aa", value:_arg1.aa});
};
if (_arg1.ab != undefined){
_local2.push({name:"_color_ab", value:_arg1.ab});
};
};
return (_local2);
}
public static function _bezier_modifier(_arg1):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local6:Object;
_local2 = [];
if ((_arg1 is Array)){
_local3 = _arg1;
} else {
_local3 = [_arg1];
};
_local6 = {};
_local4 = 0;
while (_local4 < _local3.length) {
for (_local5 in _local3[_local4]) {
if (_local6[_local5] == undefined){
_local6[_local5] = [];
};
_local6[_local5].push(_local3[_local4][_local5]);
};
_local4++;
};
for (_local5 in _local6) {
_local2.push({name:_local5, parameters:_local6[_local5]});
};
return (_local2);
}
}
}//package caurina.transitions
Section 5
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var getValue:Function;
public var setValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
}
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 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 6
//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 7
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter)
package caurina.transitions {
public class SpecialPropertySplitter {
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function){
splitValues = _arg1;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 8
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _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):void{
var _local5:SpecialProperty;
if (!_inited){
init();
};
_local5 = new SpecialProperty(_arg2, _arg3, _arg4);
_specialPropertyList[_arg1] = _local5;
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Function;
var _local11:TweenListObj;
var _local12:Number;
var _local13:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local7 = arguments[(arguments.length - 1)];
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
if (typeof(_local7.transition) == "string"){
_local13 = _local7.transition.toLowerCase();
_local10 = _transitionList[_local13];
} else {
_local10 = _local7.transition;
};
if (!Boolean(_local10)){
_local10 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local11 = new TweenListObj(_local4[_local5], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), (_local7.useFrames == true), _local10);
_local11.properties = null;
_local11.onStart = _local7.onStart;
_local11.onUpdate = _local7.onUpdate;
_local11.onComplete = _local7.onComplete;
_local11.onOverwrite = _local7.onOverwrite;
_local11.onStartParams = _local7.onStartParams;
_local11.onUpdateParams = _local7.onUpdateParams;
_local11.onCompleteParams = _local7.onCompleteParams;
_local11.onOverwriteParams = _local7.onOverwriteParams;
_local11.isCaller = true;
_local11.count = _local7.count;
_local11.waitFrames = _local7.waitFrames;
_tweenList.push(_local11);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local12 = (_tweenList.length - 1);
updateTweenByIndex(_local12);
removeTweenByIndex(_local12);
};
_local5++;
};
return (true);
}
public static function init(_arg1=null):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
SpecialPropertiesDefault.init();
}
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 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 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 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 resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local2.timeStart = (_local2.timeStart + (_currentTime - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_currentTime - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function debug_getList():String{
var _local1:String;
var _local2:uint;
var _local3:uint;
_local1 = "";
_local2 = 0;
while (_local2 < _tweenList.length) {
_local1 = (_local1 + (("[" + _local2) + "] ::\n"));
_local3 = 0;
while (_local3 < _tweenList[_local2].properties.length) {
_local1 = (_local1 + ((((" " + _tweenList[_local2].properties[_local3].name) + " -> ") + _tweenList[_local2].properties[_local3].valueComplete) + "\n"));
_local3++;
};
_local2++;
};
return (_local1);
}
public static function getVersion():String{
return ("AS3 1.25.53");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
_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 tScope:Object;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
if (_currentTime >= 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 (!(_currentTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (_currentTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
try {
tTweening.onStart.apply(tScope, tTweening.onStartParams);
} catch(e:Error) {
};
};
for (pName in tTweening.properties) {
pv = getPropertyValue(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 = (_currentTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (_currentTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
setPropertyValue(tScope, pName, nv);
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
try {
tTweening.onUpdate.apply(tScope, tTweening.onUpdateParams);
} catch(e:Error) {
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
try {
tTweening.onComplete.apply(tScope, tTweening.onCompleteParams);
} catch(e:Error) {
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
_local2 = 0;
while (_local2 < _tweenList.length) {
_tweenList[_local2].timeStart = (_currentTime - (((_currentTime - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_currentTime - (((_currentTime - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_currentTime - (((_currentTime - _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 startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
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 _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:String;
var _local9:Object;
var _local10:Number;
var _local11:Number;
var _local12:Array;
var _local13:Object;
var _local14:Object;
var _local15:Function;
var _local16:Object;
var _local17:TweenListObj;
var _local18:Number;
var _local19:Array;
var _local20:Array;
var _local21:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local9 = arguments[(arguments.length - 1)];
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local10 = (isNaN(_local9.time)) ? 0 : _local9.time;
_local11 = (isNaN(_local9.delay)) ? 0 : _local9.delay;
_local12 = new Array();
_local13 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true};
_local14 = new Object();
for (_local7 in _local9) {
if (!_local13[_local7]){
if (_specialPropertySplitterList[_local7]){
_local19 = _specialPropertySplitterList[_local7].splitValues(_local9[_local7]);
_local5 = 0;
while (_local5 < _local19.length) {
_local12[_local19[_local5].name] = {valueStart:undefined, valueComplete:_local19[_local5].value};
_local5++;
};
} else {
if (_specialPropertyModifierList[_local7] != undefined){
_local20 = _specialPropertyModifierList[_local7].modifyValues(_local9[_local7]);
_local5 = 0;
while (_local5 < _local20.length) {
_local14[_local20[_local5].name] = {modifierParameters:_local20[_local5].parameters, modifierFunction:_specialPropertyModifierList[_local7].getValue};
_local5++;
};
} else {
_local12[_local7] = {valueStart:undefined, valueComplete:_local9[_local7]};
};
};
};
};
for (_local7 in _local14) {
if (_local12[_local7] != undefined){
_local12[_local7].modifierParameters = _local14[_local7].modifierParameters;
_local12[_local7].modifierFunction = _local14[_local7].modifierFunction;
};
};
if (typeof(_local9.transition) == "string"){
_local21 = _local9.transition.toLowerCase();
_local15 = _transitionList[_local21];
} else {
_local15 = _local9.transition;
};
if (!Boolean(_local15)){
_local15 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local16 = new Object();
for (_local7 in _local12) {
_local16[_local7] = new PropertyInfoObj(_local12[_local7].valueStart, _local12[_local7].valueComplete, _local12[_local7].modifierFunction, _local12[_local7].modifierParameters);
};
_local17 = new TweenListObj(_local4[_local5], (_currentTime + ((_local11 * 1000) / _timeScale)), (_currentTime + (((_local11 * 1000) + (_local10 * 1000)) / _timeScale)), (_local9.useFrames == true), _local15);
_local17.properties = _local16;
_local17.onStart = _local9.onStart;
_local17.onUpdate = _local9.onUpdate;
_local17.onComplete = _local9.onComplete;
_local17.onOverwrite = _local9.onOverwrite;
_local17.onStartParams = _local9.onStartParams;
_local17.onUpdateParams = _local9.onUpdateParams;
_local17.onCompleteParams = _local9.onCompleteParams;
_local17.onOverwriteParams = _local9.onOverwriteParams;
_local17.rounded = _local9.rounded;
_local17.skipUpdates = _local9.skipUpdates;
removeTweensByTime(_local17.scope, _local17.properties, _local17.timeStart, _local17.timeComplete);
_tweenList.push(_local17);
if ((((_local10 == 0)) && ((_local11 == 0)))){
_local18 = (_tweenList.length - 1);
updateTweenByIndex(_local18);
removeTweenByIndex(_local18);
};
_local5++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
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;
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
private static function setPropertyValue(_arg1:Object, _arg2:String, _arg3:Number):void{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
_specialPropertyList[_arg2].setValue(_arg1, _arg3, _specialPropertyList[_arg2].parameters);
} else {
_specialPropertyList[_arg2].setValue(_arg1, _arg3);
};
} else {
_arg1[_arg2] = _arg3;
};
}
private static function getPropertyValue(_arg1:Object, _arg2:String):Number{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
return (_specialPropertyList[_arg2].getValue(_arg1, _specialPropertyList[_arg2].parameters));
};
return (_specialPropertyList[_arg2].getValue(_arg1));
//unresolved jump
};
return (_arg1[_arg2]);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_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;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = _currentTime;
_local2.isPaused = true;
return (true);
}
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 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)){
try {
_tweenList[i].onOverwrite.apply(_tweenList[i].scope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
};
};
_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):void{
var _local3:SpecialPropertySplitter;
if (!_inited){
init();
};
_local3 = new SpecialPropertySplitter(_arg2);
_specialPropertySplitterList[_arg1] = _local3;
}
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 9
//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 auxProperties:Object;
public var timeComplete:Number;
public var onStartParams:Array;
public var rounded:Boolean;
public var updatesSkipped:Number;
public var onUpdateParams:Array;
public var onComplete:Function;
public var properties:Object;
public var onStart:Function;
public var skipUpdates:Number;
public var scope:Object;
public var isCaller:Boolean;
public var timePaused:Number;
public var transition:Function;
public var onCompleteParams:Array;
public var timesCalled:Number;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
auxProperties = new Object();
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);
_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.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
};
_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:uint;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = 0;
while (_local2 < properties.length) {
if (_local2 > 0){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local2].name));
_local1 = (_local1 + (",valueStart:" + properties[_local2].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local2].valueComplete));
_local1 = (_local1 + "]");
_local2++;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
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 (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 (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);
}
}
}//package caurina.transitions
Section 10
//Array2 (com.kaboose.base.Array2)
package com.kaboose.base {
import flash.utils.*;
public class Array2 {
public static function getRandomArr(_arg1:Number, _arg2:Number):Array{
var _local3:Array;
var _local4:Number;
_local3 = new Array();
while (_local3.length < _arg1) {
_local4 = Math2.randRange(0, _arg2);
if (!objectIsInList(_local4, _local3)){
_local3.push(_local4);
};
};
return (_local3);
}
public static function isEqual(_arg1:Array, _arg2:Array):Boolean{
var _local3:uint;
if (_arg1.length != _arg2.length){
return (false);
};
_local3 = 0;
while (_local3 < _arg1.length) {
if (getQualifiedClassName(_arg1[_local3]) != getQualifiedClassName(_arg2[_local3])){
return (false);
};
if (_arg1[_local3] != _arg2[_local3]){
return (false);
};
_local3++;
};
return (true);
}
public static function shuffle(_arg1:Array):Array{
var cf:Function;
var resultArray:Array;
var inputArray = _arg1;
cf = function ():Number{
var _local1:int;
_local1 = (Math.random() - 0.5);
if (_local1 < 0){
return (-1);
};
return (1);
};
resultArray = _slot1.clone(inputArray);
resultArray.sort(cf);
return (resultArray);
}
public static function objectIsInList(_arg1:Object, _arg2:Array):Boolean{
return (!((_arg2.indexOf(_arg1) == -1)));
}
public static function clone(_arg1:Array):Array{
return (_arg1.slice());
}
}
}//package com.kaboose.base
Section 11
//Math2 (com.kaboose.base.Math2)
package com.kaboose.base {
public class Math2 {
public static function tanD(_arg1:Number):Number{
return (Math.tan(degreesToRadians(_arg1)));
}
public static function angleOfLine(_arg1:Object, _arg2:Object):Number{
return (atan2D((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
public static function sinD(_arg1:Number):Number{
return (Math.sin(degreesToRadians(_arg1)));
}
public static function asinD(_arg1:Number):Number{
return ((Math.asin(_arg1) * (180 / Math.PI)));
}
public static function degreesToRadians(_arg1:Number):Number{
return ((_arg1 * (Math.PI / 180)));
}
public static function atan2D(_arg1:Number, _arg2:Number):Number{
return ((Math.atan2(_arg2, _arg1) * (180 / Math.PI)));
}
public static function randomPolarity():Number{
var _local1:Array;
_local1 = [1, -1];
return (_local1[Math.round(Math.random())]);
}
public static function fixangle(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
return (((_arg1)<0) ? (_arg1 + 360) : _arg1);
}
public static function randRange(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Number{
if (!_arg3){
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
};
return ((_arg1 + (Math.random() * (_arg2 - _arg1))));
}
public static function radiansToDegrees(_arg1:Number):Number{
return ((_arg1 * (180 / Math.PI)));
}
public static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg2 > _arg1){
return (_arg2);
};
if (_arg3 < _arg1){
return (_arg3);
};
return (_arg1);
}
public static function setPrecision(_arg1:Number, _arg2:Number=2):Number{
_arg2 = Math.pow(10, _arg2);
return ((Math.round((_arg1 * _arg2)) / _arg2));
}
public static function cosD(_arg1:Number):Number{
return (Math.cos(degreesToRadians(_arg1)));
}
public static function acosD(_arg1:Number):Number{
return ((Math.acos(_arg1) * (180 / Math.PI)));
}
}
}//package com.kaboose.base
Section 12
//Number2 (com.kaboose.base.Number2)
package com.kaboose.base {
public class Number2 {
public static function formatNumber(_arg1:Number):String{
var _local2:String;
var _local3:Number;
var _local4:Array;
var _local5:String;
var _local6:String;
_local2 = _arg1.toString();
_local3 = 1;
if (_local2.indexOf(".") == -1){
_local6 = "";
_local4 = _local2.split("");
} else {
_local6 = _local2.substr(_local2.indexOf("."), _local2.length);
_local4 = _local2.substr(0, _local2.indexOf(".")).split("");
};
_local4.reverse();
for (_local5 in _local4) {
_local6 = (_local4[_local5] + _local6);
var _temp1 = _local3;
_local3 = (_local3 + 1);
if (_temp1 == 3){
_local3 = 0;
_local6 = (((((isNaN(_local4[0])) && ((int(_local5) > 1)))) || (((!(isNaN(_local4[0]))) && ((int(_local5) >= 1)))))) ? ("," + _local6) : _local6;
};
};
return (_local6);
}
public static function isEven(_arg1:Number):Boolean{
if ((_arg1 % 2) == 0){
return (true);
};
return (false);
}
}
}//package com.kaboose.base
Section 13
//Macaroni (com.kaboose.games.MomMania.Consumables.Macaroni)
package com.kaboose.games.MomMania.Consumables {
import flash.display.*;
import flash.events.*;
import com.kaboose.games.MomMania.*;
public class Macaroni extends Consumable {
public function Macaroni(_arg1:Number, _arg2:Number, _arg3:MovieClip){
super("macaroni", _arg1, _arg2, _arg3, "macaroniCan");
bEnabled = false;
activateTime = 3;
addEventListener(Event.ENTER_FRAME, tick);
}
private function tick():void{
}
}
}//package com.kaboose.games.MomMania.Consumables
Section 14
//MainMenu (com.kaboose.games.MomMania.UI.MainMenu)
package com.kaboose.games.MomMania.UI {
import flash.display.*;
import flash.events.*;
import com.kaboose.games.MomMania.*;
public class MainMenu extends Sprite {
private var btnInstructions:Object;
private var screen:MovieClip;
private var intro:MovieClip;
private var target:Sprite;
private var btnMute:SimpleButton;
private var momChoice:Number;
private var btnPlay:Object;
public function MainMenu(_arg1:Sprite, _arg2:Object){
screen = new (_arg2);
screen.addEventListener("onClose", onClose);
screen.addEventListener("onMainIdle", onMainIdle);
screen.addEventListener("onInstructionsIdle", onInstructionsIdle);
screen.addEventListener("onChooseMomIdle", onChooseMomIdle);
screen.addEventListener("hackButtonSounds", hackButtonSounds);
target = _arg1;
target.addChild(screen);
}
public function destroy():void{
screen.removeEventListener("onClose", onClose);
screen.removeEventListener("onMainIdle", onMainIdle);
screen.removeEventListener("onInstructionsIdle", onInstructionsIdle);
screen.removeEventListener("onChooseMomIdle", onChooseMomIdle);
target.removeChild(screen);
}
private function onInstructions(_arg1:MouseEvent):void{
hackButtonCleanup(screen);
screen.gotoAndPlay("instructions");
}
private function onMainIdle(_arg1:Event):void{
dispatchEvent(new Event("onMainIdle"));
initButtons();
}
private function onInstructionsClose(_arg1:Event):void{
screen.btnMenu.removeEventListener(MouseEvent.CLICK, onInstructionsClose);
screen.gotoAndStop("mainIdle");
}
private function onMomChosen(_arg1:MouseEvent):void{
var _local2:String;
screen.mom1.removeEventListener(MouseEvent.CLICK, onMomChosen);
screen.mom2.removeEventListener(MouseEvent.CLICK, onMomChosen);
screen.mom3.removeEventListener(MouseEvent.CLICK, onMomChosen);
_local2 = _arg1.target.name;
momChoice = Number(_local2.charAt(3));
destroy();
hackButtonCleanup(screen);
playGameIntro();
}
private function onIntroIdle(_arg1:Event):void{
var _local2:Object;
intro.removeEventListener("onIntroIdle", onIntroIdle);
_local2 = intro.btnPlay;
_local2.addEventListener(MouseEvent.CLICK, onKillIntro);
}
public function initButtons():void{
btnPlay = screen.btnPlay;
btnInstructions = screen.btnInstructions;
btnPlay.addEventListener(MouseEvent.CLICK, onPlay);
btnInstructions.addEventListener(MouseEvent.CLICK, onInstructions);
btnMute = screen.btnMute;
btnMute.addEventListener(MouseEvent.CLICK, onMuteClick);
}
private function hackButtonCleanup(_arg1:Object):void{
var _local2:String;
for (_local2 in _arg1) {
if ((_arg1[_local2] is SimpleButton)){
ButtonHack.cleanup(_arg1[_local2]);
};
};
}
private function onKillIntro(_arg1:MouseEvent):void{
var _local2:Sprite;
intro.btnPlay.removeEventListener(MouseEvent.CLICK, onKillIntro);
hackButtonCleanup(intro);
_local2 = StageSetup.getLayer("menus");
_local2.removeChild(intro);
dispatchEvent(new IdEvent(momChoice));
}
private function onClose(_arg1:Event):void{
disableButtons();
destroy();
dispatchEvent(new Event("onStartGame"));
}
private function disableButtons():void{
btnPlay.removeEventListener(MouseEvent.CLICK, onClose);
btnInstructions.removeEventListener(MouseEvent.CLICK, onInstructions);
btnMute.removeEventListener(MouseEvent.CLICK, onMuteClick);
btnPlay.enabled = false;
btnInstructions.enabled = false;
}
private function onPlay(_arg1:MouseEvent):void{
hackButtonCleanup(screen);
screen.gotoAndPlay("chooseMom");
}
private function onInstructionsIdle(_arg1:Event):void{
screen.btnMenu.addEventListener(MouseEvent.CLICK, onInstructionsClose);
}
private function onChooseMomIdle(_arg1:Event):void{
screen.mom1.addEventListener(MouseEvent.CLICK, onMomChosen);
screen.mom2.addEventListener(MouseEvent.CLICK, onMomChosen);
screen.mom3.addEventListener(MouseEvent.CLICK, onMomChosen);
}
private function playGameIntro():void{
var _local1:Sprite;
intro = new UILevelIntro();
intro.addEventListener("onIntroIdle", onIntroIdle);
intro.addEventListener("hackButtonSounds", hackButtonSounds);
_local1 = StageSetup.getLayer("menus");
_local1.addChild(intro);
intro.gotoAndPlay("monday");
}
private function onMuteClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("onMute"));
}
private function hackButtonSounds(_arg1:Event):void{
var _local2:String;
for (_local2 in _arg1.target) {
if ((_arg1.target[_local2] is SimpleButton)){
ButtonHack.setup(_arg1.target[_local2]);
};
};
}
}
}//package com.kaboose.games.MomMania.UI
Section 15
//ButtonHack (com.kaboose.games.MomMania.ButtonHack)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
public class ButtonHack {
private static function onDown(_arg1:MouseEvent):void{
new micDing().play();
}
private static function onOver(_arg1:MouseEvent):void{
new happyChild().play();
}
public static function cleanup(_arg1:SimpleButton):void{
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, onOver);
_arg1.removeEventListener(MouseEvent.MOUSE_DOWN, onDown);
}
public static function setup(_arg1:SimpleButton):void{
_arg1.addEventListener(MouseEvent.MOUSE_OVER, onOver);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
}
}
}//package com.kaboose.games.MomMania
Section 16
//Consumable (com.kaboose.games.MomMania.Consumable)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Consumable extends EventDispatcher {
public var pos:Point;
public var showType:String;
public var avatar:MovieClip;
public var ID:Number;
public var activateTime:Number;// = -1
private var target:MovieClip;
public var type:String;
public var bEnabled:Boolean;// = true
public function Consumable(_arg1:String, _arg2:Number, _arg3:Number, _arg4:MovieClip, _arg5:String=null){
bEnabled = true;
activateTime = -1;
super();
pos = new Point(_arg2, _arg3);
target = _arg4;
type = _arg1;
if (_arg5 == null){
showType = _arg1;
} else {
showType = _arg5;
};
pos = new Point(_arg2, _arg3);
renderGraphic(_arg2, _arg3);
this.avatar.addEventListener(MouseEvent.CLICK, onMouseClick);
MouseInteract.addHand(avatar);
}
public function set setEnabled(_arg1:Boolean):void{
bEnabled = _arg1;
if (type == "macaroniCan"){
type = "macaroni";
};
}
public function destroy():void{
if (this.avatar != null){
MouseInteract.removeHand(this.avatar);
this.avatar.removeEventListener(MouseEvent.CLICK, onMouseClick);
target.removeChild(this.avatar);
this.avatar = null;
} else {
trace("consumable has no avatar");
};
trace(("Consumable.destroy(), ID = " + ID));
delete ??getglobalscope
[this];
}
public function set setID(_arg1:Number):void{
trace(("new consumable, ID = " + _arg1));
this.ID = _arg1;
}
public function destroyGraphic():void{
if (this.avatar != null){
target.removeChild(avatar);
this.avatar = null;
};
}
private function onMouseClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("onConsumableClicked"));
}
public function get getID():Number{
return (ID);
}
public function renderGraphic(_arg1:Number, _arg2:Number):void{
this.avatar = new ConsumablesConsumableIconContainer();
if (showType == null){
this.avatar.gotoAndStop(type);
} else {
this.avatar.gotoAndStop(showType);
};
trace(("\n\n\ntarget = " + target.name));
target.addChild(this.avatar);
}
}
}//package com.kaboose.games.MomMania
Section 17
//ConsumableActivator (com.kaboose.games.MomMania.ConsumableActivator)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class ConsumableActivator extends EventDispatcher {
public var type:String;
private var activateTimer:Timer;
public var avatar:MovieClip;
public var curConsumableID:Number;// = -1
public function ConsumableActivator(_arg1:Number, _arg2:Number, _arg3:MovieClip, _arg4:String="microwave"){
curConsumableID = -1;
super();
type = _arg4;
avatar = new ConsumableActivatorsConsumableActivatorsContainer();
avatar.gotoAndStop(type);
avatar.x = _arg1;
avatar.y = _arg2;
_arg3.addChild(avatar);
avatar.addEventListener(MouseEvent.CLICK, onClick);
MouseInteract.addHand(avatar);
avatar.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function flashIt(_arg1:Event):void{
if (curConsumableID == -1){
avatar.clip.flash_mc.gotoAndPlay(2);
};
}
private function onActivateComplete(_arg1:Event):void{
avatar.clip.gotoAndStop("open");
avatar.addEventListener(MouseEvent.CLICK, onClick);
MouseInteract.addHand(avatar);
avatar.clip.removeEventListener("onActivatorFinish", onActivateComplete);
dispatchEvent(new Event("onActivateComplete"));
avatar.clip.mouseChildren = false;
avatar.clip.mouseEnabled = false;
}
private function onEnterFrame(_arg1:Event):void{
if (curConsumableID == -1){
setTime();
};
}
public function clearConsumable():void{
avatar.clip.consumables.gotoAndStop(1);
curConsumableID = -1;
}
public function playOpenAnim():void{
avatar.clip.gotoAndStop("open");
}
public function onUnPauseGame(_arg1:Event):void{
if (avatar.clip.timer_mc != null){
avatar.clip.timer_mc.play();
};
}
public function unflashIt(_arg1:Event):void{
avatar.clip.flash_mc.gotoAndStop(1);
}
public function addItem(_arg1:Number=-1, _arg2:Number=3, _arg3:String="macaroni"):Boolean{
if (curConsumableID == -1){
unflashIt(null);
curConsumableID = _arg1;
avatar.removeEventListener(MouseEvent.CLICK, onClick);
MouseInteract.removeHand(avatar);
activateTimer = new Timer(1000, _arg2);
activateTimer.addEventListener(TimerEvent.TIMER, onTimerTick);
activateTimer.start();
avatar.clip.gotoAndStop("activate");
avatar.clip.consumables.gotoAndStop("macaroni");
avatar.clip.addEventListener("onActivatorFinish", onActivateComplete);
return (true);
};
return (false);
}
public function playCloseAnim():void{
avatar.clip.gotoAndPlay("close");
}
public function get getConsumable():Number{
return (curConsumableID);
}
public function onTimerTick(_arg1:TimerEvent):void{
}
private function setTime():void{
var _local1:Date;
var _local2:Number;
var _local3:Number;
_local1 = new Date();
_local2 = _local1.getHours();
if (_local2 > 12){
_local2 = (_local2 - 12);
} else {
if (_local2 == 0){
_local2 = 12;
};
};
_local3 = _local1.getMinutes();
}
public function interruptActivation():void{
trace("activator interrupt");
avatar.clip.gotoAndStop("idle");
activateTimer.removeEventListener(TimerEvent.TIMER, onTimerTick);
activateTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onActivateComplete);
avatar.clip.removeEventListener("onActivatorFinish", onActivateComplete);
activateTimer.stop();
clearConsumable();
avatar.addEventListener(MouseEvent.CLICK, onClick);
MouseInteract.addHand(avatar);
}
private function onClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("onActivatorClick"));
}
public function disable():void{
avatar.removeEventListener(MouseEvent.CLICK, onClick);
MouseInteract.removeHand(avatar);
}
public function onPauseGame(_arg1:Event):void{
if (avatar.clip.timer_mc != null){
avatar.clip.timer_mc.stop();
};
}
public function destroy(_arg1:MovieClip):void{
_arg1.removeChild(avatar);
avatar.removeEventListener(MouseEvent.CLICK, onClick);
MouseInteract.removeHand(avatar);
avatar.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
delete ??getglobalscope
[this];
}
}
}//package com.kaboose.games.MomMania
Section 18
//Consumer (com.kaboose.games.MomMania.Consumer)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import com.kaboose.base.*;
public class Consumer extends EventDispatcher {
private var life:Number;
private var alertContainer:MovieClip;
private var bActive:Boolean;
private var bHasEaten:Boolean;// = false
private var anim:String;
private var currentQueue:Number;// = 0
public var ID:Number;
private var consuming:Boolean;
private var timer:Timer;
public var bTut:Boolean;
public var avatar:MovieClip;
public var spawnedConsumable:Number;
public var lifeMeter:ConsumerMeter;
private var consumableQueue:Array;
private var animContainer:MovieClip;
public var status:String;
public var slot:Object;
public function Consumer(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=3, _arg5:Boolean=false, _arg6:Number=NaN){
var _local7:Sprite;
var _local8:Number;
bHasEaten = false;
consumableQueue = ["seat", "milk", "orangejuice", "grapejuice", "icecream", "macaroni"];
currentQueue = 0;
super();
trace(("Consumer " + _arg1));
this.ID = _arg1;
this.bTut = _arg5;
createRequestList(_arg4);
this.avatar = new CharactersConsumersConsumerContainer();
this.avatar.x = _arg2;
this.avatar.y = _arg3;
anim = "happy";
alertContainer = this.avatar.alerts.icons;
lifeMeter = new ConsumerMeter(this.avatar.meter);
lifeMeter.addEventListener("onMeterDepleted", onConsumerDead);
_local7 = StageSetup.getLayer("game");
_local7.addChild(this.avatar);
if (((bTut) || ((_arg1 == 0)))){
_local8 = (_arg6 + 3);
} else {
_local8 = Math2.randRange(1, 6);
};
this.avatar.consumerContainer.gotoAndStop(("Kid" + _local8));
this.avatar.addEventListener("onContainerSet", onContainerSet);
}
public function setSlot(_arg1:Object):void{
slot = _arg1;
}
public function get getLife():Number{
return (Math.round((lifeMeter.getMeterValue * 100)));
}
public function killMe(_arg1:Boolean=false):void{
trace("killme");
lifeMeter.setMeterValue = 0;
}
public function onUnPauseGame(_arg1:Event):void{
lifeMeter.unPause();
}
public function nextRequest():void{
if (consumableQueue[currentQueue] == "macaroni"){
slot.blockIt();
};
currentQueue++;
status = "ingame";
showAlert();
avatar.addEventListener(MouseEvent.CLICK, onMouseClick);
MouseInteract.addHand(avatar);
dispatchEvent(new Event("onConsumerRequestConsumable"));
}
private function onContainerSet(_arg1:Event):void{
animContainer = this.avatar.consumerContainer.clip;
this.avatar.removeEventListener("onContainerSet", onContainerSet);
activate();
}
private function onConsumerDead(_arg1:Event):void{
if (!bTut){
animContainer.gotoAndStop("death");
animContainer.addEventListener("onAnimFinish", this.onAnimFinish);
alertContainer.visible = false;
lifeMeter.meterClip.visible = false;
this.avatar.alerts.visible = false;
avatar.removeEventListener(Event.ENTER_FRAME, setMood);
avatar.removeEventListener(MouseEvent.CLICK, onMouseClick);
MouseInteract.removeHand(avatar);
};
}
public function deliverRequest():void{
var _local1:Sound;
_local1 = new happyChild();
_local1.play();
consuming = true;
anim = consumableQueue[currentQueue];
lifeMeter.addTime();
avatar.alerts.visible = false;
lifeMeter.pause();
this.animContainer.gotoAndStop(anim);
this.animContainer.addEventListener("onAnimFinish", this.onAnimFinish);
avatar.removeEventListener(MouseEvent.CLICK, onMouseClick);
MouseInteract.removeHand(avatar);
}
public function moveAvatar(_arg1:Number, _arg2:Number, _arg3:Number=1):void{
var _local4:Sound;
this.avatar.x = _arg1;
this.avatar.y = _arg2;
this.animContainer.scaleX = _arg3;
this.avatar.alerts.scaleX = _arg3;
_local4 = new happyChild();
_local4.play();
}
public function get isConsuming():Boolean{
return (consuming);
}
private function createRequestList(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:String;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:String;
consumableQueue = new Array();
_local3 = 0;
_local4 = new Array();
_local5 = new Array("macaroni");
if (_arg1 == 1){
if (ID > 1){
_local2 = 2;
_local3 = 1;
_local4 = ["milk"];
} else {
_local2 = 1;
};
} else {
if (_arg1 == 2){
_local2 = 2;
_local5.push("milk");
} else {
if (_arg1 == 3){
_local2 = 2;
_local4 = ["milk", "orangejuice"];
} else {
if (_arg1 == 4){
_local2 = 2;
_local4 = ["milk", "orangejuice", "grapejuice"];
} else {
_local2 = 3;
_local6 = Math2.randRange(1, 3);
_local5.push(("icecream" + _local6));
_local4 = ["milk", "orangejuice", "grapejuice"];
};
};
};
};
if (_local5.length == _local2){
if (_local5.length > 1){
_local7 = Math2.randRange(1, 2);
if (_local7 == 2){
_local5 = Array2.shuffle(_local5);
};
};
consumableQueue = _local5;
} else {
_local8 = (_local2 - _local5.length);
_local10 = Math2.randRange(0, _local3);
if (_local4.length > 0){
_local11 = Math2.randRange(0, (_local4.length - 1));
_local9 = _local4[_local11];
};
if ((_local8 - _local10) > 0){
if (_local9 != null){
if (_arg1 == 5){
_local13 = _local5.pop();
};
_local5.push(_local9);
_local12 = Math2.randRange(1, 2);
if (_local12 == 2){
_local5 = Array2.shuffle(_local5);
};
if (_arg1 == 5){
_local5.push(_local13);
};
};
};
consumableQueue = _local5;
};
consumableQueue.unshift("seat");
trace(((("Consumer #" + ID) + " request Queue = ") + consumableQueue));
trace(("\tmustHaves: " + _local5));
}
public function set setSpawnedConsumable(_arg1:Number):void{
spawnedConsumable = _arg1;
}
private function setMood(_arg1:Event):void{
if (!consuming){
if (lifeMeter.getMeterValue < 0.25){
anim = "crying";
} else {
if (lifeMeter.getMeterValue < 0.5){
anim = "sad";
} else {
if (lifeMeter.getMeterValue < 0.75){
anim = "neutral";
} else {
anim = "happy";
};
};
};
if (status != "ondeck"){
anim = (anim + "Sit");
};
if (animContainer.currentLabel != anim){
animContainer.gotoAndStop(anim);
};
};
}
private function onAnimFinish(_arg1:Event):void{
setMood(null);
if ((((lifeMeter.getMeterValue <= 0)) && (!(bTut)))){
slot.setOpen = true;
avatar.visible = false;
dispatchEvent(new Event("onConsumerDead"));
} else {
lifeMeter.unPause();
consuming = false;
this.animContainer.gotoAndStop(anim);
this.nextRequest();
};
}
private function onMouseClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("onConsumerClick"));
}
public function destroyEvent(_arg1:Event):void{
killMe();
status = "inactive";
}
public function get currentRequest():String{
return (consumableQueue[currentQueue]);
}
private function showAlert():void{
alertContainer.visible = true;
avatar.alerts.visible = true;
if (currentRequest != null){
if (consumableQueue[currentQueue] == "macaroni"){
alertContainer.gotoAndStop("macaroniCan");
} else {
alertContainer.gotoAndStop(consumableQueue[currentQueue]);
};
} else {
alertContainer.gotoAndStop("smile");
};
}
public function onPauseGame(_arg1:Event):void{
trace("onpausegame");
lifeMeter.pause();
}
public function activate():void{
status = "ingame";
this.lifeMeter.activate();
animContainer = this.avatar.consumerContainer.clip;
if (consumableQueue[currentQueue] == "seat"){
status = "ondeck";
this.avatar.addEventListener(MouseEvent.CLICK, onMouseClick);
MouseInteract.addHand(avatar);
alertContainer.mouseChildren = false;
alertContainer.mouseEnabled = false;
};
avatar.addEventListener(Event.ENTER_FRAME, setMood);
animContainer.gotoAndStop(anim);
showAlert();
}
public function leaveGameArea():void{
slot.clearSlot();
status = "inactive";
destroy();
}
public function destroy():void{
var _local1:Sprite;
status = "inactive";
MouseInteract.removeHand(this.avatar);
avatar.removeEventListener(MouseEvent.CLICK, onMouseClick);
lifeMeter.removeEventListener("onMeterDepleted", onConsumerDead);
avatar.removeEventListener(Event.ENTER_FRAME, setMood);
_local1 = StageSetup.getLayer("game");
_local1.removeChild(this.avatar);
}
}
}//package com.kaboose.games.MomMania
Section 19
//ConsumerMeter (com.kaboose.games.MomMania.ConsumerMeter)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import com.kaboose.base.*;
public class ConsumerMeter extends EventDispatcher {
private var lastTime:Number;
private var curVal:Number;// = 1
private var meterBar:MovieClip;
private var lossRate:Number;// = 0.025
public var meterClip:MovieClip;
public function ConsumerMeter(_arg1:MovieClip){
curVal = 1;
lossRate = 0.025;
super();
lossRate = Math2.randRange(0.009, 0.05, true);
meterClip = _arg1;
meterBar = _arg1.meterBar;
meterBar.scaleX = 1;
lastTime = getTimer();
meterClip.heart_mc.gotoAndStop(1);
}
public function set setMeterValue(_arg1:Number):void{
curVal = _arg1;
}
public function addTime(_arg1:Number=0.25):void{
curVal = (curVal + _arg1);
curVal = ((curVal > 1)) ? 1 : curVal;
meterBar.scaleX = curVal;
}
private function tick(_arg1:Event):void{
var _local2:Number;
if (curVal <= 0){
dispatchEvent(new Event("onMeterDepleted"));
resetTime();
} else {
_local2 = getTimer();
curVal = (curVal - (lossRate * ((_local2 - lastTime) / 1000)));
lastTime = _local2;
meterBar.scaleX = curVal;
if (curVal < 0.25){
meterClip.heart_mc.gotoAndStop("broken");
} else {
meterClip.heart_mc.gotoAndStop(1);
};
};
}
public function get getMeterValue():Number{
return (curVal);
}
public function unPause():void{
lastTime = getTimer();
meterBar.addEventListener(Event.ENTER_FRAME, tick);
}
public function pause():void{
trace("meter pause");
meterBar.removeEventListener(Event.ENTER_FRAME, tick);
}
public function activate():void{
meterBar.addEventListener(Event.ENTER_FRAME, tick);
}
private function resetTime():void{
curVal = 0;
lastTime = 0;
meterBar.scaleX = 0;
meterBar.removeEventListener(Event.ENTER_FRAME, tick);
}
public function set LossRate(_arg1:Number):void{
lossRate = _arg1;
}
}
}//package com.kaboose.games.MomMania
Section 20
//ConsumerProvider (com.kaboose.games.MomMania.ConsumerProvider)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import caurina.transitions.*;
public class ConsumerProvider extends EventDispatcher {
private var xMax:Number;// = 600
private var speed:Number;// = 3
private var avatar:MovieClip;
private var conHolder:MovieClip;
private var yMin:Number;// = 180
private var destination:Point;
private var yMax:Number;// = 250
private var curItem:String;
private var bShowItem:Boolean;// = false
private var xMin:Number;// = 225
public function ConsumerProvider(_arg1:Number, _arg2:Number, _arg3:MovieClip, _arg4:Number){
speed = 3;
bShowItem = false;
xMax = 600;
xMin = 225;
yMax = 250;
yMin = 180;
super();
trace(("new provider: " + _arg4));
if (_arg4 == 1){
avatar = new CharactersConsumerProviderMomA();
} else {
if (_arg4 == 2){
avatar = new CharactersConsumerProviderMomB();
} else {
avatar = new CharactersConsumerProviderMomC();
};
};
_arg3.x = _arg1;
_arg3.y = _arg2;
conHolder = avatar.consumables;
_arg3.addChild(avatar);
avatar.parent.mouseChildren = false;
avatar.parent.mouseEnabled = false;
avatar.gotoAndStop(1);
renderItem();
}
private function checkFrame(_arg1:String):void{
if (avatar.currentLabel != _arg1){
avatar.gotoAndStop(_arg1);
conHolder = avatar.consumables;
};
}
public function renderItem(_arg1:String="none"):void{
curItem = _arg1;
if (_arg1 == "none"){
bShowItem = false;
} else {
bShowItem = true;
};
if (conHolder != null){
conHolder.gotoAndStop(_arg1);
};
}
private function onEnterFrame(_arg1:Event):void{
var _local2:Number;
var _local3:Boolean;
var _local4:Boolean;
if (avatar.parent.x < destination.x){
if (bShowItem){
checkFrame("walkProfileObject");
} else {
checkFrame("walkProfile");
};
avatar.scaleX = 1;
_local2 = 1;
} else {
if (bShowItem){
checkFrame("walkProfileObject");
} else {
checkFrame("walkProfile");
};
avatar.scaleX = -1;
_local2 = -1;
};
}
public function onDestinationReached():void{
avatar.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
if (curItem == "none"){
avatar.gotoAndStop("down");
} else {
avatar.gotoAndStop("DownObject");
};
conHolder.gotoAndStop(curItem);
}
private function onRender(_arg1:Event):void{
trace("render");
}
public function walkTo(_arg1:Number, _arg2:Number):void{
if (_arg1 < xMin){
_arg1 = xMin;
} else {
if (_arg1 > xMax){
_arg1 = xMax;
};
};
if (_arg2 < yMin){
_arg2 = yMin;
} else {
if (_arg2 > yMax){
_arg2 = yMax;
};
};
destination = new Point(_arg1, _arg2);
avatar.addEventListener(Event.ENTER_FRAME, onEnterFrame);
Tweener.addTween(avatar.parent, {y:destination.y, x:destination.x, time:0.5, transition:"easeoutexpo", onComplete:onDestinationReached});
}
}
}//package com.kaboose.games.MomMania
Section 21
//ConsumerSlot (com.kaboose.games.MomMania.ConsumerSlot)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
public class ConsumerSlot extends EventDispatcher {
private var open:Boolean;// = true
public var ID:Number;
public var dir:Number;// = 1
public var avatar:MovieClip;
private var bClickable:Boolean;
private var bBlocked:Boolean;// = false
public var x:Number;
public var y:Number;
public function ConsumerSlot(_arg1:Number, _arg2:Number, _arg3:Boolean=false){
var _local4:Sprite;
open = true;
bBlocked = false;
dir = 1;
super();
avatar = new DevAssetsConsumerSlot();
avatar.x = _arg1;
avatar.y = _arg2;
avatar.block_mc.visible = false;
bClickable = _arg3;
x = _arg1;
y = _arg2;
_local4 = StageSetup.getLayer("game");
_local4.addChild(avatar);
if (bClickable){
avatar.addEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.addHand(avatar);
};
}
public function blockIt(_arg1:Boolean=false):void{
dispatchEvent(new Event("onBlockSlot"));
bBlocked = true;
avatar.block_mc.visible = true;
avatar.addEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.addHand(avatar);
}
public function set setDirection(_arg1:Number):void{
dir = _arg1;
avatar.scaleX = dir;
}
private function slotClicked(_arg1:MouseEvent):void{
dispatchEvent(new Event("onConsumerSlotClick"));
}
public function destroy():void{
var _local1:Sprite;
_local1 = StageSetup.getLayer("game");
_local1.removeChild(avatar);
delete ??getglobalscope
[this];
}
public function get getOpen():Boolean{
return (open);
}
public function unblock():void{
bBlocked = false;
avatar.block_mc.visible = false;
avatar.removeEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.removeHand(avatar);
}
public function clearSlot():void{
open = true;
if (bClickable){
if (!bBlocked){
avatar.removeEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.removeHand(avatar);
};
};
}
public function set setOpen(_arg1:Boolean):void{
open = _arg1;
if (bClickable){
if (open){
avatar.addEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.addHand(avatar);
} else {
avatar.removeEventListener(MouseEvent.CLICK, slotClicked);
MouseInteract.removeHand(avatar);
};
};
}
public function get getBlocked():Boolean{
return (bBlocked);
}
}
}//package com.kaboose.games.MomMania
Section 22
//IdEvent (com.kaboose.games.MomMania.IdEvent)
package com.kaboose.games.MomMania {
import flash.events.*;
public class IdEvent extends Event {
public var ID:Number;
public static const ID_TYPE:String = "id";
public function IdEvent(_arg1:Number){
super(ID_TYPE);
this.ID = _arg1;
}
}
}//package com.kaboose.games.MomMania
Section 23
//MomManiaGame (com.kaboose.games.MomMania.MomManiaGame)
package com.kaboose.games.MomMania {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.media.*;
import flash.utils.*;
import com.kaboose.base.*;
import com.kaboose.games.MomMania.Consumables.*;
public class MomManiaGame extends EventDispatcher {
private var bGameInProgress:Boolean;
private var introMusicChan:SoundChannel;
private var clock:Sprite;
private var consumableActivatorMax:Number;// = 2
public var bShowTutorials:Boolean;// = true
private var introMusic:Sound;
private var nextTut:String;
private var levelTimer:Timer;
private var consumerTypes:Array;
private var bTutorialsFinished:Boolean;
public var bMuted:Boolean;// = false
private var levelStartTime:Number;
private var tutGoodJob:Boolean;
private var consumableObjects:Array;
private var slots:Array;
private var bkg_mc:MovieClip;
private var tutActivator:Boolean;
private var tutDrink:Boolean;
private var tutSink:Boolean;
private var time_mc:MovieClip;
private var tutFeedChild:Boolean;
private var consumerMaxSlots:Number;// = 4
private var tutorials_mc:MovieClip;
private var gameMusic:Sound;
private var providerAvatarID:Number;
private var totalPoints:Number;// = 0
private var consumerMaxOnDeck:Number;// = 2
private var menu:MovieClip;
private var gameMusicChan:SoundChannel;
private var consumableCount:Number;// = 0
private var bLevelVictory:Boolean;
private var renderLayers:Sprite;
private var consumerDeadPointLoss:Number;// = 250
private var curItem:Number;// = -1
private var levelPoints:Number;// = 0
private var consumerDeckX:Number;// = 50
private var consumerDeckY:Number;// = 210
private var btnMute:SimpleButton;
private var consumerDeckQueue:Array;
public var level:Number;
private var LEVEL_DATA:Object;
private var bGameDefeated:Boolean;
private var alertsContainer:Sprite;
private var consumerDeckSlots:Array;
private var tutSeat:Boolean;
private var consumerCount:Number;// = 0
private var tutDishes:Boolean;
private var tutActivatorOn:Boolean;
private var bGamePaused:Boolean;
private var consumableActivators:Array;
private var sink_mc:MovieClip;
private var levelTimeElapsed:Number;
private var totalLevels:Number;// = 5
private var tutMacaroni:Boolean;
private var hud_mc:MovieClip;
private var tutActivatorDone:Boolean;
private var gameBKG:Sprite;
private var provider:ConsumerProvider;
public function MomManiaGame(_arg1:Number, _arg2:Number=1){
var _local3:Boolean;
consumerDeadPointLoss = 250;
bMuted = false;
bShowTutorials = true;
totalLevels = 5;
consumerMaxSlots = 4;
curItem = -1;
consumerCount = 0;
consumerTypes = ["boy1", "boy2", "boy3", "girl1", "girl2", "girl3"];
consumableCount = 0;
consumableActivatorMax = 2;
consumerDeckY = 210;
consumerDeckX = 50;
consumerMaxOnDeck = 2;
LEVEL_DATA = {Level1:{slotCount:2, activatorCount:1, consumerCount:4, consumerDeathsAllowed:3, pointsRequired:1000, name:"monday", timeLimit:180}, Level2:{slotCount:2, activatorCount:1, consumerCount:5, consumerDeathsAllowed:4, pointsRequired:2000, name:"tuesday", timeLimit:180}, Level3:{slotCount:4, activatorCount:2, consumerCount:7, consumerDeathsAllowed:3, pointsRequired:3500, name:"wednesday", timeLimit:180}, Level4:{slotCount:4, activatorCount:2, consumerCount:9, consumerDeathsAllowed:3, pointsRequired:5500, name:"thursday", timeLimit:240}, Level5:{slotCount:4, activatorCount:2, consumerCount:14, consumerDeathsAllowed:3, pointsRequired:8500, name:"friday", timeLimit:300}};
totalPoints = 0;
levelPoints = 0;
super();
trace(("Game Constructor Called: Level = " + _arg2));
level = _arg2;
providerAvatarID = _arg1;
_local3 = true;
resetGame(_local3);
gameMusic = new gameLoop();
introMusic = new menuLoop();
}
private function onConsumerDead(_arg1:Event):void{
var _local2:Object;
var _local3:Timer;
var _local4:Boolean;
var _local5:Number;
var _local6:String;
var _local7:Consumable;
var _local8:String;
_local2 = _arg1.target;
levelPoints = (levelPoints - consumerDeadPointLoss);
totalPoints = (totalPoints - consumerDeadPointLoss);
if (levelPoints < 0){
levelPoints = 0;
};
if (totalPoints < 0){
totalPoints = 0;
};
if (levelPoints > 999){
hud_mc.score.text = Number2.formatNumber(levelPoints);
} else {
hud_mc.score.text = levelPoints;
};
bLevelVictory = levelGoalReached();
if (_local2.status == "ondeck"){
consumerDeckQueue[_local2.ID] = null;
_local3 = new Timer(5000, 1);
_local3.addEventListener(TimerEvent.TIMER_COMPLETE, determineOnDeck);
_local3.start();
} else {
trace("clean up and find the consumable");
if (!_local2.isConsuming){
_local4 = false;
for (_local6 in consumableObjects) {
if (consumableObjects[_local6] != null){
if (consumableObjects[_local6].type == _local2.currentRequest){
for (_local8 in consumableActivators) {
if (consumableActivators[_local8].curConsumableID != -1){
_local7 = findConsumable(consumableActivators[_local8].curConsumableID);
if (_local7.type == _local2.currentRequest){
_local4 = true;
_local5 = consumableActivators[_local8].curConsumableID;
consumableActivators[_local8].interruptActivation();
break;
};
};
};
if (((((!((curItem == -1))) && (!(_local4)))) && (!((curItem == -2))))){
_local7 = findConsumable(curItem);
if (_local7.type == _local2.currentRequest){
_local4 = true;
provider.renderItem();
_local5 = curItem;
curItem = -1;
};
};
if (!_local4){
_local5 = consumableObjects[_local6].getID;
};
_local7 = findConsumable(_local5);
_local7.removeEventListener("onConsumableClicked", onConsumableClicked);
consumableObjects[_local5] = null;
_local7.destroy();
break;
};
};
};
};
consumerDeckQueue[_local2.ID] = null;
};
_arg1.target.destroy();
if (consumersActive() == 0){
if (dishesClear()){
if (levelGoalReached()){
bLevelVictory = true;
};
endLevel();
};
};
}
private function createProvider():void{
if (provider == null){
provider = new ConsumerProvider(400, 210, bkg_mc.providerContainer, providerAvatarID);
} else {
trace("PROVIDER NOT EQUAL TO NULL");
};
}
public function init(_arg1:TimerEvent=null):void{
var _local2:Number;
playMusic("game");
if (_arg1 != null){
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, init);
};
hud_mc.day.text = LEVEL_DATA[("Level" + level)].name;
if (LEVEL_DATA[("Level" + level)].pointsRequired > 999){
hud_mc.goal.text = Number2.formatNumber(LEVEL_DATA[("Level" + level)].pointsRequired);
} else {
hud_mc.goal.text = LEVEL_DATA[("Level" + level)].pointsRequired;
};
if (levelPoints > 999){
hud_mc.score.text = Number2.formatNumber(levelPoints);
} else {
hud_mc.score.text = levelPoints;
};
trace(("MomManiaGame.init, level = " + level));
levelStartTime = getTimer();
_local2 = LEVEL_DATA[("Level" + level)].timeLimit;
levelTimer = new Timer(1000, _local2);
levelTimer.addEventListener(TimerEvent.TIMER, drawTime);
levelTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimeUp);
if (!bShowTutorials){
levelTimer.start();
};
bGameInProgress = true;
consumerMaxSlots = LEVEL_DATA[("Level" + level)].slotCount;
createConsumerSlots();
consumableActivatorMax = LEVEL_DATA[("Level" + level)].activatorCount;
if (consumableActivatorMax > 1){
bkg_mc.mitts_mc.visible = false;
} else {
bkg_mc.mitts_mc.visible = true;
};
createConsumableActivators();
createProvider();
provider.renderItem();
sink_mc.gotoAndStop(1);
determineOnDeck();
if (!bShowTutorials){
tutorialHide();
};
if (!tutSeat){
tutSeat = true;
nextTut = "seat";
tutorialShow(null, "seat");
};
}
private function onBlockSlot(_arg1:Event):void{
trace("onblockslot");
_arg1.target.removeEventListener("onBlockSlot", onBlockSlot);
if (!tutDishes){
tutDishes = true;
nextTut = "dish";
tutorialShow(null, "dish");
};
}
private function pauseGame():void{
bGamePaused = true;
levelTimer.stop();
dispatchEvent(new Event("onPauseGame"));
}
private function destroyGame():void{
bGameDefeated = false;
provider = null;
renderLayers.removeChild(gameBKG);
renderLayers.removeChild(alertsContainer);
sink_mc.removeEventListener(MouseEvent.CLICK, onSinkClick);
dispatchEvent(new Event("onDestroyGame"));
}
private function onTimeUp(_arg1:TimerEvent):void{
trace("\n\n\nGAME OVER: time up!\n\n\n");
levelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimeUp);
bLevelVictory = false;
endLevel();
}
private function onTimeUpAlertFinished(_arg1:Event):void{
var _local2:Sprite;
trace("onTimeUpAlertFinished");
if (bGamePaused){
tutorialHide(null);
};
menu.removeEventListener("onTimeUpAlertFinished", onTimeUpAlertFinished);
_local2 = StageSetup.getLayer("menus");
_local2.removeChild(menu);
menu = new UIGameOver();
_local2.addChild(menu);
menu.addEventListener("onIdle", onGameOverMenuIdle);
menu.addEventListener("hackButtonSounds", hackButtonSounds);
menu.gotoAndPlay("defeat");
if (this.gameMusicChan != null){
this.gameMusicChan.stop();
};
dispatchEvent(new Event("onDefeat"));
}
public function showLevelIntro():void{
menu = new UILevelIntro();
menu.addEventListener("onIntroIdle", onIntroIdle);
}
private function drawTime(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:int;
_local2 = 0;
_local3 = 0;
_local4 = 21;
_local5 = _arg1.target.currentCount;
_local6 = LEVEL_DATA[("Level" + level)].timeLimit;
_local7 = ((_local5 / _local6) * 360);
if (clock == null){
trace("creating clock sprite");
this.clock = new Sprite();
time_mc.addChild(clock);
};
clock.graphics.clear();
clock.graphics.lineStyle(1, 0, 100);
if ((_local6 - _local5) > 5){
clock.graphics.beginFill(15477041, 100);
} else {
clock.graphics.beginFill(0xFF0000, 100);
};
clock.graphics.lineTo(_local2, (_local3 - _local4));
_local8 = 0;
while (_local8 <= _local7) {
_local9 = (_local4 * Math.cos((((_local8 - 90) * Math.PI) / 180)));
_local10 = (_local4 * Math.sin((((_local8 - 90) * Math.PI) / 180)));
clock.graphics.lineTo((_local9 + _local2), (_local10 + _local3));
_local8 = (_local8 + 2);
};
clock.graphics.endFill();
}
public function set setRenderLayer(_arg1:Sprite):void{
renderLayers = _arg1;
gameBKG = new Sprite();
alertsContainer = new Sprite();
bkg_mc = new GameBKG();
bkg_mc.tables.gotoAndStop(1);
gameBKG.addChild(bkg_mc);
bkg_mc.pantry.gotoAndStop("closed");
bkg_mc.fridge.gotoAndStop("closed");
bkg_mc.freezer.gotoAndStop("closed");
btnMute = bkg_mc.btnMute;
btnMute.addEventListener(MouseEvent.CLICK, onMuteClick);
time_mc = bkg_mc.time_mc;
hud_mc = bkg_mc.hud_mc;
tutorials_mc = bkg_mc.tutorials_mc;
trace("set sink listener");
sink_mc = bkg_mc.sink_mc;
sink_mc.addEventListener(MouseEvent.CLICK, onSinkClick);
sink_mc.useHandCursor = true;
renderLayers.addChild(gameBKG);
renderLayers.addChild(alertsContainer);
}
private function onConsumableClicked(_arg1:Event):void{
var _local2:ConsumableActivator;
dispatchEvent(new Event("unflashActivators"));
provider.walkTo(_arg1.target.pos.x, _arg1.target.pos.y);
if (curItem == -1){
if (_arg1.target.bEnabled){
curItem = _arg1.target.getID;
_arg1.target.destroyGraphic();
provider.renderItem(_arg1.target.showType);
} else {
_local2 = findOpenActivator();
if (!tutActivator){
tutActivator = true;
nextTut = "activator";
tutorialShow(null, "activator");
};
if (_local2 != null){
dispatchEvent(new Event("flashActivators"));
_local2.playOpenAnim();
curItem = _arg1.target.getID;
_arg1.target.destroyGraphic();
provider.renderItem(_arg1.target.showType);
};
};
};
}
private function createConsumer(_arg1:Number, _arg2:Number, _arg3:Object=null, _arg4:Boolean=false):void{
var _local5:Consumer;
if (bGameInProgress){
_local5 = new Consumer(consumerCount, _arg1, _arg2, level, _arg4, providerAvatarID);
_local5.setSlot(_arg3);
consumerDeckQueue.push(_local5);
_local5.addEventListener("onConsumerClick", onConsumerClick);
_local5.addEventListener("onConsumerRequestConsumable", onConsumerRequestConsumable);
_local5.addEventListener("onConsumerDead", onConsumerDead);
addEventListener("onPauseGame", _local5.onPauseGame);
addEventListener("onUnPauseGame", _local5.onUnPauseGame);
addEventListener("destroyConsumers", _local5.destroyEvent);
consumerCount++;
};
}
private function onActivatorClick(_arg1:Event):void{
var _local2:Object;
var _local3:Consumable;
_local2 = _arg1.target;
dispatchEvent(new Event("unflashActivators"));
provider.walkTo((_local2.avatar.x + 10), _local2.avatar.y);
if (((!((curItem == -1))) && (!((curItem == -2))))){
if (findConsumable(curItem) != null){
if (findConsumable(curItem).bEnabled == false){
if (_local2.addItem(curItem, findConsumable(curItem).activateTime)){
if (!tutActivatorOn){
tutActivatorOn = true;
nextTut = "activatorOn";
tutorialShow(null, "activatorOn");
};
curItem = -1;
provider.renderItem();
};
};
};
} else {
if (((!((_local2.curConsumableID == -1))) && (!((curItem == -2))))){
trace("wt");
if (!tutFeedChild){
tutFeedChild = true;
nextTut = "feedChild";
tutorialShow(null, "feedChild");
};
curItem = _local2.getConsumable;
_local3 = findConsumable(curItem);
if (_local3 != null){
if (_local3.showType == "macaroniCan"){
};
};
_local3.showType = "macaroni";
provider.renderItem(_local3.showType);
_local2.clearConsumable();
_local2.playCloseAnim();
};
};
}
private function createConsumerSlots():void{
var _local1:Object;
var _local2:Object;
var _local3:ConsumerSlot;
var _local4:Number;
if (consumerMaxSlots > 2){
bkg_mc.tables.gotoAndStop(2);
} else {
bkg_mc.tables.gotoAndStop(1);
};
_local1 = {slot0:[333, 262], slot1:[502, 262]};
_local2 = {slot0:[203, 262], slot1:[372, 262], slot2:[463, 262], slot3:[632, 262]};
_local4 = 0;
while (_local4 < consumerMaxSlots) {
if (level <= 2){
_local3 = new ConsumerSlot(_local1[("slot" + _local4)][0], _local1[("slot" + _local4)][1]);
} else {
_local3 = new ConsumerSlot(_local2[("slot" + _local4)][0], _local2[("slot" + _local4)][1]);
};
if ((_local4 % 2) == 1){
_local3.setDirection = -1;
} else {
_local3.setDirection = 1;
};
_local3.addEventListener("onConsumerSlotClick", onConsumerSlotClick);
_local3.addEventListener("onBlockSlot", onBlockSlot);
slots.push(_local3);
_local4++;
};
}
private function onIntroIdle(_arg1:Event):void{
var _local2:Object;
menu.removeEventListener("onIntroIdle", onIntroIdle);
_local2 = menu.btnPlay;
_local2.addEventListener(MouseEvent.CLICK, nextLevel);
}
private function onEndLevelMenuIdle(_arg1:Event):void{
var _local2:TextField;
var _local3:Object;
trace("endlevelidlehandler");
menu.removeEventListener("onMenuIdle", onEndLevelMenuIdle);
_local2 = menu.timeElapsed;
_local2.text = String((levelTimeElapsed / 1000));
_local3 = menu.btnPlay;
_local3.addEventListener(MouseEvent.CLICK, nextLevel);
}
private function nextLevel(_arg1:MouseEvent=null):void{
var _local2:String;
var _local3:String;
var _local4:Sprite;
hackButtonCleanup(menu);
trace("TODO: Close Fridge and Pantry");
bkg_mc.pantry.gotoAndStop("closed");
bkg_mc.fridge.gotoAndStop("closed");
bkg_mc.freezer.gotoAndStop("closed");
level++;
if (level > 5){
trace("you beat the game!");
} else {
for (_local2 in slots) {
slots[_local2].destroy();
};
for (_local3 in consumableActivators) {
consumableActivators[_local3].destroy(bkg_mc.activatorContainer);
};
resetGame();
init();
_local4 = StageSetup.getLayer("menus");
_local4.removeChild(menu);
};
}
private function onActivateComplete(_arg1:Event):void{
if (bGameInProgress){
if (!tutActivatorDone){
tutActivatorDone = true;
nextTut = "activatorDone";
tutorialShow(null, "activatorDone");
};
findConsumable(_arg1.target.curConsumableID).setEnabled = true;
};
}
public function getConsumable(_arg1:IdEvent=null, _arg2:Number=-1):void{
var _local3:String;
for (_local3 in consumableObjects) {
if (consumableObjects[_local3] != null){
if (consumableObjects[_local3].getID == _arg1.ID){
_arg1.currentTarget.returnedConsumable = consumableObjects[_local3];
};
};
};
}
private function endLevel():void{
var _local1:String;
var _local2:Sprite;
if (bGameInProgress){
trace("End Level:");
trace("\tStop The Clock");
trace("\tRemove all Consumers");
trace("\tRemove all Consumables");
trace("\tKill Provider tween");
trace(("\tbLevelVictory: " + bLevelVictory));
trace(("time_mc: " + time_mc));
trace(("clock: " + clock));
if (clock != null){
clock.graphics.clear();
};
levelTimer.stop();
levelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimeUp);
levelTimer.removeEventListener(TimerEvent.TIMER, drawTime);
bGameInProgress = false;
levelTimeElapsed = (getTimer() - levelStartTime);
for (_local1 in consumableActivators) {
consumableActivators[_local1].disable();
};
destroyAllConsumers();
destroyAllConsumables();
_local2 = StageSetup.getLayer("menus");
if (bLevelVictory){
trace("you beat the level");
if (level == totalLevels){
bGameDefeated = true;
trace("you defeated the game!!");
};
trace(("\n\n MENUMENU: " + menu));
if (menu != null){
trace(("menu.parent: " + menu.parent));
};
menu = new UINotifications();
menu.addEventListener("onEndLevelAlertFinished", onEndLevelAlertFinished);
_local2.addChild(menu);
menu.gotoAndPlay("levelComplete");
} else {
menu = new UINotifications();
menu.addEventListener("onTimeUpAlertFinished", onTimeUpAlertFinished);
_local2.addChild(menu);
menu.gotoAndPlay("timeUp");
};
} else {
trace("\n\n\n END LEVEL CALLED AGAIN :(");
};
}
private function onEndLevelAlertFinished(_arg1:Event):void{
var _local2:Sprite;
trace(("\n\n on EndLevelAlertFinished, menu = " + menu));
if (bGamePaused){
tutorialHide(null);
};
menu.removeEventListener("onEndLevelAlertFinished", onEndLevelAlertFinished);
_local2 = StageSetup.getLayer("menus");
_local2.removeChild(menu);
if (bGameDefeated){
menu = new UIGameOver();
menu.addEventListener("onIdle", onGameOverMenuIdle);
menu.addEventListener("hackButtonSounds", hackButtonSounds);
_local2.addChild(menu);
menu.gotoAndPlay("victory");
if (this.gameMusicChan != null){
this.gameMusicChan.stop();
};
dispatchEvent(new Event("onVictory"));
} else {
menu = new UILevelIntro();
menu.addEventListener("onIntroIdle", onIntroIdle);
menu.addEventListener("hackButtonSounds", hackButtonSounds);
_local2.addChild(menu);
menu.gotoAndPlay(LEVEL_DATA[("Level" + (level + 1))].name);
playMusic("intro");
};
}
private function unPauseGame():void{
levelTimer.start();
bGamePaused = false;
dispatchEvent(new Event("onUnPauseGame"));
}
private function hackButtonCleanup(_arg1:Object):void{
var _local2:String;
for (_local2 in _arg1) {
if ((_arg1[_local2] is SimpleButton)){
ButtonHack.cleanup(_arg1[_local2]);
};
};
}
private function dishesClear():Boolean{
var _local1:String;
for (_local1 in slots) {
if (slots[_local1].getBlocked){
trace("\n\nPlayer Must Clear Dishes Before Level Can End\n\n");
return (false);
};
};
return (true);
}
private function determineOnDeck(_arg1:TimerEvent=null):void{
var _local2:Number;
var _local3:ConsumerSlot;
if (bGameInProgress){
_local2 = 0;
while (_local2 < consumerMaxOnDeck) {
_local3 = findOpenDeck();
if (_local3 != null){
if (bShowTutorials){
if (!bTutorialsFinished){
if (consumerCount == 0){
_local3.setOpen = false;
if (consumerCount < LEVEL_DATA[("Level" + level)].consumerCount){
createConsumer(_local3.x, _local3.y, _local3, true);
};
};
};
} else {
_local3.setOpen = false;
if (consumerCount < LEVEL_DATA[("Level" + level)].consumerCount){
createConsumer(_local3.x, _local3.y, _local3);
};
};
};
_local2++;
};
if (consumersActive() == 0){
if (dishesClear()){
endLevel();
};
};
} else {
trace("bGameInProgress is false, will not determine deck");
};
}
private function playMusic(_arg1:String="game"):void{
var _local2:SoundTransform;
var _local3:SoundTransform;
trace(("playMusic: " + _arg1));
if (_arg1 == "game"){
if (this.gameMusicChan == null){
this.gameMusicChan = this.gameMusic.play(0, 9999999999);
_local2 = gameMusicChan.soundTransform;
_local2.volume = (bMuted) ? 0 : 1;
gameMusicChan.soundTransform = _local2;
} else {
_local2 = gameMusicChan.soundTransform;
_local2.volume = (bMuted) ? 0 : 1;
gameMusicChan.soundTransform = _local2;
};
if (this.introMusicChan != null){
_local3 = introMusicChan.soundTransform;
_local3.volume = 0;
introMusicChan.soundTransform = _local3;
};
} else {
if (_arg1 == "intro"){
if (this.introMusicChan == null){
this.introMusicChan = this.introMusic.play(0, 9999999999);
_local3 = introMusicChan.soundTransform;
_local3.volume = (bMuted) ? 0 : 1;
introMusicChan.soundTransform = _local3;
} else {
_local3 = introMusicChan.soundTransform;
_local3.volume = (bMuted) ? 0 : 1;
introMusicChan.soundTransform = _local3;
};
if (this.gameMusicChan != null){
_local2 = gameMusicChan.soundTransform;
_local2.volume = 0;
gameMusicChan.soundTransform = _local2;
};
trace(("gamemusic vol: " + this.gameMusicChan.soundTransform.volume));
};
};
}
private function createConsumable(_arg1:String):Consumable{
var _local2:Number;
var _local3:Number;
var _local4:Consumable;
if (_arg1 == "macaroni"){
bkg_mc.pantry.gotoAndStop("open");
_local2 = 616;
_local3 = 116;
} else {
if (_arg1 == "orangejuice"){
bkg_mc.fridge.gotoAndStop("open");
_local2 = 485;
_local3 = 90;
} else {
if (_arg1 == "grapejuice"){
bkg_mc.fridge.gotoAndStop("open");
_local2 = 511;
_local3 = 90;
} else {
if (_arg1 == "milk"){
bkg_mc.fridge.gotoAndStop("open");
_local2 = 537;
_local3 = 90;
} else {
if (_arg1 == "icecream1"){
bkg_mc.freezer.gotoAndStop("open");
_local2 = 485;
_local3 = 45;
} else {
if (_arg1 == "icecream2"){
bkg_mc.freezer.gotoAndStop("open");
_local2 = 511;
_local3 = 45;
} else {
if (_arg1 == "icecream3"){
bkg_mc.freezer.gotoAndStop("open");
_local2 = 537;
_local3 = 45;
};
};
};
};
};
};
};
if (_arg1 == "macaroni"){
_local4 = new Macaroni(_local2, _local3, bkg_mc[(_arg1 + "_mc")]);
} else {
_local4 = new Consumable(_arg1, _local2, _local3, bkg_mc[(_arg1 + "_mc")]);
};
consumableObjects.push(_local4);
trace(("consumableCount: " + consumableCount));
_local4.setID = consumableCount;
_local4.addEventListener("onConsumableClicked", onConsumableClicked);
consumableCount++;
return (_local4);
}
private function onBackToMenu(_arg1:MouseEvent):void{
var _local2:Sprite;
trace("back to menu");
menu.btnMenu.removeEventListener(MouseEvent.CLICK, onBackToMenu);
hackButtonCleanup(menu);
_local2 = StageSetup.getLayer("menus");
_local2.removeChild(menu);
resetGame();
destroyGame();
}
private function onConsumerClick(_arg1:Event):void{
var _local2:ConsumerSlot;
trace(("this.gameMusicChan.vol: " + this.gameMusicChan.soundTransform.volume));
trace(("this.gameMusicChan.position: " + this.gameMusicChan.position));
if (_arg1.target.status == "ondeck"){
_local2 = findOpenSlot();
if (_local2 != null){
moveConsumerToSlot(_local2, _arg1.target);
} else {
trace("Cannot seat a Consumer, there are no open consumer slots");
};
} else {
provider.walkTo(_arg1.target.avatar.x, (_arg1.target.avatar.y + 110));
checkForDeliverable(_arg1.target);
};
}
private function levelGoalReached():Boolean{
var _local1:Number;
_local1 = LEVEL_DATA[("Level" + level)].pointsRequired;
trace(("points needed: " + _local1));
trace(("points earned: " + levelPoints));
if (levelPoints >= _local1){
trace("LEVEL GOAL REACHED!!!");
return (true);
};
trace("Level Goal NOT Reached");
return (false);
}
private function checkForDeliverable(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Consumable;
if (_arg1 != null){
_local3 = findConsumable(curItem);
if (_local3 != null){
if (_local3.type == _arg1.currentRequest){
if (_local3.bEnabled){
consumableObjects[_local3.getID] = null;
_local3.destroy();
provider.renderItem();
curItem = -1;
_arg1.deliverRequest();
} else {
trace("Consumable is not deliverable, it must first be activated");
};
} else {
trace("Provider does not have the consumable in inventory/equipped");
};
};
};
}
private function getAllConsumblesOfType(_arg1:String):void{
var _local2:Array;
var _local3:String;
_local2 = new Array();
for (_local3 in consumableObjects) {
if (consumableObjects[_local3] != null){
if (consumableObjects[_local3].type == _arg1){
_local2.push(consumableObjects[_local3].getID);
};
};
};
trace(((("IDLIST for " + _arg1) + " = ") + _local2));
}
private function consumersActive():Number{
var _local1:Number;
var _local2:String;
_local1 = 0;
if (consumerDeckQueue.length >= LEVEL_DATA[("Level" + level)].consumerCount){
for (_local2 in consumerDeckQueue) {
if (consumerDeckQueue[_local2] != null){
if (consumerDeckQueue[_local2].status != "inactive"){
_local1++;
};
};
};
} else {
_local1 = 999;
};
return (_local1);
}
private function findOpenSlot():ConsumerSlot{
var _local1:String;
for (_local1 in slots) {
if (slots[_local1].getOpen){
if (!slots[_local1].getBlocked){
return (slots[_local1]);
};
};
};
return (null);
}
private function tutorialShow(_arg1:TimerEvent=null, _arg2:String="seat"):void{
if (bShowTutorials){
if (bGameInProgress){
if (!bGamePaused){
if (nextTut != null){
_arg2 = nextTut;
};
tutorials_mc.visible = true;
tutorials_mc.gotoAndPlay(_arg2);
};
};
};
}
private function destroyAllConsumables():void{
var _local1:String;
trace("Destroy All Consumables");
for (_local1 in consumableObjects) {
if (consumableObjects[_local1] != null){
trace(("consumableObjects[i]: " + consumableObjects[_local1]));
consumableObjects[_local1].removeEventListener("onConsumableClicked", onConsumableClicked);
consumableObjects[_local1].destroy();
consumableObjects[_local1] = null;
};
};
trace(("\tconsumableObjects: " + consumableObjects));
}
private function onSinkClick(_arg1:MouseEvent):void{
var _local2:Timer;
trace("sink clicked");
provider.walkTo(sink_mc.x, sink_mc.y);
if (curItem == -2){
trace("\tYou have a dish!");
sink_mc.gotoAndStop(1);
curItem = -1;
provider.renderItem();
if (!tutGoodJob){
nextTut = "goodJob";
tutorialShow(null, "goodJob");
tutorialFinished();
tutGoodJob = true;
_local2 = new Timer(5000, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, tutorialHide);
_local2.start();
determineOnDeck();
};
if (consumersActive() == 0){
if (dishesClear()){
endLevel();
};
};
} else {
trace("\tYou do not have a dish!");
};
}
private function findOpenActivator():ConsumableActivator{
var _local1:String;
for (_local1 in consumableActivators) {
if (consumableActivators[_local1].getConsumable == -1){
return (consumableActivators[_local1]);
};
};
return (null);
}
private function destroyAllConsumers():void{
var _local1:String;
trace("Destroy All Consumers:");
for (_local1 in consumerDeckQueue) {
if (consumerDeckQueue[_local1] != null){
consumerDeckQueue[_local1].removeEventListener("onConsumerClick", onConsumerClick);
consumerDeckQueue[_local1].removeEventListener("onConsumerRequestConsumable", onConsumerRequestConsumable);
consumerDeckQueue[_local1].removeEventListener("onConsumerDead", onConsumerDead);
removeEventListener("onPauseGame", consumerDeckQueue[_local1].onPauseGame);
removeEventListener("onUnPauseGame", consumerDeckQueue[_local1].onUnPauseGame);
consumerDeckQueue[_local1] = null;
};
};
dispatchEvent(new Event("destroyConsumers"));
trace(("\tconsumerDeckQueue: " + consumerDeckQueue));
}
private function auditRequests():void{
}
private function tutorialHide(_arg1:TimerEvent=null):void{
if (tutorials_mc != null){
tutorials_mc.visible = false;
};
}
private function onConsumerSlotClick(_arg1:Event):void{
provider.walkTo(_arg1.target.avatar.x, _arg1.target.avatar.y);
if (curItem == -1){
if (_arg1.target.getBlocked){
provider.renderItem("plate");
curItem = -2;
sink_mc.gotoAndStop(2);
_arg1.target.unblock();
};
if (!tutSink){
tutSink = true;
nextTut = "sink";
tutorialShow(null, "sink");
};
};
}
private function onMuteClick(_arg1:MouseEvent):void{
var _local2:SoundTransform;
var _local3:SoundTransform;
dispatchEvent(new Event("onMute"));
if (bMuted){
bMuted = false;
if (this.gameMusicChan != null){
_local2 = gameMusicChan.soundTransform;
_local2.volume = 1;
gameMusicChan.soundTransform = _local2;
};
} else {
bMuted = true;
if (this.gameMusicChan != null){
_local2 = gameMusicChan.soundTransform;
_local2.volume = 0;
gameMusicChan.soundTransform = _local2;
};
if (this.introMusicChan != null){
_local3 = introMusicChan.soundTransform;
_local3.volume = 0;
introMusicChan.soundTransform = _local3;
};
};
}
private function hackButtonSounds(_arg1:Event):void{
var _local2:String;
for (_local2 in _arg1.target) {
if ((_arg1.target[_local2] is SimpleButton)){
ButtonHack.setup(_arg1.target[_local2]);
};
};
}
private function resetGame(_arg1:Boolean=false):void{
var _local2:Number;
var _local3:ConsumerSlot;
trace("Reset Game");
consumableCount = 0;
consumerCount = 0;
levelPoints = 0;
bGamePaused = false;
bLevelVictory = false;
if (_arg1){
totalPoints = 0;
};
curItem = -1;
consumerDeckQueue = new Array();
consumableObjects = new Array();
consumableActivators = new Array();
slots = new Array();
consumerDeckSlots = new Array();
if (consumerDeckSlots.length <= 0){
_local2 = 0;
while (_local2 < consumerMaxOnDeck) {
_local3 = new ConsumerSlot(consumerDeckX, (consumerDeckY + (100 * _local2)), false);
_local3.ID = _local2;
_local3.setOpen = true;
consumerDeckSlots.push(_local3);
_local2++;
};
};
}
private function onGameOverMenuIdle(_arg1:Event):void{
menu.btnMenu.addEventListener(MouseEvent.CLICK, onBackToMenu);
}
private function moveConsumerToSlot(_arg1:Object, _arg2:Object):void{
var _local3:String;
var _local4:Timer;
var _local5:Number;
var _local6:Number;
if (bGameInProgress){
for (_local3 in consumerDeckSlots) {
_local5 = consumerDeckSlots[_local3].y;
if (_arg2.avatar.y == _local5){
consumerDeckSlots[_local3].setOpen = true;
_local6 = consumerDeckSlots[_local3].ID;
break;
};
};
_arg2.moveAvatar((_arg1.avatar.x - 15), (_arg1.avatar.y - 50), _arg1.dir);
_arg1.setOpen = false;
_arg2.setSlot(_arg1);
_arg2.lifeMeter.addTime();
_arg2.nextRequest();
_local4 = new Timer(5000, 1);
_local4.addEventListener(TimerEvent.TIMER_COMPLETE, determineOnDeck);
_local4.start();
};
}
private function findOpenDeck():ConsumerSlot{
var _local1:String;
for (_local1 in consumerDeckSlots) {
if (consumerDeckSlots[_local1].getOpen){
return (consumerDeckSlots[_local1]);
};
};
return (null);
}
private function onConsumerRequestConsumable(_arg1:Event):void{
var _local2:Timer;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
var _local6:Timer;
if (_arg1.target.currentRequest != null){
if ((((((_arg1.target.currentRequest == "milk")) || ((_arg1.target.currentRequest == "orangejuice")))) || ((_arg1.target.currentRequest == "grapejuice")))){
} else {
if (_arg1.target.currentRequest == "macaroni"){
if (!tutMacaroni){
tutMacaroni = true;
nextTut = "macaroni";
tutorialShow(null, "macaroni");
};
};
};
_arg1.target.setSpawnedConsumable = createConsumable(_arg1.target.currentRequest).getID;
} else {
trace("\nYay, Consumer Satiated! \n - TODO: Animate Consumer off of game screen, then destroy");
_local3 = _arg1.target.getLife;
_local4 = (_local3 * 10);
levelPoints = (levelPoints + _local4);
totalPoints = (totalPoints + _local4);
if (levelPoints > 999){
hud_mc.score.text = Number2.formatNumber(levelPoints);
} else {
hud_mc.score.text = levelPoints;
};
trace(("\tPoints Earned: " + _local4));
trace(("\tLevelPoints: " + levelPoints));
trace(("\tTotalPoints: " + totalPoints));
_arg1.target.leaveGameArea();
_local5 = levelGoalReached();
if (_local5){
bLevelVictory = true;
if (consumersActive() == 0){
if (dishesClear()){
endLevel();
};
};
trace(("consumers active: " + consumersActive()));
} else {
_local6 = new Timer(5000, 1);
_local6.addEventListener(TimerEvent.TIMER_COMPLETE, determineOnDeck);
_local6.start();
};
};
}
private function tutorialFinished():void{
bTutorialsFinished = true;
bShowTutorials = false;
levelTimer.start();
}
private function findConsumable(_arg1:Number):Consumable{
var _local2:String;
for (_local2 in consumableObjects) {
if (consumableObjects[_local2] != null){
if (consumableObjects[_local2].getID == _arg1){
return (consumableObjects[_local2]);
};
};
};
return (null);
}
private function createConsumableActivators():void{
var _local1:Number;
var _local2:ConsumableActivator;
_local1 = 0;
while (_local1 < consumableActivatorMax) {
_local2 = new ConsumableActivator((0xFF + (_local1 * 95)), 39, bkg_mc.activatorContainer);
_local2.addEventListener("onActivatorClick", onActivatorClick);
_local2.addEventListener("onActivateComplete", onActivateComplete);
_local2.addEventListener(IdEvent.ID_TYPE, getConsumable);
addEventListener("onPauseGame", _local2.onPauseGame);
addEventListener("onUnPauseGame", _local2.onUnPauseGame);
addEventListener("flashActivators", _local2.flashIt);
addEventListener("unflashActivators", _local2.unflashIt);
consumableActivators.push(_local2);
_local1++;
};
}
}
}//package com.kaboose.games.MomMania
Section 24
//MouseInteract (com.kaboose.games.MomMania.MouseInteract)
package com.kaboose.games.MomMania {
import flash.display.*;
public class MouseInteract {
public static function addHand(_arg1:MovieClip):void{
_arg1.buttonMode = true;
_arg1.useHandCursor = true;
}
public static function removeHand(_arg1:MovieClip):void{
_arg1.buttonMode = false;
_arg1.useHandCursor = false;
}
}
}//package com.kaboose.games.MomMania
Section 25
//StageSetup (com.kaboose.games.MomMania.StageSetup)
package com.kaboose.games.MomMania {
import flash.display.*;
public class StageSetup extends Sprite {
private var currentStage:Stage;
public var menus:Sprite;
public var alerts:Sprite;
public var game:Sprite;
private static var _instance:StageSetup;
public function StageSetup(){
_instance = this;
}
public function setDefaultGameStyle():void{
trace("StageSetup: using default game style");
this.currentStage.frameRate = 48;
this.currentStage.scaleMode = StageScaleMode.SHOW_ALL;
this.currentStage.align = StageAlign.TOP_LEFT;
}
public function setStage(_arg1:Stage):void{
this.currentStage = _arg1;
game = new Sprite();
menus = new Sprite();
alerts = new Sprite();
_arg1.addChild(game);
_arg1.addChild(menus);
_arg1.addChild(alerts);
}
public static function getInstance():Object{
return (_instance);
}
public static function getLayer(_arg1:String):Sprite{
return (_instance[_arg1]);
}
public static function initialize():void{
if (_instance == null){
new (StageSetup);
};
}
}
}//package com.kaboose.games.MomMania
Section 26
//FactoryClass (com.madewithscience.slint.FactoryClass)
package com.madewithscience.slint {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
public class FactoryClass extends MovieClip {
private var clip:MovieClip;
private var preloadOutput:MovieClip;
public function FactoryClass(){
var _local1:Loader;
var _local2:URLRequest;
super();
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
addEventListener(Event.ENTER_FRAME, onFrame);
_local1 = new Loader();
_local2 = new URLRequest("Preloader.swf");
_local1.contentLoaderInfo.addEventListener(Event.COMPLETE, onAssetLoaded);
_local1.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onPreloadError);
_local1.load(_local2);
}
private function onPreloadError(_arg1:IOErrorEvent):void{
trace("error when trying to load preloader.swf");
}
private function init():void{
var _local1:Class;
var _local2:Object;
_local1 = Class(getDefinitionByName("MacAndCheeseMomMania"));
if (_local1){
_local2 = new _local1(this.stage);
addChild((_local2 as DisplayObject));
};
}
private function onAssetLoaded(_arg1:Event):void{
var _local2:Object;
if (framesLoaded != totalFrames){
preloadOutput = new MovieClip();
stage.addChild(preloadOutput);
_local2 = _arg1.target.applicationDomain.getDefinition("PreloadClip");
clip = new (_local2);
preloadOutput.addChild(clip);
preloadOutput.x = 325;
preloadOutput.y = 200;
};
}
private function onFrame(_arg1:Event):void{
var _local2:Number;
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onFrame);
if (preloadOutput != null){
stage.removeChild(preloadOutput);
};
nextFrame();
init();
} else {
_local2 = (this.stage.loaderInfo.bytesLoaded / this.stage.loaderInfo.bytesTotal);
if (clip != null){
clip.bar.scaleX = _local2;
};
};
}
}
}//package com.madewithscience.slint
Section 27
//ActivatorMicrowave_161 (GameAssets_fla.ActivatorMicrowave_161)
package GameAssets_fla {
import flash.display.*;
public dynamic class ActivatorMicrowave_161 extends MovieClip {
public var flash_mc:MovieClip;
public var consumables:MovieClip;
public var timer_mc:MovieClip;
public function ActivatorMicrowave_161(){
addFrameScript(0, frame1, 74, frame75);
}
function frame75(){
gotoAndStop("idle");
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 28
//ActivatorMicrowavealert_162 (GameAssets_fla.ActivatorMicrowavealert_162)
package GameAssets_fla {
import flash.display.*;
public dynamic class ActivatorMicrowavealert_162 extends MovieClip {
public function ActivatorMicrowavealert_162(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
gotoAndPlay(2);
}
}
}//package GameAssets_fla
Section 29
//Bubbleinstr_178 (GameAssets_fla.Bubbleinstr_178)
package GameAssets_fla {
import flash.display.*;
public dynamic class Bubbleinstr_178 extends MovieClip {
public var clickArea:MovieClip;
public var flash_mc:MovieClip;
}
}//package GameAssets_fla
Section 30
//ConsumableIconContainerHack_144 (GameAssets_fla.ConsumableIconContainerHack_144)
package GameAssets_fla {
import flash.display.*;
public dynamic class ConsumableIconContainerHack_144 extends MovieClip {
public var clickArea:MovieClip;
public function ConsumableIconContainerHack_144(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 31
//ConsumerAlertBubble_143 (GameAssets_fla.ConsumerAlertBubble_143)
package GameAssets_fla {
import flash.display.*;
public dynamic class ConsumerAlertBubble_143 extends MovieClip {
public var icons:MovieClip;
}
}//package GameAssets_fla
Section 32
//ConsumerAvatarContainer_25 (GameAssets_fla.ConsumerAvatarContainer_25)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class ConsumerAvatarContainer_25 extends MovieClip {
public var clip:MovieClip;
public function ConsumerAvatarContainer_25(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame10(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
function frame1(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
function frame20(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
function frame30(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
function frame40(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
function frame50(){
this.parent.dispatchEvent(new Event("onContainerSet"));
stop();
}
}
}//package GameAssets_fla
Section 33
//cupboards_3 (GameAssets_fla.cupboards_3)
package GameAssets_fla {
import flash.display.*;
public dynamic class cupboards_3 extends MovieClip {
public function cupboards_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 34
//freezer_5 (GameAssets_fla.freezer_5)
package GameAssets_fla {
import flash.display.*;
public dynamic class freezer_5 extends MovieClip {
public function freezer_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 35
//fridge_4 (GameAssets_fla.fridge_4)
package GameAssets_fla {
import flash.display.*;
public dynamic class fridge_4 extends MovieClip {
public function fridge_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 36
//hud_assets_23 (GameAssets_fla.hud_assets_23)
package GameAssets_fla {
import flash.display.*;
import flash.text.*;
public dynamic class hud_assets_23 extends MovieClip {
public var goal:TextField;
public var score:TextField;
public var day:TextField;
}
}//package GameAssets_fla
Section 37
//KidA_26 (GameAssets_fla.KidA_26)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidA_26 extends MovieClip {
public var anim_mc:MovieClip;
public function KidA_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 38
//KidA_death_46 (GameAssets_fla.KidA_death_46)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_death_46 extends MovieClip {
public function KidA_death_46(){
addFrameScript(24, frame25);
}
function frame25(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 39
//KidA_drinkingGrapeJuice_28 (GameAssets_fla.KidA_drinkingGrapeJuice_28)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_drinkingGrapeJuice_28 extends MovieClip {
public function KidA_drinkingGrapeJuice_28(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 40
//KidA_drinkingMilk_30 (GameAssets_fla.KidA_drinkingMilk_30)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_drinkingMilk_30 extends MovieClip {
public function KidA_drinkingMilk_30(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 41
//KidA_drinkingOrangeJuice_29 (GameAssets_fla.KidA_drinkingOrangeJuice_29)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_drinkingOrangeJuice_29 extends MovieClip {
public function KidA_drinkingOrangeJuice_29(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 42
//KidA_eatingIceCream1_31 (GameAssets_fla.KidA_eatingIceCream1_31)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_eatingIceCream1_31 extends MovieClip {
public function KidA_eatingIceCream1_31(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 43
//KidA_eatingIceCream2_32 (GameAssets_fla.KidA_eatingIceCream2_32)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_eatingIceCream2_32 extends MovieClip {
public function KidA_eatingIceCream2_32(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 44
//KidA_eatingIceCream3_33 (GameAssets_fla.KidA_eatingIceCream3_33)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_eatingIceCream3_33 extends MovieClip {
public function KidA_eatingIceCream3_33(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 45
//KidA_eatingMacaroni_27 (GameAssets_fla.KidA_eatingMacaroni_27)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidA_eatingMacaroni_27 extends MovieClip {
public function KidA_eatingMacaroni_27(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 46
//KidAinstr2_176 (GameAssets_fla.KidAinstr2_176)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidAinstr2_176 extends MovieClip {
public var anim_mc:MovieClip;
public var meterBar:MovieClip;
}
}//package GameAssets_fla
Section 47
//KidAinstrpee_177 (GameAssets_fla.KidAinstrpee_177)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidAinstrpee_177 extends MovieClip {
public var anim_mc:MovieClip;
public var alerts:MovieClip;
}
}//package GameAssets_fla
Section 48
//KidB_47 (GameAssets_fla.KidB_47)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidB_47 extends MovieClip {
public var anim_mc:MovieClip;
public function KidB_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 49
//KidB_drinkingGrapeJuice_49 (GameAssets_fla.KidB_drinkingGrapeJuice_49)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_drinkingGrapeJuice_49 extends MovieClip {
public function KidB_drinkingGrapeJuice_49(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 50
//KidB_drinkingMilk_51 (GameAssets_fla.KidB_drinkingMilk_51)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_drinkingMilk_51 extends MovieClip {
public function KidB_drinkingMilk_51(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 51
//KidB_drinkingOrangeJuice_50 (GameAssets_fla.KidB_drinkingOrangeJuice_50)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_drinkingOrangeJuice_50 extends MovieClip {
public function KidB_drinkingOrangeJuice_50(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 52
//KidB_eatingIceCream1_52 (GameAssets_fla.KidB_eatingIceCream1_52)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_eatingIceCream1_52 extends MovieClip {
public function KidB_eatingIceCream1_52(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 53
//KidB_eatingIceCream2_53 (GameAssets_fla.KidB_eatingIceCream2_53)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_eatingIceCream2_53 extends MovieClip {
public function KidB_eatingIceCream2_53(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 54
//KidB_eatingIceCream3_54 (GameAssets_fla.KidB_eatingIceCream3_54)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_eatingIceCream3_54 extends MovieClip {
public function KidB_eatingIceCream3_54(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 55
//KidB_eatingMacaroni_48 (GameAssets_fla.KidB_eatingMacaroni_48)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidB_eatingMacaroni_48 extends MovieClip {
public function KidB_eatingMacaroni_48(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 56
//KidC_65 (GameAssets_fla.KidC_65)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidC_65 extends MovieClip {
public var anim_mc:MovieClip;
public function KidC_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 57
//KidC_drinkingGrapeJuice_67 (GameAssets_fla.KidC_drinkingGrapeJuice_67)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_drinkingGrapeJuice_67 extends MovieClip {
public function KidC_drinkingGrapeJuice_67(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 58
//KidC_drinkingMilk_69 (GameAssets_fla.KidC_drinkingMilk_69)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_drinkingMilk_69 extends MovieClip {
public function KidC_drinkingMilk_69(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 59
//KidC_drinkingOrangeJuice_68 (GameAssets_fla.KidC_drinkingOrangeJuice_68)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_drinkingOrangeJuice_68 extends MovieClip {
public function KidC_drinkingOrangeJuice_68(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 60
//KidC_eatingIceCream1_70 (GameAssets_fla.KidC_eatingIceCream1_70)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_eatingIceCream1_70 extends MovieClip {
public function KidC_eatingIceCream1_70(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 61
//KidC_eatingIceCream2_71 (GameAssets_fla.KidC_eatingIceCream2_71)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_eatingIceCream2_71 extends MovieClip {
public function KidC_eatingIceCream2_71(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 62
//KidC_eatingIceCream3_72 (GameAssets_fla.KidC_eatingIceCream3_72)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_eatingIceCream3_72 extends MovieClip {
public function KidC_eatingIceCream3_72(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 63
//KidC_eatingMacaroni_66 (GameAssets_fla.KidC_eatingMacaroni_66)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidC_eatingMacaroni_66 extends MovieClip {
public function KidC_eatingMacaroni_66(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 64
//KidD_83 (GameAssets_fla.KidD_83)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidD_83 extends MovieClip {
public var anim_mc:MovieClip;
public function KidD_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 65
//KidD_drinkingGrapeJuice_85 (GameAssets_fla.KidD_drinkingGrapeJuice_85)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_drinkingGrapeJuice_85 extends MovieClip {
public function KidD_drinkingGrapeJuice_85(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 66
//KidD_drinkingMilk_87 (GameAssets_fla.KidD_drinkingMilk_87)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_drinkingMilk_87 extends MovieClip {
public function KidD_drinkingMilk_87(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 67
//KidD_drinkingOrangeJuice_86 (GameAssets_fla.KidD_drinkingOrangeJuice_86)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_drinkingOrangeJuice_86 extends MovieClip {
public function KidD_drinkingOrangeJuice_86(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 68
//KidD_eatingIceCream1_88 (GameAssets_fla.KidD_eatingIceCream1_88)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_eatingIceCream1_88 extends MovieClip {
public function KidD_eatingIceCream1_88(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 69
//KidD_eatingIceCream2_89 (GameAssets_fla.KidD_eatingIceCream2_89)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_eatingIceCream2_89 extends MovieClip {
public function KidD_eatingIceCream2_89(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 70
//KidD_eatingIceCream3_90 (GameAssets_fla.KidD_eatingIceCream3_90)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_eatingIceCream3_90 extends MovieClip {
public function KidD_eatingIceCream3_90(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 71
//KidD_eatingMacaroni_84 (GameAssets_fla.KidD_eatingMacaroni_84)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidD_eatingMacaroni_84 extends MovieClip {
public function KidD_eatingMacaroni_84(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 72
//KidE_103 (GameAssets_fla.KidE_103)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidE_103 extends MovieClip {
public var anim_mc:MovieClip;
public function KidE_103(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 73
//KidE_drinkingGrapeJuice_105 (GameAssets_fla.KidE_drinkingGrapeJuice_105)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_drinkingGrapeJuice_105 extends MovieClip {
public function KidE_drinkingGrapeJuice_105(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 74
//KidE_drinkingMilk_107 (GameAssets_fla.KidE_drinkingMilk_107)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_drinkingMilk_107 extends MovieClip {
public function KidE_drinkingMilk_107(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 75
//KidE_drinkingOrangeJuice_106 (GameAssets_fla.KidE_drinkingOrangeJuice_106)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_drinkingOrangeJuice_106 extends MovieClip {
public function KidE_drinkingOrangeJuice_106(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 76
//KidE_eatingIceCream1_108 (GameAssets_fla.KidE_eatingIceCream1_108)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_eatingIceCream1_108 extends MovieClip {
public function KidE_eatingIceCream1_108(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 77
//KidE_eatingIceCream2_109 (GameAssets_fla.KidE_eatingIceCream2_109)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_eatingIceCream2_109 extends MovieClip {
public function KidE_eatingIceCream2_109(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 78
//KidE_eatingIceCream3_110 (GameAssets_fla.KidE_eatingIceCream3_110)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_eatingIceCream3_110 extends MovieClip {
public function KidE_eatingIceCream3_110(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 79
//KidE_eatingMacaroni_104 (GameAssets_fla.KidE_eatingMacaroni_104)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidE_eatingMacaroni_104 extends MovieClip {
public function KidE_eatingMacaroni_104(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 80
//KidF_123 (GameAssets_fla.KidF_123)
package GameAssets_fla {
import flash.display.*;
public dynamic class KidF_123 extends MovieClip {
public var anim_mc:MovieClip;
public function KidF_123(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 81
//KidF_drinkingGrapeJuice_125 (GameAssets_fla.KidF_drinkingGrapeJuice_125)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_drinkingGrapeJuice_125 extends MovieClip {
public function KidF_drinkingGrapeJuice_125(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 82
//KidF_drinkingMilk_127 (GameAssets_fla.KidF_drinkingMilk_127)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_drinkingMilk_127 extends MovieClip {
public function KidF_drinkingMilk_127(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 83
//KidF_drinkingOrangeJuice_126 (GameAssets_fla.KidF_drinkingOrangeJuice_126)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_drinkingOrangeJuice_126 extends MovieClip {
public function KidF_drinkingOrangeJuice_126(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 84
//KidF_eatingIceCream1_128 (GameAssets_fla.KidF_eatingIceCream1_128)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_eatingIceCream1_128 extends MovieClip {
public function KidF_eatingIceCream1_128(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 85
//KidF_eatingIceCream2_129 (GameAssets_fla.KidF_eatingIceCream2_129)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_eatingIceCream2_129 extends MovieClip {
public function KidF_eatingIceCream2_129(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 86
//KidF_eatingIceCream3_130 (GameAssets_fla.KidF_eatingIceCream3_130)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_eatingIceCream3_130 extends MovieClip {
public function KidF_eatingIceCream3_130(){
addFrameScript(38, frame39);
}
function frame39(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 87
//KidF_eatingMacaroni_124 (GameAssets_fla.KidF_eatingMacaroni_124)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KidF_eatingMacaroni_124 extends MovieClip {
public function KidF_eatingMacaroni_124(){
addFrameScript(149, frame150);
}
function frame150(){
this.parent.dispatchEvent(new Event("onAnimFinish"));
stop();
}
}
}//package GameAssets_fla
Section 88
//meter_157 (GameAssets_fla.meter_157)
package GameAssets_fla {
import flash.display.*;
public dynamic class meter_157 extends MovieClip {
public var heart_mc:MovieClip;
public var meterBar:MovieClip;
}
}//package GameAssets_fla
Section 89
//mictimerOn_165 (GameAssets_fla.mictimerOn_165)
package GameAssets_fla {
import flash.display.*;
import flash.events.*;
public dynamic class mictimerOn_165 extends MovieClip {
public function mictimerOn_165(){
addFrameScript(148, frame149);
}
function frame149(){
this.parent.dispatchEvent(new Event("onActivatorFinish"));
stop();
}
}
}//package GameAssets_fla
Section 90
//momBbackobject_207 (GameAssets_fla.momBbackobject_207)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBbackobject_207 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 91
//momBbackwalkobject_210 (GameAssets_fla.momBbackwalkobject_210)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBbackwalkobject_210 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 92
//momBfrontobject_206 (GameAssets_fla.momBfrontobject_206)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBfrontobject_206 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 93
//momBfrontwalkobject_209 (GameAssets_fla.momBfrontwalkobject_209)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBfrontwalkobject_209 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 94
//momBsideobect_208 (GameAssets_fla.momBsideobect_208)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBsideobect_208 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 95
//momBsidewalkobect_211 (GameAssets_fla.momBsidewalkobect_211)
package GameAssets_fla {
import flash.display.*;
public dynamic class momBsidewalkobect_211 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 96
//momCbackobject_219 (GameAssets_fla.momCbackobject_219)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCbackobject_219 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 97
//momCbackwalkobject_222 (GameAssets_fla.momCbackwalkobject_222)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCbackwalkobject_222 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 98
//momCfrontobject_218 (GameAssets_fla.momCfrontobject_218)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCfrontobject_218 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 99
//momCfrontwalkobject_221 (GameAssets_fla.momCfrontwalkobject_221)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCfrontwalkobject_221 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 100
//momCsideobect_220 (GameAssets_fla.momCsideobect_220)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCsideobect_220 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 101
//momCsidewalkobect_223 (GameAssets_fla.momCsidewalkobect_223)
package GameAssets_fla {
import flash.display.*;
public dynamic class momCsidewalkobect_223 extends MovieClip {
public var consumables:ConsumablesConsumableIconContainer;
}
}//package GameAssets_fla
Section 102
//sink_9 (GameAssets_fla.sink_9)
package GameAssets_fla {
import flash.display.*;
public dynamic class sink_9 extends MovieClip {
public var clickarea_mc:MovieClip;
public function sink_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 103
//TableandChairsContainer_12 (GameAssets_fla.TableandChairsContainer_12)
package GameAssets_fla {
import flash.display.*;
public dynamic class TableandChairsContainer_12 extends MovieClip {
public function TableandChairsContainer_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameAssets_fla
Section 104
//Tutorials_13 (GameAssets_fla.Tutorials_13)
package GameAssets_fla {
import flash.display.*;
public dynamic class Tutorials_13 extends MovieClip {
public function Tutorials_13(){
addFrameScript(9, frame10, 19, frame20, 29, frame30, 39, frame40, 49, frame50, 59, frame60, 69, frame70, 79, frame80, 89, frame90);
}
function frame70(){
stop();
}
function frame80(){
stop();
}
function frame90(){
stop();
}
function frame10(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame50(){
stop();
}
function frame60(){
stop();
}
}
}//package GameAssets_fla
Section 105
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var document:Object;
public var type:Class;
public var propertiesFactory:Function;
private var _properties:Object;
public var id:String;
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 106
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
}
}//package mx.core
Section 107
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function get descriptor():UIComponentDescriptor;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function set cacheHeuristic(_arg1:Boolean):void;
function get cachePolicy():String;
function registerEffects(_arg1:Array):void;
function set id(_arg1:String):void;
}
}//package mx.core
Section 108
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.display.*;
import flash.events.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 109
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 110
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateDisplayList():void;
function invalidateSize():void;
function invalidateProperties():void;
}
}//package mx.core
Section 111
//IStateClient (mx.core.IStateClient)
package mx.core {
public interface IStateClient {
function set currentState(_arg1:String):void;
function get currentState():String;
}
}//package mx.core
Section 112
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
public interface IUIComponent extends IFlexDisplayObject {
function set enabled(_arg1:Boolean):void;
function set measuredMinWidth(_arg1:Number):void;
function set isPopUp(_arg1:Boolean):void;
function get percentWidth():Number;
function set percentWidth(_arg1:Number):void;
function get baselinePosition():Number;
function initialize():void;
function getExplicitOrMeasuredWidth():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function getExplicitOrMeasuredHeight():Number;
function get document():Object;
function get explicitMaxWidth():Number;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function get maxHeight():Number;
function get minWidth():Number;
function owns(_arg1:DisplayObject):Boolean;
function get opaqueBackground():Object;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function get owner():DisplayObjectContainer;
function set document(_arg1:Object):void;
function get tweeningProperties():Array;
function get enabled():Boolean;
function get isPopUp():Boolean;
function get explicitMinHeight():Number;
function set focusPane(_arg1:Sprite):void;
function get maxWidth():Number;
function get percentHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function get explicitMaxHeight():Number;
function get focusPane():Sprite;
function parentChanged(_arg1:DisplayObjectContainer):void;
function set opaqueBackground(_arg1:Object):void;
function set measuredMinHeight(_arg1:Number):void;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scrollRect():Rectangle;
function set explicitWidth(_arg1:Number):void;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function get explicitMinWidth():Number;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 113
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 114
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
public var effects:Array;
public var stylesFactory:Function;
mx_internal var instanceIndices:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 115
//FlexEvent (mx.events.FlexEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class FlexEvent extends Event {
public static const ADD:String = "add";
public static const TRANSFORM_CHANGE:String = "transformChange";
public static const INIT_COMPLETE:String = "initComplete";
public static const REMOVE:String = "remove";
public static const BUTTON_DOWN:String = "buttonDown";
public static const EXIT_STATE:String = "exitState";
public static const CREATION_COMPLETE:String = "creationComplete";
public static const REPEAT:String = "repeat";
public static const LOADING:String = "loading";
public static const REPEAT_START:String = "repeatStart";
public static const INITIALIZE:String = "initialize";
public static const ENTER_STATE:String = "enterState";
public static const URL_CHANGED:String = "urlChanged";
public static const REPEAT_END:String = "repeatEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 116
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class MoveEvent extends Event {
public var oldY:Number;
public var oldX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 117
//ResizeEvent (mx.events.ResizeEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResizeEvent extends Event {
public var oldHeight:Number;
public var oldWidth:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 118
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StateChangeEvent extends Event {
public var oldState:String;
public var newState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "2.0.1.0";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 119
//UIMovieClip (mx.flash.UIMovieClip)
package mx.flash {
import flash.display.*;
import flash.events.*;
import mx.managers.*;
import flash.geom.*;
import mx.core.*;
import mx.events.*;
import flash.system.*;
public class UIMovieClip extends MovieClip implements IDeferredInstantiationUIComponent, IToolTipManagerClient, IStateClient {
private var oldHeight:Number;
protected var _height:Number;
private var _currentState:String;
private var _isPopUp:Boolean;// = false
private var _systemManager:ISystemManager;
private var explicitSizeChanged:Boolean;// = false
private var _explicitHeight:Number;
private var _toolTip:String;
private var _document:Object;
public var boundingBoxName:String;// = "boundingBox"
private var _measuredWidth:Number;
private var _tweeningProperties:Array;
protected var _width:Number;
private var _focusPane:Sprite;
private var transitionEndState:String;
private var _percentWidth:Number;
private var stateMap:Object;
private var _descriptor:UIComponentDescriptor;
private var oldY:Number;
private var oldX:Number;
private var validateMeasuredSizeFlag:Boolean;// = true
private var _includeInLayout:Boolean;// = true
private var _explicitMinWidth:Number;
private var _explicitMaxHeight:Number;
private var _explicitMaxWidth:Number;
private var transitionStartFrame:Number;
private var _measuredMinHeight:Number;// = 0
private var _measuredHeight:Number;
private var transitionDirection:Number;// = 0
private var _owner:DisplayObjectContainer;
private var _id:String;
private var _parent:DisplayObjectContainer;
private var transitionEndFrame:Number;
private var _percentHeight:Number;
private var _explicitMinHeight:Number;
private var _measuredMinWidth:Number;// = 0
private var oldWidth:Number;
private var _explicitWidth:Number;
public function UIMovieClip(){
validateMeasuredSizeFlag = true;
transitionDirection = 0;
explicitSizeChanged = false;
boundingBoxName = "boundingBox";
_includeInLayout = true;
_isPopUp = false;
_measuredMinHeight = 0;
_measuredMinWidth = 0;
super();
addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function validateMeasuredSize():void{
if (validateMeasuredSizeFlag){
validateMeasuredSizeFlag = false;
_measuredWidth = contentBounds.width;
_measuredHeight = contentBounds.height;
};
}
public function get minHeight():Number{
if (!isNaN(explicitMinHeight)){
return (explicitMinHeight);
};
return (measuredMinHeight);
}
public function set explicitMaxWidth(_arg1:Number):void{
_explicitMaxWidth = _arg1;
}
protected function enterFrameHandler(_arg1:Event):void{
var _local2:Rectangle;
var _local3:Number;
if (explicitSizeChanged){
explicitSizeChanged = false;
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
if (isNaN(oldX)){
oldX = x;
};
if (isNaN(oldY)){
oldY = y;
};
if (((!((x == oldX))) || (!((y == oldY))))){
dispatchMoveEvent();
};
_local2 = contentBounds;
if (isNaN(oldWidth)){
oldWidth = (_width = _local2.width);
};
if (isNaN(oldHeight)){
oldHeight = (_height = _local2.height);
};
if (((sizeChanged(_local2.width, oldWidth)) || (sizeChanged(_local2.height, oldHeight)))){
_width = _local2.width;
_height = _local2.height;
validateMeasuredSizeFlag = true;
notifySizeChanged();
dispatchResizeEvent();
} else {
if (((sizeChanged(width, oldWidth)) || (sizeChanged(height, oldHeight)))){
dispatchResizeEvent();
};
};
if (((((currentLabel) && ((currentLabel.indexOf(":") < 0)))) && (!((currentLabel == _currentState))))){
_currentState = currentLabel;
};
if (transitionDirection != 0){
_local3 = (currentFrame + transitionDirection);
if ((((((transitionDirection > 0)) && ((_local3 >= transitionEndFrame)))) || ((((transitionDirection < 0)) && ((_local3 <= transitionEndFrame)))))){
gotoAndStop(stateMap[transitionEndState].frame);
transitionDirection = 0;
} else {
gotoAndStop(_local3);
};
};
}
public function get tweeningProperties():Array{
return (_tweeningProperties);
}
public function set minHeight(_arg1:Number):void{
explicitMinHeight = _arg1;
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
override public function set height(_arg1:Number):void{
explicitHeight = _arg1;
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
public function get focusPane():Sprite{
return (_focusPane);
}
protected function notifySizeChanged():void{
if (((parent) && ((parent is IInvalidating)))){
IInvalidating(parent).invalidateSize();
IInvalidating(parent).invalidateDisplayList();
};
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
public function get baselinePosition():Number{
return (0);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (!_systemManager){
_local1 = root;
if (_local1){
_systemManager = (_local1 as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
};
_local2 = _local2.parent;
};
};
};
return (_systemManager);
}
public function get currentState():String{
return (_currentState);
}
public function set explicitMinHeight(_arg1:Number):void{
_explicitMinHeight = _arg1;
notifySizeChanged();
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function get measuredWidth():Number{
validateMeasuredSize();
return (_measuredWidth);
}
public function get owner():DisplayObjectContainer{
return (_owner);
}
protected function get contentBounds():Rectangle{
if (((((boundingBoxName) && (!((boundingBoxName == ""))))) && ((boundingBoxName in this)))){
return (this[boundingBoxName].getBounds(this));
};
return (getBounds(this));
}
public function get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? 10000 : explicitMaxWidth);
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
} else {
if ((((_arg1 is IUIComponent)) || ((_arg1 is ISystemManager)))){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
}
public function set focusPane(_arg1:Sprite):void{
_focusPane = _arg1;
}
public function set descriptor(_arg1:UIComponentDescriptor):void{
_descriptor = _arg1;
}
public function registerEffects(_arg1:Array):void{
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function set includeInLayout(_arg1:Boolean):void{
_includeInLayout = _arg1;
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
explicitSizeChanged = true;
notifySizeChanged();
}
public function set percentWidth(_arg1:Number):void{
_percentWidth = _arg1;
notifySizeChanged();
}
public function get id():String{
return (_id);
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object;
var _local3:*;
_local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
_local3 = ApplicationDomain.currentDomain.getDefinition("mx.binding.BindingManager");
if (_local3 != null){
_local3.executeBindings(_local2, id, this);
};
}
override public function get height():Number{
if (!isNaN(_height)){
return (_height);
};
return (super.height);
}
public function set minWidth(_arg1:Number):void{
explicitMinWidth = _arg1;
}
public function set currentState(_arg1:String):void{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:StateChangeEvent;
if (_arg1 == _currentState){
return;
};
if (!stateMap){
buildStateMap();
};
if (stateMap[_arg1]){
_local2 = (((_currentState + "-") + _arg1) + ":start");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(((_currentState + "-") + _arg1) + ":end")].frame;
};
if (isNaN(_local3)){
_local2 = (((_arg1 + "-") + _currentState) + ":end");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(((_arg1 + "-") + _currentState) + ":start")].frame;
};
};
if (isNaN(_local3)){
_local2 = (("*-" + _arg1) + ":start");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(("*-" + _arg1) + ":end")].frame;
};
};
if (isNaN(_local3)){
_local2 = (_arg1 + "-*:end");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(_arg1 + "-*:start")].frame;
};
};
if (isNaN(_local3)){
_local2 = (_currentState + "-*:start");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(_currentState + "-*:end")].frame;
};
};
if (isNaN(_local3)){
_local2 = (("*-" + _currentState) + ":end");
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap[(("*-" + _currentState) + ":start")].frame;
};
};
if (isNaN(_local3)){
_local2 = "*-*:start";
if (stateMap[_local2]){
_local3 = stateMap[_local2].frame;
_local4 = stateMap["*-*:end"].frame;
};
};
if (((isNaN(_local3)) && ((_arg1 in stateMap)))){
_local3 = stateMap[_arg1].frame;
};
if (isNaN(_local3)){
return;
};
_local5 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
_local5.oldState = _currentState;
_local5.newState = _arg1;
dispatchEvent(_local5);
if (isNaN(_local4)){
gotoAndStop(_local3);
transitionDirection = 0;
} else {
if ((((currentFrame < Math.min(_local3, _local4))) || ((currentFrame > Math.max(_local3, _local4))))){
gotoAndStop(_local3);
} else {
_local3 = currentFrame;
};
transitionStartFrame = _local3;
transitionEndFrame = _local4;
transitionDirection = ((_local4)>_local3) ? 1 : -1;
transitionEndState = _arg1;
};
_local5 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
_local5.oldState = _currentState;
_local5.newState = _arg1;
dispatchEvent(_local5);
_currentState = _arg1;
};
}
public function get document():Object{
return (_document);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
public function set cacheHeuristic(_arg1:Boolean):void{
}
public function set maxHeight(_arg1:Number):void{
explicitMaxHeight = _arg1;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (((sizeChanged(_width, _arg1)) || (sizeChanged(_height, _arg2)))){
dispatchResizeEvent();
};
_width = _arg1;
_height = _arg2;
super.scaleX = (_arg1 / measuredWidth);
super.scaleY = (_arg2 / measuredHeight);
}
public function get cachePolicy():String{
return ("");
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function get descriptor():UIComponentDescriptor{
return (_descriptor);
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
if (((id) && (!((id == ""))))){
_arg1[id] = this;
};
}
public function get measuredMinWidth():Number{
return (_measuredMinWidth);
}
private function sizeChanged(_arg1:Number, _arg2:Number):Boolean{
return ((Math.abs((_arg1 - _arg2)) > 1));
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
public function initialize():void{
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
if (((((boundingBoxName) && (!((boundingBoxName == ""))))) && ((boundingBoxName in this)))){
this[boundingBoxName].visible = false;
};
if (explicitSizeChanged){
explicitSizeChanged = false;
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
}
override public function set width(_arg1:Number):void{
explicitWidth = _arg1;
}
public function set percentHeight(_arg1:Number):void{
_percentHeight = _arg1;
notifySizeChanged();
}
public function set maxWidth(_arg1:Number):void{
explicitMaxWidth = _arg1;
}
private function buildStateMap():void{
var _local1:Array;
var _local2:int;
_local1 = currentLabels;
stateMap = {};
_local2 = 0;
while (_local2 < _local1.length) {
stateMap[_local1[_local2].name] = _local1[_local2];
_local2++;
};
}
public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
if (((id) && (!((id == ""))))){
_arg1[id] = null;
};
}
public function owns(_arg1:DisplayObject):Boolean{
while (((_arg1) && (!((_arg1 == this))))) {
if ((_arg1 is IUIComponent)){
_arg1 = IUIComponent(_arg1).owner;
} else {
_arg1 = _arg1.parent;
};
};
return ((_arg1 == this));
}
public function get measuredHeight():Number{
validateMeasuredSize();
return (_measuredHeight);
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
super.visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
public function get maxHeight():Number{
return ((isNaN(explicitMaxHeight)) ? 10000 : explicitMaxHeight);
}
public function set explicitMaxHeight(_arg1:Number):void{
_explicitMaxHeight = _arg1;
notifySizeChanged();
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent;
_local1 = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
override public function get width():Number{
if (!isNaN(_width)){
return (_width);
};
return (super.width);
}
public function get percentHeight():Number{
return (_percentHeight);
}
public function set explicitMinWidth(_arg1:Number):void{
_explicitMinWidth = _arg1;
notifySizeChanged();
}
public function get isPopUp():Boolean{
return (_isPopUp);
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
if (((!((_arg1 == oldX))) || (!((_arg2 == oldY))))){
dispatchMoveEvent();
};
}
public function get toolTip():String{
return (_toolTip);
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
explicitSizeChanged = true;
notifySizeChanged();
}
public function get parentDocument():Object{
var _local1:IUIComponent;
var _local2:ISystemManager;
if (document == this){
_local1 = (parent as IUIComponent);
if (_local1){
return (_local1.document);
};
_local2 = (parent as ISystemManager);
if (_local2){
return (_local2.document);
};
return (null);
//unresolved jump
};
return (document);
}
public function set toolTip(_arg1:String):void{
var _local2:*;
_local2 = ApplicationDomain.currentDomain.getDefinition("mx.managers.ToolTipManager");
if (_local2){
var _local3 = _local2;
_local3.mx_internal::registerToolTip(this, _arg1);
};
_toolTip = _arg1;
}
private function dispatchMoveEvent():void{
var _local1:MoveEvent;
_local1 = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
}
}//package mx.flash
Section 120
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.display.*;
import mx.core.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function hideFocus():void;
function set defaultButton(_arg1:IUIComponent):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function set focusPane(_arg1:Sprite):void;
function get nextTabIndex():int;
function get defaultButton():IUIComponent;
function get showFocusIndicator():Boolean;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function setFocus(_arg1:IFocusManagerComponent):void;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 121
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 122
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.display.*;
import flash.events.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 123
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get toolTipChildren():IChildList;
function get numModalWindows():int;
function isTopLevel():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get topLevelSystemManager():ISystemManager;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function set focusPane(_arg1:Sprite):void;
function get rawChildren():IChildList;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function deactivate(_arg1:IFocusManagerContainer):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function set numModalWindows(_arg1:int):void;
}
}//package mx.managers
Section 124
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function set toolTip(_arg1:String):void;
function get toolTip():String;
}
}//package mx.managers
Section 125
//CharactersConsumerProviderMomA (CharactersConsumerProviderMomA)
package {
import mx.flash.*;
public dynamic class CharactersConsumerProviderMomA extends UIMovieClip {
}
}//package
Section 126
//CharactersConsumerProviderMomB (CharactersConsumerProviderMomB)
package {
import mx.flash.*;
public dynamic class CharactersConsumerProviderMomB extends UIMovieClip {
}
}//package
Section 127
//CharactersConsumerProviderMomC (CharactersConsumerProviderMomC)
package {
import mx.flash.*;
public dynamic class CharactersConsumerProviderMomC extends UIMovieClip {
}
}//package
Section 128
//CharactersConsumersConsumerContainer (CharactersConsumersConsumerContainer)
package {
import mx.flash.*;
public dynamic class CharactersConsumersConsumerContainer extends UIMovieClip {
public function CharactersConsumersConsumerContainer(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 129
//ConsumableActivatorsConsumableActivatorsContainer (ConsumableActivatorsConsumableActivatorsContainer)
package {
import mx.flash.*;
public dynamic class ConsumableActivatorsConsumableActivatorsContainer extends UIMovieClip {
public function ConsumableActivatorsConsumableActivatorsContainer(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 130
//ConsumablesConsumableIconContainer (ConsumablesConsumableIconContainer)
package {
import mx.flash.*;
public dynamic class ConsumablesConsumableIconContainer extends UIMovieClip {
public function ConsumablesConsumableIconContainer(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 131
//DevAssetsConsumerSlot (DevAssetsConsumerSlot)
package {
import mx.flash.*;
public dynamic class DevAssetsConsumerSlot extends UIMovieClip {
}
}//package
Section 132
//endLevelHonk (endLevelHonk)
package {
import flash.media.*;
public dynamic class endLevelHonk extends Sound {
}
}//package
Section 133
//endTag (endTag)
package {
import flash.media.*;
public dynamic class endTag extends Sound {
}
}//package
Section 134
//GameBKG (GameBKG)
package {
import mx.flash.*;
public dynamic class GameBKG extends UIMovieClip {
}
}//package
Section 135
//gameLoop (gameLoop)
package {
import flash.media.*;
public dynamic class gameLoop extends Sound {
}
}//package
Section 136
//happyChild (happyChild)
package {
import flash.media.*;
public dynamic class happyChild extends Sound {
}
}//package
Section 137
//MacAndCheeseMomMania (MacAndCheeseMomMania)
package {
import flash.display.*;
import flash.events.*;
import com.kaboose.games.MomMania.*;
import flash.media.*;
import com.kaboose.games.MomMania.UI.*;
import flash.net.*;
public class MacAndCheeseMomMania extends Sprite {
private var menuMusic:Sound;
private var bMuted:Boolean;
private var playCount:Number;// = 0
private var menu:MainMenu;
private var menuMusicChan:SoundChannel;
private var myStage:Object;
private var menuRef:String;// = "MenuScreensMainMenuMainMenu"
private var endSting:Sound;
private var game:MomManiaGame;
public function MacAndCheeseMomMania(_arg1:Stage){
menuRef = "MenuScreensMainMenuMainMenu";
playCount = 0;
super();
trace("Main Classed Constructor Called");
StageSetup.initialize();
myStage = StageSetup.getInstance();
myStage.setStage(_arg1);
myStage.setDefaultGameStyle();
menuMusic = new menuLoop();
endSting = new endTag();
loadMainMenu();
}
private function onDefeat(_arg1:Event):void{
var _local2:SoundTransform;
if (this.menuMusicChan != null){
this.menuMusicChan.stop();
};
this.menuMusicChan = endSting.play(0, 1);
if (bMuted){
_local2 = menuMusicChan.soundTransform;
_local2.volume = 0;
menuMusicChan.soundTransform = _local2;
};
this.menuMusicChan.addEventListener(Event.SOUND_COMPLETE, onEndStingComplete);
trace("GameSetup.onDefeat, You LOST!");
}
private function onEndStingComplete(_arg1:Event):void{
var _local2:SoundTransform;
this.menuMusicChan.removeEventListener(Event.SOUND_COMPLETE, onEndStingComplete);
this.menuMusicChan.stop();
this.menuMusicChan = menuMusic.play(0, 9999999);
if (bMuted){
_local2 = menuMusicChan.soundTransform;
_local2.volume = 0;
menuMusicChan.soundTransform = _local2;
};
}
private function onMainIdle(_arg1:Event):void{
if (this.menuMusicChan == null){
this.menuMusicChan = menuMusic.play(0, 9999999);
trace(("setting menuMusicChan: " + this.menuMusicChan));
};
}
private function onTrackerError(_arg1:IOErrorEvent):void{
trace("error tracking");
}
private function onStartGame(_arg1:IdEvent):void{
trace("----- MainClass onStartGame -----");
playCount++;
if (game == null){
game = new MomManiaGame(_arg1.ID);
} else {
game.level = 1;
};
if (playCount > 1){
game.bShowTutorials = false;
};
game.setRenderLayer = myStage.game;
game.addEventListener("onVictory", onVictory);
game.addEventListener("onDefeat", onDefeat);
game.addEventListener("onDestroyGame", onDestroyGame);
game.addEventListener("onMute", onMute);
game.bMuted = bMuted;
game.init();
trackGameplay();
this.menuMusicChan.stop();
this.menuMusicChan = null;
}
private function onVictory(_arg1:Event):void{
trace("GameSetup.onVictory, You WIN!");
if (this.menuMusicChan != null){
this.menuMusicChan.stop();
};
this.menuMusicChan = endSting.play(0, 1);
this.menuMusicChan.addEventListener(Event.SOUND_COMPLETE, onEndStingComplete);
}
private function trackGameplay():void{
var _local1:Object;
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:URLLoader;
_local1 = LoaderInfo(this.root.loaderInfo).parameters;
if (_local1.gameID == null){
_local1.gameID = "9055";
};
if (_local1.trackerURL == null){
_local1.trackerURL = "http://games.zeeks.com/logGamePlay.php";
};
_local2 = new URLRequest(_local1.trackerURL);
_local3 = new URLVariables();
_local3.gameID = _local1.gameID;
_local3.cachekiller = int((Math.random() * 10000000));
_local2.data = _local3;
_local4 = new URLLoader();
_local4.addEventListener(HTTPStatusEvent.HTTP_STATUS, onTrackerStatus);
_local4.addEventListener(IOErrorEvent.IO_ERROR, onTrackerError);
_local4.load(_local2);
}
private function onMute(_arg1:Event):void{
var _local2:SoundTransform;
trace("mainclass onMute()");
if (bMuted){
if (this.menuMusicChan != null){
_local2 = menuMusicChan.soundTransform;
_local2.volume = 1;
menuMusicChan.soundTransform = _local2;
};
bMuted = false;
} else {
if (this.menuMusicChan != null){
_local2 = menuMusicChan.soundTransform;
_local2.volume = 0;
menuMusicChan.soundTransform = _local2;
};
bMuted = true;
};
}
private function onDestroyGame(_arg1:Event):void{
trace("GameSetup.onDestroyGame");
game.removeEventListener("onDefeat", onDefeat);
game.removeEventListener("onVictory", onVictory);
game.removeEventListener("onDestroyGame", onDestroyGame);
game = null;
loadMainMenu();
}
private function onMainMenu(_arg1:Event):void{
trace("GameSetup.onMainMenu");
}
private function onTrackerStatus(_arg1:HTTPStatusEvent):void{
trace(("gameplay tracker httpStatusHandler: " + _arg1));
}
private function loadMainMenu():void{
menu = new MainMenu(myStage.menus, UIMainMenu);
menu.addEventListener("onStartGame", onStartGame);
menu.addEventListener(IdEvent.ID_TYPE, onStartGame);
menu.addEventListener("onMainIdle", onMainIdle);
menu.addEventListener("onMute", onMute);
}
}
}//package
Section 138
//menuLoop (menuLoop)
package {
import flash.media.*;
public dynamic class menuLoop extends Sound {
}
}//package
Section 139
//micDing (micDing)
package {
import flash.media.*;
public dynamic class micDing extends Sound {
}
}//package
Section 140
//UIGameOver (UIGameOver)
package {
import flash.events.*;
import mx.flash.*;
public dynamic class UIGameOver extends UIMovieClip {
public function UIGameOver(){
addFrameScript(0, frame1, 2, frame3, 19, frame20);
}
function frame1(){
stop();
}
function frame3(){
this.dispatchEvent(new Event("onIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame20(){
this.dispatchEvent(new Event("onIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
}
}//package
Section 141
//UILevelIntro (UILevelIntro)
package {
import flash.events.*;
import mx.flash.*;
public dynamic class UILevelIntro extends UIMovieClip {
public function UILevelIntro(){
addFrameScript(0, frame1, 2, frame3, 12, frame13, 22, frame23, 32, frame33, 45, frame46);
}
function frame1(){
stop();
}
function frame3(){
this.dispatchEvent(new Event("onIntroIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame23(){
this.dispatchEvent(new Event("onIntroIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame13(){
this.dispatchEvent(new Event("onIntroIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame46(){
this.dispatchEvent(new Event("onIntroIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame33(){
this.dispatchEvent(new Event("onIntroIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
}
}//package
Section 142
//UIMainMenu (UIMainMenu)
package {
import flash.events.*;
import mx.flash.*;
public dynamic class UIMainMenu extends UIMovieClip {
public function UIMainMenu(){
addFrameScript(175, frame176, 189, frame190, 200, frame201, 215, frame216, 223, frame224);
}
function frame176(){
this.dispatchEvent(new Event("onMainIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame190(){
stop();
}
function frame201(){
this.dispatchEvent(new Event("onClose"));
stop();
}
function frame216(){
this.dispatchEvent(new Event("onInstructionsIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
function frame224(){
this.dispatchEvent(new Event("onChooseMomIdle"));
this.dispatchEvent(new Event("hackButtonSounds"));
stop();
}
}
}//package
Section 143
//UINotifications (UINotifications)
package {
import flash.events.*;
import mx.flash.*;
public dynamic class UINotifications extends UIMovieClip {
public function UINotifications(){
addFrameScript(118, frame119, 238, frame239);
}
function frame239(){
this.dispatchEvent(new Event("onTimeUpAlertFinished"));
stop();
}
function frame119(){
stop();
this.dispatchEvent(new Event("onEndLevelAlertFinished"));
}
}
}//package