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 numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
}
}//package caurina.transitions
Section 2
//Equations (caurina.transitions.Equations)
package caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package caurina.transitions
Section 3
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var originalValueComplete:Object;
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var hasModifier:Boolean;
public var valueComplete:Number;
public var extra:Object;
public var valueStart:Number;
public var modifierFunction:Function;
public var arrayIndex:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){
valueStart = _arg1;
valueComplete = _arg2;
originalValueComplete = _arg3;
arrayIndex = _arg4;
extra = _arg5;
isSpecialProperty = _arg6;
hasModifier = Boolean(_arg7);
modifierFunction = _arg7;
modifierParameters = _arg8;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("arrayIndex:" + String(arrayIndex)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("extra:" + String(extra)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("hasModifier:" + String(hasModifier)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 4
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var preProcess:Function;
public var setValue:Function;
public var getValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
preProcess = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("preProcess:" + String(preProcess)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 5
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier)
package caurina.transitions {
public class SpecialPropertyModifier {
public var getValue:Function;
public var modifyValues:Function;
public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){
modifyValues = _arg1;
getValue = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 6
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter)
package caurina.transitions {
public class SpecialPropertySplitter {
public var parameters:Array;
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){
splitValues = _arg1;
parameters = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 7
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
public static var autoOverwrite:Boolean = true;
private static var _engineExists:Boolean = false;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyModifierList:Object;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
var _local6:SpecialProperty;
if (!_inited){
init();
};
_local6 = new SpecialProperty(_arg2, _arg3, _arg4, _arg5);
_specialPropertyList[_arg1] = _local6;
}
public static function init(... _args):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Array;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Function;
var _local9:TweenListObj;
var _local10:Number;
var _local11:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local4 = _arg1.concat();
} else {
_local4 = [_arg1];
};
_local5 = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local6 = (isNaN(_local5.time)) ? 0 : _local5.time;
_local7 = (isNaN(_local5.delay)) ? 0 : _local5.delay;
if (typeof(_local5.transition) == "string"){
_local11 = _local5.transition.toLowerCase();
_local8 = _transitionList[_local11];
} else {
_local8 = _local5.transition;
};
if (!Boolean(_local8)){
_local8 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local5.useFrames == true){
_local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams);
} else {
_local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams);
};
_local9.properties = null;
_local9.onStart = _local5.onStart;
_local9.onUpdate = _local5.onUpdate;
_local9.onComplete = _local5.onComplete;
_local9.onOverwrite = _local5.onOverwrite;
_local9.onStartParams = _local5.onStartParams;
_local9.onUpdateParams = _local5.onUpdateParams;
_local9.onCompleteParams = _local5.onCompleteParams;
_local9.onOverwriteParams = _local5.onOverwriteParams;
_local9.onStartScope = _local5.onStartScope;
_local9.onUpdateScope = _local5.onUpdateScope;
_local9.onCompleteScope = _local5.onCompleteScope;
_local9.onOverwriteScope = _local5.onOverwriteScope;
_local9.onErrorScope = _local5.onErrorScope;
_local9.isCaller = true;
_local9.count = _local5.count;
_local9.waitFrames = _local5.waitFrames;
_tweenList.push(_local9);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local10 = (_tweenList.length - 1);
updateTweenByIndex(_local10);
removeTweenByIndex(_local10);
};
_local3++;
};
return (true);
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
var _local5:SpecialPropertySplitter;
var _local6:Array;
var _local7:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
if (_specialPropertySplitterList[_args[_local4]]){
_local5 = _specialPropertySplitterList[_args[_local4]];
_local6 = _local5.splitValues(_arg1, null);
_local7 = 0;
while (_local7 < _local6.length) {
_local3.push(_local6[_local7].name);
_local7++;
};
} else {
_local3.push(_args[_local4]);
};
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _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;
var _local3:Number;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local3 = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.33.74");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
updateFrame();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var cTime:Number;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
cTime = getCurrentTweeningTime(tTweening);
if (cTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(cTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (cTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope;
try {
tTweening.onStart.apply(eventScope, tTweening.onStartParams);
} catch(e2:Error) {
handleError(tTweening, e2, "onStart");
};
};
for (pName in tTweening.properties) {
if (tTweening.properties[pName].isSpecialProperty){
if (Boolean(_specialPropertyList[pName].preProcess)){
tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra);
};
pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
pv = tScope[pName];
};
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.hasStarted = true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (cTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (cTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d, tTweening.transitionParams);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
if (tProperty.isSpecialProperty){
_specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
tScope[pName] = nv;
};
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope;
try {
tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams);
} catch(e3:Error) {
handleError(tTweening, e3, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope;
try {
tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams);
} catch(e4:Error) {
handleError(tTweening, e4, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_local3 = getCurrentTweeningTime(_tweenList[_local2]);
_tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var eventScope:Object;
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(eventScope, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace()));
};
} else {
if (!Boolean(pTweening.onError)){
printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace()));
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
_currentTimeFrame = 0;
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Object;
var _local12:Object;
var _local13:Function;
var _local14:Object;
var _local15:TweenListObj;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local6 = _arg1.concat();
} else {
_local6 = [_arg1];
};
_local7 = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
_local10 = new Array();
_local11 = {overwrite:true, time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
_local12 = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
if (((_local7.overwrite == undefined)) ? autoOverwrite : _local7.overwrite){
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
};
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
return (true);
};
_local2++;
};
return (false);
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = getCurrentTweeningTime(_local2);
_local2.isPaused = true;
return (true);
}
public static function getCurrentTweeningTime(_arg1:Object):Number{
return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
_currentTimeFrame = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope;
try {
_tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){
_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")) && ((_local3.indexOf(_args[_local4]) == -1)))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 8
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var timeComplete:Number;
public var onStartParams:Array;
public var onUpdateScope:Object;
public var rounded:Boolean;
public var onUpdateParams:Array;
public var properties:Object;
public var onComplete:Function;
public var transitionParams:Object;
public var updatesSkipped:Number;
public var onStart:Function;
public var onOverwriteScope:Object;
public var skipUpdates:Number;
public var onStartScope:Object;
public var scope:Object;
public var transition:Function;
public var timePaused:Number;
public var onCompleteParams:Array;
public var timesCalled:Number;
public var isCaller:Boolean;
public var onError:Function;
public var onErrorScope:Object;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public var onCompleteScope:Object;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
transitionParams = _arg6;
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
_local2.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:Boolean;
var _local3:String;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = true;
for (_local3 in properties) {
if (!_local2){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local3].name));
_local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete));
_local1 = (_local1 + "]");
_local2 = false;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
_local1 = (_local1 + (", transitionParams:" + String(transitionParams)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (onStartScope){
_local1 = (_local1 + (", onStartScope:" + String(onStartScope)));
};
if (onUpdateScope){
_local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope)));
};
if (onCompleteScope){
_local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope)));
};
if (onOverwriteScope){
_local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope)));
};
if (onErrorScope){
_local1 = (_local1 + (", onErrorScope:" + String(onErrorScope)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (isCaller){
_local1 = (_local1 + (", isCaller:" + String(isCaller)));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (timesCalled){
_local1 = (_local1 + (", timesCalled:" + String(timesCalled)));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (hasStarted){
_local1 = (_local1 + (", hasStarted:" + String(hasStarted)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package caurina.transitions
Section 9
//MouseWheelTrap (com.spikything.utils.MouseWheelTrap)
package com.spikything.utils {
import flash.display.*;
import flash.events.*;
import flash.external.*;
public class MouseWheelTrap {
private static var _mouseWheelTrapped:Boolean;
private static function allowBrowserScroll(_arg1:Boolean):void{
createMouseWheelTrap();
if (ExternalInterface.available){
ExternalInterface.call("allowBrowserScroll", _arg1);
};
}
public static function setup(_arg1:Stage):void{
var stage = _arg1;
stage.addEventListener(MouseEvent.MOUSE_MOVE, function ():void{
allowBrowserScroll(false);
});
stage.addEventListener(Event.MOUSE_LEAVE, function ():void{
allowBrowserScroll(true);
});
}
private static function createMouseWheelTrap():void{
if (_mouseWheelTrapped){
return;
};
_mouseWheelTrapped = true;
if (ExternalInterface.available){
ExternalInterface.call("eval", "var browserScrolling;function allowBrowserScroll(value){browserScrolling=value;}function handle(delta){if(!browserScrolling){return false;}return true;}function wheel(event){var delta=0;if(!event){event=window.event;}if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta;}}else if(event.detail){delta=-event.detail/3;}if(delta){handle(delta);}if(!browserScrolling){if(event.preventDefault){event.preventDefault();}event.returnValue=false;}}if(window.addEventListener){window.addEventListener('DOMMouseScroll',wheel,false);}window.onmousewheel=document.onmousewheel=wheel;allowBrowserScroll(true);");
};
}
}
}//package com.spikything.utils
Section 10
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 11
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 12
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
loader.load(req);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_w:Number;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var progress:Number;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
bar_w = ((w - bar.x) - 10);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
progress = Math.min(1, options.progress_override(clip));
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Object;
var _local11:Number;
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local8 = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
_local9 = ((100 * _local3) / chk.ad_msec);
_local10 = this._mochiad_bar._inside;
_local11 = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 13
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
MochiSocial.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 14
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 15
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 16
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local3:Object;
var _local4:Object;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
}
}//package mochi.as3
Section 17
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _consumableProperties:Object;
private var _syncID:Number;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (_arg1.privateProperties.consumable){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function sync(_arg1:Event=null):void{
var _local2:Object;
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
_local2 = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[_local2]);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 18
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = _callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.8 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
var _local3:Number;
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
_local3 = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.target;
_local3 = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var mochiLCURL:String;
var req:URLRequest;
var complete:Function;
var clip = _arg1;
loader = new Loader();
mochiLCURL = (_servURL + _mochiLC);
req = new URLRequest(mochiLCURL);
complete = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String;
var _local4:URLRequest;
var _local5:URLVariables;
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
_local3 = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local4 = new URLRequest(_local3);
_local5 = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function updateCopy(_arg1:Object):void{
MochiServices.send("coins_updateCopy", _arg1, null, null);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 19
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const LOGIN_HIDE:String = "LoginHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function requestLogin():void{
MochiServices.send("coins_requestLogin");
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 20
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:String;
if (_syncContainer[_arg1] == _arg2){
return;
};
_local3 = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
}
}//package mochi.as3
Section 21
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var error:Event;// = null
public var key:String;// = null
public var operation:String;// = null
public var data;// = null
public var _loader:URLLoader;
public function MochiUserData(_arg1:String="", _arg2:Function=null){
key = null;
data = null;
error = null;
operation = null;
callback = null;
super();
this.key = _arg1;
this.callback = _arg2;
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function request(_arg1:String, _arg2:ByteArray):void{
var api_url:String;
var api_token:String;
var args:URLVariables;
var req:URLRequest;
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
api_url = MochiSocial.getAPIURL();
api_token = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
args = new URLVariables();
args.op = _operation;
args.key = key;
req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData;
_local3 = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData;
_local4 = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 22
//flag_icon_292 (PaperWarfare_spil_teen_v5_fla.flag_icon_292)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class flag_icon_292 extends MovieClip {
public function flag_icon_292(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 23
//l_br_290 (PaperWarfare_spil_teen_v5_fla.l_br_290)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class l_br_290 extends MovieClip {
public var text:TextField;
public var flag:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 24
//MainTimeline (PaperWarfare_spil_teen_v5_fla.MainTimeline)
package PaperWarfare_spil_teen_v5_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import spill.localisation.*;
import caurina.transitions.*;
import mochi.as3.*;
import flash.utils.*;
import com.spikything.utils.*;
import fl.transitions.*;
import flash.net.*;
import flash.media.*;
import flash.filters.*;
import Spill.Components.*;
import flash.ui.*;
import flash.external.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
import mochi.*;
import fl.transitions.easing.*;
public dynamic class MainTimeline extends MovieClip {
public var keyIsPressed:Boolean;
public var cld1_mc:MovieClip;
public var promptR_mc:MovieClip;
public var moreGames_btn:MovieClip;
public var enDeployLvl7Wave:Number;
public var playerAmmo6Arr:Array;
public var wheelUpOrDown:Number;
public var paperAdoboLogo_mc:MovieClip;
public var startLevelTimer:Timer;
public var enDeployTimerLvl1:Timer;
public var enDeployTimerLvl2:Timer;
public var enDeployTimerLvl3:Timer;
public var enDeployTimerLvl4:Timer;
public var enDeployTimerLvl5:Timer;
public var enDeployTimerLvl6:Timer;
public var enDeployLvl2WaveMax:Number;
public var enDeployTimerLvl9:Timer;
public var medalAwarding_txt:TextField;
public var enDeployTimerLvl7:Timer;
public var enDeployTimerLvl8:Timer;
public var ammo7Inventory:Number;
public var weaponCounter:Number;
public var enemyAmmo10Array:Array;
public var playerAmmo8Rof:Number;
public var explosionArray:Array;
public var c:MovieClip;
public var winPostFrame_mc:MovieClip;
public var cld2_mc:MovieClip;
public var promptS_mc:MovieClip;
public var test_mc:MovieClip;
public var dead:String;
public var w1Snd:Sound;
public var adoboLogo_mc:MovieClip;
public var lostMessage_txt:TextField;
public var ammo4Max:Number;
public var enemyAmmo4Array:Array;
public var enDeployLvl6Wave:Number;
public var highScores_btn:MovieClip;
public var lvlCntnr_mc:MovieClip;
public var studio_txt:TextField;
public var playerAmmo7Arr:Array;
public var mousew:TextField;
public var enDeployTimerLvl10:Timer;
public var enDeployLvl7WaveMax:Number;
public var introDesElem1_mc:MovieClip;
public var shield_txt:TextField;
public var boss3Ammo2Array:Array;
public var bossLifeUI_mc:MovieClip;
public var cld3_mc:MovieClip;
public var winMessage_txt:TextField;
public var ammo5Max:Number;
public var w2Snd:Sound;
public var ammo4Inventory:Number;
public var emp:String;
public var playerAmmo8Arr:Array;
public var title_mc:MovieClip;
public var ammoInventory_txt:TextField;
public var powerUpDeploymentTimer:Timer;
public var levelComplete:Boolean;
public var hitSnd:Sound;
public var gsSnd:Sound;
public var obj:Submitter;
public var introDesElem2_mc:MovieClip;
public var beginPos:Number;
public var enDeployLvl5Wave:Number;
public var lostPad_mc:MovieClip;
public var enDeployLvl3WaveMax:Number;
public var paperWarfareSharedObject:SharedObject;
public var enemyAmmo5Array:Array;
public var ammo6Max:Number;
public var lives:Number;
public var prelevelDesElem1_mc:MovieClip;
public var ngsSnd:Sound;
public var mouseFollowSpeed:Number;
public var boss3Ammo3Array:Array;
public var boss2Ammo1Array:Array;
public var credits_btn:MovieClip;
public var playerAmmo9Arr:Array;
public var ammo8Inventory:Number;
public var _mochiads_game_id:String;
public var w3Snd:Sound;
public var promptGO_mc:MovieClip;
public var enDeployLvl8WaveMax:Number;
public var btnSnd:Sound;
public var stageWidth:Number;
public var ammo1Inventory:Number;
public var selectText_txt:MovieClip;
public var ammo7Max:Number;
public var startLvlCounter:Number;
public var enDeployLvl4Wave:Number;
public var enemyAmmoArray:Array;
public var disObj:MovieClip;
public var propertyToAnimate:String;
public var nwLvl:Number;
public var duration:Number;
public var weaponArray:Array;
public var debrisArray:Array;
public var w4Snd:Sound;
public var playerAmmo1Rof:Number;
public var titletwnObj1:Tween;
public var titletwnObj2:Tween;
public var musicCode:Number;
public var enemyAmmo6Array:Array;
public var upgradePanel1_mc:MovieClip;
public var creditsBack_btn:MovieClip;
public var killsOverall:int;
public var enDeployLvl10WaveMax:Number;
public var lifeDenominator:Number;
public var stageHeight:Number;
public var killScore:int;
public var ehSnd:Sound;
public var spil_btn:SpilGamesLink;
public var enemyDestroyableAmmoArray:Array;
public var killsLevel_txt:TextField;
public var ammo8Max:Number;
public var brandingLogo_btn:MovieClip;
public var boss2Ammo2Array:Array;
public var w5Snd:Sound;
public var ammo5Inventory:Number;
public var enDeployLvl4WaveMax:Number;
public var enDeployLvl3Wave:Number;
public var playerAmmo2Rof:Number;
public var upgradePanel2_mc:MovieClip;
public var pwrSnd:Sound;
public var music:String;
public var suitSelectionPanel1_mc:MovieClip;
public var smokeArray:Array;
public var toPostLevelTimer:Timer;
public var playerAmmo1Arr:Array;
public var EasingFunction:Function;
public var enDeployLvl9WaveMax:Number;
public var postLvlWinNext_btn:MovieClip;
public var twn:Tween;
public var newGame_btn:MovieClip;
public var prompt_mc:MovieClip;
public var w6Snd:Sound;
public var enemyAmmo7Array:Array;
public var playerAmmo3Rof:Number;
public var titleDesElement1_mc:MovieClip;
public var upgradePanel3_mc:MovieClip;
public var emp_txt:TextField;
public var promptLC_mc:MovieClip;
public var lostMessage2_txt:TextField;
public var cldSpd:Number;
public var suitSelectionPanel2_mc:MovieClip;
public var playerAmmo8aArr:Array;
public var ammo2Inventory:Number;
public var suitCode:Number;
public var enDeployLvl2Wave:Number;
public var boss1Ammo1Array:Array;
public var playerAmmo2Arr:Array;
public var winPostDes_mc:MovieClip;
public var enemyAmmo1Array:Array;
public var w7Snd:Sound;
public var lostKillsOverall_txt:TextField;
public var brandingLogo_btn2:MovieClip;
public var howToDesElem1_mc:MovieClip;
public var playerAmmo4Rof:Number;
public var titleDesElement2_mc:MovieClip;
public var promptUpdates:Boolean;
public var enDeployLvl5WaveMax:Number;
public var postLvlLostNext_btn:MovieClip;
public var waveInterval:Number;
public var lastWord:String;
public var suitSelectionPanel3_mc:MovieClip;
public var playerAmmo8bArr:Array;
public var lifeNumerator:Number;
public var enemyDeploymentTimer:Timer;
public var bossArray:Array;
public var enemyAmmo8Array:Array;
public var updatePrompter_mc:MovieClip;
public var playerAmmo3Arr:Array;
public var useSeconds:Boolean;
public var enDeployLvl9Wave:Number;
public var back_btn:MovieClip;
public var next_btn:MovieClip;
public var ammo6Inventory:Number;
public var playerSpecial1Arr:Array;
public var howToDesElem2_mc:MovieClip;
public var disFromBarrel:Number;
public var enDeployLvl1Wave:Number;
public var titleBackDesign_mc:MovieClip;
public var adobo_txt:TextField;
public var counterTemporaryVar:Number;
public var lives_txt:TextField;
public var playerAmmo5Rof:Number;
public var enemyAmmo2Array:Array;
public var ammo1Max:Number;
public var enDeployLvl1WaveMax:Number;
public var achievementBack_btn:MovieClip;
public var map_mc:MovieClip;
public var lifeBar_mc:MovieClip;
public var playerAmmo4Arr:Array;
public var killsOverall_txt:TextField;
public var enDeployLvl10Wave:Number;
public var shield:String;
public var endPos:Number;
public var playerSpecial2Arr:Array;
public var scoreDisplay_txt:TextField;
public var level:Number;
public var enDeployLvl8Wave:Number;
public var playerTrailInterval:Number;
public var loadGame_btn:MovieClip;
public var enemyAmmo9Array:Array;
public var ammo2Max:Number;
public var w8aSnd:Sound;
public var enDeployLvl6WaveMax:Number;
public var lostPostFrame_mc:MovieClip;
public var killsLevel:Number;
public var credPad_mc:MovieClip;
public var enemyArray:Array;
public var lvlComplete_txt:TextField;
public var ammo3Inventory:Number;
public var playerAmmo5Arr:Array;
public var winPad_mc:MovieClip;
public var gameState:String;
public var devLink_btn:MovieClip;
public var powerupArray:Array;
public var enemyAmmo3Array:Array;
public var medal_mc:MovieClip;
public var playerAmmo7Rof:Number;
public var games_txt:TextField;
public var fireWeapon:String;
public var boss3Ammo1Array:Array;
public var ammo3Max:Number;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92, 92, frame93, 93, frame94, 94, frame95, 95, frame96);
}
public function moveSand(_arg1:MovieClip, _arg2){
_arg1.x = (_arg1.x - _arg2);
if (_arg1.x <= -848){
if (_arg1 == lvlCntnr_mc.s1){
lvlCntnr_mc.s1.x = (lvlCntnr_mc.s2.x + lvlCntnr_mc.s2.width);
};
if (_arg1 == lvlCntnr_mc.s2){
lvlCntnr_mc.s2.x = ((lvlCntnr_mc.s1.x + lvlCntnr_mc.s1.width) - 25);
};
if (_arg1 == lvlCntnr_mc.s3){
lvlCntnr_mc.s3.x = (lvlCntnr_mc.s4.x + lvlCntnr_mc.s4.width);
};
if (_arg1 == lvlCntnr_mc.s4){
lvlCntnr_mc.s4.x = ((lvlCntnr_mc.s3.x + lvlCntnr_mc.s3.width) - 25);
};
if (_arg1 == lvlCntnr_mc.s5){
lvlCntnr_mc.s5.x = (lvlCntnr_mc.s6.x + lvlCntnr_mc.s6.width);
};
if (_arg1 == lvlCntnr_mc.s6){
lvlCntnr_mc.s6.x = ((lvlCntnr_mc.s5.x + lvlCntnr_mc.s5.width) - 25);
};
};
}
public function updateAmmoUI(){
if (weaponCounter == 1){
ammoInventory_txt.text = String("LG .67: infinite");
} else {
if (weaponCounter == 2){
if (ammo2Inventory <= 0){
ammo2Inventory = 0;
};
ammoInventory_txt.text = String(("PAZ 5: " + ammo2Inventory));
} else {
if (weaponCounter == 3){
if (ammo3Inventory <= 0){
ammo3Inventory = 0;
};
ammoInventory_txt.text = String(("DESHK 48: " + ammo3Inventory));
} else {
if (weaponCounter == 4){
if (ammo4Inventory <= 0){
ammo4Inventory = 0;
};
ammoInventory_txt.text = String(("KRILL: " + ammo4Inventory));
} else {
if (weaponCounter == 5){
if (ammo5Inventory <= 0){
ammo5Inventory = 0;
};
ammoInventory_txt.text = String(("ASSAULTER: " + ammo5Inventory));
} else {
if (weaponCounter == 6){
if (ammo6Inventory <= 0){
ammo6Inventory = 0;
};
ammoInventory_txt.text = String(("LG 1: " + ammo6Inventory));
} else {
if (weaponCounter == 7){
if (ammo7Inventory <= 0){
ammo7Inventory = 0;
};
ammoInventory_txt.text = String(("SABOGKA: " + ammo7Inventory));
} else {
if (weaponCounter == 8){
if (ammo8Inventory <= 0){
ammo8Inventory = 0;
};
ammoInventory_txt.text = String(("BARAGKA D2: " + ammo8Inventory));
};
};
};
};
};
};
};
};
}
public function endLevelCleanUpArray(_arg1:Array){
var _local2:Number;
_local2 = (_arg1.length - 1);
while (_local2 >= 0) {
_arg1[_local2].destruct("");
_local2--;
};
}
public function attEnemy4Ammo(_arg1:MovieClip){
var _local2:Enemy4Ammo;
_local2 = new Enemy4Ammo(_arg1);
lvlCntnr_mc.addChild(_local2);
enemyAmmo4Array.push(_local2);
}
public function startLevel(_arg1:TimerEvent){
trace("LEVEL START");
startLvlCounter = 0;
Tweener.addTween(promptS_mc, {y:-200, time:2, transition:"easeInStrong"});
startLevelTimer.reset();
switch (level){
case 1:
enDeployTimerLvl1.start();
break;
case 2:
enDeployTimerLvl2.start();
break;
case 3:
enDeployTimerLvl3.start();
break;
case 4:
enDeployTimerLvl4.start();
break;
case 5:
enDeployTimerLvl5.start();
break;
case 6:
enDeployTimerLvl6.start();
break;
case 7:
enDeployTimerLvl7.start();
break;
case 8:
enDeployTimerLvl8.start();
break;
case 9:
enDeployTimerLvl9.start();
break;
case 10:
enDeployTimerLvl10.start();
break;
default:
break;
};
}
public function attBoss1(){
var _local1:Number;
var _local2:Number;
var _local3:Boss1;
_local1 = randomGenerator(700, 800);
_local2 = randomGenerator(100, 400);
_local3 = new Boss1(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
bossArray.push(_local3);
}
public function attBoss3(){
var _local1:Number;
var _local2:Number;
var _local3:Boss3;
_local1 = randomGenerator(700, 800);
_local2 = randomGenerator(100, 400);
_local3 = new Boss3(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
bossArray.push(_local3);
}
public function startLevelPrompt(_arg1:TimerEvent){
startLvlCounter++;
if (startLvlCounter == 1){
Tweener.addTween(promptR_mc, {y:240, time:2, transition:"easeOutStrong"});
} else {
if (startLvlCounter == 2){
Tweener.addTween(promptR_mc, {y:-200, time:2, transition:"easeInStrong"});
Tweener.addTween(promptS_mc, {y:240, time:2, transition:"easeOutStrong"});
};
};
}
function frame1(){
paperAdoboLogo_mc.scaleX = 0;
paperAdoboLogo_mc.scaleY = 0;
_mochiads_game_id = "9ee0ec22c4da4cea";
MochiAd.showPreGameAd({clip:root, id:"9ee0ec22c4da4cea", res:"680x480"});
Languages.initialize();
SpilGame.initialize("paper_warfare", PortalGroup.TEEN, "paper_warfare.html", this, true);
obj = new Submitter();
MouseWheelTrap.setup(stage);
}
function frame3(){
Tweener.addTween(paperAdoboLogo_mc, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
}
function frame2(){
}
public function plyW1Snd(){
if (music == "on"){
w1Snd.play();
};
}
public function attEnemy3Ammo(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Enemy3Ammo;
_local2 = 50;
_local3 = _arg1.barrel.rotation;
_local4 = (_arg1.x + (_local2 * Math.cos(((_local3 * Math.PI) / 180))));
_local5 = (_arg1.y + (_local2 * Math.sin(((_local3 * Math.PI) / 180))));
_local6 = new Enemy3Ammo(_arg1);
_local6.x = _local4;
_local6.y = _local5;
lvlCntnr_mc.addChild(_local6);
enemyAmmo3Array.push(_local6);
}
public function attBoss2(){
var _local1:Number;
var _local2:Number;
var _local3:Boss2;
_local1 = randomGenerator(700, 800);
_local2 = randomGenerator(100, 400);
_local3 = new Boss2(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
bossArray.push(_local3);
}
public function removeFromArray(_arg1:Array, _arg2:MovieClip){
var _local3:Number;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3] == _arg2){
_arg1.splice(_local3, 1);
lvlCntnr_mc.removeChild(_arg2);
break;
};
_local3++;
};
}
public function btn_prompt(_arg1:MovieClip){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
Tweener.addTween(btn, {scaleX:1.2, scaleY:1.2, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(2);
};
mOut = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(1);
};
clck = function (_arg1:MouseEvent){
if (btn == prompt_mc.yes_btn){
btn.buttonMode = false;
btn.removeEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.removeEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.removeEventListener(MouseEvent.CLICK, clck);
delete paperWarfareSharedObject.data.gameDataExist;
delete paperWarfareSharedObject.data.level_so;
delete paperWarfareSharedObject.data.killsOverall_os;
delete paperWarfareSharedObject.data.ammo1Inventory_so;
delete paperWarfareSharedObject.data.ammo2Inventory_so;
delete paperWarfareSharedObject.data.ammo3Inventory_so;
delete paperWarfareSharedObject.data.ammo4Inventory_so;
delete paperWarfareSharedObject.data.ammo5Inventory_so;
delete paperWarfareSharedObject.data.ammo6Inventory_so;
delete paperWarfareSharedObject.data.ammo7Inventory_so;
delete paperWarfareSharedObject.data.ammo8Inventory_so;
delete paperWarfareSharedObject.data.suitCode_so;
delete paperWarfareSharedObject.data.mouseFollowSpeed_so;
delete paperWarfareSharedObject.data.lifeNumerator_so;
delete paperWarfareSharedObject.data.lifeDenominator_so;
delete paperWarfareSharedObject.data.lives_so;
delete paperWarfareSharedObject.data.weaponArray_so;
delete paperWarfareSharedObject.data.shield_so;
delete paperWarfareSharedObject.data.emp_so;
suitCode = 1;
lifeNumerator = 100;
lifeDenominator = 100;
lives = 3;
mouseFollowSpeed = 0.75;
killScore = 0;
killsOverall = 0;
killsLevel = 0;
level = 1;
ammo1Inventory = ammo1Max;
ammo2Inventory = ammo2Max;
ammo3Inventory = ammo3Max;
ammo4Inventory = ammo4Max;
ammo5Inventory = ammo5Max;
ammo6Inventory = ammo6Max;
ammo7Inventory = ammo7Max;
ammo8Inventory = ammo8Max;
shield = "unarmed";
emp = "unarmed";
weaponArray.splice(0, weaponArray.length);
weaponArray.push("proton");
weaponArray.push("burst");
gotoAndPlay("intro");
} else {
if (btn == prompt_mc.no_btn){
Tweener.addTween(prompt_mc, {y:-271.7, time:1.6, transition:"easeInStrong"});
};
};
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function attBoss1Ammo1(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Boss1Ammo1;
_local2 = 240;
_local3 = 0;
while (_local3 < 5) {
_local2 = (_local2 - 20);
_local4 = new Boss1Ammo1(_arg1, _local2);
lvlCntnr_mc.addChild(_local4);
boss1Ammo1Array.push(_local4);
_local3++;
};
}
public function enDeployLvl10(_arg1:TimerEvent){
enDeployLvl10Wave++;
switch (enDeployLvl10Wave){
case 1:
attEnemy10(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy9(1);
break;
case 2:
attEnemy10(1);
attEnemy4(1);
attEnemy8(2);
attEnemy6(1);
attEnemy7(1);
break;
case 3:
attEnemy3(2);
attEnemy4(1);
attEnemy9(1);
attEnemy6(1);
attEnemy10(1);
break;
case 4:
attPwrUp3();
attEnemy9(1);
attEnemy5(1);
attEnemy10(1);
attEnemy7(1);
break;
case 5:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy6(1);
attEnemy10(1);
break;
case 6:
attEnemy1(1);
attEnemy2(1);
attEnemy8(2);
break;
case 7:
attEnemy10(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 8:
attPwrUp7();
attEnemy10(2);
attEnemy10(1);
attEnemy7(1);
break;
case 9:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy10(1);
attEnemy7(1);
break;
case 10:
attEnemy9(1);
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 11:
attEnemy1(1);
attEnemy10(2);
attEnemy6(1);
attEnemy7(1);
break;
case 12:
attPwrUp6();
attEnemy10(1);
attEnemy3(1);
attEnemy8(1);
attEnemy7(1);
break;
case 13:
attEnemy1(1);
attEnemy10(2);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 14:
attEnemy1(1);
attEnemy2(2);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 15:
attEnemy1(1);
attEnemy10(1);
attEnemy6(1);
attEnemy7(1);
break;
case 16:
attPwrUp2();
attEnemy1(1);
attEnemy10(1);
attEnemy8(1);
attEnemy9(1);
attEnemy7(1);
break;
case 17:
attEnemy1(1);
attEnemy2(2);
attEnemy10(1);
attEnemy8(1);
attEnemy9(1);
break;
case 18:
attEnemy10(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 19:
attEnemy1(2);
attEnemy10(1);
attEnemy3(1);
attEnemy9(1);
break;
case 20:
attPwrUp7();
attEnemy1(1);
attEnemy3(1);
attEnemy9(1);
attEnemy7(1);
break;
case 21:
attPwrUp3();
attEnemy1(2);
attEnemy2(1);
attEnemy10(1);
attEnemy7(1);
break;
case 22:
attPwrUp3();
attEnemy1(1);
attEnemy9(1);
attEnemy8(1);
attEnemy7(1);
break;
case 23:
attEnemy10(1);
attEnemy3(1);
attEnemy8(2);
attEnemy7(1);
break;
case 24:
attPwrUp2();
attEnemy10(1);
attEnemy9(1);
attEnemy8(2);
attEnemy7(1);
break;
case 25:
attEnemy1(2);
attEnemy10(1);
attEnemy9(1);
attEnemy7(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy10(1);
attEnemy7(1);
break;
case 27:
attEnemy1(1);
attEnemy9(2);
attEnemy10(1);
attEnemy7(1);
break;
case 28:
attPwrUp6();
attEnemy1(1);
attEnemy3(1);
attEnemy10(1);
attEnemy9(1);
break;
case 29:
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy10(1);
break;
case 30:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 31:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy10(1);
break;
case 32:
attPwrUp1();
attPwrUp3();
attEnemy9(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 33:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 34:
attEnemy10(1);
attEnemy2(1);
attEnemy9(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 35:
attPwrUp6();
attEnemy10(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 36:
attPwrUp3();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy10(1);
break;
case 37:
attPwrUp1();
attEnemy9(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 38:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy4(1);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 39:
attPwrUp2();
attEnemy10(1);
attEnemy2(1);
attEnemy9(1);
attEnemy4(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 40:
attBoss3();
Tweener.addTween(bossLifeUI_mc, {y:459, time:1, transition:"linear"});
break;
default:
break;
};
}
public function mouseUnpressed(_arg1:MouseEvent){
fireWeapon = "cease";
playerAmmo1Rof = 1;
playerAmmo2Rof = 15;
playerAmmo3Rof = 1;
playerAmmo4Rof = 0;
playerAmmo5Rof = 0;
playerAmmo7Rof = 1;
playerAmmo8Rof = 1;
}
public function btn_nav(_arg1:MovieClip, _arg2:String){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var whereTo = _arg2;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
Tweener.addTween(btn, {scaleX:1.2, scaleY:1.2, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(2);
};
mOut = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(1);
};
clck = function (_arg1:MouseEvent){
if (whereTo == "promptToClearData"){
Tweener.addTween(prompt_mc, {y:218.4, time:1.6, transition:"easeInStrong"});
} else {
btn.buttonMode = false;
btn.removeEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.removeEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.removeEventListener(MouseEvent.CLICK, clck);
gotoAndPlay(whereTo);
};
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function keyPressed(_arg1:KeyboardEvent){
if (keyIsPressed == false){
if ((((this.currentFrame >= 8)) && ((this.currentFrame <= 17)))){
if ((((lives <= 0)) && ((lifeNumerator <= 0)))){
} else {
if (_arg1.keyCode == 49){
weaponCounter = 1;
} else {
if (_arg1.keyCode == 50){
weaponCounter = 2;
} else {
if (_arg1.keyCode == 51){
if (weaponArray.length >= 3){
weaponCounter = 3;
};
} else {
if (_arg1.keyCode == 52){
if (weaponArray.length >= 4){
weaponCounter = 4;
};
} else {
if (_arg1.keyCode == 53){
if (weaponArray.length >= 5){
weaponCounter = 5;
};
} else {
if (_arg1.keyCode == 54){
if (weaponArray.length >= 6){
weaponCounter = 6;
};
} else {
if (_arg1.keyCode == 55){
if (weaponArray.length >= 7){
weaponCounter = 7;
};
} else {
if (_arg1.keyCode == 56){
if (weaponArray.length <= 8){
weaponCounter = 8;
};
} else {
if (_arg1.keyCode == 69){
trace("E");
attPlayerSpecial2();
} else {
if (_arg1.keyCode == 83){
trace("s");
attPlayerSpecial1();
} else {
if (_arg1.keyCode == 32){
trace("space");
weaponCounter++;
if (weaponCounter > weaponArray.length){
weaponCounter = 1;
};
} else {
if (_arg1.keyCode == 66){
trace("space");
weaponCounter--;
if (weaponCounter < 1){
weaponCounter = weaponArray.length;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
updateAmmoUI();
};
if (_arg1.keyCode == 77){
trace("offOnMusic");
musicCode++;
if (musicCode == 1){
music = "off";
SoundMixer.stopAll();
};
if (musicCode == 2){
music = "on";
if ((((this.currentFrame >= 8)) && ((this.currentFrame <= 17)))){
plygsSnd();
} else {
plyngsSnd();
};
musicCode = 0;
};
};
keyIsPressed = true;
};
}
public function keyReleased(_arg1:KeyboardEvent){
if ((((((((((((((((((((((((((((((_arg1.keyCode == 49)) || ((_arg1.keyCode == 50)))) || ((_arg1.keyCode == 51)))) || ((_arg1.keyCode == 52)))) || ((_arg1.keyCode == 53)))) || ((_arg1.keyCode == 54)))) || ((_arg1.keyCode == 55)))) || ((_arg1.keyCode == 56)))) || ((_arg1.keyCode == 55)))) || ((_arg1.keyCode == 56)))) || ((_arg1.keyCode == 69)))) || ((_arg1.keyCode == 83)))) || ((_arg1.keyCode == 32)))) || ((_arg1.keyCode == 66)))) || ((_arg1.keyCode == 77)))){
keyIsPressed = false;
};
}
public function weaponToBeShown(_arg1:MovieClip){
_arg1.gotoAndStop(weaponCounter);
}
public function plyrAnimation(_arg1:MovieClip){
if ((((((((mouseX < 0)) || ((mouseX > 680)))) || ((mouseY < 0)))) || ((mouseY > 480)))){
_arg1.gotoAndStop(5);
} else {
if (_arg1.x < (mouseX - 50)){
_arg1.gotoAndStop(1);
} else {
if (_arg1.x < (mouseX - 40)){
_arg1.gotoAndStop(2);
} else {
if (_arg1.x < (mouseX - 30)){
_arg1.gotoAndStop(3);
} else {
if (_arg1.x < (mouseX - 20)){
_arg1.gotoAndStop(4);
} else {
if (_arg1.x < (mouseX - 10)){
_arg1.gotoAndStop(5);
};
};
};
};
};
if (_arg1.x > (mouseX + 50)){
_arg1.gotoAndStop(9);
} else {
if (_arg1.x > (mouseX + 40)){
_arg1.gotoAndStop(8);
} else {
if (_arg1.x > (mouseX + 30)){
_arg1.gotoAndStop(7);
} else {
if (_arg1.x > (mouseX + 20)){
_arg1.gotoAndStop(6);
} else {
if (_arg1.x > (mouseX + 10)){
_arg1.gotoAndStop(5);
};
};
};
};
};
if ((((_arg1.x > (mouseX - 10))) && ((_arg1.x < (mouseX + 10))))){
_arg1.gotoAndStop(5);
};
};
}
public function moveCloud(_arg1:MovieClip){
_arg1.x = (_arg1.x - cldSpd);
if (_arg1.x < -150){
_arg1.x = (Math.floor((Math.random() * (1000 - 680))) + 680);
_arg1.y = (Math.floor((Math.random() * (250 - 50))) + 50);
};
}
public function plyW2Snd(){
if (music == "on"){
w2Snd.play();
};
}
public function btn_suitSelectionArrow(_arg1:MovieClip){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
Tweener.addTween(btn, {scaleX:1.2, scaleY:1.2, time:1, transition:"easeOutElastic"});
};
mOut = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
};
clck = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
if (btn == suitSelectionPanel3_mc.arrowLeft_btn){
suitCode--;
if (suitCode <= 1){
suitCode = 1;
};
};
if (btn == suitSelectionPanel3_mc.arrowRight_btn){
suitCode++;
if (suitCode >= 3){
suitCode = 3;
};
};
suitSelectionSlider();
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function plygsSnd(){
if (music == "on"){
gsSnd.play(0, int.MAX_VALUE);
};
}
public function init(){
bossLifeUI_mc.y = 1000;
killsLevel = 0;
levelComplete = false;
stage.addEventListener(Event.ENTER_FRAME, lpr);
if (level == 1){
weaponCounter = 2;
} else {
if (level == 2){
weaponCounter = 3;
} else {
if (level == 3){
weaponCounter = 4;
} else {
if (level == 4){
weaponCounter = 5;
} else {
if (level == 5){
} else {
if (level == 6){
weaponCounter = 6;
} else {
if (level == 7){
weaponCounter = 7;
} else {
if (level == 8){
} else {
if (level == 9){
weaponCounter = 8;
} else {
if (level == 10){
};
};
};
};
};
};
};
};
};
};
updateAmmoUI();
startLevelTimer.start();
SoundMixer.stopAll();
plygsSnd();
}
public function attEnemy2Ammo(_arg1:MovieClip){
var _local2:Enemy2Ammo;
_local2 = new Enemy2Ammo(_arg1);
lvlCntnr_mc.addChild(_local2);
enemyAmmo2Array.push(_local2);
}
function frame79(){
stop();
Tweener.addTween(howToDesElem1_mc, {width:680, height:480, time:1, transition:"easeOutElastic"});
Tweener.addTween(howToDesElem2_mc, {width:604, height:380, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(back_btn, {x:488, y:447, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(next_btn, {x:613, y:448, time:1.4, transition:"easeOutElastic"});
btn_nav(back_btn, "intro");
btn_nav(next_btn, "suitSelection");
}
public function cld(_arg1:MovieClip){
if (_arg1.x < -150){
_arg1.x = 700;
} else {
_arg1.x = (_arg1.x - (Math.floor((Math.random() * (5 - 1))) + 1));
};
}
function frame77(){
stop();
stage.showDefaultContextMenu = false;
brandingLogo_btn.buttonMode = true;
brandingLogo_btn.addEventListener(MouseEvent.CLICK, handle_btnMoreGames);
Tweener.addTween(title_mc, {width:491, height:236, time:2, transition:"easeOutElastic"});
Tweener.addTween(titleBackDesign_mc, {width:495, height:171, time:2.8, transition:"easeOutElastic"});
Tweener.addTween(titleDesElement1_mc, {height:477, time:2.2, transition:"easeOutElastic"});
Tweener.addTween(titleDesElement2_mc, {height:477, time:2.6, transition:"easeOutElastic"});
Tweener.addTween(newGame_btn, {y:266, time:1, transition:"easeOutElastic"});
Tweener.addTween(loadGame_btn, {y:327, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(highScores_btn, {y:384, time:1.3, transition:"easeOutElastic"});
Tweener.addTween(moreGames_btn, {y:440, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(credits_btn, {y:384, time:1.5, transition:"easeOutElastic"});
this.addEventListener(Event.ENTER_FRAME, titleLooper);
btn_prompt(prompt_mc.yes_btn);
btn_prompt(prompt_mc.no_btn);
if (paperWarfareSharedObject.data.gameDataExist != undefined){
trace("game exist");
btn_nav(newGame_btn, "promptToClearData");
btn_nav(loadGame_btn, "upgrade");
} else {
trace("game do not exist");
btn_nav(newGame_btn, "intro");
loadGame_btn.alpha = 0.5;
};
btn_nav(credits_btn, "credits");
btn_mg(moreGames_btn, "");
}
public function plyrAmmoAndEnemyCheckHit(_arg1:Array, _arg2:Array, _arg3:Number){
var _local4:Number;
var _local5:Number;
_local4 = (_arg1.length - 1);
while (_local4 >= 0) {
_local5 = (_arg2.length - 1);
while (_local5 >= 0) {
if (_arg1[_local4].hitTestObject(_arg2[_local5])){
_arg1[_local4].destruct("hit");
if ((((weaponCounter == 5)) || ((weaponCounter == 6)))){
_arg2[_local5].typeOfDestruction = "sliced";
} else {
if (weaponCounter == 4){
_arg2[_local5].typeOfDestruction = "fried";
} else {
_arg2[_local5].typeOfDestruction = "normal";
};
};
plyHitSnd();
_arg2[_local5].life = (_arg2[_local5].life - _arg3);
break;
};
_local5--;
};
_local4--;
};
}
function frame83(){
stop();
nwLvl = 1;
init();
}
function frame84(){
stop();
nwLvl = 2;
init();
}
function frame85(){
stop();
nwLvl = 3;
init();
}
function frame86(){
stop();
nwLvl = 4;
init();
}
public function updateUI(){
if (lifeNumerator >= lifeDenominator){
lifeNumerator = lifeDenominator;
};
if (lives > 0){
if (lifeNumerator <= 0){
lives--;
lifeNumerator = lifeDenominator;
};
};
if (lives > 3){
lives = 3;
};
if ((((lives <= 0)) && ((lifeNumerator <= 0)))){
Tweener.addTween(promptGO_mc, {y:240, time:1.5, transition:"easeOutStrong"});
if (dead == "false"){
dead = "true";
attExplosion1(lvlCntnr_mc.plyr_mc);
attDebris(lvlCntnr_mc.plyr_mc);
toPostLevelTimer.start();
};
};
lifeBar_mc.scaleX = (lifeNumerator / lifeDenominator);
if (lifeBar_mc.scaleX <= 0){
lifeBar_mc.scaleX = 0;
};
lives_txt.text = String(("LIVES: " + lives));
scoreDisplay_txt.text = String(killScore);
emp_txt.text = String(("EMP- " + emp));
shield_txt.text = String(("SHIELD- " + shield));
if (shield == "armed"){
shield_txt.textColor = 0xFF0000;
} else {
shield_txt.textColor = 0;
};
if (emp == "armed"){
emp_txt.textColor = 0xFF0000;
} else {
emp_txt.textColor = 0;
};
}
function frame76(){
stage.showDefaultContextMenu = false;
stageWidth = 680;
stageHeight = 480;
dead = "false";
gameState = "running";
fireWeapon = "cease";
nwLvl = 0;
levelComplete = false;
promptUpdates = false;
music = "on";
ammo1Max = 100;
ammo2Max = 350;
ammo3Max = 250;
ammo4Max = 300;
ammo5Max = 1000;
ammo6Max = 100;
ammo7Max = 20;
ammo8Max = 5;
ammo1Inventory = ammo1Max;
ammo2Inventory = ammo2Max;
ammo3Inventory = ammo3Max;
ammo4Inventory = ammo4Max;
ammo5Inventory = ammo5Max;
ammo6Inventory = ammo6Max;
ammo7Inventory = ammo7Max;
ammo8Inventory = ammo8Max;
paperWarfareSharedObject = SharedObject.getLocal("paperWarfareSavedData");
lsoChecker();
playerAmmo1Arr = new Array();
playerAmmo2Arr = new Array();
playerAmmo3Arr = new Array();
playerAmmo4Arr = new Array();
playerAmmo5Arr = new Array();
playerAmmo6Arr = new Array();
playerAmmo7Arr = new Array();
playerAmmo8Arr = new Array();
playerAmmo8aArr = new Array();
playerAmmo8bArr = new Array();
playerAmmo9Arr = new Array();
playerSpecial1Arr = new Array();
playerSpecial2Arr = new Array();
enemyArray = new Array();
enemyAmmoArray = new Array();
enemyAmmo1Array = new Array();
enemyAmmo2Array = new Array();
enemyAmmo3Array = new Array();
enemyAmmo4Array = new Array();
enemyAmmo5Array = new Array();
enemyAmmo6Array = new Array();
enemyAmmo7Array = new Array();
enemyAmmo8Array = new Array();
enemyAmmo9Array = new Array();
enemyAmmo10Array = new Array();
enemyDestroyableAmmoArray = new Array();
bossArray = new Array();
boss1Ammo1Array = new Array();
boss2Ammo1Array = new Array();
boss2Ammo2Array = new Array();
boss3Ammo1Array = new Array();
boss3Ammo2Array = new Array();
boss3Ammo3Array = new Array();
powerupArray = new Array();
smokeArray = new Array();
debrisArray = new Array();
explosionArray = new Array();
startLvlCounter = 0;
startLevelTimer = new Timer(1000, 3);
startLevelTimer.addEventListener(TimerEvent.TIMER, startLevelPrompt);
startLevelTimer.addEventListener(TimerEvent.TIMER_COMPLETE, startLevel);
enemyDeploymentTimer = new Timer(2000, 0);
enemyDeploymentTimer.addEventListener(TimerEvent.TIMER, deployEnemy);
waveInterval = 3000;
enDeployLvl1Wave = 0;
enDeployLvl1WaveMax = 18;
enDeployTimerLvl1 = new Timer(waveInterval, enDeployLvl1WaveMax);
enDeployTimerLvl1.addEventListener(TimerEvent.TIMER, enDeployLvl1);
enDeployLvl2Wave = 0;
enDeployLvl2WaveMax = 20;
enDeployTimerLvl2 = new Timer(waveInterval, enDeployLvl2WaveMax);
enDeployTimerLvl2.addEventListener(TimerEvent.TIMER, enDeployLvl2);
enDeployLvl3Wave = 0;
enDeployLvl3WaveMax = 22;
enDeployTimerLvl3 = new Timer(waveInterval, enDeployLvl3WaveMax);
enDeployTimerLvl3.addEventListener(TimerEvent.TIMER, enDeployLvl3);
enDeployLvl4Wave = 0;
enDeployLvl4WaveMax = 25;
enDeployTimerLvl4 = new Timer(waveInterval, enDeployLvl4WaveMax);
enDeployTimerLvl4.addEventListener(TimerEvent.TIMER, enDeployLvl4);
enDeployLvl5Wave = 0;
enDeployLvl5WaveMax = 30;
enDeployTimerLvl5 = new Timer(waveInterval, enDeployLvl5WaveMax);
enDeployTimerLvl5.addEventListener(TimerEvent.TIMER, enDeployLvl5);
enDeployLvl6Wave = 0;
enDeployLvl6WaveMax = 30;
enDeployTimerLvl6 = new Timer(waveInterval, enDeployLvl6WaveMax);
enDeployTimerLvl6.addEventListener(TimerEvent.TIMER, enDeployLvl6);
enDeployLvl7Wave = 0;
enDeployLvl7WaveMax = 30;
enDeployTimerLvl7 = new Timer(waveInterval, enDeployLvl7WaveMax);
enDeployTimerLvl7.addEventListener(TimerEvent.TIMER, enDeployLvl7);
enDeployLvl8Wave = 0;
enDeployLvl8WaveMax = 35;
enDeployTimerLvl8 = new Timer(waveInterval, enDeployLvl8WaveMax);
enDeployTimerLvl8.addEventListener(TimerEvent.TIMER, enDeployLvl8);
enDeployLvl9Wave = 0;
enDeployLvl9WaveMax = 35;
enDeployTimerLvl9 = new Timer(waveInterval, enDeployLvl9WaveMax);
enDeployTimerLvl9.addEventListener(TimerEvent.TIMER, enDeployLvl9);
enDeployLvl10Wave = 0;
enDeployLvl10WaveMax = 40;
enDeployTimerLvl10 = new Timer(waveInterval, enDeployLvl10WaveMax);
enDeployTimerLvl10.addEventListener(TimerEvent.TIMER, enDeployLvl10);
enDeployTimerLvl1.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl2.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl3.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl4.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl5.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl6.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl7.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl8.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl9.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
enDeployTimerLvl9.addEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
powerUpDeploymentTimer = new Timer(1000, 0);
powerUpDeploymentTimer.addEventListener(TimerEvent.TIMER, deployPowerUp);
toPostLevelTimer = new Timer(1000, 4);
toPostLevelTimer.addEventListener(TimerEvent.TIMER_COMPLETE, toPostLevel);
weaponCounter = 1;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUnpressed);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
keyIsPressed = false;
musicCode = 0;
playerTrailInterval = 1;
disFromBarrel = 60;
playerAmmo1Rof = 0;
playerAmmo2Rof = 15;
playerAmmo3Rof = 1;
playerAmmo4Rof = 0;
playerAmmo5Rof = 0;
playerAmmo7Rof = 1;
playerAmmo8Rof = 1;
cldSpd = 8;
w1Snd = new Weapon1Snd();
w2Snd = new Weapon2Snd();
w3Snd = new Weapon3Snd();
w4Snd = new Weapon4Snd();
w5Snd = new Weapon5Snd();
w6Snd = new Weapon6Snd();
w7Snd = new Weapon7Snd();
w8aSnd = new Weapon8aSnd();
ehSnd = new EnemyHitSnd();
btnSnd = new BtnSnd();
gsSnd = new GameScreenBG();
ngsSnd = new NonGameScreenBG();
SoundMixer.stopAll();
plyngsSnd();
pwrSnd = new PwrUpSnd();
hitSnd = new HitSnd();
obj._O0000Ol01(parent, "PaperWarfare", "PaperWarfare.html", 0, "normal", "", 0, 0, 1, true);
}
public function plyHitSnd(){
if (music == "on"){
hitSnd.play(0, 1);
};
}
public function btn_weaponDescription(_arg1:MovieClip, _arg2:Number){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var newYpos = _arg2;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
Tweener.addTween(btn, {scaleX:1.2, scaleY:1.2, time:0.2, transition:"easeOutStrong"});
};
mOut = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:0.2, transition:"easeOutStrong"});
};
clck = function (_arg1:MouseEvent){
Tweener.addTween(upgradePanel2_mc.descSlider_mc, {y:newYpos, time:0.5, transition:"easeOutStrong"});
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function attExplosion1(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Explosion1;
plyehSnd();
_local2 = _arg1.x;
_local3 = _arg1.y;
_local4 = (Math.floor((Math.random() * (300 - 240))) + 240);
_local5 = new Explosion1(_local2, _local3, _local4);
lvlCntnr_mc.addChild(_local5);
explosionArray.push(_local5);
}
public function attBoss2Ammo1(_arg1:MovieClip){
var _local2:Boss2Ammo1;
_local2 = new Boss2Ammo1(_arg1);
lvlCntnr_mc.addChild(_local2);
boss2Ammo1Array.push(_local2);
}
public function attExplosion5(_arg1:MovieClip, _arg2:Number){
var _local3:Number;
var _local4:Number;
var _local5:Explosion5;
_local3 = _arg1.x;
_local4 = _arg1.y;
_local5 = new Explosion5(_local3, _local4, _arg2);
lvlCntnr_mc.addChild(_local5);
explosionArray.push(_local5);
}
function frame87(){
stop();
nwLvl = 5;
shield = "armed";
init();
}
public function attExplosion2(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Explosion2;
_local2 = _arg1.x;
_local3 = _arg1.y;
_local4 = (Math.floor((Math.random() * (300 - 240))) + 240);
_local5 = new Explosion2(_local2, _local3, _local4);
lvlCntnr_mc.addChild(_local5);
explosionArray.push(_local5);
}
public function attBoss2Ammo2(_arg1:MovieClip){
var _local2:Number;
var _local3:Boss2Ammo2;
_local2 = 0;
while (_local2 < 2) {
_local3 = new Boss2Ammo2(_arg1);
_local3.x = _arg1.x;
if (_local2 == 0){
_local3.y = (_arg1.y - 50);
} else {
if (_local2 == 1){
_local3.y = (_arg1.y + 50);
};
};
lvlCntnr_mc.addChild(_local3);
boss2Ammo2Array.push(_local3);
_local2++;
};
}
public function enemyAmmoAndPlayrCheckHit(_arg1:Array, _arg2:Number){
var _local3:Number;
_local3 = (_arg1.length - 1);
while (_local3 >= 0) {
if (_arg1[_local3].hitTestObject(lvlCntnr_mc.plyr_mc)){
attExplosion1(lvlCntnr_mc.plyr_mc);
if (levelComplete == false){
lifeNumerator = (lifeNumerator - _arg2);
};
screenShake();
_arg1[_local3].destruct("hit");
break;
};
_local3--;
};
}
function frame82(){
stop();
if (level == 1){
map_mc.gotoAndStop(1);
} else {
if (level == 2){
map_mc.gotoAndStop(2);
};
};
if (level == 3){
map_mc.gotoAndStop(3);
} else {
if (level == 4){
map_mc.gotoAndStop(4);
};
};
if (level == 5){
map_mc.gotoAndStop(5);
} else {
if (level == 6){
map_mc.gotoAndStop(6);
} else {
if (level == 7){
map_mc.gotoAndStop(7);
};
};
};
if (level == 8){
map_mc.gotoAndStop(8);
} else {
if (level == 9){
map_mc.gotoAndStop(9);
} else {
if (level == 10){
map_mc.gotoAndStop(10);
};
};
};
map_mc.scaleX = 0.1;
map_mc.scaleY = 0.1;
Tweener.addTween(map_mc, {scaleX:1, scaleY:1, time:2, transition:"easeOutElastic"});
Tweener.addTween(prelevelDesElem1_mc, {width:680, height:480, time:1.8, transition:"easeOutElastic"});
Tweener.addTween(back_btn, {x:488, y:447, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(next_btn, {x:613, y:448, time:1.4, transition:"easeOutElastic"});
btn_nav(back_btn, "upgrade");
btn_playLevel(next_btn, level);
}
function frame96(){
stop();
trace(creditsBack_btn);
c.scaleX = 0.1;
credPad_mc.scaleY = 0.1;
Tweener.addTween(c, {scaleX:1, scaleY:1, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(credPad_mc, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
btn_nav(creditsBack_btn, "initializer");
devLink(devLink_btn);
btn_mg(brandingLogo_btn2, "");
}
function frame91(){
stop();
nwLvl = 9;
init();
}
function frame92(){
stop();
nwLvl = 10;
init();
}
public function attExplosion3(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Explosion3;
_local2 = _arg1.x;
_local3 = _arg1.y;
_local5 = 0;
while (_local5 < 2) {
if (_local5 == 0){
_local4 = (Math.floor((Math.random() * (10 - 0))) + 0);
} else {
_local4 = (Math.floor((Math.random() * (150 - 45))) + 45);
};
_local6 = new Explosion3(_local2, _local3, _local4);
lvlCntnr_mc.addChild(_local6);
explosionArray.push(_local6);
_local5++;
};
}
public function randomGenerator(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * (_arg2 - _arg1))) + _arg1);
return (_local3);
}
function frame81(){
stop();
btn_weaponDescription(upgradePanel1_mc.w1, 218);
btn_weaponDescription(upgradePanel1_mc.w2, 489);
upgradePanel1_mc.w3.alpha = 0.5;
upgradePanel1_mc.w4.alpha = 0.5;
upgradePanel1_mc.w5.alpha = 0.5;
upgradePanel1_mc.w6.alpha = 0.5;
upgradePanel1_mc.w7.alpha = 0.5;
upgradePanel1_mc.w8.alpha = 0.5;
upgradePanel3_mc.shield_mc.alpha = 0.2;
upgradePanel3_mc.emp_mc.alpha = 0.2;
if (promptUpdates == true){
updatePrompter_mc.y = 144.9;
promptUpdates = false;
};
if (level == 2){
upgradePanel1_mc.w3.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
upgradePanel2_mc.descSlider_mc.y = 786;
updatePrompter_mc.updates_mc.gotoAndStop(1);
} else {
if (level == 3){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
upgradePanel2_mc.descSlider_mc.y = 1070;
updatePrompter_mc.updates_mc.gotoAndStop(2);
} else {
if (level == 4){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
upgradePanel2_mc.descSlider_mc.y = 1350;
updatePrompter_mc.updates_mc.gotoAndStop(3);
} else {
if (level == 5){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
upgradePanel3_mc.shield_mc.alpha = 1;
updatePrompter_mc.updates_mc.gotoAndStop(7);
} else {
if (level == 6){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
upgradePanel1_mc.w6.alpha = 1;
upgradePanel3_mc.shield_mc.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
btn_weaponDescription(upgradePanel1_mc.w6, 1638);
upgradePanel2_mc.descSlider_mc.y = 1638;
updatePrompter_mc.updates_mc.gotoAndStop(4);
} else {
if (level == 7){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
upgradePanel1_mc.w6.alpha = 1;
upgradePanel1_mc.w7.alpha = 1;
upgradePanel3_mc.shield_mc.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
btn_weaponDescription(upgradePanel1_mc.w6, 1638);
btn_weaponDescription(upgradePanel1_mc.w7, 1914);
upgradePanel2_mc.descSlider_mc.y = 1914;
updatePrompter_mc.updates_mc.gotoAndStop(5);
} else {
if (level == 8){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
upgradePanel1_mc.w6.alpha = 1;
upgradePanel1_mc.w7.alpha = 1;
upgradePanel3_mc.shield_mc.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
btn_weaponDescription(upgradePanel1_mc.w6, 1638);
btn_weaponDescription(upgradePanel1_mc.w7, 1914);
upgradePanel3_mc.shield_mc.alpha = 1;
upgradePanel3_mc.emp_mc.alpha = 1;
updatePrompter_mc.updates_mc.gotoAndStop(8);
} else {
if (level == 9){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
upgradePanel1_mc.w6.alpha = 1;
upgradePanel1_mc.w7.alpha = 1;
upgradePanel1_mc.w8.alpha = 1;
upgradePanel3_mc.shield_mc.alpha = 1;
upgradePanel3_mc.emp_mc.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
btn_weaponDescription(upgradePanel1_mc.w6, 1638);
btn_weaponDescription(upgradePanel1_mc.w7, 1914);
btn_weaponDescription(upgradePanel1_mc.w8, 2190);
upgradePanel2_mc.descSlider_mc.y = 2190;
updatePrompter_mc.updates_mc.gotoAndStop(6);
};
};
};
};
};
};
};
};
if (level == 10){
upgradePanel1_mc.w3.alpha = 1;
upgradePanel1_mc.w4.alpha = 1;
upgradePanel1_mc.w5.alpha = 1;
upgradePanel1_mc.w6.alpha = 1;
upgradePanel1_mc.w7.alpha = 1;
upgradePanel1_mc.w8.alpha = 1;
upgradePanel3_mc.shield_mc.alpha = 1;
upgradePanel3_mc.emp_mc.alpha = 1;
btn_weaponDescription(upgradePanel1_mc.w3, 770);
btn_weaponDescription(upgradePanel1_mc.w4, 1070);
btn_weaponDescription(upgradePanel1_mc.w5, 1350);
btn_weaponDescription(upgradePanel1_mc.w6, 1638);
btn_weaponDescription(upgradePanel1_mc.w7, 1914);
btn_weaponDescription(upgradePanel1_mc.w8, 2190);
};
Tweener.addTween(upgradePanel1_mc, {x:-109, time:1, transition:"easeOutElastic"});
Tweener.addTween(upgradePanel2_mc, {x:737, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(upgradePanel3_mc, {x:-23.9, time:1.6, transition:"easeOutElastic"});
Tweener.addTween(back_btn, {x:488, y:447, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(next_btn, {x:613, y:448, time:1.4, transition:"easeOutElastic"});
btn_updatesScreen(back_btn, "suitSelection");
btn_updatesScreen(next_btn, "prelevel");
closeUpdatePrompt(updatePrompter_mc.closeUpdatePrompt_btn, -523.1);
}
function frame78(){
stop();
Tweener.addTween(introDesElem1_mc, {width:704, height:504, time:1, transition:"easeOutElastic"});
Tweener.addTween(introDesElem2_mc, {width:612, height:414, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(back_btn, {x:488, y:447, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(next_btn, {x:613, y:448, time:1.4, transition:"easeOutElastic"});
btn_nav(back_btn, "title");
btn_nav(next_btn, "howTo");
}
public function btn_updatesScreen(_arg1:MovieClip, _arg2:String){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var whereTo = _arg2;
mOvr = function (_arg1:MouseEvent){
btn.gotoAndStop(2);
};
mOut = function (_arg1:MouseEvent){
btn.gotoAndStop(1);
};
clck = function (_arg1:MouseEvent){
if (whereTo == "suitSelection"){
btn.buttonMode = false;
btn.removeEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.removeEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.removeEventListener(MouseEvent.CLICK, clck);
if (paperWarfareSharedObject.data.gameDataExist == undefined){
gotoAndPlay(whereTo);
} else {
gotoAndPlay("title");
};
} else {
btn.buttonMode = false;
btn.removeEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.removeEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.removeEventListener(MouseEvent.CLICK, clck);
gotoAndPlay(whereTo);
};
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
function frame94(){
stop();
SoundMixer.stopAll();
plyngsSnd();
lastWord = "";
btn_nav(postLvlLostNext_btn, "initializer");
lostMessage_txt.scaleX = 0.1;
lostKillsOverall_txt.scaleX = 0.1;
medalAwarding_txt.scaleX = 0.1;
lostMessage2_txt.scaleX = 0.1;
lostKillsOverall_txt.text = String(("Overall Kills-> " + killsOverall));
lostMessage_txt.text = String("You've fought a good fight soldier");
Tweener.addTween(lostMessage_txt, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(lostKillsOverall_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
Tweener.addTween(medalAwarding_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
Tweener.addTween(lostMessage2_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
if (level == 1){
medalAwarding_txt.text = String("Airman Basic Medal");
medal_mc.gotoAndStop(1);
} else {
if (level == 2){
medalAwarding_txt.text = String("Airman Medal");
medal_mc.gotoAndStop(2);
} else {
if (level == 3){
medalAwarding_txt.text = String("Airman First Class Medal");
medal_mc.gotoAndStop(3);
} else {
if (level == 4){
medalAwarding_txt.text = String("Senior Airman Medal");
medal_mc.gotoAndStop(4);
} else {
if (level == 5){
medalAwarding_txt.text = String("Staff Sergeant Medal");
medal_mc.gotoAndStop(5);
} else {
if (level == 6){
medalAwarding_txt.text = String("Technical Sergeant Medal");
medal_mc.gotoAndStop(6);
} else {
if (level == 7){
medalAwarding_txt.text = String("Master Sergeant Medal");
medal_mc.gotoAndStop(7);
} else {
if (level == 8){
medalAwarding_txt.text = String("Senior Master Sergeant Medal");
medal_mc.gotoAndStop(8);
} else {
if (level == 9){
medalAwarding_txt.text = String("Chief Master Sergeant Medal");
medal_mc.gotoAndStop(9);
} else {
if (level == 10){
medalAwarding_txt.text = String("Captain Medal");
medal_mc.gotoAndStop(10);
};
};
};
};
};
};
};
};
};
};
lostPostFrame_mc.scaleX = 0.1;
lostPad_mc.scaleY = 0.1;
lostPostFrame_mc.scaleX = 0.1;
lostPad_mc.scaleY = 0.1;
medal_mc.scaleX = 0.1;
medal_mc.scaleY = 0.1;
Tweener.addTween(lostPostFrame_mc, {scaleX:1, scaleY:1, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(lostPad_mc, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(medal_mc, {scaleX:1, scaleY:1, time:1.6, transition:"easeOutElastic"});
obj._O01lOO10O(killsOverall);
}
public function attExplosion4(_arg1:MovieClip, _arg2){
var _local3:Number;
var _local4:Number;
var _local5:Explosion4;
_local3 = _arg1.x;
_local4 = _arg1.y;
_local5 = new Explosion4(_local3, _local4, _arg2);
lvlCntnr_mc.addChild(_local5);
explosionArray.push(_local5);
}
function frame89(){
stop();
nwLvl = 7;
init();
}
function frame90(){
stop();
nwLvl = 8;
emp = "armed";
init();
}
public function plyW3Snd(){
if (music == "on"){
w3Snd.play();
};
}
function frame93(){
stop();
infos();
SoundMixer.stopAll();
plyngsSnd();
if (level < 10){
promptUpdates = true;
};
btn_nav(postLvlWinNext_btn, "upgrade");
winPostFrame_mc.scaleX = 0.1;
winPad_mc.scaleX = 0.1;
winPostFrame_mc.scaleY = 0.1;
winPad_mc.scaleY = 0.1;
winPostDes_mc.scaleX = 0.1;
winMessage_txt.scaleX = 0.1;
killsLevel_txt.scaleX = 0.1;
killsOverall_txt.scaleX = 0.1;
Tweener.addTween(winPostFrame_mc, {scaleX:1, scaleY:1, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(winPad_mc, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(winPostDes_mc, {scaleX:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(winMessage_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
Tweener.addTween(killsLevel_txt, {scaleX:1, scaleY:1, time:1.6, transition:"easeOutElastic"});
Tweener.addTween(killsOverall_txt, {scaleX:1, scaleY:1, time:1.7, transition:"easeOutElastic"});
grantAwards();
}
function frame80(){
stop();
selectText_txt.x = 1000;
Tweener.addTween(suitSelectionPanel1_mc, {rotation:0, time:1, transition:"easeOutElastic"});
Tweener.addTween(suitSelectionPanel2_mc, {rotation:0, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(suitSelectionPanel3_mc, {rotation:0, time:1.6, transition:"easeOutElastic"});
Tweener.addTween(back_btn, {x:488, y:447, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(next_btn, {x:613, y:448, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(selectText_txt, {x:471, time:1.4, transition:"easeOutElastic"});
btn_nav(back_btn, "howTo");
btn_nav(next_btn, "upgrade");
btn_suitSelectionArrow(suitSelectionPanel3_mc.arrowLeft_btn);
btn_suitSelectionArrow(suitSelectionPanel3_mc.arrowRight_btn);
}
public function plyngsSnd(){
if (music == "on"){
ngsSnd.play(0, int.MAX_VALUE);
};
}
public function enemyAndPlyrCheckHit(_arg1:Array){
var _local2:Number;
_local2 = (_arg1.length - 1);
while (_local2 >= 0) {
if (_arg1[_local2].hitTestObject(lvlCntnr_mc.plyr_mc)){
lifeNumerator = (lifeNumerator - 8);
screenShake();
_arg1[_local2].destruct("hit");
break;
};
_local2--;
};
}
public function moveMountain(_arg1:MovieClip){
if ((((_arg1 == lvlCntnr_mc.m3)) || ((_arg1 == lvlCntnr_mc.m4)))){
_arg1.x = (_arg1.x - 2.5);
} else {
_arg1.x = (_arg1.x - 5);
};
if (_arg1.x < -980){
_arg1.x = 780;
};
}
public function infos(){
switch (level){
case 1:
break;
case 2:
lvlComplete_txt.text = "Level 1 complete";
break;
case 3:
lvlComplete_txt.text = "Level 2 complete";
break;
case 4:
lvlComplete_txt.text = "Level 3 complete";
break;
case 5:
lvlComplete_txt.text = "Level 4 complete";
break;
case 6:
lvlComplete_txt.text = "Level 5 complete";
break;
case 7:
lvlComplete_txt.text = "Level 6 complete";
break;
case 8:
lvlComplete_txt.text = "Level 7 complete";
break;
case 9:
lvlComplete_txt.text = "Level 8 complete";
break;
case 10:
lvlComplete_txt.text = "Level 9 complete";
break;
default:
break;
};
killsLevel_txt.text = String(("Kills->" + killsLevel));
killsOverall_txt.text = String(("Overall Kills-> " + killsOverall));
}
public function plyrSpecialAndEnemyCheckHit(_arg1:Array, _arg2:Array, _arg3:Number){
var _local4:Number;
var _local5:Number;
_local4 = (_arg1.length - 1);
while (_local4 >= 0) {
_local5 = (_arg2.length - 1);
while (_local5 >= 0) {
if (_arg1[_local4].hitTestObject(_arg2[_local5])){
_arg2[_local5].destruct("hit");
break;
};
_local5--;
};
_local4--;
};
}
public function plyW4Snd(){
if (music == "on"){
w4Snd.play();
};
}
public function attEnemy1Ammo(_arg1:MovieClip){
var _local2:Enemy1Ammo;
_local2 = new Enemy1Ammo(_arg1);
lvlCntnr_mc.addChild(_local2);
enemyAmmo1Array.push(_local2);
}
public function attPlayerSpecial1(){
var _local1:PlayerSpecial1;
if (shield == "armed"){
_local1 = new PlayerSpecial1(lvlCntnr_mc.plyr_mc.x, lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerSpecial1Arr.push(_local1);
shield = "unarmed";
};
}
public function attEnemy9Ammo(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Enemy9Ammo;
_local2 = 220;
_local3 = 0;
while (_local3 < 3) {
_local2 = (_local2 - 20);
_local4 = new Enemy9Ammo(_arg1, _local2);
lvlCntnr_mc.addChild(_local4);
enemyAmmo9Array.push(_local4);
_local3++;
};
}
public function attPlayerSpecial2(){
var _local1:PlayerSpecial2;
if (emp == "armed"){
_local1 = new PlayerSpecial2(lvlCntnr_mc.plyr_mc.x, lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerSpecial2Arr.push(_local1);
emp = "unarmed";
};
}
public function moveBuilding(_arg1:MovieClip){
_arg1.x = (_arg1.x - 6);
if (_arg1.x < -150){
_arg1.x = (Math.floor((Math.random() * (1000 - 680))) + 680);
};
}
public function plybtnSnd(){
if (music == "on"){
btnSnd.play();
};
}
public function devLink(_arg1:MovieClip){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
};
mOut = function (_arg1:MouseEvent){
};
clck = function (_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.adobogames.com/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_new");
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
function frame88(){
stop();
nwLvl = 6;
init();
}
public function attEnemy10Ammo(_arg1:MovieClip){
var _local2:Enemy10Ammo;
_local2 = new Enemy10Ammo(_arg1);
lvlCntnr_mc.addChild(_local2);
enemyAmmo10Array.push(_local2);
}
public function mouseWheel(_arg1:MouseEvent){
}
public function handle_btnSpil(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()));
}
public function attEnemy10(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Enemy10;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = randomGenerator(700, 800);
_local4 = randomGenerator(100, 400);
_local5 = new Enemy10(_local3, _local4);
lvlCntnr_mc.addChild(_local5);
enemyArray.push(_local5);
_local2++;
};
}
public function attBoss3Ammo1(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Boss3Ammo1;
_local2 = 240;
_local3 = 0;
while (_local3 < 5) {
_local2 = (_local2 - 20);
_local4 = new Boss3Ammo1(_arg1, _local2);
lvlCntnr_mc.addChild(_local4);
boss3Ammo1Array.push(_local4);
_local3++;
};
}
public function attBoss3Ammo2(_arg1:MovieClip){
var _local2:Boss3Ammo2;
_local2 = new Boss3Ammo2(_arg1);
lvlCntnr_mc.addChild(_local2);
boss3Ammo2Array.push(_local2);
}
public function attBoss3Ammo3(_arg1:MovieClip){
var _local2:Number;
var _local3:Boss3Ammo3;
_local2 = 0;
while (_local2 < 2) {
_local3 = new Boss3Ammo3(_arg1);
_local3.x = _arg1.x;
if (_local2 == 0){
_local3.y = (_arg1.y - 50);
} else {
if (_local2 == 1){
_local3.y = (_arg1.y + 50);
};
};
lvlCntnr_mc.addChild(_local3);
boss3Ammo3Array.push(_local3);
_local2++;
};
}
public function grantAwards(){
switch (level){
case 3:
obj._O00OOl1Ol("award1");
break;
case 5:
obj._O00OOl1Ol("award2");
break;
case 7:
obj._O00OOl1Ol("award3");
break;
case 9:
obj._O00OOl1Ol("award4");
break;
};
}
public function attPlayerAmmo8a(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:PlayerAmmo8a;
plyW8aSnd();
_local2 = randomGenerator(220, 250);
_local3 = 0;
while (_local3 < 7) {
_local2 = (_local2 + randomGenerator(10, 45));
_local4 = new PlayerAmmo8a(_arg1.x, _arg1.y, _local2);
lvlCntnr_mc.addChild(_local4);
playerAmmo8aArr.push(_local4);
_local3++;
};
}
public function endOfEnemyDeployment(_arg1:TimerEvent){
switch (level){
case 1:
enDeployTimerLvl1.removeEventListener(TimerEvent.TIMER, enDeployLvl1);
enDeployTimerLvl1.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 2:
enDeployTimerLvl2.removeEventListener(TimerEvent.TIMER, enDeployLvl2);
enDeployTimerLvl2.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 3:
enDeployTimerLvl3.removeEventListener(TimerEvent.TIMER, enDeployLvl3);
enDeployTimerLvl3.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 4:
enDeployTimerLvl4.removeEventListener(TimerEvent.TIMER, enDeployLvl4);
enDeployTimerLvl4.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 5:
enDeployTimerLvl5.removeEventListener(TimerEvent.TIMER, enDeployLvl5);
enDeployTimerLvl5.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 6:
enDeployTimerLvl6.removeEventListener(TimerEvent.TIMER, enDeployLvl6);
enDeployTimerLvl6.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 7:
enDeployTimerLvl7.removeEventListener(TimerEvent.TIMER, enDeployLvl7);
enDeployTimerLvl7.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 8:
enDeployTimerLvl8.removeEventListener(TimerEvent.TIMER, enDeployLvl8);
enDeployTimerLvl8.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 9:
enDeployTimerLvl9.removeEventListener(TimerEvent.TIMER, enDeployLvl9);
enDeployTimerLvl9.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 10:
enDeployTimerLvl10.removeEventListener(TimerEvent.TIMER, enDeployLvl10);
enDeployTimerLvl10.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
default:
break;
};
}
public function attPlayerAmmo8b(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:PlayerAmmo8b;
plyW8aSnd();
_local2 = randomGenerator(220, 250);
_local3 = 0;
while (_local3 < 7) {
_local2 = (_local2 + randomGenerator(10, 45));
_local4 = new PlayerAmmo8b(_arg1.x, _arg1.y, _local2);
lvlCntnr_mc.addChild(_local4);
playerAmmo8bArr.push(_local4);
_local3++;
};
}
public function screenShake(){
Earthquake.go(lvlCntnr_mc, 6, 0.3);
}
public function plyehSnd(){
if (music == "on"){
ehSnd.play();
};
}
public function closeUpdatePrompt(_arg1:MovieClip, _arg2:Number){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var newYpos = _arg2;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
};
mOut = function (_arg1:MouseEvent){
};
clck = function (_arg1:MouseEvent){
Tweener.addTween(updatePrompter_mc, {y:newYpos, time:0.5, transition:"easeInStrong"});
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function attEnemy8Ammo(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Enemy8Ammo;
_local2 = (Math.floor((Math.random() * (250 - 5))) + 5);
_local5 = 0;
while (_local5 < 8) {
_local4 = (Math.floor((Math.random() * (120 - 100))) + 100);
_local2 = (_local2 + _local4);
_local3 = (Math.floor((Math.random() * (-100 - -200))) + -200);
_local6 = new Enemy8Ammo(_arg1, _local2, _local3);
lvlCntnr_mc.addChild(_local6);
enemyAmmo8Array.push(_local6);
_local5++;
};
}
public function plyW5Snd(){
if (music == "on"){
w5Snd.play();
};
}
public function handle_btnMoreGames(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
}
function frame95(){
stop();
SoundMixer.stopAll();
plyngsSnd();
stop();
lostMessage_txt.scaleX = 0.1;
lostKillsOverall_txt.scaleX = 0.1;
medalAwarding_txt.scaleX = 0.1;
lostMessage2_txt.scaleX = 0.1;
lostKillsOverall_txt.text = String(("Overall Kills-> " + killsOverall));
lostMessage_txt.text = String("You gave em hell..Congrats soldier!!!");
Tweener.addTween(lostMessage_txt, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(lostKillsOverall_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
Tweener.addTween(medalAwarding_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
Tweener.addTween(lostMessage2_txt, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutElastic"});
medalAwarding_txt.text = String("Major Medal");
medal_mc.gotoAndStop(11);
lostPostFrame_mc.scaleX = 0.1;
lostPad_mc.scaleY = 0.1;
lostPostFrame_mc.scaleX = 0.1;
lostPad_mc.scaleY = 0.1;
medal_mc.scaleX = 0.1;
medal_mc.scaleY = 0.1;
Tweener.addTween(lostPostFrame_mc, {scaleX:1, scaleY:1, time:1.2, transition:"easeOutElastic"});
Tweener.addTween(lostPad_mc, {scaleX:1, scaleY:1, time:1.4, transition:"easeOutElastic"});
Tweener.addTween(medal_mc, {scaleX:1, scaleY:1, time:1.6, transition:"easeOutElastic"});
btn_nav(achievementBack_btn, "title");
obj._O00OOl1Ol("award5");
obj._O01lOO10O(killsOverall);
}
public function btn_mg(_arg1:MovieClip, _arg2:String){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var whereTo = _arg2;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
Tweener.addTween(btn, {scaleX:1.2, scaleY:1.2, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(2);
};
mOut = function (_arg1:MouseEvent){
Tweener.addTween(btn, {scaleX:1, scaleY:1, time:1, transition:"easeOutElastic"});
btn.gotoAndStop(1);
};
clck = function (_arg1:MouseEvent){
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function plyW6Snd(){
if (music == "on"){
w6Snd.play();
};
}
public function firingFunction(){
if (fireWeapon == "open"){
if (weaponCounter == 1){
attPlayerAmmo1();
} else {
if (weaponCounter == 2){
if (ammo2Inventory > 0){
attPlayerAmmo2();
};
} else {
if (weaponCounter == 3){
if (ammo3Inventory > 0){
attPlayerAmmo3();
};
} else {
if (weaponCounter == 4){
if (ammo4Inventory > 0){
attPlayerAmmo4();
};
} else {
if (weaponCounter == 5){
if (ammo5Inventory > 0){
attPlayerAmmo5();
};
} else {
if (weaponCounter == 6){
if (ammo6Inventory > 0){
attPlayerAmmo6();
};
} else {
if (weaponCounter == 7){
if (ammo7Inventory > 0){
attPlayerAmmo7();
};
} else {
if (weaponCounter == 8){
if (ammo8Inventory > 0){
attPlayerAmmo8();
};
};
};
};
};
};
};
};
};
};
}
public function plyPwrSnd(){
if (music == "on"){
pwrSnd.play(0, 1);
};
}
public function btn_playLevel(_arg1:MovieClip, _arg2:Number){
var mOvr:Function;
var mOut:Function;
var clck:Function;
var btn = _arg1;
var lvlNum = _arg2;
mOvr = function (_arg1:MouseEvent){
plybtnSnd();
btn.gotoAndStop(2);
};
mOut = function (_arg1:MouseEvent){
btn.gotoAndStop(1);
};
clck = function (_arg1:MouseEvent){
var _local2:String;
btn.buttonMode = false;
btn.removeEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.removeEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.removeEventListener(MouseEvent.CLICK, clck);
_local2 = String(("lvl" + lvlNum));
gotoAndStop(_local2);
};
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_OVER, mOvr);
btn.addEventListener(MouseEvent.MOUSE_OUT, mOut);
btn.addEventListener(MouseEvent.CLICK, clck);
}
public function updateLvl(){
level++;
Tweener.addTween(promptLC_mc, {y:240, time:2, transition:"easeOutStrong"});
toPostLevelTimer.start();
levelComplete = true;
}
public function moveRoad(_arg1:MovieClip){
_arg1.x = (_arg1.x - 6);
if (_arg1.x <= -867.5){
if (_arg1 == lvlCntnr_mc.road1){
lvlCntnr_mc.road1.x = ((lvlCntnr_mc.road2.x + lvlCntnr_mc.road2.width) - 20);
};
if (_arg1 == lvlCntnr_mc.road2){
lvlCntnr_mc.road2.x = ((lvlCntnr_mc.road1.x + lvlCntnr_mc.road1.width) - 14);
};
};
}
public function toPostLevel(_arg1:TimerEvent){
stage.removeEventListener(Event.ENTER_FRAME, lpr);
toPostLevelTimer.reset();
if (level == 2){
weaponArray.push("spread");
} else {
if (level == 3){
weaponArray.push("fire");
} else {
if (level == 4){
weaponArray.push("vulcan");
} else {
if (level == 5){
} else {
if (level == 6){
weaponArray.push("laser");
} else {
if (level == 7){
weaponArray.push("m1");
} else {
if (level == 8){
} else {
if (level == 9){
weaponArray.push("m2");
};
};
};
};
};
};
};
};
endLevelCleanUpArray(enemyArray);
endLevelCleanUpArray(playerAmmo1Arr);
endLevelCleanUpArray(playerAmmo2Arr);
endLevelCleanUpArray(playerAmmo3Arr);
endLevelCleanUpArray(playerAmmo4Arr);
endLevelCleanUpArray(playerAmmo5Arr);
endLevelCleanUpArray(playerAmmo6Arr);
endLevelCleanUpArray(playerAmmo7Arr);
endLevelCleanUpArray(playerAmmo8Arr);
endLevelCleanUpArray(playerAmmo8aArr);
endLevelCleanUpArray(playerAmmo8bArr);
endLevelCleanUpArray(playerAmmo9Arr);
endLevelCleanUpArray(playerSpecial1Arr);
endLevelCleanUpArray(playerSpecial2Arr);
endLevelCleanUpArray(enemyArray);
endLevelCleanUpArray(enemyAmmoArray);
endLevelCleanUpArray(enemyAmmo1Array);
endLevelCleanUpArray(enemyAmmo2Array);
endLevelCleanUpArray(enemyAmmo3Array);
endLevelCleanUpArray(enemyAmmo4Array);
endLevelCleanUpArray(enemyAmmo5Array);
endLevelCleanUpArray(enemyAmmo6Array);
endLevelCleanUpArray(enemyAmmo7Array);
endLevelCleanUpArray(enemyAmmo8Array);
endLevelCleanUpArray(enemyAmmo9Array);
endLevelCleanUpArray(enemyAmmo10Array);
endLevelCleanUpArray(enemyDestroyableAmmoArray);
endLevelCleanUpArray(bossArray);
endLevelCleanUpArray(boss1Ammo1Array);
endLevelCleanUpArray(boss2Ammo1Array);
endLevelCleanUpArray(boss2Ammo2Array);
endLevelCleanUpArray(boss3Ammo1Array);
endLevelCleanUpArray(boss3Ammo2Array);
endLevelCleanUpArray(boss3Ammo3Array);
endLevelCleanUpArray(powerupArray);
endLevelCleanUpArray(explosionArray);
endLevelCleanUpArray(debrisArray);
endLevelCleanUpArray(smokeArray);
trace("POST LEVEL");
killsOverall = (killsOverall + killsLevel);
if (dead == "true"){
lsoDel();
switch (level){
case 1:
enDeployTimerLvl1.removeEventListener(TimerEvent.TIMER, enDeployLvl1);
enDeployTimerLvl1.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 2:
enDeployTimerLvl2.removeEventListener(TimerEvent.TIMER, enDeployLvl2);
enDeployTimerLvl2.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 3:
enDeployTimerLvl3.removeEventListener(TimerEvent.TIMER, enDeployLvl3);
enDeployTimerLvl3.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 4:
enDeployTimerLvl4.removeEventListener(TimerEvent.TIMER, enDeployLvl4);
enDeployTimerLvl4.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 5:
enDeployTimerLvl5.removeEventListener(TimerEvent.TIMER, enDeployLvl5);
enDeployTimerLvl5.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 6:
enDeployTimerLvl6.removeEventListener(TimerEvent.TIMER, enDeployLvl6);
enDeployTimerLvl6.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 7:
enDeployTimerLvl7.removeEventListener(TimerEvent.TIMER, enDeployLvl7);
enDeployTimerLvl7.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 8:
enDeployTimerLvl8.removeEventListener(TimerEvent.TIMER, enDeployLvl8);
enDeployTimerLvl8.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 9:
enDeployTimerLvl9.removeEventListener(TimerEvent.TIMER, enDeployLvl9);
enDeployTimerLvl9.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
case 10:
enDeployTimerLvl10.removeEventListener(TimerEvent.TIMER, enDeployLvl10);
enDeployTimerLvl10.removeEventListener(TimerEvent.TIMER_COMPLETE, endOfEnemyDeployment);
break;
default:
break;
};
this.gotoAndStop("postLevelLost");
} else {
if (dead == "false"){
if (level < 11){
this.gotoAndStop("postLevelWin");
} else {
this.gotoAndStop("finish");
};
};
};
}
public function plyW7Snd(){
if (music == "on"){
w7Snd.play();
};
}
public function attEnemy7Ammo(_arg1:MovieClip){
var _local2:Enemy7Ammo;
_local2 = new Enemy7Ammo(_arg1);
lvlCntnr_mc.addChild(_local2);
enemyAmmo7Array.push(_local2);
}
public function moveSea(_arg1:MovieClip){
_arg1.x = (_arg1.x - 6);
if (_arg1.x <= -738.7){
if (_arg1 == lvlCntnr_mc.sea1){
lvlCntnr_mc.sea1.x = ((lvlCntnr_mc.sea2.x + lvlCntnr_mc.sea2.width) - 14);
};
if (_arg1 == lvlCntnr_mc.sea2){
lvlCntnr_mc.sea2.x = ((lvlCntnr_mc.sea1.x + lvlCntnr_mc.sea1.width) - 14);
};
};
}
public function suitSelectionSlider(){
if (suitCode == 1){
lifeNumerator = 100;
lifeDenominator = 100;
mouseFollowSpeed = 0.75;
Tweener.addTween(suitSelectionPanel1_mc.suitInfoPanel_mc.slider, {x:0, time:0.5, transition:"easeOutStrong"});
Tweener.addTween(suitSelectionPanel3_mc.suitPanel_mc.suitSelectioSlider_mc, {x:210, time:0.5, transition:"easeOutStrong"});
} else {
if (suitCode == 2){
lifeNumerator = 150;
lifeDenominator = 150;
mouseFollowSpeed = 0.81;
Tweener.addTween(suitSelectionPanel1_mc.suitInfoPanel_mc.slider, {x:-340, time:0.5, transition:"easeOutStrong"});
Tweener.addTween(suitSelectionPanel3_mc.suitPanel_mc.suitSelectioSlider_mc, {x:-3.8, time:0.5, transition:"easeOutStrong"});
} else {
if (suitCode == 3){
lifeNumerator = 200;
lifeDenominator = 200;
mouseFollowSpeed = 0.88;
Tweener.addTween(suitSelectionPanel1_mc.suitInfoPanel_mc.slider, {x:-670, time:0.5, transition:"easeOutStrong"});
Tweener.addTween(suitSelectionPanel3_mc.suitPanel_mc.suitSelectioSlider_mc, {x:-205, time:0.5, transition:"easeOutStrong"});
};
};
};
}
public function titleLooper(_arg1:Event){
if (this.currentFrame == 2){
cld(cld1_mc);
cld(cld2_mc);
cld(cld3_mc);
} else {
this.removeEventListener(Event.ENTER_FRAME, titleLooper);
};
}
public function lsoChecker(){
if (paperWarfareSharedObject.data.gameDataExist != undefined){
suitCode = paperWarfareSharedObject.data.suitCode_so;
lifeNumerator = paperWarfareSharedObject.data.lifeNumerator_so;
lifeDenominator = paperWarfareSharedObject.data.lifeDenominator_so;
lives = paperWarfareSharedObject.data.lives_so;
mouseFollowSpeed = paperWarfareSharedObject.data.mouseFollowSpeed_so;
killScore = 0;
killsOverall = paperWarfareSharedObject.data.killsOverall_so;
killsLevel = paperWarfareSharedObject.data.killsLevel_so;
level = paperWarfareSharedObject.data.level_so;
ammo1Inventory = paperWarfareSharedObject.data.ammo1Inventory_so;
ammo2Inventory = paperWarfareSharedObject.data.ammo2Inventory_so;
ammo3Inventory = paperWarfareSharedObject.data.ammo3Inventory_so;
ammo4Inventory = paperWarfareSharedObject.data.ammo4Inventory_so;
ammo5Inventory = paperWarfareSharedObject.data.ammo5Inventory_so;
ammo6Inventory = paperWarfareSharedObject.data.ammo6Inventory_so;
ammo7Inventory = paperWarfareSharedObject.data.ammo7Inventory_so;
ammo8Inventory = paperWarfareSharedObject.data.ammo8Inventory_so;
shield = paperWarfareSharedObject.data.shield_so;
emp = paperWarfareSharedObject.data.emp_so;
weaponArray = new Array();
if (level == 1){
weaponArray.push("w1");
weaponArray.push("w2");
} else {
if (level == 2){
weaponArray.push("w1");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 3){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 4){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 5){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 6){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 7){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 8){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 9){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
} else {
if (level == 10){
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
weaponArray.push("w2");
};
};
};
};
};
};
};
};
};
};
} else {
suitCode = 1;
lifeNumerator = 100;
lifeDenominator = 100;
lives = 3;
mouseFollowSpeed = 0.75;
killScore = 0;
killsOverall = 0;
killsLevel = 0;
level = 1;
ammo1Inventory = ammo1Max;
ammo2Inventory = ammo2Max;
ammo3Inventory = ammo3Max;
ammo4Inventory = ammo4Max;
ammo5Inventory = ammo5Max;
ammo6Inventory = ammo6Max;
ammo7Inventory = ammo7Max;
ammo8Inventory = ammo8Max;
shield = "unarmed";
emp = "unarmed";
weaponArray = new Array();
weaponArray.push("proton");
weaponArray.push("burst");
};
}
public function animate(_arg1:MovieClip, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean){
disObj = _arg1;
propertyToAnimate = _arg2;
EasingFunction = _arg3;
beginPos = _arg4;
endPos = _arg5;
duration = _arg6;
useSeconds = _arg7;
twn = new Tween(_arg1, propertyToAnimate, EasingFunction, beginPos, endPos, duration, useSeconds);
}
public function deployEnemy(_arg1:TimerEvent){
}
public function updateKillScore(_arg1:Number){
killScore = (killScore + _arg1);
}
public function moveTree(_arg1:MovieClip){
_arg1.x = (_arg1.x - 6);
if (_arg1.x < -150){
_arg1.x = (Math.floor((Math.random() * (1000 - 720))) + 720);
};
}
public function lsoDel(){
delete paperWarfareSharedObject.data.gameDataExist;
delete paperWarfareSharedObject.data.level_so;
delete paperWarfareSharedObject.data.killsOverall_so;
delete paperWarfareSharedObject.data.ammo1Inventory_so;
delete paperWarfareSharedObject.data.ammo2Inventory_so;
delete paperWarfareSharedObject.data.ammo3Inventory_so;
delete paperWarfareSharedObject.data.ammo4Inventory_so;
delete paperWarfareSharedObject.data.ammo5Inventory_so;
delete paperWarfareSharedObject.data.ammo6Inventory_so;
delete paperWarfareSharedObject.data.ammo7Inventory_so;
delete paperWarfareSharedObject.data.ammo8Inventory_so;
delete paperWarfareSharedObject.data.suitCode_so;
delete paperWarfareSharedObject.data.mouseFollowSpeed_so;
delete paperWarfareSharedObject.data.lifeNumerator_so;
delete paperWarfareSharedObject.data.lifeDenominator_so;
delete paperWarfareSharedObject.data.lives_so;
delete paperWarfareSharedObject.data.weaponArray_so;
delete paperWarfareSharedObject.data.shield_so;
delete paperWarfareSharedObject.data.emp_so;
}
public function attEnemy6Ammo(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Enemy6Ammo;
_local2 = 220;
_local3 = 0;
while (_local3 < 3) {
_local2 = (_local2 - 20);
_local4 = new Enemy6Ammo(_arg1, _local2);
lvlCntnr_mc.addChild(_local4);
enemyAmmo6Array.push(_local4);
_local3++;
};
}
public function instanceLooper(_arg1:Array){
var _local2:Number;
_local2 = (_arg1.length - 1);
while (_local2 >= 0) {
_arg1[_local2].looper();
_local2--;
};
}
public function enDeployLvl6(_arg1:TimerEvent){
enDeployLvl6Wave++;
trace(enDeployLvl6Wave);
switch (enDeployLvl6Wave){
case 1:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 2:
attEnemy2(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 3:
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 4:
attPwrUp3();
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 5:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 6:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
break;
case 7:
attEnemy1(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 8:
attPwrUp6();
attEnemy3(1);
attEnemy5(1);
attEnemy7(1);
break;
case 9:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 10:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 11:
attEnemy1(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 12:
attPwrUp1();
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy7(1);
break;
case 13:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 14:
attEnemy1(1);
attEnemy2(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 15:
attEnemy1(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 16:
attPwrUp6();
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 17:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy7(1);
break;
case 18:
attEnemy1(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 19:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy7(1);
break;
case 20:
attPwrUp6();
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy7(1);
break;
case 21:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy7(1);
break;
case 22:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
attEnemy7(1);
break;
case 23:
attEnemy1(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 24:
attPwrUp1();
attEnemy1(1);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 25:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
attEnemy7(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy7(1);
break;
case 27:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy7(1);
break;
case 28:
attPwrUp3();
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy7(1);
break;
case 29:
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 30:
attBoss2();
Tweener.addTween(bossLifeUI_mc, {y:459, time:1, transition:"linear"});
break;
default:
break;
};
}
public function enDeployLvl1(_arg1:TimerEvent){
enDeployLvl1Wave++;
trace(enDeployLvl1Wave);
switch (enDeployLvl1Wave){
case 1:
attEnemy1(1);
break;
case 2:
attEnemy2(1);
break;
case 3:
attEnemy1(2);
break;
case 4:
attPwrUp1();
attEnemy2(1);
break;
case 5:
attEnemy1(1);
break;
case 6:
attEnemy2(2);
break;
case 7:
attEnemy1(2);
break;
case 8:
attPwrUp3();
attEnemy1(2);
break;
case 9:
attEnemy2(2);
break;
case 10:
attEnemy1(2);
break;
case 11:
attEnemy2(2);
break;
case 12:
attPwrUp3();
attEnemy1(2);
break;
case 13:
attEnemy2(2);
break;
case 14:
attEnemy1(2);
break;
case 15:
attEnemy2(2);
break;
case 16:
attPwrUp1();
attEnemy1(2);
break;
case 17:
attEnemy2(2);
break;
case 18:
attEnemy1(2);
break;
default:
break;
};
}
public function enDeployLvl3(_arg1:TimerEvent){
enDeployLvl3Wave++;
trace(enDeployLvl3Wave);
switch (enDeployLvl3Wave){
case 1:
attEnemy4(2);
break;
case 2:
attEnemy3(1);
attEnemy4(1);
break;
case 3:
attEnemy1(1);
attEnemy2(1);
break;
case 4:
attPwrUp3();
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
break;
case 5:
attEnemy4(2);
break;
case 6:
attEnemy1(2);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 7:
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 8:
attPwrUp3();
attEnemy3(2);
attEnemy4(1);
break;
case 9:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
break;
case 10:
attEnemy1(2);
attEnemy4(1);
break;
case 11:
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 12:
attPwrUp1();
attEnemy1(1);
attEnemy2(2);
attEnemy4(1);
break;
case 13:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
break;
case 14:
attEnemy1(1);
attEnemy3(2);
attEnemy4(1);
break;
case 15:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
break;
case 16:
attPwrUp1();
attEnemy1(1);
attEnemy3(2);
attEnemy4(1);
break;
case 17:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 18:
attEnemy1(2);
attEnemy2(1);
attEnemy4(1);
break;
case 19:
attEnemy2(2);
attEnemy3(1);
attEnemy4(1);
break;
case 20:
attPwrUp3();
attEnemy2(2);
attEnemy4(1);
break;
case 21:
attEnemy1(1);
attEnemy3(2);
attEnemy4(1);
break;
case 22:
attBoss1();
Tweener.addTween(bossLifeUI_mc, {y:459, time:1, transition:"linear"});
break;
default:
break;
};
}
public function enDeployLvl5(_arg1:TimerEvent){
enDeployLvl5Wave++;
trace(enDeployLvl5Wave);
switch (enDeployLvl5Wave){
case 1:
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 2:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 3:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
break;
case 4:
attPwrUp3();
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
break;
case 5:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
break;
case 6:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 7:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 8:
attPwrUp6();
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 9:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
break;
case 10:
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
break;
case 11:
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 12:
attPwrUp3();
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 13:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 14:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
break;
case 15:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
break;
case 16:
attPwrUp1();
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 17:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 18:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 19:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
attEnemy6(1);
break;
case 20:
attPwrUp6();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 21:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 22:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
break;
case 23:
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 24:
attPwrUp2();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy6(1);
break;
case 25:
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy5(1);
attEnemy6(1);
break;
case 27:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 28:
attPwrUp3();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 29:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
case 30:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
attEnemy6(1);
break;
default:
break;
};
}
public function enDeployLvl8(_arg1:TimerEvent){
enDeployLvl8Wave++;
switch (enDeployLvl8Wave){
case 1:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy9(1);
break;
case 2:
attEnemy2(1);
attEnemy4(1);
attEnemy8(2);
attEnemy6(1);
attEnemy7(1);
break;
case 3:
attEnemy3(2);
attEnemy4(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 4:
attPwrUp7();
attEnemy9(1);
attEnemy5(1);
attEnemy8(1);
attEnemy7(1);
break;
case 5:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 6:
attEnemy1(1);
attEnemy2(1);
attEnemy8(2);
break;
case 7:
attEnemy1(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 8:
attPwrUp3();
attEnemy3(2);
attEnemy9(1);
attEnemy7(1);
break;
case 9:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy8(1);
attEnemy7(1);
break;
case 10:
attEnemy9(1);
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 11:
attEnemy1(1);
attEnemy3(2);
attEnemy6(1);
attEnemy7(1);
break;
case 12:
attPwrUp6();
attEnemy9(1);
attEnemy3(1);
attEnemy8(1);
attEnemy7(1);
break;
case 13:
attEnemy1(1);
attEnemy3(2);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 14:
attEnemy1(1);
attEnemy2(2);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 15:
attEnemy1(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 16:
attPwrUp3();
attEnemy1(1);
attEnemy3(1);
attEnemy8(1);
attEnemy9(1);
attEnemy7(1);
break;
case 17:
attEnemy1(1);
attEnemy2(2);
attEnemy4(1);
attEnemy8(1);
attEnemy9(1);
break;
case 18:
attEnemy1(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 19:
attEnemy1(2);
attEnemy2(1);
attEnemy3(1);
attEnemy9(1);
break;
case 20:
attPwrUp1();
attEnemy1(1);
attEnemy3(1);
attEnemy9(1);
attEnemy7(1);
break;
case 21:
attEnemy1(2);
attEnemy2(1);
attEnemy9(1);
attEnemy7(1);
break;
case 22:
attEnemy1(1);
attEnemy9(1);
attEnemy8(1);
attEnemy7(1);
break;
case 23:
attEnemy1(1);
attEnemy3(1);
attEnemy8(2);
attEnemy7(1);
break;
case 24:
attPwrUp3();
attEnemy1(1);
attEnemy9(1);
attEnemy8(2);
attEnemy7(1);
break;
case 25:
attEnemy1(2);
attEnemy4(1);
attEnemy9(1);
attEnemy7(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy8(1);
attEnemy7(1);
break;
case 27:
attEnemy1(1);
attEnemy9(2);
attEnemy5(1);
attEnemy7(1);
break;
case 28:
attPwrUp7();
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy9(1);
break;
case 29:
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 30:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 31:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 32:
attPwrUp1();
attEnemy9(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 33:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 34:
attEnemy1(1);
attEnemy2(1);
attEnemy9(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 35:
attPwrUp3();
attEnemy9(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
default:
break;
};
}
public function enDeployLvl2(_arg1:TimerEvent){
enDeployLvl2Wave++;
trace(enDeployLvl2Wave);
switch (enDeployLvl2Wave){
case 1:
attEnemy3(1);
break;
case 2:
attEnemy2(1);
attEnemy3(1);
break;
case 3:
attEnemy2(2);
break;
case 4:
attPwrUp1();
attEnemy2(1);
attEnemy3(1);
break;
case 5:
attEnemy1(2);
attEnemy3(1);
break;
case 6:
attEnemy1(1);
attEnemy2(2);
break;
case 7:
attEnemy2(2);
attEnemy3(1);
break;
case 8:
attPwrUp3();
attEnemy2(1);
attEnemy3(1);
break;
case 9:
attEnemy1(1);
attEnemy3(2);
break;
case 10:
attEnemy2(1);
attEnemy3(1);
break;
case 11:
attEnemy1(1);
attEnemy3(2);
break;
case 12:
attPwrUp3();
attEnemy2(1);
attEnemy3(1);
break;
case 13:
attEnemy1(2);
attEnemy3(1);
break;
case 14:
attEnemy2(1);
attEnemy3(1);
break;
case 15:
attEnemy1(1);
attEnemy3(2);
break;
case 16:
attPwrUp1();
attEnemy1(1);
attEnemy3(1);
break;
case 17:
attEnemy2(2);
attEnemy3(1);
break;
case 18:
attEnemy2(1);
attEnemy3(1);
break;
case 19:
attEnemy1(1);
attEnemy3(2);
break;
case 20:
attPwrUp3();
attEnemy3(2);
break;
default:
break;
};
}
public function enDeployLvl4(_arg1:TimerEvent){
enDeployLvl4Wave++;
trace(enDeployLvl4Wave);
switch (enDeployLvl4Wave){
case 1:
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 2:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
break;
case 3:
attEnemy4(1);
attEnemy5(1);
break;
case 4:
attPwrUp1();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 5:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
break;
case 6:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
break;
case 7:
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
break;
case 8:
attPwrUp3();
attEnemy1(2);
attEnemy2(1);
attEnemy5(1);
break;
case 9:
attEnemy1(1);
attEnemy4(2);
attEnemy5(1);
break;
case 10:
attEnemy2(2);
attEnemy4(1);
attEnemy5(1);
break;
case 11:
attEnemy4(1);
break;
case 12:
attPwrUp1();
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
break;
case 13:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
break;
case 14:
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
break;
case 15:
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 16:
attPwrUp3();
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 17:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 18:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
break;
case 19:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
break;
case 20:
attPwrUp3();
attEnemy3(1);
attEnemy4(1);
attEnemy5(1);
break;
case 21:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
break;
case 22:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy5(1);
break;
case 23:
attEnemy2(1);
attEnemy3(1);
attEnemy5(1);
break;
case 24:
attPwrUp2();
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy4(1);
break;
case 25:
attEnemy1(1);
attEnemy4(1);
attEnemy5(1);
break;
default:
break;
};
}
public function attPwrUpInfo(_arg1:MovieClip, _arg2:Number){
var _local3:PowerUpInfo;
_local3 = new PowerUpInfo(_arg1.x, (_arg1.y - 50), _arg2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function lpr(_arg1:Event){
if ((((level == 1)) && ((levelComplete == false)))){
if ((((enDeployLvl1Wave >= enDeployLvl1WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 2)) && ((levelComplete == false)))){
if ((((enDeployLvl2Wave >= enDeployLvl2WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 3)) && ((levelComplete == false)))){
if ((((((enDeployLvl3Wave >= enDeployLvl3WaveMax)) && ((enemyArray.length == 0)))) && ((bossArray.length == 0)))){
updateLvl();
};
};
if ((((level == 4)) && ((levelComplete == false)))){
if ((((enDeployLvl4Wave >= enDeployLvl4WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 5)) && ((levelComplete == false)))){
if ((((enDeployLvl5Wave >= enDeployLvl5WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 6)) && ((levelComplete == false)))){
if ((((((enDeployLvl6Wave >= enDeployLvl6WaveMax)) && ((enemyArray.length == 0)))) && ((bossArray.length == 0)))){
updateLvl();
};
};
if ((((level == 7)) && ((levelComplete == false)))){
if ((((enDeployLvl7Wave >= enDeployLvl7WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 8)) && ((levelComplete == false)))){
if ((((enDeployLvl8Wave >= enDeployLvl8WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 9)) && ((levelComplete == false)))){
if ((((enDeployLvl9Wave >= enDeployLvl9WaveMax)) && ((enemyArray.length == 0)))){
updateLvl();
};
};
if ((((level == 10)) && ((levelComplete == false)))){
if ((((((enDeployLvl10Wave >= enDeployLvl10WaveMax)) && ((enemyArray.length == 0)))) && ((bossArray.length == 0)))){
updateLvl();
};
};
if (gameState == "running"){
moveCloud(lvlCntnr_mc.cld1_mc);
moveCloud(lvlCntnr_mc.cld2_mc);
moveCloud(lvlCntnr_mc.cld3_mc);
moveCloud(lvlCntnr_mc.cld4_mc);
if (nwLvl == 1){
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
} else {
if (nwLvl == 2){
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
moveSea(lvlCntnr_mc.sea1);
moveSea(lvlCntnr_mc.sea2);
} else {
if (nwLvl == 3){
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
} else {
if (nwLvl == 4){
moveSand(lvlCntnr_mc.s1, 2.5);
moveSand(lvlCntnr_mc.s2, 2.5);
moveSand(lvlCntnr_mc.s3, 1);
moveSand(lvlCntnr_mc.s4, 1);
moveSand(lvlCntnr_mc.s5, 0.2);
moveSand(lvlCntnr_mc.s6, 0.2);
moveDesertHouse(lvlCntnr_mc.dh1);
moveDesertHouse(lvlCntnr_mc.dh2);
moveDesertHouse(lvlCntnr_mc.dh3);
} else {
if (nwLvl == 5){
moveSand(lvlCntnr_mc.s1, 2.5);
moveSand(lvlCntnr_mc.s2, 2.5);
moveSand(lvlCntnr_mc.s3, 1);
moveSand(lvlCntnr_mc.s4, 1);
moveSand(lvlCntnr_mc.s5, 0.2);
moveSand(lvlCntnr_mc.s6, 0.2);
moveDesertHouse(lvlCntnr_mc.dh1);
moveDesertHouse(lvlCntnr_mc.dh2);
moveDesertHouse(lvlCntnr_mc.dh3);
} else {
if (nwLvl == 6){
moveSand(lvlCntnr_mc.s1, 2.5);
moveSand(lvlCntnr_mc.s2, 2.5);
moveSand(lvlCntnr_mc.s3, 1);
moveSand(lvlCntnr_mc.s4, 1);
moveSand(lvlCntnr_mc.s5, 0.2);
moveSand(lvlCntnr_mc.s6, 0.2);
moveDesertHouse(lvlCntnr_mc.dh1);
moveDesertHouse(lvlCntnr_mc.dh2);
moveDesertHouse(lvlCntnr_mc.dh3);
} else {
if (nwLvl == 7){
moveRoad(lvlCntnr_mc.road1);
moveRoad(lvlCntnr_mc.road2);
moveBuilding(lvlCntnr_mc.b1);
moveBuilding(lvlCntnr_mc.b2);
moveBuilding(lvlCntnr_mc.b3);
moveBuilding(lvlCntnr_mc.b4);
moveBuilding(lvlCntnr_mc.b5);
moveBuilding(lvlCntnr_mc.b6);
moveBuilding(lvlCntnr_mc.b7);
moveBuilding(lvlCntnr_mc.b8);
moveBuilding(lvlCntnr_mc.b9);
moveBuilding(lvlCntnr_mc.b10);
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
} else {
if (nwLvl == 8){
moveRoad(lvlCntnr_mc.road1);
moveRoad(lvlCntnr_mc.road2);
moveBuilding(lvlCntnr_mc.b1);
moveBuilding(lvlCntnr_mc.b2);
moveBuilding(lvlCntnr_mc.b3);
moveBuilding(lvlCntnr_mc.b4);
moveBuilding(lvlCntnr_mc.b5);
moveBuilding(lvlCntnr_mc.b6);
moveBuilding(lvlCntnr_mc.b7);
moveBuilding(lvlCntnr_mc.b8);
moveBuilding(lvlCntnr_mc.b9);
moveBuilding(lvlCntnr_mc.b10);
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
} else {
if (nwLvl == 9){
moveRoad(lvlCntnr_mc.road1);
moveRoad(lvlCntnr_mc.road2);
moveBuilding(lvlCntnr_mc.b1);
moveBuilding(lvlCntnr_mc.b2);
moveBuilding(lvlCntnr_mc.b3);
moveBuilding(lvlCntnr_mc.b4);
moveBuilding(lvlCntnr_mc.b5);
moveBuilding(lvlCntnr_mc.b6);
moveBuilding(lvlCntnr_mc.b7);
moveBuilding(lvlCntnr_mc.b8);
moveBuilding(lvlCntnr_mc.b9);
moveBuilding(lvlCntnr_mc.b10);
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
moveTree(lvlCntnr_mc.t1);
moveTree(lvlCntnr_mc.t2);
moveTree(lvlCntnr_mc.t3);
moveTree(lvlCntnr_mc.t4);
moveTree(lvlCntnr_mc.t5);
moveTree(lvlCntnr_mc.t6);
moveTree(lvlCntnr_mc.t7);
moveTree(lvlCntnr_mc.t8);
moveTree(lvlCntnr_mc.t9);
} else {
if (nwLvl == 10){
moveRoad(lvlCntnr_mc.road1);
moveRoad(lvlCntnr_mc.road2);
moveBuilding(lvlCntnr_mc.b1);
moveBuilding(lvlCntnr_mc.b2);
moveBuilding(lvlCntnr_mc.b3);
moveBuilding(lvlCntnr_mc.b4);
moveBuilding(lvlCntnr_mc.b5);
moveBuilding(lvlCntnr_mc.b6);
moveBuilding(lvlCntnr_mc.b7);
moveBuilding(lvlCntnr_mc.b8);
moveBuilding(lvlCntnr_mc.b9);
moveBuilding(lvlCntnr_mc.b10);
moveMountain(lvlCntnr_mc.m1);
moveMountain(lvlCntnr_mc.m2);
moveMountain(lvlCntnr_mc.m3);
moveMountain(lvlCntnr_mc.m4);
moveTree(lvlCntnr_mc.t1);
moveTree(lvlCntnr_mc.t2);
moveTree(lvlCntnr_mc.t3);
moveTree(lvlCntnr_mc.t4);
moveTree(lvlCntnr_mc.t5);
moveTree(lvlCntnr_mc.t6);
moveTree(lvlCntnr_mc.t7);
moveTree(lvlCntnr_mc.t8);
moveTree(lvlCntnr_mc.t9);
};
};
};
};
};
};
};
};
};
};
plyrAmmoAndEnemyCheckHit(playerAmmo1Arr, enemyArray, 4);
plyrAmmoAndEnemyCheckHit(playerAmmo2Arr, enemyArray, 11);
plyrAmmoAndEnemyCheckHit(playerAmmo3Arr, enemyArray, 11);
plyrAmmoAndEnemyCheckHit(playerAmmo4Arr, enemyArray, 8);
plyrAmmoAndEnemyCheckHit(playerAmmo5Arr, enemyArray, 8);
plyrAmmoAndEnemyCheckHit(playerAmmo6Arr, enemyArray, 10);
plyrAmmoAndEnemyCheckHit(playerAmmo7Arr, enemyArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8Arr, enemyArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8aArr, enemyArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8bArr, enemyArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo1Arr, bossArray, 4);
plyrAmmoAndEnemyCheckHit(playerAmmo2Arr, bossArray, 11);
plyrAmmoAndEnemyCheckHit(playerAmmo3Arr, bossArray, 11);
plyrAmmoAndEnemyCheckHit(playerAmmo4Arr, bossArray, 8);
plyrAmmoAndEnemyCheckHit(playerAmmo5Arr, bossArray, 10);
plyrAmmoAndEnemyCheckHit(playerAmmo6Arr, bossArray, 4);
plyrAmmoAndEnemyCheckHit(playerAmmo7Arr, bossArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8Arr, bossArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8aArr, bossArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8bArr, bossArray, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo1Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo2Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo3Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo4Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo5Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo6Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo7Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8Arr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8aArr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8bArr, enemyAmmo5Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo1Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo2Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo3Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo4Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo5Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo6Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo7Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8Arr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8aArr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8bArr, boss2Ammo2Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo1Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo2Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo3Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo4Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo5Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo6Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo7Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8Arr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8aArr, boss3Ammo3Array, 100);
plyrAmmoAndEnemyCheckHit(playerAmmo8bArr, boss3Ammo3Array, 100);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo1Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo2Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo3Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo4Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo5Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo6Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo7Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo8Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo9Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyAmmo10Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, enemyArray, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss1Ammo1Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss2Ammo1Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss2Ammo2Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss3Ammo1Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss3Ammo2Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial1Arr, boss3Ammo3Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial2Arr, enemyAmmo5Array, 20);
plyrSpecialAndEnemyCheckHit(playerSpecial2Arr, enemyArray, 20);
enemyAndPlyrCheckHit(enemyArray);
enemyAmmoAndPlayrCheckHit(enemyAmmo1Array, 2);
enemyAmmoAndPlayrCheckHit(enemyAmmo2Array, 3);
enemyAmmoAndPlayrCheckHit(enemyAmmo3Array, 5);
enemyAmmoAndPlayrCheckHit(enemyAmmo4Array, 5);
enemyAmmoAndPlayrCheckHit(enemyAmmo5Array, 7);
enemyAmmoAndPlayrCheckHit(enemyAmmo6Array, 3);
enemyAmmoAndPlayrCheckHit(enemyAmmo7Array, 3);
enemyAmmoAndPlayrCheckHit(enemyAmmo8Array, 3);
enemyAmmoAndPlayrCheckHit(enemyAmmo9Array, 4);
enemyAmmoAndPlayrCheckHit(enemyAmmo10Array, 5);
enemyAmmoAndPlayrCheckHit(boss1Ammo1Array, 5);
enemyAmmoAndPlayrCheckHit(boss2Ammo1Array, 6);
enemyAmmoAndPlayrCheckHit(boss2Ammo2Array, 7);
enemyAmmoAndPlayrCheckHit(boss3Ammo1Array, 6);
enemyAmmoAndPlayrCheckHit(boss3Ammo2Array, 5);
enemyAmmoAndPlayrCheckHit(boss3Ammo3Array, 5);
instanceLooper(playerAmmo1Arr);
instanceLooper(playerAmmo2Arr);
instanceLooper(playerAmmo3Arr);
instanceLooper(playerAmmo4Arr);
instanceLooper(playerAmmo5Arr);
instanceLooper(playerAmmo6Arr);
instanceLooper(playerAmmo7Arr);
instanceLooper(playerAmmo8Arr);
instanceLooper(playerAmmo8aArr);
instanceLooper(playerAmmo8bArr);
instanceLooper(playerSpecial1Arr);
instanceLooper(playerSpecial2Arr);
instanceLooper(enemyArray);
instanceLooper(enemyAmmoArray);
instanceLooper(enemyAmmo1Array);
instanceLooper(enemyAmmo2Array);
instanceLooper(enemyAmmo3Array);
instanceLooper(enemyAmmo4Array);
instanceLooper(enemyAmmo5Array);
instanceLooper(enemyAmmo6Array);
instanceLooper(enemyAmmo7Array);
instanceLooper(enemyAmmo8Array);
instanceLooper(enemyAmmo9Array);
instanceLooper(enemyAmmo10Array);
instanceLooper(bossArray);
instanceLooper(boss1Ammo1Array);
instanceLooper(boss2Ammo1Array);
instanceLooper(boss2Ammo2Array);
instanceLooper(boss3Ammo1Array);
instanceLooper(boss3Ammo2Array);
instanceLooper(boss3Ammo3Array);
instanceLooper(powerupArray);
instanceLooper(smokeArray);
instanceLooper(debrisArray);
instanceLooper(explosionArray);
updateUI();
if (suitCode == 3){
mouseFollowControl(lvlCntnr_mc.hevArmor_mc);
plyrAnimation(lvlCntnr_mc.hevArmor_mc);
weaponToBeShown(lvlCntnr_mc.hevArmor_mc.weapon_mc);
} else {
if (suitCode == 2){
mouseFollowControl(lvlCntnr_mc.medArmor_mc);
plyrAnimation(lvlCntnr_mc.medArmor_mc);
weaponToBeShown(lvlCntnr_mc.medArmor_mc.weapon_mc);
} else {
if (suitCode == 1){
mouseFollowControl(lvlCntnr_mc.lightArmor_mc);
plyrAnimation(lvlCntnr_mc.lightArmor_mc);
weaponToBeShown(lvlCntnr_mc.lightArmor_mc.weapon_mc);
};
};
};
firingFunction();
playerTrail();
};
}
public function attSmokeTrail(_arg1:MovieClip){
var _local2:SmokeTrail;
_local2 = new SmokeTrail(_arg1);
lvlCntnr_mc.addChild(_local2);
smokeArray.push(_local2);
}
public function enDeployLvl7(_arg1:TimerEvent){
enDeployLvl7Wave++;
switch (enDeployLvl7Wave){
case 1:
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 2:
attEnemy2(1);
attEnemy8(2);
attEnemy6(1);
attEnemy7(1);
break;
case 3:
attEnemy3(2);
attEnemy4(1);
attEnemy6(1);
attEnemy7(1);
break;
case 4:
attEnemy5(1);
attEnemy8(1);
attEnemy7(1);
break;
case 5:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 6:
attEnemy1(1);
attEnemy2(1);
attEnemy8(2);
break;
case 7:
attEnemy1(1);
attEnemy3(1);
attEnemy6(1);
attEnemy7(1);
break;
case 8:
attPwrUp3();
attEnemy3(2);
attEnemy8(1);
attEnemy7(1);
break;
case 9:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy8(1);
attEnemy7(1);
break;
case 10:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 11:
attEnemy1(1);
attEnemy3(2);
attEnemy6(1);
attEnemy7(1);
break;
case 12:
attPwrUp2();
attEnemy1(1);
attEnemy3(1);
attEnemy8(1);
attEnemy7(1);
break;
case 13:
attEnemy1(1);
attEnemy3(2);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 14:
attEnemy1(1);
attEnemy2(2);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 15:
attEnemy1(1);
attEnemy5(1);
attEnemy6(1);
attEnemy7(1);
break;
case 16:
attPwrUp6();
attEnemy1(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 17:
attEnemy1(1);
attEnemy2(2);
attEnemy4(1);
attEnemy8(1);
attEnemy7(1);
break;
case 18:
attEnemy1(1);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 19:
attEnemy1(2);
attEnemy2(1);
attEnemy3(1);
attEnemy7(1);
break;
case 20:
attPwrUp1();
attEnemy1(1);
attEnemy3(1);
attEnemy8(1);
attEnemy7(1);
break;
case 21:
attEnemy1(2);
attEnemy2(1);
attEnemy4(1);
attEnemy7(1);
break;
case 22:
attEnemy1(1);
attEnemy4(1);
attEnemy8(1);
attEnemy7(1);
break;
case 23:
attEnemy1(1);
attEnemy3(1);
attEnemy8(2);
attEnemy7(1);
break;
case 24:
attPwrUp3();
attEnemy1(1);
attEnemy4(1);
attEnemy8(2);
attEnemy7(1);
break;
case 25:
attEnemy1(2);
attEnemy4(1);
attEnemy8(1);
attEnemy7(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy8(1);
attEnemy7(1);
break;
case 27:
attEnemy1(1);
attEnemy8(2);
attEnemy5(1);
attEnemy7(1);
break;
case 28:
attPwrUp3();
attEnemy1(1);
attEnemy3(1);
attEnemy4(1);
attEnemy8(1);
break;
case 29:
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 30:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
default:
break;
};
}
public function attPlayerAmmo8(){
var _local1:PlayerAmmo8;
playerAmmo8Rof--;
if (playerAmmo8Rof == 0){
plyW7Snd();
_local1 = new PlayerAmmo8((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo8Arr.push(_local1);
updateAmmoInventory();
playerAmmo8Rof = 10;
};
}
public function attPlayerAmmo5(){
var _local1:PlayerAmmo5;
playerAmmo5Rof--;
if (playerAmmo5Rof <= 0){
plyW5Snd();
_local1 = new PlayerAmmo5((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo5Arr.push(_local1);
updateAmmoInventory();
playerAmmo5Rof = 2;
};
}
public function enDeployLvl9(_arg1:TimerEvent){
enDeployLvl9Wave++;
switch (enDeployLvl9Wave){
case 1:
attEnemy10(1);
attEnemy3(1);
attEnemy4(1);
attEnemy6(1);
attEnemy9(1);
break;
case 2:
attEnemy10(1);
attEnemy4(1);
attEnemy8(2);
attEnemy6(1);
attEnemy7(1);
break;
case 3:
attEnemy3(2);
attEnemy4(1);
attEnemy9(1);
attEnemy6(1);
attEnemy10(1);
break;
case 4:
attPwrUp7();
attEnemy9(1);
attEnemy5(1);
attEnemy10(1);
attEnemy7(1);
break;
case 5:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy6(1);
attEnemy10(1);
break;
case 6:
attEnemy1(1);
attEnemy2(1);
attEnemy8(2);
break;
case 7:
attEnemy10(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 8:
attPwrUp3();
attEnemy10(2);
attEnemy10(1);
attEnemy7(1);
break;
case 9:
attEnemy1(1);
attEnemy3(1);
attEnemy5(1);
attEnemy10(1);
attEnemy7(1);
break;
case 10:
attEnemy9(1);
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy8(1);
break;
case 11:
attEnemy1(1);
attEnemy10(2);
attEnemy6(1);
attEnemy7(1);
break;
case 12:
attPwrUp6();
attEnemy10(1);
attEnemy3(1);
attEnemy8(1);
attEnemy7(1);
break;
case 13:
attEnemy1(1);
attEnemy10(2);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 14:
attEnemy1(1);
attEnemy2(2);
attEnemy8(1);
attEnemy6(1);
attEnemy7(1);
break;
case 15:
attEnemy1(1);
attEnemy10(1);
attEnemy6(1);
attEnemy7(1);
break;
case 16:
attPwrUp3();
attEnemy1(1);
attEnemy10(1);
attEnemy8(1);
attEnemy9(1);
attEnemy7(1);
break;
case 17:
attEnemy1(1);
attEnemy2(2);
attEnemy10(1);
attEnemy8(1);
attEnemy9(1);
break;
case 18:
attEnemy10(1);
attEnemy9(1);
attEnemy6(1);
attEnemy7(1);
break;
case 19:
attEnemy1(2);
attEnemy10(1);
attEnemy3(1);
attEnemy9(1);
break;
case 20:
attPwrUp2();
attEnemy1(1);
attEnemy3(1);
attEnemy9(1);
attEnemy7(1);
break;
case 21:
attEnemy1(2);
attEnemy2(1);
attEnemy10(1);
attEnemy7(1);
break;
case 22:
attEnemy1(1);
attEnemy9(1);
attEnemy8(1);
attEnemy7(1);
break;
case 23:
attEnemy10(1);
attEnemy3(1);
attEnemy8(2);
attEnemy7(1);
break;
case 24:
attPwrUp3();
attEnemy10(1);
attEnemy9(1);
attEnemy8(2);
attEnemy7(1);
break;
case 25:
attEnemy1(2);
attEnemy10(1);
attEnemy9(1);
attEnemy7(1);
break;
case 26:
attEnemy1(1);
attEnemy2(1);
attEnemy4(1);
attEnemy10(1);
attEnemy7(1);
break;
case 27:
attEnemy1(1);
attEnemy9(2);
attEnemy10(1);
attEnemy7(1);
break;
case 28:
attPwrUp7();
attEnemy1(1);
attEnemy3(1);
attEnemy10(1);
attEnemy9(1);
break;
case 29:
attEnemy2(1);
attEnemy4(1);
attEnemy6(1);
attEnemy10(1);
break;
case 30:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 31:
attEnemy1(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy10(1);
break;
case 32:
attPwrUp1();
attEnemy9(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 33:
attEnemy1(1);
attEnemy9(1);
attEnemy3(1);
attEnemy8(1);
attEnemy10(1);
attEnemy9(1);
break;
case 34:
attEnemy10(1);
attEnemy2(1);
attEnemy9(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
case 35:
attPwrUp3();
attEnemy10(1);
attEnemy2(1);
attEnemy3(1);
attEnemy8(1);
attEnemy6(1);
attEnemy9(1);
break;
default:
break;
};
}
public function endLevel(_arg1:TimerEvent){
}
public function attPlayerAmmo1(){
var _local1:PlayerAmmo1;
playerAmmo1Rof--;
if (playerAmmo1Rof == 0){
plyW1Snd();
_local1 = new PlayerAmmo1((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo1Arr.push(_local1);
updateAmmoInventory();
playerAmmo1Rof = 5;
};
}
public function attPlayerAmmo2(){
var _local1:PlayerAmmo2;
var _local2:PlayerAmmo2;
var _local3:PlayerAmmo2;
playerAmmo2Rof--;
if (playerAmmo2Rof == 14){
plyW2Snd();
_local1 = new PlayerAmmo2((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo2Arr.push(_local1);
updateAmmoInventory();
};
if (playerAmmo2Rof == 12){
_local2 = new PlayerAmmo2((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local2);
playerAmmo2Arr.push(_local2);
updateAmmoInventory();
};
if (playerAmmo2Rof == 10){
_local3 = new PlayerAmmo2((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local3);
playerAmmo2Arr.push(_local3);
updateAmmoInventory();
};
if (playerAmmo2Rof <= 4){
playerAmmo2Rof = 15;
};
}
public function attPlayerAmmo3(){
var _local1:Number;
var _local2:Number;
var _local3:PlayerAmmo3;
playerAmmo3Rof--;
if (playerAmmo3Rof <= 0){
plyW3Snd();
_local1 = -5;
_local2 = 0;
while (_local2 < 3) {
_local1 = (_local1 + 5);
_local3 = new PlayerAmmo3((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, _local1);
lvlCntnr_mc.addChild(_local3);
playerAmmo3Arr.push(_local3);
updateAmmoInventory();
playerAmmo3Rof = 10;
_local2++;
};
};
}
public function moveDesertHouse(_arg1:MovieClip){
_arg1.x = (_arg1.x - 2.5);
if (_arg1.x < -150){
_arg1.x = (Math.floor((Math.random() * (800 - 750))) + 750);
};
}
public function attPlayerAmmo6(){
var _local1:PlayerAmmo6;
plyW6Snd();
_local1 = new PlayerAmmo6((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo6Arr.push(_local1);
updateAmmoInventory();
}
public function deployPowerUp(_arg1:TimerEvent){
}
public function attEnemy5Ammo(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Enemy5Ammo;
_local2 = 50;
_local3 = _arg1.barrel.rotation;
_local4 = (_arg1.x + (_local2 * Math.cos(((_local3 * Math.PI) / 180))));
_local5 = (_arg1.y + (_local2 * Math.sin(((_local3 * Math.PI) / 180))));
_local6 = new Enemy5Ammo(_arg1);
_local6.x = _local4;
_local6.y = _local5;
lvlCntnr_mc.addChild(_local6);
enemyAmmo5Array.push(_local6);
}
public function attDebris(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Debris;
_local2 = _arg1.x;
_local3 = _arg1.y;
_local6 = (Math.floor((Math.random() * (8 - 1))) + 1);
_local7 = 0;
while (_local7 < 8) {
_local5 = (Math.floor((Math.random() * (300 - 240))) + 240);
_local8 = new Debris(_local2, _local3, _local5);
lvlCntnr_mc.addChild(_local8);
debrisArray.push(_local8);
_local7++;
};
}
public function attEnemy1(_arg1:Number){
var _local2:Number;
var _local3:Enemy1;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Enemy1();
_local3.x = randomGenerator(700, 900);
_local3.y = randomGenerator(100, 400);
lvlCntnr_mc.addChild(_local3);
enemyArray.push(_local3);
_local2++;
};
}
public function attEnemy2(_arg1:Number){
var _local2:Number;
var _local3:Enemy2;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Enemy2();
_local3.x = randomGenerator(700, 900);
_local3.y = randomGenerator(100, 400);
lvlCntnr_mc.addChild(_local3);
enemyArray.push(_local3);
_local2++;
};
}
public function attPwrUp2(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp2;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp2(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPwrUp3(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp3;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp3(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPwrUp4(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp4;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp4(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPwrUp7(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp7;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp7(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function playerTrail(){
var _local1:PlayerSmokeTrail;
playerTrailInterval--;
if (playerTrailInterval <= 0){
_local1 = new PlayerSmokeTrail(lvlCntnr_mc.plyr_mc);
lvlCntnr_mc.addChild(_local1);
smokeArray.push(_local1);
playerTrailInterval = 5;
};
}
public function attEnemy9(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Enemy9;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = randomGenerator(700, 800);
_local4 = randomGenerator(100, 400);
_local5 = new Enemy9(_local3, _local4);
lvlCntnr_mc.addChild(_local5);
enemyArray.push(_local5);
_local2++;
};
}
public function attPwrUp1(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp1;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp1(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPwrUp5(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp5;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp5(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPwrUp6(){
var _local1:Number;
var _local2:Number;
var _local3:PowerUp6;
_local1 = randomGenerator(100, 600);
_local2 = randomGenerator(-200, -100);
_local3 = new PowerUp6(_local1, _local2);
lvlCntnr_mc.addChild(_local3);
powerupArray.push(_local3);
}
public function attPlayerAmmo7(){
var _local1:PlayerAmmo7;
playerAmmo7Rof--;
if (playerAmmo7Rof == 0){
plyW7Snd();
_local1 = new PlayerAmmo7((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo7Arr.push(_local1);
updateAmmoInventory();
playerAmmo7Rof = 10;
};
}
public function plyW8aSnd(){
if (music == "on"){
w8aSnd.play();
};
}
public function attEnemy3(_arg1:Number){
var _local2:Number;
var _local3:Enemy3;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Enemy3();
_local3.x = randomGenerator(700, 900);
_local3.y = randomGenerator(100, 400);
lvlCntnr_mc.addChild(_local3);
enemyArray.push(_local3);
_local2++;
};
}
public function attEnemy4(_arg1:Number){
var _local2:Number;
var _local3:Enemy4;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Enemy4();
_local3.x = randomGenerator(700, 900);
_local3.y = randomGenerator(100, 400);
lvlCntnr_mc.addChild(_local3);
enemyArray.push(_local3);
_local2++;
};
}
public function saveToLSO(){
paperWarfareSharedObject.data.gameDataExist = "true";
paperWarfareSharedObject.data.level_so = level;
paperWarfareSharedObject.data.killsOverall_so = killsOverall;
paperWarfareSharedObject.data.ammo1Inventory_so = ammo1Inventory;
paperWarfareSharedObject.data.ammo2Inventory_so = ammo2Inventory;
paperWarfareSharedObject.data.ammo3Inventory_so = ammo3Inventory;
paperWarfareSharedObject.data.ammo4Inventory_so = ammo4Inventory;
paperWarfareSharedObject.data.ammo5Inventory_so = ammo5Inventory;
paperWarfareSharedObject.data.ammo6Inventory_so = ammo6Inventory;
paperWarfareSharedObject.data.ammo7Inventory_so = ammo7Inventory;
paperWarfareSharedObject.data.ammo8Inventory_so = ammo8Inventory;
paperWarfareSharedObject.data.suitCode_so = suitCode;
paperWarfareSharedObject.data.mouseFollowSpeed_so = mouseFollowSpeed;
paperWarfareSharedObject.data.lifeNumerator_so = lifeNumerator;
paperWarfareSharedObject.data.lifeDenominator_so = lifeDenominator;
paperWarfareSharedObject.data.lives_so = lives;
paperWarfareSharedObject.data.weaponArray_so = weaponArray;
paperWarfareSharedObject.data.shield_so = shield;
paperWarfareSharedObject.data.emp_so = emp;
paperWarfareSharedObject.flush();
}
public function attEnemy6(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Enemy6;
_local2 = 0;
while (_local2 < _arg1) {
_local5 = randomGenerator(0, 3);
_local3 = randomGenerator(400, 640);
if (_local5 == 1){
_local4 = randomGenerator(-400, -100);
} else {
_local4 = randomGenerator(500, 600);
};
_local6 = new Enemy6(_local3, _local4);
lvlCntnr_mc.addChild(_local6);
enemyArray.push(_local6);
_local2++;
};
}
public function attEnemy8(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Enemy8;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = randomGenerator(700, 800);
_local4 = randomGenerator(100, 400);
_local5 = new Enemy8(_local3, _local4);
lvlCntnr_mc.addChild(_local5);
enemyArray.push(_local5);
_local2++;
};
}
public function mousePressed(_arg1:MouseEvent){
if ((((lives <= 0)) && ((lifeNumerator <= 0)))){
} else {
fireWeapon = "open";
};
}
public function mouseFollowControl(_arg1:MovieClip){
if (dead == "false"){
if (_arg1.x <= 0){
_arg1.x = 1;
_arg1.gotoAndStop(5);
} else {
if (_arg1.x >= 680){
_arg1.x = 679;
_arg1.gotoAndStop(5);
} else {
if (_arg1.y <= 0){
_arg1.y = 1;
_arg1.gotoAndStop(5);
} else {
if (_arg1.y >= 480){
_arg1.y = 479;
_arg1.gotoAndStop(5);
} else {
_arg1.x = ((mouseFollowSpeed * (_arg1.x - mouseX)) + mouseX);
_arg1.y = ((mouseFollowSpeed * (_arg1.y - mouseY)) + mouseY);
lvlCntnr_mc.plyr_mc.x = _arg1.x;
lvlCntnr_mc.plyr_mc.y = _arg1.y;
};
};
};
};
} else {
_arg1.x = -1000;
_arg1.y = -1000;
lvlCntnr_mc.plyr_mc.x = _arg1.x;
lvlCntnr_mc.plyr_mc.y = _arg1.y;
};
}
public function attPlayerAmmo4(){
var _local1:PlayerAmmo4;
playerAmmo4Rof--;
if (playerAmmo4Rof <= 0){
plyW4Snd();
_local1 = new PlayerAmmo4((lvlCntnr_mc.plyr_mc.x + disFromBarrel), lvlCntnr_mc.plyr_mc.y, 0);
lvlCntnr_mc.addChild(_local1);
playerAmmo4Arr.push(_local1);
updateAmmoInventory();
playerAmmo4Rof = 3;
};
}
public function attEnemy5(_arg1:Number){
var _local2:Number;
var _local3:Enemy5;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Enemy5();
_local3.x = randomGenerator(700, 900);
_local3.y = randomGenerator(100, 400);
lvlCntnr_mc.addChild(_local3);
enemyArray.push(_local3);
_local2++;
};
}
public function attEnemy7(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Enemy7;
_local2 = 0;
while (_local2 < _arg1) {
_local3 = randomGenerator(700, 800);
_local4 = randomGenerator(30, 50);
_local5 = new Enemy7(_local3, _local4);
lvlCntnr_mc.addChild(_local5);
enemyArray.push(_local5);
_local2++;
};
}
public function updateAmmoInventory(){
if (weaponCounter == 1){
} else {
if (weaponCounter == 2){
ammo2Inventory--;
} else {
if (weaponCounter == 3){
ammo3Inventory--;
} else {
if (weaponCounter == 4){
ammo4Inventory--;
} else {
if (weaponCounter == 5){
ammo5Inventory--;
} else {
if (weaponCounter == 6){
ammo6Inventory--;
} else {
if (weaponCounter == 7){
ammo7Inventory--;
} else {
if (weaponCounter == 8){
ammo8Inventory--;
};
};
};
};
};
};
};
};
updateAmmoUI();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 25
//mc_adoboPaperLogo_2 (PaperWarfare_spil_teen_v5_fla.mc_adoboPaperLogo_2)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_adoboPaperLogo_2 extends MovieClip {
public var studio_txt:TextField;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 26
//mc_armorHev_135 (PaperWarfare_spil_teen_v5_fla.mc_armorHev_135)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_armorHev_135 extends MovieClip {
public var weapon_mc:MovieClip;
public function mc_armorHev_135(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 27
//mc_armorLight_134 (PaperWarfare_spil_teen_v5_fla.mc_armorLight_134)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_armorLight_134 extends MovieClip {
public var weapon_mc:MovieClip;
public function mc_armorLight_134(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 28
//mc_armorMed_132 (PaperWarfare_spil_teen_v5_fla.mc_armorMed_132)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_armorMed_132 extends MovieClip {
public var weapon_mc:MovieClip;
public function mc_armorMed_132(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 29
//mc_bossuilifeBarOutlinecopy_140 (PaperWarfare_spil_teen_v5_fla.mc_bossuilifeBarOutlinecopy_140)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_bossuilifeBarOutlinecopy_140 extends MovieClip {
public var bosslifeBar_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 30
//mc_descriptionSLider_114 (PaperWarfare_spil_teen_v5_fla.mc_descriptionSLider_114)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_descriptionSLider_114 extends MovieClip {
public var desciption_txt:TextField;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 31
//mc_explosion2a_184 (PaperWarfare_spil_teen_v5_fla.mc_explosion2a_184)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_explosion2a_184 extends MovieClip {
public function mc_explosion2a_184(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
}
function frame1(){
}
function frame4(){
}
function frame2(){
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 32
//mc_explosion4a_182 (PaperWarfare_spil_teen_v5_fla.mc_explosion4a_182)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_explosion4a_182 extends MovieClip {
public function mc_explosion4a_182(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 33
//mc_howToDesElem1_95 (PaperWarfare_spil_teen_v5_fla.mc_howToDesElem1_95)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_howToDesElem1_95 extends MovieClip {
public function mc_howToDesElem1_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 34
//mc_howToDesElem2_96 (PaperWarfare_spil_teen_v5_fla.mc_howToDesElem2_96)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_howToDesElem2_96 extends MovieClip {
public function mc_howToDesElem2_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 35
//mc_lvlContainer1_129 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer1_129)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer1_129 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var m3:MovieClip;
public var m1:MovieClip;
public var cld2_mc:MovieClip;
public var m4:MovieClip;
public var m2:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 36
//mc_lvlContainer10_171 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer10_171)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer10_171 extends MovieClip {
public var plyr_mc:MovieClip;
public var b10:MovieClip;
public var b2:MovieClip;
public var road2:MovieClip;
public var b9:MovieClip;
public var b5:MovieClip;
public var b6:MovieClip;
public var b7:MovieClip;
public var b1:MovieClip;
public var cld4_mc:MovieClip;
public var road1:MovieClip;
public var b8:MovieClip;
public var b3:MovieClip;
public var t2:MovieClip;
public var t3:MovieClip;
public var t7:MovieClip;
public var t1:MovieClip;
public var t9:MovieClip;
public var t5:MovieClip;
public var t8:MovieClip;
public var m1:MovieClip;
public var t4:MovieClip;
public var b4:MovieClip;
public var cld2_mc:MovieClip;
public var t6:MovieClip;
public var m4:MovieClip;
public var medArmor_mc:MovieClip;
public var m3:MovieClip;
public var m2:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 37
//mc_lvlContainer2_146 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer2_146)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer2_146 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var m3:MovieClip;
public var m1:MovieClip;
public var cld2_mc:MovieClip;
public var m4:MovieClip;
public var m2:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var sea1:MovieClip;
public var sea2:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 38
//mc_lvlContainer3_148 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer3_148)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer3_148 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var m3:MovieClip;
public var m1:MovieClip;
public var cld2_mc:MovieClip;
public var m4:MovieClip;
public var m2:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 39
//mc_lvlContainer4_149 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer4_149)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer4_149 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var s1:MovieClip;
public var s5:MovieClip;
public var s6:MovieClip;
public var dh1:MovieClip;
public var dh2:MovieClip;
public var s4:MovieClip;
public var dh3:MovieClip;
public var s3:MovieClip;
public var s2:MovieClip;
public var cld2_mc:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 40
//mc_lvlContainer5_155 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer5_155)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer5_155 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var s1:MovieClip;
public var s5:MovieClip;
public var s6:MovieClip;
public var dh1:MovieClip;
public var dh2:MovieClip;
public var s4:MovieClip;
public var dh3:MovieClip;
public var s3:MovieClip;
public var s2:MovieClip;
public var cld2_mc:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 41
//mc_lvlContainer6_157 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer6_157)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer6_157 extends MovieClip {
public var plyr_mc:MovieClip;
public var cld4_mc:MovieClip;
public var s1:MovieClip;
public var s5:MovieClip;
public var s6:MovieClip;
public var dh1:MovieClip;
public var dh2:MovieClip;
public var s4:MovieClip;
public var dh3:MovieClip;
public var s3:MovieClip;
public var s2:MovieClip;
public var cld2_mc:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 42
//mc_lvlContainer7_158 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer7_158)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer7_158 extends MovieClip {
public var plyr_mc:MovieClip;
public var b10:MovieClip;
public var b2:MovieClip;
public var road2:MovieClip;
public var b9:MovieClip;
public var b5:MovieClip;
public var b6:MovieClip;
public var b7:MovieClip;
public var b1:MovieClip;
public var cld4_mc:MovieClip;
public var road1:MovieClip;
public var b8:MovieClip;
public var b3:MovieClip;
public var b4:MovieClip;
public var m3:MovieClip;
public var m1:MovieClip;
public var cld2_mc:MovieClip;
public var m4:MovieClip;
public var m2:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 43
//mc_lvlContainer8_163 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer8_163)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer8_163 extends MovieClip {
public var plyr_mc:MovieClip;
public var b10:MovieClip;
public var b2:MovieClip;
public var road2:MovieClip;
public var b9:MovieClip;
public var b5:MovieClip;
public var b6:MovieClip;
public var b7:MovieClip;
public var b1:MovieClip;
public var cld4_mc:MovieClip;
public var road1:MovieClip;
public var b8:MovieClip;
public var b3:MovieClip;
public var b4:MovieClip;
public var m3:MovieClip;
public var m1:MovieClip;
public var cld2_mc:MovieClip;
public var m4:MovieClip;
public var m2:MovieClip;
public var medArmor_mc:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 44
//mc_lvlContainer9_164 (PaperWarfare_spil_teen_v5_fla.mc_lvlContainer9_164)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_lvlContainer9_164 extends MovieClip {
public var plyr_mc:MovieClip;
public var b10:MovieClip;
public var b2:MovieClip;
public var road2:MovieClip;
public var b9:MovieClip;
public var b5:MovieClip;
public var b6:MovieClip;
public var b7:MovieClip;
public var b1:MovieClip;
public var cld4_mc:MovieClip;
public var road1:MovieClip;
public var b8:MovieClip;
public var b3:MovieClip;
public var t2:MovieClip;
public var t3:MovieClip;
public var t7:MovieClip;
public var t1:MovieClip;
public var t9:MovieClip;
public var t5:MovieClip;
public var t8:MovieClip;
public var m1:MovieClip;
public var t4:MovieClip;
public var b4:MovieClip;
public var cld2_mc:MovieClip;
public var t6:MovieClip;
public var m4:MovieClip;
public var medArmor_mc:MovieClip;
public var m3:MovieClip;
public var m2:MovieClip;
public var cld3_mc:MovieClip;
public var lightArmor_mc:MovieClip;
public var hevArmor_mc:MovieClip;
public var cld1_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 45
//mc_map_128 (PaperWarfare_spil_teen_v5_fla.mc_map_128)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_map_128 extends MovieClip {
public function mc_map_128(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 46
//mc_newUpdatePanel_110 (PaperWarfare_spil_teen_v5_fla.mc_newUpdatePanel_110)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_newUpdatePanel_110 extends MovieClip {
public var shield_mc:MovieClip;
public var emp_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 47
//mc_newWeapon_125 (PaperWarfare_spil_teen_v5_fla.mc_newWeapon_125)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_newWeapon_125 extends MovieClip {
public var desciption_txt:TextField;
public function mc_newWeapon_125(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 48
//mc_plyrWeapons_133 (PaperWarfare_spil_teen_v5_fla.mc_plyrWeapons_133)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_plyrWeapons_133 extends MovieClip {
public function mc_plyrWeapons_133(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 49
//mc_PreLevDesElem1copy_127 (PaperWarfare_spil_teen_v5_fla.mc_PreLevDesElem1copy_127)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_PreLevDesElem1copy_127 extends MovieClip {
public function mc_PreLevDesElem1copy_127(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 50
//mc_promptToDelete_18 (PaperWarfare_spil_teen_v5_fla.mc_promptToDelete_18)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_promptToDelete_18 extends MovieClip {
public var yes_btn:MovieClip;
public var no_btn:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 51
//mc_selectSuitPanel_103 (PaperWarfare_spil_teen_v5_fla.mc_selectSuitPanel_103)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_selectSuitPanel_103 extends MovieClip {
public var suitSelectioSlider_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 52
//mc_selectText_109 (PaperWarfare_spil_teen_v5_fla.mc_selectText_109)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mc_selectText_109 extends MovieClip {
public var selectText_txt:TextField;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 53
//mc_suitPanelInfo_98 (PaperWarfare_spil_teen_v5_fla.mc_suitPanelInfo_98)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_suitPanelInfo_98 extends MovieClip {
public var slider:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 54
//mc_SuitSelectionSuitPanel1_97 (PaperWarfare_spil_teen_v5_fla.mc_SuitSelectionSuitPanel1_97)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_SuitSelectionSuitPanel1_97 extends MovieClip {
public var suitInfoPanel_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 55
//mc_SuitSelectionSuitPanel3_102 (PaperWarfare_spil_teen_v5_fla.mc_SuitSelectionSuitPanel3_102)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_SuitSelectionSuitPanel3_102 extends MovieClip {
public var arrowLeft_btn:MovieClip;
public var arrowRight_btn:MovieClip;
public var suitPanel_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 56
//mc_titleScreenBgSketches_5 (PaperWarfare_spil_teen_v5_fla.mc_titleScreenBgSketches_5)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_titleScreenBgSketches_5 extends MovieClip {
public function mc_titleScreenBgSketches_5(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 57
//mc_titleScreenTitle_17 (PaperWarfare_spil_teen_v5_fla.mc_titleScreenTitle_17)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_titleScreenTitle_17 extends MovieClip {
public function mc_titleScreenTitle_17(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package PaperWarfare_spil_teen_v5_fla
Section 58
//mc_updatePrompter_124 (PaperWarfare_spil_teen_v5_fla.mc_updatePrompter_124)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_updatePrompter_124 extends MovieClip {
public var updates_mc:MovieClip;
public var closeUpdatePrompt_btn:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 59
//mc_upgradePanel1_113 (PaperWarfare_spil_teen_v5_fla.mc_upgradePanel1_113)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_upgradePanel1_113 extends MovieClip {
public var descSlider_mc:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 60
//mc_upgradePanel2_115 (PaperWarfare_spil_teen_v5_fla.mc_upgradePanel2_115)
package PaperWarfare_spil_teen_v5_fla {
import flash.display.*;
public dynamic class mc_upgradePanel2_115 extends MovieClip {
public var w1:MovieClip;
public var w4:MovieClip;
public var w6:MovieClip;
public var w8:MovieClip;
public var w7:MovieClip;
public var w2:MovieClip;
public var w3:MovieClip;
public var w5:MovieClip;
}
}//package PaperWarfare_spil_teen_v5_fla
Section 61
//Brand (spill.localisation.Brand)
package spill.localisation {
import flash.xml.*;
public class Brand {
public var domain:String;
public var useGoogleAnalitics:Boolean;// = true
public var emailPage:String;
public var name:String;
public var site_id:uint;
public var isExternal:Boolean;// = false
public var id:Number;
public var hostingDomain:String;// = ""
public var preferedLanguage:String;// = ""
public var moreLink:String;// = ""
public var hasSendToFriendLink:Boolean;// = true
public var portalGroup:uint;
public var emailLink:String;// = "game"
private static const topLevelDoubles:String = (((((((((((((("ac.cn,ac.jp,ac.uk,ad.jp,adm.br,adv.br,agr.br," + "ah.cn,am.br,arq.br,art.br,asn.au,ato.br,av.tr,bel.tr,bio.br,biz.tr,bj.cn,bmd.br,") + "cim.br,cng.br,cnt.br,co.at,co.jp,co.uk,com.au,com.br,com.cn,com.eg,com.hk,com.mx,") + "com.ru,com.tr,com.tw,conf.au,cq.cn,csiro.au,dr.tr,ecn.br,edu.au,edu.br,edu.tr,") + "emu.id.au,eng.br,esp.br,etc.br,eti.br,eun.eg,far.br,fj.cn,fm.br,fnd.br,fot.br,") + "fst.br,g12.br,gb.com,gb.net,gd.cn,gen.tr,ggf.br,gob.mx,gov.au,gov.br,gov.cn,") + "gov.hk,gov.tr,gr.jp,gs.cn,gx.cn,gz.cn,ha.cn,hb.cn,he.cn,hi.cn,hk.cn,hl.cn,hn.cn,") + "id.au,idv.tw,imb.br,ind.br,inf.br,info.au,info.tr,jl.cn,jor.br,js.cn,jx.cn,k12.tr,") + "lel.br,ln.cn,ltd.uk,mat.br,me.uk,med.br,mil.br,mil.tr,mo.cn,mus.br,name.tr,ne.jp,") + "net.au,net.br,net.cn,net.eg,net.hk,net.lu,net.mx,net.ru,net.tr,net.tw,net.uk,") + "nm.cn,no.com,nom.br,not.br,ntr.br,nx.cn,odo.br,oop.br,or.at,or.jp,org.au,org.br,") + "org.cn,org.hk,org.lu,org.ru,org.tr,org.tw,org.uk,plc.uk,pol.tr,pp.ru,ppg.br,pro.br,") + "psc.br,psi.br,qh.cn,qsl.br,rec.br,sc.cn,sd.cn,se.com,se.net,sh.cn,slg.br,sn.cn,") + "srv.br,sx.cn,tel.tr,tj.cn,tmp.br,trd.br,tur.br,tv.br,tw.cn,uk.com,uk.net,vet.br,") + "wattle.id.au,web.tr,xj.cn,xz.cn,yn.cn,zj.cn,zlg.br,co.nr,co.nz,com.fr,com.ph,");
public function Brand(){
moreLink = "";
emailLink = "game";
useGoogleAnalitics = true;
hasSendToFriendLink = true;
preferedLanguage = "";
isExternal = false;
hostingDomain = "";
super();
}
public function exportXML():XML{
var _local1:XML;
var _local2:XML;
var _local3:XML;
_local1 = <portal/>
;
_local1.@id = site_id;
_local1.@language = preferedLanguage;
_local1.@channel = portalGroup;
_local2 = <domain/>
;
_local2.appendChild(new XMLNode(3, domain));
_local1.appendChild(_local2);
if (moreLink){
_local3 = <more_games_path/>
;
_local3.appendChild(new XMLNode(3, moreLink));
_local1.appendChild(_local3);
};
_local2 = <game_path/>
;
_local2.appendChild(new XMLNode(3, emailLink));
_local1.appendChild(_local2);
if (!useGoogleAnalitics){
_local1.attributes.noGoogleAnalitics = true;
};
if (!hasSendToFriendLink){
_local1.attributes.noSendToFriendLink = true;
};
return (_local1);
}
private function get utm_source():String{
return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal"));
}
public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{
var _local5:String;
_local5 = ("http://" + domain);
_local5 = (_local5 + ("/" + moreLink));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg2) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg3 = stripSubDomain(_arg3);
trace(_arg3);
if (_arg3 == "localhost"){
_arg3 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg3));
if (((!((_arg4 == ""))) && (!((_arg4 == null))))){
_local5 = (_local5 + ("&utm_content=" + _arg4));
};
};
return (_local5);
}
private function get utm_campaign():String{
if (isExternal){
return (("utm_campaign=" + hostingDomain));
};
return ("");
}
public function get backgroundColor():uint{
return (PortalGroup.backgroundColors[portalGroup]);
}
public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{
var _local6:String;
_local6 = ("http://" + domain);
_local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local6 = (_local6 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
trace(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local6 = (_local6 + ("&utm_source=" + _arg4));
if (((!((_arg5 == ""))) && (!((_arg5 == null))))){
_local6 = (_local6 + ("&utm_content=" + _arg5));
};
};
return (_local6);
}
private function get utm_term():String{
return ("utm_term=");
}
public function importXML(_arg1:XMLNode):void{
}
public function getSendToFriendLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String=""):String{
var _local5:String;
if (!hasSendToFriendLink){
return (getMoreGamesLink(_arg1, _arg3));
};
_local5 = ("http://" + domain);
_local5 = (_local5 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg4));
_local5 = (_local5 + "&utm_content=send_to_friend");
};
return (_local5);
}
private static function stripSubDomain(_arg1:String):String{
var _local2:Array;
if (!_arg1){
return ("");
};
_local2 = _arg1.split(".");
if (_local2.length <= 2){
return (_arg1);
};
_local2 = _local2.reverse();
if (topLevelDoubles.indexOf((((_local2[1] + ".") + _local2[0]) + ",")) > 0){
return (((((_local2[2] + ".") + _local2[1]) + ".") + _local2[0]));
};
return (((_local2[1] + ".") + _local2[0]));
}
}
}//package spill.localisation
Section 62
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.display.*;
import flash.events.*;
public class BrandingLogo extends MovieClip {
public function BrandingLogo(){
addFrameScript(0, frame1);
super();
stop();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
if (stage){
added();
};
brandingChanged();
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("brandingChanged", brandingChanged, false, 0, true);
brandingChanged();
}
private function brandingChanged(_arg1:Event=null):void{
if (SpilGame.currentBranding){
gotoAndStop(SpilGame.currentBranding.domain);
};
}
function frame1(){
stop();
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("brandingChanged", brandingChanged);
}
}
}//package spill.localisation
Section 63
//Brandings (spill.localisation.Brandings)
package spill.localisation {
public class Brandings {
private static var brands_by_id:Object = new Object();
private static var brands_by_domain:Object = new Object();
public static function getBrandByID(_arg1:Number):Brand{
return (brands_by_id[_arg1]);
}
public static function getBrandsArray():Array{
var _local1:Array;
var _local2:Brand;
_local1 = new Array();
for each (_local2 in brands_by_domain) {
_local1.push(_local2);
};
return (_local1);
}
private static function addBrand(_arg1:Brand):Brand{
if (brands_by_domain[_arg1.domain]){
trace(("ERROR: Attempting to add duplicate brand by domain: " + _arg1.domain));
} else {
brands_by_domain[_arg1.domain] = _arg1;
};
if (brands_by_id[_arg1.site_id]){
trace(("ERROR: Attempting to add duplicate brand by id: " + _arg1.site_id));
} else {
brands_by_id[_arg1.site_id] = _arg1;
};
return (_arg1);
}
public static function initialize():void{
var _local1:Brand;
_local1 = new Brand();
_local1.site_id = 79;
_local1.domain = "www.agame.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TWEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 88;
_local1.domain = "www.gamesgames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 90;
_local1.domain = "www.girlsgogames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 45;
_local1.domain = "www.a10.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 92;
_local1.domain = "www.games.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 107;
_local1.domain = "www.agame.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.TWEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 102;
_local1.domain = "www.girlsgogames.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 2;
_local1.domain = "www.game.com.cn";
_local1.moreLink = "moregames/";
_local1.preferedLanguage = "cn";
_local1.portalGroup = PortalGroup.NONE;
_local1.useGoogleAnalitics = false;
_local1.hasSendToFriendLink = false;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 25;
_local1.domain = "www.spel.nl";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 1;
_local1.domain = "www.spelletjes.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 93;
_local1.domain = "www.girlsgogames.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 12;
_local1.domain = "www.jeu.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 95;
_local1.domain = "www.girlsgogames.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 11;
_local1.domain = "www.jeux.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 26;
_local1.domain = "www.spielen.com";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 94;
_local1.domain = "www.girlsgogames.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 5;
_local1.domain = "www.jetztspielen.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 109;
_local1.domain = "www.minigry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 16;
_local1.domain = "www.gry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 98;
_local1.domain = "www.girlsgogames.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 108;
_local1.domain = "www.spel.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 100;
_local1.domain = "www.girlsgogames.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 44;
_local1.domain = "www.spela.se";
_local1.emailLink = "spel_";
_local1.preferedLanguage = "se";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 106;
_local1.domain = "www.giocaregratis.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 15;
_local1.domain = "www.gioco.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 99;
_local1.domain = "www.girlsgogames.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 97;
_local1.domain = "www.zapjuegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 86;
_local1.domain = "www.juegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 96;
_local1.domain = "www.juegosdechicas.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 122;
_local1.domain = "www.girlsgogames.es";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 91;
_local1.domain = "www.clickjogos.com";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 101;
_local1.domain = "www.girlsgogames.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 50;
_local1.domain = "www.ojogos.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 55;
_local1.domain = "www.games.co.id";
_local1.emailLink = "permainanme";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "id";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 105;
_local1.domain = "www.flashgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 104;
_local1.domain = "www.girlsgogames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 103;
_local1.domain = "www.ourgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 24;
_local1.domain = "www.game.co.in";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "in";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 87;
_local1.domain = "www.ojogos.pt";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pt";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 120;
_local1.domain = "www.egames.jp";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "jp";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 121;
_local1.domain = "www.dailygame.com";
_local1.emailLink = "/game/";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 0;
_local1.domain = "gamedev.dev.spilgames.com";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = null;
addBrand(_local1);
}
public static function exportXML():XML{
var _local1:XML;
var _local2:Brand;
_local1 = <portals/>
;
for each (_local2 in brands_by_domain) {
_local1.appendChild(_local2.exportXML());
};
return (_local1);
}
public static function getBrandByDomain(_arg1:String):Brand{
return (brands_by_domain[_arg1]);
}
public static function hasDomain(_arg1:String):Boolean{
return (!((brands_by_domain[_arg1] == null)));
}
}
}//package spill.localisation
Section 64
//Language (spill.localisation.Language)
package spill.localisation {
import flash.xml.*;
public class Language {
public var references:Array;
public var name:String;
public var embedInputFonts:Boolean;// = true
public var forceFont:String;// = null
public var id:uint;
public var portal_groups:Array;
public var textLanguage:String;
public var bwcId:int;
public var embedFonts:Boolean;// = true
public var displayName:String;// = ""
public var dname:String;
public function Language(_arg1:String, _arg2:String=null){
embedFonts = true;
embedInputFonts = true;
forceFont = null;
references = [];
displayName = "";
super();
name = _arg1;
dname = _arg2;
portal_groups = new Array();
}
public function exportXML():XMLNode{
var _local1:XMLNode;
var _local2:XMLNode;
var _local3:Array;
var _local4:Array;
var _local5:int;
_local1 = new XMLNode(1, "language");
_local1.attributes.name = name;
if (textLanguage != null){
_local1.attributes.textLanguage = textLanguage;
};
if (references.length){
_local1.attributes.references = references.toString();
};
_local1.attributes.id = bwcId;
_local2 = new XMLNode(1, "display_name");
_local2.firstChild = new XMLNode(3, displayName);
_local1.appendChild(_local2);
_local3 = [];
_local4 = PortalGroup.channelNames;
_local5 = 0;
while (_local5 < _local4.length) {
_local3.push(Brandings.getBrandByDomain(portal_groups[_local5]).site_id);
_local5++;
};
_local1.attributes.channels = _local3.join(",");
return (_local1);
}
public function get p_teen():String{
return (portal_groups[PortalGroup.TEEN]);
}
public function set p_teen(_arg1:String):void{
portal_groups[PortalGroup.TEEN] = _arg1;
}
public function get p_tween():String{
return (portal_groups[PortalGroup.TWEEN]);
}
public function get p_family():String{
return (portal_groups[PortalGroup.FAMILY]);
}
public function get p_girl():String{
return (portal_groups[PortalGroup.GIRL]);
}
public function set p_girl(_arg1:String):void{
portal_groups[PortalGroup.GIRL] = _arg1;
}
public function get displayAcronim():String{
return ((dname) ? dname : name);
}
public function set p_family(_arg1:String):void{
portal_groups[PortalGroup.FAMILY] = _arg1;
}
public function set p_tween(_arg1:String):void{
portal_groups[PortalGroup.TWEEN] = _arg1;
}
}
}//package spill.localisation
Section 65
//Languages (spill.localisation.Languages)
package spill.localisation {
import flash.xml.*;
public class Languages {
public static var languages:Object = new Object();
private static var _init:Boolean = false;
public static function initialize():void{
var _local1:Language;
if (_init){
return;
};
_init = true;
_local1 = new Language("nl");
_local1.displayName = "Nederlands";
_local1.p_family = "www.spelletjes.nl";
_local1.p_tween = "www.spel.nl";
_local1.p_girl = "www.girlsgogames.nl";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 3;
addLanguage(_local1);
_local1 = new Language("es");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.com";
_local1.p_tween = "www.zapjuegos.com";
_local1.p_girl = "www.girlsgogames.es";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 9;
addLanguage(_local1);
_local1 = new Language("pl");
_local1.displayName = "Polski";
_local1.p_family = "www.gry.pl";
_local1.p_tween = "www.minigry.pl";
_local1.p_girl = "www.girlsgogames.pl";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 6;
addLanguage(_local1);
_local1 = new Language("fr");
_local1.displayName = "Français";
_local1.p_family = "www.jeux.fr";
_local1.p_tween = "www.jeu.fr";
_local1.p_girl = "www.girlsgogames.fr";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 4;
addLanguage(_local1);
_local1 = new Language("en_us", "us");
_local1.displayName = "English (US)";
_local1.p_family = "www.gamesgames.com";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.com";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 1;
addLanguage(_local1);
addReference(_local1, "en");
_local1 = new Language("id");
_local1.displayName = "Bahasa Ind.";
_local1.p_family = "www.games.co.id";
_local1.p_tween = "www.games.co.id";
_local1.p_girl = "www.games.co.id";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 11;
addLanguage(_local1);
_local1 = new Language("ru");
_local1.displayName = "Русский язык";
_local1.p_family = "www.ourgames.ru";
_local1.p_tween = "www.flashgames.ru";
_local1.p_girl = "www.girlsgogames.ru";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 12;
addLanguage(_local1);
_local1 = new Language("se");
_local1.displayName = "Svenska";
_local1.p_family = "www.spela.se";
_local1.p_tween = "www.spel.se";
_local1.p_girl = "www.girlsgogames.se";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 7;
addLanguage(_local1);
addReference(_local1, "sv");
_local1 = new Language("it");
_local1.displayName = "Italiano";
_local1.p_family = "www.gioco.it";
_local1.p_tween = "www.giocaregratis.it";
_local1.p_girl = "www.girlsgogames.it";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 8;
addLanguage(_local1);
_local1 = new Language("en_uk", "uk");
_local1.displayName = "English (UK)";
_local1.p_family = "www.games.co.uk";
_local1.p_tween = "www.agame.co.uk";
_local1.p_girl = "www.girlsgogames.co.uk";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 13;
addLanguage(_local1);
_local1 = new Language("cn");
_local1.displayName = "中文";
_local1.p_family = "www.game.com.cn";
_local1.p_tween = "www.game.com.cn";
_local1.p_girl = "www.game.com.cn";
_local1.p_teen = "www.game.com.cn";
_local1.bwcId = 2;
_local1.embedFonts = false;
_local1.embedInputFonts = false;
_local1.forceFont = "_sans";
addLanguage(_local1);
addReference(_local1, "zh-CN");
addReference(_local1, "zh-TW");
_local1 = new Language("pt");
_local1.displayName = "Português";
_local1.p_family = "www.ojogos.pt";
_local1.p_tween = "www.ojogos.pt";
_local1.p_girl = "www.ojogos.pt";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 17;
addLanguage(_local1);
_local1 = new Language("in");
_local1.displayName = "India";
_local1.p_family = "www.game.co.in";
_local1.p_tween = "www.game.co.in";
_local1.p_girl = "www.game.co.in";
_local1.p_teen = "www.a10.com";
_local1.textLanguage = "en_uk";
_local1.bwcId = 14;
addLanguage(_local1);
_local1 = new Language("de");
_local1.displayName = "Deutsch";
_local1.p_family = "www.jetztspielen.de";
_local1.p_tween = "www.spielen.com";
_local1.p_girl = "www.girlsgogames.de";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 5;
addLanguage(_local1);
_local1 = new Language("br");
_local1.displayName = "PortuguêsBR";
_local1.p_family = "www.ojogos.com.br";
_local1.p_tween = "www.clickjogos.com";
_local1.p_girl = "www.girlsgogames.com.br";
_local1.p_teen = "www.a10.com";
_local1.bwcId = 10;
addLanguage(_local1);
_local1 = new Language("jp");
_local1.displayName = "日本語";
_local1.p_family = "www.egames.jp";
_local1.p_tween = "www.egames.jp";
_local1.p_girl = "www.egames.jp";
_local1.p_teen = "www.a10.com";
_local1.embedFonts = true;
_local1.embedInputFonts = false;
_local1.forceFont = "MS UI Gothic";
_local1.bwcId = 19;
addLanguage(_local1);
addReference(_local1, "ja");
_local1 = new Language("ar");
_local1.displayName = "Arabic";
_local1.p_family = "www.dailygame.com";
_local1.p_tween = "www.dailygame.com";
_local1.p_girl = "www.dailygame.com";
_local1.p_teen = "www.dailygame.com";
_local1.bwcId = 20;
addLanguage(_local1);
addReference(_local1, "ar");
}
public static function exportXML():XMLNode{
var _local1:Array;
var _local2:XMLNode;
var _local3:Language;
_local1 = getLanguagesArray();
_local2 = new XMLNode(1, "languages");
for each (_local3 in _local1) {
_local2.appendChild(_local3.exportXML());
};
return (_local2);
}
public static function getLanguagesArray():Array{
var _local1:Array;
var _local2:Object;
var _local3:Language;
_local1 = new Array();
_local2 = new Object();
for each (_local3 in languages) {
if (!_local2[_local3.name]){
_local1.push(_local3);
_local2[_local3.name] = true;
};
};
return (_local1);
}
public static function getLanguage(_arg1:String):Language{
return (languages[_arg1]);
}
private static function addLanguage(_arg1:Language):void{
languages[_arg1.name] = _arg1;
}
private static function addReference(_arg1:Language, _arg2:String):void{
languages[_arg2] = _arg1;
_arg1.references.push(_arg2);
}
public static function getLanguageByOldID(_arg1:int):Language{
var _local2:Language;
for each (_local2 in languages) {
if (_local2.bwcId == _arg1){
return (_local2);
};
};
return (null);
}
}
}//package spill.localisation
Section 66
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
public class LanguageSelectBox extends MovieClip {
private var flag:MovieClip;
private var mc:MovieClip;
private var popup:MovieClip;
private var languageName_text:TextField;
public function LanguageSelectBox(){
trace("new langselecbox");
super();
if (numChildren > 0){
removeChildAt(0);
};
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true);
Languages.initialize();
popup = new LanguageSelectPopup_mc();
x = Math.round(x);
y = Math.round(y);
popup.y = (-(Math.floor(popup.height)) + 1);
popup.visible = false;
addChild(popup);
mc = new LanguageSelectBox_mc();
addChild(mc);
flag = mc.flag;
languageName_text = mc.languageName_text;
if (stage){
added();
};
init();
languageChanged();
}
private function added(_arg1:Event=null):void{
trace("addedselebnox");
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
}
public function set popupLocation(_arg1:String):void{
trace(("popupLocation = " + _arg1));
if (_arg1 == "bottom"){
popup.y = (Math.floor(mc.height) - 1);
} else {
popup.y = (-(Math.floor(popup.height)) + 1);
};
}
public function init():void{
var _local1:Array;
var _local2:int;
var _local3:MovieClip;
var _local4:Language;
trace("initselectbox");
_local1 = new Array(popup.l_br, popup.l_de, popup.l_en_us, popup.l_fr, popup.l_in, popup.l_jp, popup.l_pt, popup.l_ru, popup.l_ar, popup.l_cn, popup.l_en_uk, popup.l_es, popup.l_id, popup.l_it, popup.l_nl, popup.l_pl, popup.l_se);
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = MovieClip(_local1[_local2]);
_local3.addEventListener(MouseEvent.CLICK, itemClicked, true, 0, true);
_local3.flag.gotoAndStop(_local3.name.substr(2));
_local3.flag.mouseEnabled = false;
_local3.text.mouseEnabled = false;
_local4 = Languages.getLanguage(_local3.name.substr(2));
if (_local4){
_local3.text.text = _local4.displayAcronim;
} else {
trace((("Error, '" + _local3.name.substr(2)) + "' language not found"));
};
_local2++;
};
}
private function mouseOver(_arg1:MouseEvent):void{
popup.visible = true;
}
private function languageChanged(_arg1:Event=null):void{
if (SpilGame.currentLanguage){
flag.gotoAndStop(SpilGame.currentLanguage.name);
languageName_text.text = SpilGame.currentLanguage.displayName;
languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts;
};
}
private function mouseOut(_arg1:MouseEvent):void{
popup.visible = false;
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
private function itemClicked(_arg1:MouseEvent):void{
SpilGame.changeLanguage(_arg1.currentTarget.name.substr(2));
popup.visible = false;
}
}
}//package spill.localisation
Section 67
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc)
package spill.localisation {
import flash.display.*;
import flash.text.*;
public dynamic class LanguageSelectBox_mc extends MovieClip {
public var flag:MovieClip;
public var languageName_text:TextField;
}
}//package spill.localisation
Section 68
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_in:MovieClip;
public var l_ar:MovieClip;
public var l_br:MovieClip;
public var l_cn:MovieClip;
public var l_se:MovieClip;
public var l_de:MovieClip;
public var l_es:MovieClip;
public var l_en_uk:MovieClip;
public var l_fr:MovieClip;
public var l_en_us:MovieClip;
public var l_pl:MovieClip;
public var l_pt:MovieClip;
public var l_nl:MovieClip;
public var l_id:MovieClip;
public var l_it:MovieClip;
public var l_jp:MovieClip;
public var l_ru:MovieClip;
}
}//package spill.localisation
Section 69
//LocalizedTextField (spill.localisation.LocalizedTextField)
package spill.localisation {
import flash.events.*;
public class LocalizedTextField extends TextFieldFit {
private var regex:RegExp;
private var originalText:String;
public function LocalizedTextField(){
regex = /{([^{}]*)}/g;
super();
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
added();
}
private function languageChanged(_arg1:Event):void{
text = originalText;
updateProperties();
}
override public function set text(_arg1:String):void{
originalText = _arg1;
if ((_arg1 is String)){
super.text = _arg1.replace(regex, replaceFn);
} else {
super.text = "";
};
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
private function replaceFn():String{
var _local2:String;
_local2 = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
text = originalText;
}
}
}//package spill.localisation
Section 70
//PortalGroup (spill.localisation.PortalGroup)
package spill.localisation {
import flash.xml.*;
public class PortalGroup {
public static const FAMILY:uint = 0;
public static const channelNames:Array = ["family", "tween", "girl", "teen"];
public static const TWEEN:uint = 1;
public static const NONE:uint = 4;
public static const TEEN:uint = 3;
public static const GIRL:uint = 2;
public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF];
public static function getName(_arg1:int):String{
return (channelNames[_arg1]);
}
public static function exportXML():XMLNode{
var _local1:XMLNode;
var _local2:int;
var _local3:XMLNode;
_local1 = new XMLNode(1, "channels");
_local2 = 0;
while (_local2 < 4) {
_local3 = new XMLNode(1, "channel");
_local3.attributes.name = channelNames[_local2];
_local3.attributes.id = _local2;
_local1.appendChild(_local3);
_local2++;
};
return (_local1);
}
}
}//package spill.localisation
Section 71
//spil_internal (spill.localisation.spil_internal)
package spill.localisation {
public namespace spil_internal = "spill.localisation";
}//package spill.localisation
Section 72
//SpilGame (spill.localisation.SpilGame)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import flash.ui.*;
import flash.external.*;
import flash.system.*;
public class SpilGame {
private static const cookiePath:String = "/";
private static const cookieLanguageVar:String = "savedLang";
public static const LANGUAGE_CHANGED:String = "languageChanged";
private static const cookieName:String = "spilgames_language_v100";
public static const BRANDING_CHANGED:String = "brandingChanged";
private static var strings:Object = new Object();
public static var currentBranding:Brand;
private static var contexMenuItem:ContextMenuItem;
spil_internal static var gameName:String;
spil_internal static var debugHostDomain:String = "";
private static var localDomains:Object = new Object();
spil_internal static var emailPage:String;
private static var channelLock:Boolean = false;
spil_internal static var debugEmbedDomain:String = "";
private static var eventDispatcher:EventDispatcher;
private static var _init:Boolean = false;
public static var currentLanguage:Language;
spil_internal static var portalGroup:uint;
public static function getSpilCompanyLink():String{
if (currentLanguage.name == "cn"){
return ("http://www.game.com.cn/downloads/");
};
return ("http://www.gameportal.net");
}
public static function getPromotionLink(_arg1:String="feature_promotion"):String{
var _local2:String;
_local2 = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1));
}
public static function traceAllBrands():void{
trace(outputAllBrands());
}
public static function getString(_arg1:String):String{
var _local2:Object;
_local2 = strings[_arg1];
if (_local2){
if (currentLanguage.textLanguage){
return (_local2[currentLanguage.textLanguage]);
};
return (_local2[currentLanguage.name]);
//unresolved jump
};
return ("");
}
public static function initialize(_arg1:String, _arg2:int, _arg3:String, _arg4:Sprite, _arg5:Boolean=false):void{
if (_init){
trace("ERROR: LocalisationManager already initialised");
return;
};
_init = true;
localDomains["localhost"] = true;
localDomains["www8.agame.com"] = true;
localDomains["gamedev.dev.spilgames.com"] = true;
Brandings.initialize();
Languages.initialize();
initContexMenu(_arg4);
channelLock = _arg5;
gameName = _arg1.replace(" ", "_");
portalGroup = _arg2;
emailPage = _arg3;
chooseLanguage();
chooseBranding();
}
public static function get isExternal():Boolean{
return (((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain]))));
}
private static function initContexMenu(_arg1:Sprite):void{
contexMenuItem = new ContextMenuItem("");
_arg1.contextMenu = new ContextMenu();
_arg1.contextMenu.customItems.push(contexMenuItem);
contexMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contexMenuClicked);
}
private static function replaceFn():String{
var _local2:String;
_local2 = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
public static function initTextField(_arg1:TextField):void{
var _local2:TextFormat;
trace(_arg1.text);
_arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn);
trace(_arg1.text);
_arg1.embedFonts = currentLanguage.embedFonts;
if (currentLanguage.forceFont != ""){
_local2 = new TextFormat();
_local2.font = currentLanguage.forceFont;
_arg1.setTextFormat(_local2);
};
}
spil_internal static function get hostingDomain():String{
var _local1:LocalConnection;
if (debugHostDomain != ""){
return (debugHostDomain);
};
_local1 = new LocalConnection();
return (_local1.domain);
}
spil_internal static function chooseLanguage():void{
if (cookieLanguage != null){
currentLanguage = cookieLanguage;
} else {
if (isExternal){
currentLanguage = systemLanguage;
} else {
currentLanguage = portalLanguage;
if (!currentLanguage){
currentLanguage = systemLanguage;
};
};
};
if (!currentLanguage){
trace("Unable to determine language, using 'English US'");
currentLanguage = Languages.getLanguage("en_us");
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
private static function contexMenuClicked(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu")));
}
public static function importXMLv2(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.attribute("identifier")] = new Object());
for each (_local4 in _local2.children()) {
if (_local4.children().length() > 0){
_local3[_local4.name()] = _local4.children()[0].toString();
} else {
_local3[_local4.name()] = "";
};
};
};
}
spil_internal static function changeLanguage(_arg1:String):void{
var _local2:Language;
_local2 = Languages.getLanguage(_arg1);
if (!_local2){
trace("ERROR: Supplied language string does not have a matching language");
} else {
cookieLanguage = _local2;
currentLanguage = _local2;
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
chooseBranding();
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
public static function getSendToFriendLink():String{
return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain));
}
spil_internal static function chooseBranding():void{
var _local1:Brand;
var _local2:uint;
if (!isExternal){
_local1 = Brandings.getBrandByDomain(embedDomain);
if (_local1){
if (currentLanguage.name == _local1.preferedLanguage){
currentBranding = _local1;
} else {
_local2 = 0;
if ((((_local1.portalGroup == PortalGroup.NONE)) || (channelLock))){
_local2 = portalGroup;
} else {
_local2 = _local1.portalGroup;
};
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[_local2]);
};
} else {
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]);
};
} else {
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]);
};
if ((!(currentBranding) is Brand)){
currentBranding = Brandings.getBrandByDomain("www.agame.com");
};
contexMenuItem.caption = ("More Games: " + currentBranding.domain);
dispatchEvent(new Event(BRANDING_CHANGED));
}
spil_internal static function get systemLanguage():Language{
return (Languages.getLanguage(Capabilities.language));
}
spil_internal static function set cookieLanguage(_arg1:Language):void{
var _local2:SharedObject;
_local2 = SharedObject.getLocal(cookieName, cookiePath);
if (_arg1 == null){
_local2.data[cookieLanguageVar] = null;
} else {
_local2.data[cookieLanguageVar] = _arg1.name;
};
_local2.flush();
}
public static function importXML(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.identifier] = new Object());
for each (_local4 in _local2.children()) {
_local3[_local4.name()] = _local4.children()[0].toString();
};
};
}
spil_internal static function dispatchEvent(_arg1:Event):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.dispatchEvent(_arg1);
}
private static function getDomain(_arg1:String):String{
var _local2:String;
var _local3:uint;
if (_arg1.indexOf("file") == 0){
return ("offline_play");
};
_local2 = new String();
_local3 = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
if (_local2 == "localhost"){
_local2 = "offline_play";
};
return (_local2);
}
public static function exportXML():XML{
var _local1:XML;
_local1 = <spil_games/>
;
_local1.appendChild(Brandings.exportXML());
_local1.appendChild(Languages.exportXML());
_local1.appendChild(PortalGroup.exportXML());
return (_local1);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function outputAllBrands():String{
var _local1:Array;
var _local2:String;
var _local3:Brand;
_local1 = Brandings.getBrandsArray();
_local2 = "";
for each (_local3 in _local1) {
_local2 = (_local2 + (_local3.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain) + "\n"));
};
return (_local2);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function getMoreGamesLink(_arg1:String=""):String{
var _local2:String;
_local2 = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1));
}
spil_internal static function get cookieLanguage():Language{
var _local1:SharedObject;
var _local2:String;
_local1 = SharedObject.getLocal(cookieName, cookiePath);
_local2 = String(_local1.data[cookieLanguageVar]);
return (Languages.getLanguage(_local2));
}
private static function get portalLanguage():Language{
var _local1:Brand;
var _local2:String;
var _local3:Language;
if (isExternal){
return (null);
};
if (!embedDomain){
return (null);
};
_local1 = Brandings.getBrandByDomain(embedDomain);
if (!_local1){
return (null);
};
_local2 = _local1.preferedLanguage;
if (!_local2){
return (null);
};
_local3 = Languages.getLanguage(_local2);
if (!_local3){
return (null);
};
return (_local3);
}
spil_internal static function get embedDomain():String{
var loc:String;
if (debugEmbedDomain != ""){
return (debugEmbedDomain);
};
if (ExternalInterface.available){
try {
loc = ExternalInterface.call("window.location.href.toString");
if (((!((loc == ""))) && (!((loc == null))))){
trace(("embed domain = " + getDomain(loc)));
return (getDomain(loc));
};
} catch(e:SecurityError) {
trace(("Security Error connecting to external interface, error = " + e));
} catch(e:Error) {
trace(("Error connecting to external interface, error = " + e));
};
};
return (null);
}
}
}//package spill.localisation
Section 73
//SpilGamesLink (spill.localisation.SpilGamesLink)
package spill.localisation {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class SpilGamesLink extends SimpleButton {
public function SpilGamesLink(){
addEventListener(MouseEvent.CLICK, buttonClicked);
}
private function buttonClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()), "_blank");
}
}
}//package spill.localisation
Section 74
//TextFieldFit (spill.localisation.TextFieldFit)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class TextFieldFit extends MovieClip {
protected var _text:String;// = "default"
protected var _textSize:Number;// = 12
protected var _embedFonts:Boolean;// = true
protected var _glowColor:uint;// = 0
private var h:Number;
protected var _antiAliasType:String;// = "advanced"
private var w:Number;
protected var _useGlowFilter:Boolean;// = false
protected var _hAlign:String;// = "left"
protected var _textColor:uint;// = 0
protected var _glowStrength:Number;// = 5
protected var _glowBlur:Number;// = 3
private var field:TextField;
protected var _gridFitType:String;// = "pixel"
protected var _glowQuality:Number;// = 1
private var debugBounding:Sprite;
protected var _disableWordwrap:Boolean;// = false
protected var _multiline:Boolean;// = false
protected var _font:String;// = ""
protected var _underline:Boolean;// = false
protected var _vAlign:String;// = "top"
protected var _italic:Boolean;// = false
protected var _bold:Boolean;// = false
private var sizeChanged:Boolean;// = true
private var embeddedFonts:Array;
protected var _selectable:Boolean;// = false
private var format:TextFormat;
private var valid:Boolean;// = true
private static const gutter:Number = 2;
spil_internal static var embedFonts:Boolean = true;
spil_internal static var forceAAType:String = null;
spil_internal static var forceFont:String = null;
public static var alwaysCheckWidth:Boolean = false;
public function TextFieldFit(){
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
sizeChanged = true;
valid = true;
_text = "default";
_textColor = 0;
_textSize = 12;
_multiline = false;
_disableWordwrap = false;
_hAlign = "left";
_vAlign = "top";
_bold = false;
_underline = false;
_italic = false;
_selectable = false;
_font = "";
_embedFonts = true;
_antiAliasType = "advanced";
_gridFitType = "pixel";
_useGlowFilter = false;
_glowBlur = 3;
_glowColor = 0;
_glowStrength = 5;
_glowQuality = 1;
super();
_local1 = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
_local2 = width;
_local3 = height;
if (numChildren > 0){
removeChildAt(0);
};
if (!field){
field = new TextField();
addChild(field);
};
field.border = false;
field.background = false;
field.type = TextFieldType.DYNAMIC;
mouseEnabled = false;
mouseChildren = false;
format = new TextFormat();
embeddedFonts = Font.enumerateFonts(false);
setSize(_local2, _local3);
validate();
if (stage){
addEventListener(Event.RENDER, init);
stage.invalidate();
};
init();
}
private function resizeText(_arg1:Boolean=false):void{
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
if (format.size <= 3){
trace("WARNING: Text resised to 3px, either an error occured or the text just wont fit");
return;
};
field.setTextFormat(format);
resizeText(true);
} else {
if (_arg1 == false){
while (doesTextFit()) {
if (format.size <= textSize){
format.size = Object((Number(format.size) + 1));
field.setTextFormat(format);
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
field.setTextFormat(format);
break;
};
} else {
break;
};
};
};
};
}
public function get italic():Boolean{
return (_italic);
}
public function get textColor():uint{
return (_textColor);
}
public function get vAlign():String{
return (_vAlign);
}
public function get useGlowFilter():Boolean{
return (_useGlowFilter);
}
public function get selectable():Boolean{
return (_selectable);
}
public function set italic(_arg1:Boolean):void{
_italic = _arg1;
invalidate();
}
public function set text(_arg1:String):void{
_text = _arg1;
invalidate();
}
public function set vAlign(_arg1:String):void{
_vAlign = _arg1;
invalidate();
}
public function get font():String{
return (_font);
}
public function set textColor(_arg1:uint):void{
_textColor = _arg1;
invalidate();
}
public function get antiAliasType():String{
return (_antiAliasType);
}
public function get bold():Boolean{
return (_bold);
}
public function set useGlowFilter(_arg1:Boolean):void{
_useGlowFilter = _arg1;
invalidate();
}
public function set font(_arg1:String):void{
_font = _arg1;
invalidate();
}
public function set selectable(_arg1:Boolean):void{
_selectable = _arg1;
invalidate();
}
public function get multiline():Boolean{
return (_multiline);
}
public function set disableWordwrap(_arg1:Boolean):void{
_disableWordwrap = _arg1;
invalidate();
}
public function get glowQuality():Number{
return (_glowQuality);
}
public function get embedFonts():Boolean{
return (_embedFonts);
}
public function get gridFitType():String{
return (_gridFitType);
}
public function get underline():Boolean{
return (_underline);
}
public function get textSize():Number{
return (_textSize);
}
public function set antiAliasType(_arg1:String):void{
_antiAliasType = _arg1;
invalidate();
}
protected function updateProperties():void{
var _local1:Boolean;
var _local2:Font;
field.text = _text;
field.multiline = ((((_text.indexOf(" ") < 0)) && ((_text.length < 14)))) ? false : _multiline;
field.wordWrap = ((field.multiline) && (!(_disableWordwrap)));
field.selectable = _selectable;
field.antiAliasType = (forceAAType) ? forceAAType : _antiAliasType;
field.gridFitType = _gridFitType;
embeddedFonts = Font.enumerateFonts(false);
if (((((_embedFonts) && (!((_font == ""))))) && (TextFieldFit.embedFonts))){
_local1 = false;
for each (_local2 in embeddedFonts) {
if (_font == _local2.fontName){
_local1 = true;
break;
};
};
field.embedFonts = _local1;
if (!_local1){
trace(((("WARNING: Embedded font '" + _font) + "' not found, disabling embedding of fonts, text = ") + _text));
};
} else {
field.embedFonts = false;
};
if (TextFieldFit.forceFont){
format.font = TextFieldFit.forceFont;
} else {
if (_font != ""){
format.font = _font;
};
};
if (sizeChanged){
format.size = _textSize;
};
format.color = _textColor;
format.align = _hAlign;
format.bold = _bold;
format.italic = _italic;
format.underline = _underline;
format.leftMargin = 0;
format.rightMargin = 0;
field.setTextFormat(format);
if (_useGlowFilter){
filters = [new GlowFilter(_glowColor, 1, _glowBlur, _glowBlur, _glowStrength, _glowQuality)];
} else {
filters = [];
};
}
private function doesTextFit():Boolean{
if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){
return (false);
};
return (true);
}
public function get glowStrength():Number{
return (_glowStrength);
}
public function set hAlign(_arg1:String):void{
_hAlign = _arg1;
invalidate();
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.RENDER, init);
updateProperties();
layoutText();
}
public function set bold(_arg1:Boolean):void{
_bold = _arg1;
invalidate();
}
private function validate(_arg1:Event=null):void{
updateProperties();
layoutText();
removeEventListener(Event.ENTER_FRAME, validate);
valid = true;
}
public function get text():String{
return (_text);
}
public function set glowBlur(_arg1:Number):void{
_glowBlur = _arg1;
invalidate();
}
private function invalidate():void{
if (valid){
addEventListener(Event.ENTER_FRAME, validate);
if (stage){
stage.invalidate();
};
valid = false;
};
}
public function set embedFonts(_arg1:Boolean):void{
_embedFonts = _arg1;
invalidate();
}
public function set multiline(_arg1:Boolean):void{
_multiline = _arg1;
invalidate();
}
public function get disableWordwrap():Boolean{
return (_disableWordwrap);
}
public function set glowQuality(_arg1:Number):void{
_glowQuality = _arg1;
invalidate();
}
private function layoutText():void{
resizeText();
field.height = (field.textHeight + (gutter * 2));
if (vAlign == "top"){
field.y = 0;
} else {
if (vAlign == "middle"){
field.y = ((h - field.height) / 2);
} else {
if (vAlign == "bottom"){
field.y = (h - field.height);
};
};
};
}
public function get hAlign():String{
return (_hAlign);
}
public function setSize(_arg1:Number, _arg2:Number):void{
w = _arg1;
h = _arg2;
scaleX = (scaleY = 1);
field.width = w;
field.height = h;
invalidate();
}
public function set gridFitType(_arg1:String):void{
_gridFitType = _arg1;
invalidate();
}
public function set underline(_arg1:Boolean):void{
_underline = _arg1;
invalidate();
}
public function get glowBlur():Number{
return (_glowBlur);
}
public function set textSize(_arg1:Number):void{
_textSize = _arg1;
sizeChanged = true;
invalidate();
}
public function set glowColor(_arg1:uint):void{
_glowColor = _arg1;
invalidate();
}
public function get glowColor():uint{
return (_glowColor);
}
public function set glowStrength(_arg1:Number):void{
_glowStrength = _arg1;
invalidate();
}
}
}//package spill.localisation
Section 75
//Submitter (Spill.Components.Submitter)
package Spill.Components {
import flash.display.*;
public dynamic class Submitter extends MovieClip {
public var OO00OO1l1l:OOO000lll;
}
}//package Spill.Components
Section 76
//O1OOO0O00 (Util.O1OOO0O00)
package Util {
import flash.net.*;
import flash.external.*;
public class O1OOO0O00 {
private static const _O1lO0Oll1:Array = ["www.a10.com.gp.dev.spilgames.eu", "stg.pl.a10.com", "gamedev.dev.spilgames.com", "www.agame.com", "www.girlsgogames.com", "www.games.co.uk", "www.mygames.co.uk", "www.girlsgogames.co.uk", "www.spel.nl", "www.spelletjes.nl", "www.girlsgogames.nl", "www.jetztspielen.de", "www.spielen.com", "www.girlsgogames.de", "www.jeux.fr", "www.jeu.fr", "www.girlsgogames.fr", "www.juegos.com", "www.zapjuegos.com", "www.juegosdechicas.com", "www.gioco.it", "www.giocaregratis.it", "www.girlsgogames.it", "www.gry.pl", "www.minigry.pl", "www.girlsgogames.pl", "www.spela.se", "www.spel.eu", "www.girlsgogames.se", "www.ojogos.pt", "www.ourgames.ru", "www.flashgames.ru", "www.girlsgogames.ru", "www.oyunlar123.com", "www.asoyun.com", "www.girlsgogamestr.com", "www.gamesgames.com", "www.agame.com", "www.girlsgogames.com", "www.juegos.com", "www.zapjuegos.com", "www.juegosdechicas.com", "www.ojogos.com.br", "www.clickjogos.com", "www.girlsgogames.com.br", "www.game.com.cn", "www.xiaoyouxi.com", "www.egames.jp", "www.game.co.in", "www.game.co.in", "www.girlsgogames.in", "www.games.co.id", "www.laro.com.ph", "www.game.com.my", "www.onrpg.com", "www.zlonggames.com", "www.a10.com", "localhost"];
private static var _OOl10ll1l:URLRequest;
private static var _O0Oll0l00;
public function O1OOO0O00():void{
super();
try {
_O0Oll0l00 = ExternalInterface.call("window.location.href.toString");
} catch(e) {
_O0Oll0l00 = "error";
};
if ((((_O0Oll0l00 == null)) || ((_O0Oll0l00 == "")))){
_O0Oll0l00 = "error";
};
if (String(_O0Oll0l00).indexOf(".swf") != -1){
_O0Oll0l00 = "error";
};
}
public function O0111l110():Boolean{
if (((!((_O001llOll(_O11ll1l00(_O0Oll0l00)) == -1))) && (!((_O0Oll0l00 == "error"))))){
return (true);
};
return (false);
}
private static function _O11ll1l00(_arg1:String):String{
var _local2:String = new String();
var _local3:uint = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
return (_local2);
}
private static function _O001llOll(_arg1:String):Number{
var _local2:uint;
if (((_O1lO0Oll1) && (_arg1))){
_local2 = 0;
while (_local2 < _O1lO0Oll1.length) {
if (_arg1 == _O1lO0Oll1[_local2]){
return (_local2);
};
_local2++;
};
return (-1);
} else {
trace("cannot find site name");
};
return (-1);
}
}
}//package Util
Section 77
//Boss1 (Boss1)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Boss1 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
private var chngPosCount:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var newYpos:Number;
private var rateOfShoot:Number;
private var spd:Number;
private var newXpos:Number;
public var lifeDenominator:Number;
private var _angle:Number;
public function Boss1(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 1200;
lifeDenominator = life;
spd = 4;
chngPosCount = (Math.floor((Math.random() * (4 - 2))) + 2);
entryXpos = (Math.floor((Math.random() * (500 - 400))) + 400);
Tweener.addTween(this, {x:entryXpos, time:1.8, transition:"linear", onComplete:posChange});
rateOfShoot = (Math.floor((Math.random() * (800 - 500))) + 500);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function posChange(){
var _local1:Number;
chngPosCount++;
_local1 = (Math.floor((Math.random() * (2 - 0))) + 0);
newXpos = (Math.floor((Math.random() * (600 - 480))) + 480);
if (this.y <= 240){
newYpos = (Math.floor((Math.random() * (420 - 300))) + 300);
Tweener.addTween(this, {x:newXpos, y:newYpos, time:2, transition:"linear", delay:_local1, onComplete:posChange});
} else {
newYpos = (Math.floor((Math.random() * (230 - 100))) + 100);
Tweener.addTween(this, {x:newXpos, y:newYpos, time:2, transition:"linear", delay:_local1, onComplete:posChange});
};
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss1Ammo1(this);
};
}
public function looper(){
if (life <= 0){
MovieClip(parent.parent).attExplosion5(this, 1);
lifeBar(life, lifeDenominator);
destruct("");
} else {
lifeBar(life, lifeDenominator);
if (this.x <= -150){
destruct("");
};
};
}
public function lifeBar(_arg1:Number, _arg2:Number){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = (_arg1 / _arg2);
if (MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX <= 0){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = 0;
};
}
public function changePos(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:1.8, transition:"linear", delay:1, onComplete:deviateDestruct});
}
public function destruct(_arg1:String){
Tweener.removeTweens(this);
MovieClip(parent.parent).updateKillScore(5);
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).bossArray, this);
}
public function deviateDestruct(){
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 78
//Boss1Ammo1 (Boss1Ammo1)
package {
import flash.display.*;
import flash.events.*;
public class Boss1Ammo1 extends MovieClip {
public var xSpd:Number;
public var typeOfDestruction:String;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss1Ammo1(_arg1:MovieClip, _arg2:Number){
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = _arg2;
trace(("this.x" + this.x));
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((this.x < 0)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss1Ammo1Array, this);
}
}
}//package
Section 79
//Boss2 (Boss2)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Boss2 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
private var chngPosCount:Number;
private var wpn2shootTimer:Timer;
public var typeOfDestruction:String;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var newYpos:Number;
private var wpn1shootTimer:Timer;
private var rateOfShoot:Number;
private var spd:Number;
private var newXpos:Number;
public var lifeDenominator:Number;
private var _angle:Number;
private var wpn1coolDownTimer:Timer;
public function Boss2(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
private function wpn1shootCease(_arg1:TimerEvent){
wpn1shootTimer.reset();
wpn1coolDownTimer.start();
}
public function init(){
life = 2000;
lifeDenominator = life;
spd = 4;
chngPosCount = (Math.floor((Math.random() * (4 - 2))) + 2);
entryXpos = (Math.floor((Math.random() * (500 - 400))) + 400);
Tweener.addTween(this, {x:entryXpos, time:1.8, transition:"linear", onComplete:posChange});
rateOfShoot = 300;
wpn1shootTimer = new Timer(rateOfShoot, 6);
wpn1shootTimer.addEventListener(TimerEvent.TIMER, wpn1shoot);
wpn1shootTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootCease);
wpn1shootTimer.start();
wpn1coolDownTimer = new Timer(1000, 3);
wpn1coolDownTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootOpen);
wpn2shootTimer = new Timer(2000, 0);
wpn2shootTimer.addEventListener(TimerEvent.TIMER, wpn2shootOpen);
wpn2shootTimer.start();
}
private function posChange(){
var _local1:Number;
chngPosCount++;
_local1 = (Math.floor((Math.random() * (2 - 0))) + 0);
newXpos = (Math.floor((Math.random() * (600 - 480))) + 480);
if (this.y <= 240){
newYpos = (Math.floor((Math.random() * (420 - 300))) + 300);
Tweener.addTween(this, {x:newXpos, y:MovieClip(parent).plyr_mc.y, time:1, transition:"linear", delay:_local1, onComplete:posChange});
} else {
newYpos = (Math.floor((Math.random() * (230 - 100))) + 100);
Tweener.addTween(this, {x:newXpos, y:MovieClip(parent).plyr_mc.y, time:1, transition:"linear", delay:_local1, onComplete:posChange});
};
}
public function looper(){
if (life <= 0){
MovieClip(parent.parent).attExplosion5(this, 2);
lifeBar(life, lifeDenominator);
destruct("");
} else {
lifeBar(life, lifeDenominator);
if (this.x <= -150){
destruct("");
};
};
}
private function wpn1shootOpen(_arg1:TimerEvent){
wpn1shootTimer.start();
}
public function lifeBar(_arg1:Number, _arg2:Number){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = (_arg1 / _arg2);
if (MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX <= 0){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = 0;
};
}
private function wpn1shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss2Ammo1(this);
};
}
public function changePos(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:1.8, transition:"linear", delay:1, onComplete:deviateDestruct});
}
public function destruct(_arg1:String){
Tweener.removeTweens(this);
MovieClip(parent.parent).updateKillScore(5);
wpn1shootTimer.stop();
wpn1coolDownTimer.stop();
wpn1shootTimer.removeEventListener(TimerEvent.TIMER, wpn1shoot);
wpn2shootTimer.removeEventListener(TimerEvent.TIMER, wpn2shootOpen);
wpn1shootTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootCease);
wpn1coolDownTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootOpen);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).bossArray, this);
}
private function wpn2shootOpen(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss2Ammo2(this);
};
}
public function deviateDestruct(){
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 80
//Boss2Ammo1 (Boss2Ammo1)
package {
import flash.display.*;
import flash.events.*;
public class Boss2Ammo1 extends MovieClip {
public var xSpd:Number;
public var typeOfDestruction:String;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss2Ammo1(_arg1:MovieClip){
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = 180;
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss2Ammo1Array, this);
}
}
}//package
Section 81
//Boss2Ammo2 (Boss2Ammo2)
package {
import flash.display.*;
import flash.events.*;
public class Boss2Ammo2 extends MovieClip {
public var life:Number;
public var xSpd:Number;
public var typeOfDestruction:String;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss2Ammo2(_arg1:MovieClip){
this.rotation = _arg1.rotation;
init();
}
public function init(){
spd = 12;
grvty = 1;
life = 2;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function followPlyr(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:Number;
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
_local2 = (_arg1.x - this.x);
_local3 = (_arg1.y - this.y);
_local4 = Math.atan((_local3 / _local2));
_local5 = ((_local4 * 180) / Math.PI);
if (_local2 < 0){
_local5 = (_local5 - 180);
};
_local6 = _local5;
this.rotation = _local5;
_local5 = _local6;
_local4 = ((_local5 / 180) * Math.PI);
_local2 = Math.cos(_local4);
_local3 = Math.sin(_local4);
_local2 = (_local2 * spd);
_local3 = (_local3 * spd);
};
this.x = (this.x + _local2);
this.y = (this.y + _local3);
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("outBounds");
} else {
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
destruct("hit");
} else {
followPlyr(MovieClip(parent).plyr_mc);
};
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
} else {
if (_arg1 == "outBounds"){
};
};
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss2Ammo2Array, this);
}
}
}//package
Section 82
//Boss3 (Boss3)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Boss3 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
private var wpn3shootTimer:Timer;
private var chngPosCount:Number;
private var wpn2shootTimer:Timer;
public var typeOfDestruction:String;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var newYpos:Number;
private var wpn2coolDownTimer:Timer;
private var wpn1shootTimer:Timer;
private var rateOfShoot:Number;
private var spd:Number;
private var newXpos:Number;
public var lifeDenominator:Number;
private var _angle:Number;
private var wpn1coolDownTimer:Timer;
public function Boss3(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
this.x = _arg1;
this.y = _arg2;
init();
}
private function wpn1shootCease(_arg1:TimerEvent){
wpn1shootTimer.reset();
wpn1coolDownTimer.start();
}
public function init(){
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 3000;
lifeDenominator = life;
spd = 4;
chngPosCount = (Math.floor((Math.random() * (4 - 2))) + 2);
entryXpos = (Math.floor((Math.random() * (500 - 400))) + 400);
Tweener.addTween(this, {x:entryXpos, time:1.8, transition:"linear", onComplete:posChange});
rateOfShoot = 500;
wpn1shootTimer = new Timer(rateOfShoot, 5);
wpn1shootTimer.addEventListener(TimerEvent.TIMER, wpn1shoot);
wpn1shootTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootCease);
wpn1shootTimer.start();
wpn1coolDownTimer = new Timer(2000, 3);
wpn1coolDownTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootOpen);
wpn2shootTimer = new Timer(150, 6);
wpn2shootTimer.addEventListener(TimerEvent.TIMER, wpn2shoot);
wpn2shootTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn2shootCease);
wpn2coolDownTimer = new Timer(1500, 1);
wpn2coolDownTimer.addEventListener(TimerEvent.TIMER_COMPLETE, wpn2shootOpen);
wpn2coolDownTimer.start();
wpn3shootTimer = new Timer(4000, 0);
wpn3shootTimer.addEventListener(TimerEvent.TIMER, wpn3shoot);
wpn3shootTimer.start();
}
private function wpn2shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss3Ammo2(this);
};
}
private function posChange(){
var _local1:Number;
chngPosCount++;
_local1 = (Math.floor((Math.random() * (2 - 0))) + 0);
newXpos = (Math.floor((Math.random() * (600 - 480))) + 480);
if (this.y <= 240){
newYpos = (Math.floor((Math.random() * (420 - 300))) + 300);
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1, transition:"linear", delay:_local1, onComplete:posChange});
} else {
newYpos = (Math.floor((Math.random() * (230 - 100))) + 100);
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1, transition:"linear", delay:_local1, onComplete:posChange});
};
}
public function looper(){
if (life <= 0){
MovieClip(parent.parent).attExplosion5(this, 3);
lifeBar(life, lifeDenominator);
destruct("");
} else {
lifeBar(life, lifeDenominator);
if (this.x <= -150){
destruct("");
};
};
}
private function wpn1shootOpen(_arg1:TimerEvent){
wpn1shootTimer.start();
}
public function lifeBar(_arg1:Number, _arg2:Number){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = (_arg1 / _arg2);
if (MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX <= 0){
MovieClip(parent.parent).bossLifeUI_mc.bosslifeBar_mc.scaleX = 0;
};
}
private function wpn1shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss3Ammo1(this);
};
}
public function destruct(_arg1:String){
Tweener.removeTweens(this);
MovieClip(parent.parent).updateKillScore(5);
wpn1shootTimer.stop();
wpn1coolDownTimer.stop();
wpn1shootTimer.removeEventListener(TimerEvent.TIMER, wpn1shoot);
wpn2shootTimer.removeEventListener(TimerEvent.TIMER, wpn2shoot);
wpn3shootTimer.removeEventListener(TimerEvent.TIMER, wpn3shoot);
wpn2shootTimer.removeEventListener(TimerEvent.TIMER, wpn2shootOpen);
wpn2coolDownTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, wpn2shootOpen);
wpn1shootTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootCease);
wpn1coolDownTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, wpn1shootOpen);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).bossArray, this);
}
public function changePos(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:1.8, transition:"linear", delay:1, onComplete:deviateDestruct});
}
private function wpn3shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attBoss3Ammo3(this);
};
}
private function wpn2shootOpen(_arg1:TimerEvent){
wpn2shootTimer.start();
}
private function wpn2shootCease(_arg1:TimerEvent){
wpn2shootTimer.reset();
wpn2coolDownTimer.start();
}
public function deviateDestruct(){
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 83
//Boss3Ammo1 (Boss3Ammo1)
package {
import flash.display.*;
import flash.events.*;
public class Boss3Ammo1 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss3Ammo1(_arg1:MovieClip, _arg2:Number){
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = _arg2;
trace(("this.x" + this.x));
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((this.x < 0)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss3Ammo1Array, this);
}
}
}//package
Section 84
//Boss3Ammo2 (Boss3Ammo2)
package {
import flash.display.*;
import flash.events.*;
public class Boss3Ammo2 extends MovieClip {
public var xSpd:Number;
public var typeOfDestruction:String;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss3Ammo2(_arg1:MovieClip){
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = 180;
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss3Ammo2Array, this);
}
}
}//package
Section 85
//Boss3Ammo3 (Boss3Ammo3)
package {
import flash.display.*;
import flash.events.*;
public class Boss3Ammo3 extends MovieClip {
public var life:Number;
public var xSpd:Number;
public var typeOfDestruction:String;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Boss3Ammo3(_arg1:MovieClip){
this.rotation = _arg1.rotation;
init();
}
public function init(){
spd = 12;
grvty = 1;
life = 2;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function followPlyr(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:Number;
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
_local2 = (_arg1.x - this.x);
_local3 = (_arg1.y - this.y);
_local4 = Math.atan((_local3 / _local2));
_local5 = ((_local4 * 180) / Math.PI);
if (_local2 < 0){
_local5 = (_local5 - 180);
};
_local6 = _local5;
this.rotation = _local5;
_local5 = _local6;
_local4 = ((_local5 / 180) * Math.PI);
_local2 = Math.cos(_local4);
_local3 = Math.sin(_local4);
_local2 = (_local2 * spd);
_local3 = (_local3 * spd);
};
this.x = (this.x + _local2);
this.y = (this.y + _local3);
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("outBounds");
} else {
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
destruct("hit");
} else {
followPlyr(MovieClip(parent).plyr_mc);
};
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
} else {
if (_arg1 == "outBounds"){
};
};
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).boss3Ammo3Array, this);
}
}
}//package
Section 86
//BtnSnd (BtnSnd)
package {
import flash.media.*;
public dynamic class BtnSnd extends Sound {
}
}//package
Section 87
//Debris (Debris)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class Debris extends MovieClip {
public var xSpd:Number;
public var animation_mc:MovieClip;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
private var smokeTrail:Timer;
public var rot:Number;
public function Debris(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
myGlow = new GlowFilter();
super();
_local4 = (Math.floor((Math.random() * (500 - 80))) + 80);
smokeTrail = new Timer(_local4, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 8;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
if (this.scaleX <= 0){
destruct("");
} else {
this.scaleX = (this.scaleX - 0.04);
this.scaleY = (this.scaleY - 0.04);
this.animation_mc.rotation = (this.animation_mc.rotation + 25);
ySpd = (ySpd + grvty);
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).debrisArray, this);
}
}
}//package
Section 88
//Earthquake (Earthquake)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Earthquake {
private static const FRAME_RATE:int = 30;
private static var timer:Timer;
private static var originalX:int;
private static var originalY:int;
private static var intensityOffset:int;
private static var intensity:int;
private static var image:DisplayObject;
private static function cleanup():void{
timer = null;
image = null;
}
public static function go(_arg1:DisplayObject, _arg2:Number=10, _arg3:Number=1):void{
var _local4:int;
var _local5:int;
if (timer){
timer.stop();
};
image = _arg1;
originalX = 0;
originalY = 0;
intensity = _arg2;
intensityOffset = (intensity / 2);
_local4 = int((1000 / FRAME_RATE));
_local5 = int(((_arg3 * 1000) / _local4));
timer = new Timer(_local4, _local5);
timer.addEventListener(TimerEvent.TIMER, quake);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, resetImage);
timer.start();
}
public static function temp():void{
}
private static function quake(_arg1:TimerEvent):void{
var _local2:int;
var _local3:int;
_local2 = ((originalX + (Math.random() * intensity)) - intensityOffset);
_local3 = ((originalY + (Math.random() * intensity)) - intensityOffset);
image.x = _local2;
image.y = _local3;
}
private static function resetImage(_arg1:TimerEvent=null):void{
image.x = originalX;
image.y = originalY;
cleanup();
}
}
}//package
Section 89
//Enemy1 (Enemy1)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy1 extends MovieClip {
public var life:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var rateOfShoot:Number;
private var spd:Number;
public function Enemy1(){
myGlow = new GlowFilter();
super();
addFrameScript(0, frame1);
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 30;
spd = (Math.floor((Math.random() * (3 - 1))) + 1);
rateOfShoot = (Math.floor((Math.random() * (1000 - 800))) + 800);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy1Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
this.x = (this.x - spd);
if (this.x <= -150){
destruct("outBounds");
};
};
}
function frame1(){
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 1);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 90
//Enemy10 (Enemy10)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy10 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
private var chngPosCount:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var newYpos:Number;
private var rateOfShoot:Number;
private var spd:Number;
private var newXpos:Number;
private var _angle:Number;
public function Enemy10(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 30;
spd = 4;
chngPosCount = (Math.floor((Math.random() * (4 - 2))) + 2);
entryXpos = (Math.floor((Math.random() * (630 - 480))) + 480);
Tweener.addTween(this, {x:entryXpos, time:1, transition:"easeOutStrong", onComplete:mov});
rateOfShoot = 180;
shootTimer = new Timer(rateOfShoot, 8);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
}
private function mov(){
var _local1:Number;
chngPosCount++;
_local1 = (Math.floor((Math.random() * (2 - 0))) + 0);
newXpos = (Math.floor((Math.random() * (520 - 380))) + 380);
if (this.y <= 240){
newYpos = (Math.floor((Math.random() * (450 - 300))) + 300);
if (chngPosCount >= 5){
Tweener.addTween(this, {x:-200, y:100, time:2.5, transition:"easeInOutStrong", delay:_local1, onComplete:deviateDestruct});
} else {
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1.8, transition:"easeInOutStrong", delay:_local1, onComplete:mov});
};
} else {
newYpos = (Math.floor((Math.random() * (230 - 80))) + 80);
if (chngPosCount >= 5){
Tweener.addTween(this, {x:-200, y:380, time:2.5, transition:"easeInOutStrong", delay:_local1, onComplete:deviateDestruct});
} else {
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1.5, transition:"easeInOutStrong", delay:_local1, onComplete:mov});
};
};
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy10Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
};
};
}
public function changePos(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:2.5, transition:"easeInStrong", delay:1, onComplete:deviateDestruct});
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 10);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
Tweener.removeTweens(this);
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
public function deviateDestruct(){
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 91
//Enemy10Ammo (Enemy10Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy10Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy10Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = (_arg1.x - 50);
this.y = _arg1.y;
this.rotation = 180;
init();
}
public function init(){
spd = 25;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < 0)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo10Array, this);
}
}
}//package
Section 92
//Enemy1Ammo (Enemy1Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy1Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy1Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = 180;
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo1Array, this);
}
}
}//package
Section 93
//Enemy2 (Enemy2)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy2 extends MovieClip {
public var life:Number;
private var xSpd:Number;
public var typeOfDestruction:String;
private var yDir:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var ySpd:Number;
private var rateOfShoot:Number;
private var minYpos:Number;
private var maxYpos:Number;
public function Enemy2(){
myGlow = new GlowFilter();
super();
addFrameScript(0, frame1);
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 30;
xSpd = 3;
ySpd = 8;
minYpos = 50;
maxYpos = 430;
yDir = "down";
rateOfShoot = (Math.floor((Math.random() * (3000 - 2500))) + 2500);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy2Ammo(this);
};
}
function frame1(){
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
movement();
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 2);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
private function movement(){
if (this.y < minYpos){
yDir = "down";
} else {
if (this.y > maxYpos){
yDir = "up";
};
};
this.x = (this.x - xSpd);
if (yDir == "up"){
ySpd = (Math.floor((Math.random() * (7 - 4))) + 4);
this.y = (this.y - ySpd);
} else {
if (yDir == "down"){
ySpd = (Math.floor((Math.random() * (7 - 4))) + 4);
this.y = (this.y + ySpd);
};
};
}
}
}//package
Section 94
//Enemy2Ammo (Enemy2Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy2Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy2Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = (_arg1.y - 40);
this.rotation = 180;
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo2Array, this);
}
}
}//package
Section 95
//Enemy3 (Enemy3)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy3 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var rateOfShoot:Number;
public var barrel:MovieClip;
private var spd:Number;
private var _angle:Number;
public function Enemy3(){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 30;
spd = 5;
rateOfShoot = (Math.floor((Math.random() * (1500 - 1000))) + 1000);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy3Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
this.x = (this.x - spd);
rotateBarrel(MovieClip(parent).plyr_mc, barrel);
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 3);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
private function rotateBarrel(_arg1:MovieClip, _arg2:MovieClip){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
a_x = (_arg1.x - (this.x + _arg2.x));
a_y = (_arg1.y - (this.y + _arg2.y));
_angle = ((180 * Math.atan2(a_y, a_x)) / Math.PI);
_arg2.rotation = _angle;
};
}
}
}//package
Section 96
//Enemy3Ammo (Enemy3Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy3Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy3Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.rotation = _arg1.barrel.rotation;
init();
}
public function init(){
spd = 25;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo3Array, this);
}
}
}//package
Section 97
//Enemy4 (Enemy4)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy4 extends MovieClip {
public var life:Number;
private var xSpd:Number;
public var typeOfDestruction:String;
private var yDir:String;
private var shootTimer:Timer;
private var passed:Boolean;
private var myGlow:GlowFilter;
private var ySpd:Number;
private var rateOfShoot:Number;
private var minYpos:Number;
private var maxYpos:Number;
public function Enemy4(){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 30;
xSpd = 15;
ySpd = 8;
minYpos = 50;
maxYpos = 430;
yDir = "down";
rateOfShoot = (Math.floor((Math.random() * (800 - 250))) + 250);
passed = false;
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy4Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
movement();
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 4);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
private function movement(){
this.x = (this.x - xSpd);
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
if (this.x > MovieClip(parent).plyr_mc.x){
if (passed == false){
if (this.y > MovieClip(parent).plyr_mc.y){
this.y = (this.y - ySpd);
};
if (this.y < MovieClip(parent).plyr_mc.y){
this.y = (this.y + ySpd);
};
};
} else {
passed = true;
};
};
}
}
}//package
Section 98
//Enemy4Ammo (Enemy4Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy4Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy4Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = 180;
init();
}
public function init(){
spd = 20;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo4Array, this);
}
}
}//package
Section 99
//Enemy5 (Enemy5)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy5 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var rateOfShoot:Number;
public var barrel:MovieClip;
private var spd:Number;
private var _angle:Number;
public function Enemy5(){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
life = 30;
spd = 5;
rateOfShoot = (Math.floor((Math.random() * (1500 - 1000))) + 1000);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy5Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
this.x = (this.x - spd);
rotateBarrel(MovieClip(parent).plyr_mc, barrel);
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 5);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
private function rotateBarrel(_arg1:MovieClip, _arg2:MovieClip){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
a_x = (_arg1.x - (this.x + _arg2.x));
a_y = (_arg1.y - (this.y + _arg2.y));
_angle = ((180 * Math.atan2(a_y, a_x)) / Math.PI);
_arg2.rotation = _angle;
};
}
}
}//package
Section 100
//Enemy5Ammo (Enemy5Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy5Ammo extends MovieClip {
public var life:Number;
public var xSpd:Number;
public var typeOfDestruction:String;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy5Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.rotation = _arg1.barrel.rotation;
init();
}
public function init(){
spd = 12;
grvty = 1;
life = 2;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function followPlyr(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:Number;
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
_local2 = (_arg1.x - this.x);
_local3 = (_arg1.y - this.y);
_local4 = Math.atan((_local3 / _local2));
_local5 = ((_local4 * 180) / Math.PI);
if (_local2 < 0){
_local5 = (_local5 - 180);
};
_local6 = _local5;
this.rotation = _local5;
_local5 = _local6;
_local4 = ((_local5 / 180) * Math.PI);
_local2 = Math.cos(_local4);
_local3 = Math.sin(_local4);
_local2 = (_local2 * spd);
_local3 = (_local3 * spd);
};
this.x = (this.x + _local2);
this.y = (this.y + _local3);
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("outBounds");
} else {
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
destruct("hit");
} else {
followPlyr(MovieClip(parent).plyr_mc);
};
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
} else {
if (_arg1 == "outBounds"){
};
};
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo5Array, this);
}
}
}//package
Section 101
//Enemy6 (Enemy6)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy6 extends MovieClip {
public var life:Number;
private var deviateInterval:Number;
private var a_x:Number;
private var a_y:Number;
private var deviateTmr:Timer;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var deviatePos:Number;
private var rateOfShoot:Number;
private var spd:Number;
private var _angle:Number;
public function Enemy6(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 30;
spd = 2;
rateOfShoot = (Math.floor((Math.random() * (1500 - 1000))) + 1000);
deviateInterval = (Math.floor((Math.random() * (3000 - 1000))) + 1000);
shootTimer = new Timer(rateOfShoot, 0);
deviateTmr = new Timer(deviateInterval, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
deviateTmr.addEventListener(TimerEvent.TIMER, deviate);
shootTimer.start();
positioning();
}
public function deviate(){
MovieClip(parent.parent).attEnemy6Ammo(this);
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
deviateTmr.stop();
deviateTmr.removeEventListener(TimerEvent.TIMER, deviate);
Tweener.addTween(this, {y:deviatePos, time:1, transition:"easeInStrong", onComplete:deviateDestruct});
trace("deviate");
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy6Ammo(this);
};
}
public function positioning(){
if (this.y < 0){
trace("top");
deviatePos = -200;
Tweener.addTween(this, {y:120, time:1, transition:"easeOutStrong", onComplete:deviate});
};
if (this.y > 480){
trace("bottom");
deviatePos = 600;
Tweener.addTween(this, {y:300, time:1, transition:"easeOutStrong", onComplete:deviate});
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
this.x = (this.x - spd);
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 10);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
Tweener.removeTweens(this);
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
public function deviateDestruct(){
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
private function rotateBarrel(_arg1:MovieClip, _arg2:MovieClip){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
a_x = (_arg1.x - (this.x + _arg2.x));
a_y = (_arg1.y - (this.y + _arg2.y));
_angle = ((180 * Math.atan2(a_y, a_x)) / Math.PI);
_arg2.rotation = _angle;
};
}
public function initDeviate(){
deviateTmr.start();
}
}
}//package
Section 102
//Enemy6Ammo (Enemy6Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy6Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy6Ammo(_arg1:MovieClip, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = _arg2;
trace(("this.x" + this.x));
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((this.x < 0)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo6Array, this);
}
}
}//package
Section 103
//Enemy7 (Enemy7)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy7 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var rateOfShoot:Number;
private var spd:Number;
private var _angle:Number;
public function Enemy7(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 30;
spd = 4;
rateOfShoot = (Math.floor((Math.random() * (1500 - 1000))) + 1000);
shootTimer = new Timer(rateOfShoot, 0);
shootTimer.addEventListener(TimerEvent.TIMER, shoot);
shootTimer.start();
}
private function shoot(_arg1:TimerEvent){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy7Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
} else {
this.x = (this.x - spd);
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 7);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
Tweener.removeTweens(this);
shootTimer.stop();
shootTimer.removeEventListener(TimerEvent.TIMER, shoot);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 104
//Enemy7Ammo (Enemy7Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy7Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy7Ammo(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = 90;
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo7Array, this);
}
}
}//package
Section 105
//Enemy8 (Enemy8)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy8 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var rateOfShoot:Number;
private var spd:Number;
private var _angle:Number;
public function Enemy8(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 30;
spd = 4;
entryXpos = (Math.floor((Math.random() * (500 - 400))) + 400);
Tweener.addTween(this, {x:entryXpos, time:1, transition:"easeOutStrong", onComplete:deviate});
}
public function deviate(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:2.5, transition:"easeInStrong", delay:1, onComplete:deviateDestruct});
}
private function shoot(){
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy8Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
};
};
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 8);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
public function deviateDestruct(){
Tweener.removeTweens(this);
shoot();
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 106
//Enemy8Ammo (Enemy8Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy8Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy8Ammo(_arg1:MovieClip, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg2;
this.rotation = (Math.floor((Math.random() * (120 - 95))) + 95);
trace(("this.x" + this.x));
init();
}
public function init(){
spd = (Math.floor((Math.random() * (12 - 8))) + 8);
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((this.x < 0)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo8Array, this);
}
}
}//package
Section 107
//Enemy9 (Enemy9)
package {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import flash.filters.*;
import flash.ui.*;
public class Enemy9 extends MovieClip {
public var life:Number;
private var a_x:Number;
private var a_y:Number;
private var chngPosCount:Number;
public var typeOfDestruction:String;
private var shootTimer:Timer;
private var myGlow:GlowFilter;
private var entryXpos:Number;
private var newYpos:Number;
private var rateOfShoot:Number;
private var spd:Number;
private var newXpos:Number;
private var _angle:Number;
public function Enemy9(_arg1:Number, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
life = 30;
spd = 4;
chngPosCount = (Math.floor((Math.random() * (4 - 2))) + 2);
entryXpos = (Math.floor((Math.random() * (500 - 400))) + 400);
Tweener.addTween(this, {x:entryXpos, time:1, transition:"easeOutStrong", onComplete:shoot});
}
private function shoot(){
var _local1:Number;
chngPosCount++;
_local1 = (Math.floor((Math.random() * (2 - 0))) + 0);
newXpos = (Math.floor((Math.random() * (520 - 380))) + 380);
if (this.y <= 240){
newYpos = (Math.floor((Math.random() * (420 - 300))) + 300);
if (chngPosCount >= 5){
Tweener.addTween(this, {x:-200, y:100, time:2.5, transition:"easeInOutStrong", delay:_local1, onComplete:deviateDestruct});
} else {
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1.8, transition:"easeInOutStrong", delay:_local1, onComplete:shoot});
};
} else {
newYpos = (Math.floor((Math.random() * (230 - 100))) + 100);
if (chngPosCount >= 5){
Tweener.addTween(this, {x:-200, y:380, time:2.5, transition:"easeInOutStrong", delay:_local1, onComplete:deviateDestruct});
} else {
Tweener.addTween(this, {x:newXpos, y:newYpos, time:1.5, transition:"easeInOutStrong", delay:_local1, onComplete:shoot});
};
};
if ((((MovieClip(parent.parent).lives <= 0)) && ((MovieClip(parent.parent).lifeNumerator <= 0)))){
} else {
MovieClip(parent.parent).attEnemy9Ammo(this);
};
}
public function looper(){
if (life <= 0){
destruct("hit");
} else {
if (this.x <= -150){
destruct("outBounds");
};
};
}
public function changePos(){
Tweener.addTween(this, {x:(entryXpos + 100), y:-200, time:2.5, transition:"easeInStrong", delay:1, onComplete:deviateDestruct});
}
public function destruct(_arg1:String){
if (_arg1 == "hit"){
MovieClip(parent.parent).updateKillScore(5);
MovieClip(parent.parent).killsLevel++;
MovieClip(parent.parent).attExplosion1(this);
MovieClip(parent.parent).attDebris(this);
if (typeOfDestruction == "fried"){
MovieClip(parent.parent).attExplosion2(this);
} else {
if (typeOfDestruction == "sliced"){
MovieClip(parent.parent).attExplosion3(this);
} else {
MovieClip(parent.parent).attExplosion4(this, 9);
};
};
} else {
if (_arg1 == "outBounds"){
};
};
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
public function deviateDestruct(){
Tweener.removeTweens(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyArray, this);
}
}
}//package
Section 108
//Enemy9Ammo (Enemy9Ammo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Enemy9Ammo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Enemy9Ammo(_arg1:MovieClip, _arg2:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = _arg2;
trace(("this.x" + this.x));
init();
}
public function init(){
spd = 12;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if ((((this.x < 0)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).enemyAmmo9Array, this);
}
}
}//package
Section 109
//EnemyHitSnd (EnemyHitSnd)
package {
import flash.media.*;
public dynamic class EnemyHitSnd extends Sound {
}
}//package
Section 110
//Explosion1 (Explosion1)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Explosion1 extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Explosion1(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
frmNum = 1;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 8;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
frmNum++;
if (frmNum >= 10){
destruct("");
} else {
this.gotoAndStop(frmNum);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 111
//Explosion2 (Explosion2)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Explosion2 extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Explosion2(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
addFrameScript(0, frame1);
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 15;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
frmNum = (Math.floor((Math.random() * (4 - 1))) + 1);
this.gotoAndStop(frmNum);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
if (this.scaleX <= 0){
destruct("");
} else {
ySpd = (ySpd + grvty);
this.y = (this.y + ySpd);
};
};
}
function frame1(){
stop();
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 112
//Explosion3 (Explosion3)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class Explosion3 extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
private var smokeTrail:Timer;
public var rot:Number;
public function Explosion3(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
myGlow = new GlowFilter();
super();
_local4 = (Math.floor((Math.random() * (500 - 120))) + 120);
smokeTrail = new Timer(_local4, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 8;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
frmNum = (Math.floor((Math.random() * (4 - 1))) + 1);
this.gotoAndStop(frmNum);
}
public function attSmoke(_arg1:TimerEvent){
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if ((((((this.x < -50)) || ((this.x > 680)))) || ((this.y > 480)))){
destruct("");
} else {
ySpd = (ySpd + grvty);
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 113
//Explosion4 (Explosion4)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Explosion4 extends MovieClip {
public var xSpd:Number;
public var animation_mc:MovieClip;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Explosion4(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
frmNum = 1;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = 180;
this.animation_mc.gotoAndStop(_arg3);
init();
}
public function init(){
if (this.currentFrame == 4){
spd = 30;
} else {
spd = 8;
};
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.y >= 480){
destruct("");
} else {
this.animation_mc.rotation = (this.animation_mc.rotation - 14);
ySpd = (ySpd + grvty);
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 114
//Explosion5 (Explosion5)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class Explosion5 extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var fall:Boolean;// = false
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
private var smokeTrail:Timer;
public var rot:Number;
public function Explosion5(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
fall = false;
super();
smokeTrail = new Timer(80, 30);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.addEventListener(TimerEvent.TIMER_COMPLETE, attSmokeEnd);
smokeTrail.start();
frmNum = _arg3;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.gotoAndStop(frmNum);
init();
}
public function init(){
spd = 2.8;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Explosion5a;
if (frmNum == 2){
_local2 = this.x;
} else {
_local2 = (this.x + 120);
};
_local3 = this.y;
_local4 = ((_local2 + Math.floor((Math.random() * (100 - -100)))) + -100);
_local5 = ((_local3 + Math.floor((Math.random() * (100 - -100)))) + -100);
_local6 = (Math.floor((Math.random() * (300 - 240))) + 240);
_local7 = new Explosion5a(_local4, _local5, _local6);
MovieClip(parent.parent).lvlCntnr_mc.addChild(_local7);
MovieClip(parent.parent).explosionArray.push(_local7);
}
public function looper(){
if (this.y >= 480){
destruct("");
} else {
if (fall == true){
ySpd = (ySpd + grvty);
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
};
}
public function attSmokeEnd(_arg1:TimerEvent){
fall = true;
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.removeEventListener(TimerEvent.TIMER_COMPLETE, attSmokeEnd);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 115
//Explosion5a (Explosion5a)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Explosion5a extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function Explosion5a(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
frmNum = 1;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 8;
grvty = 1;
angle = ((MovieClip(this).rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
frmNum++;
if (frmNum >= 10){
destruct("");
} else {
this.gotoAndStop(frmNum);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).explosionArray, this);
}
}
}//package
Section 116
//GameScreenBG (GameScreenBG)
package {
import flash.media.*;
public dynamic class GameScreenBG extends Sound {
}
}//package
Section 117
//HitSnd (HitSnd)
package {
import flash.media.*;
public dynamic class HitSnd extends Sound {
}
}//package
Section 118
//NonGameScreenBG (NonGameScreenBG)
package {
import flash.media.*;
public dynamic class NonGameScreenBG extends Sound {
}
}//package
Section 119
//OOO000lll (OOO000lll)
package {
import flash.display.*;
import flash.events.*;
import Util.*;
import flash.net.*;
import flash.system.*;
public class OOO000lll extends MovieClip {
public var O1OlOO00O:XML;
private var _O10OOO1O0:Loader;
private var _O1l10l101:Object;
private var _OO0l101l1:Object;
public var OOO10O100:String;
public var O0l00l0O0:XML;
private var _OOl10010l:String;
private var _O001OO010:Object;
private var _O01OO1O00;
private var _O01O0lOl0:int;
private var _O1Ol011l1:String;
private var _O11OO0110:String;
private var _OOO00l00l:int;
private var _O0lO0100O:String;
private var _OOOOll01l:Array;
private var _O111O01OO:Object;
private var _OO10001Ol:Boolean;
private var _OO1l1OO10:String;
public var O1lll0ll0:XML;
private var _O1OO1OllO:Object;
private var _O0l0OO01O;
private var _OO0l1lOO1:int;
public var OOOll0OO0:int;
public function OOO000lll():void{
var _O1OlO10O0:*;
super();
Security.allowDomain("*");
_OO10001Ol = false;
_O01OO1O00 = this.parent;
_O01OO1O00.stop();
var _OOll00l11:int;
while (true) {
try {
_O1OlO10O0 = _O01OO1O00.getChildAt(_OOll00l11);
if ((_O1OlO10O0 is MovieClip)){
_O1OlO10O0.visible = false;
} else {
_O01OO1O00.removeChild(_O1OlO10O0);
};
_OOll00l11 = (_OOll00l11 + 1);
} catch(e:Error) {
break;
};
};
try {
_O01OO1O00["_O0000Ol01"] = _O0000Ol01;
_O01OO1O00["_O0Olll0lO"] = _O0Olll0lO;
} catch(e:Error) {
};
}
private function _O11lll1OO0(_arg1:String):void{
if (_O0l0OO01O){
_O0l0OO01O.OO0011ll1O(_arg1);
};
}
private function _OO0OO1OO0(_arg1:Event):void{
if ((((((_arg1.type == "ScoreLoadSubmitComplete")) || ((_arg1.type == "ScoreLoadListComplete")))) || ((_arg1.type == "ScoreLoadUserListComplete")))){
O0l00l0O0 = _O0l0OO01O.O011Oll0O();
} else {
if (_arg1.type == "ScoreLoadTimeComplete"){
O1lll0ll0 = _O0l0OO01O.OO011OOl1();
} else {
O0l00l0O0 = _O0l0OO01O.O0001O0Ol();
};
};
_O01OO1O00.dispatchEvent(_arg1);
}
private function _O10Ol0l10(_arg1:IOErrorEvent):void{
removeEventListener(Event.ENTER_FRAME, _O0OlOOO1O);
_O01OO1O00.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
}
private function _O01Ol1O1O():void{
if (_O0l0OO01O){
_O0l0OO01O.OO011OOl1();
};
}
private function _O110l10ll():void{
if (_O0l0OO01O){
_O0l0OO01O.O01l01OlO();
};
}
private function _O01O1101l():void{
stop();
_O10OOO1O0 = new Loader();
_O10OOO1O0.load(new URLRequest(_O1Ol011l1));
_O01OO1O00.addChildAt(_O10OOO1O0, 0);
this.addEventListener(Event.ENTER_FRAME, _O0OlOOO1O);
_O10OOO1O0.contentLoaderInfo.addEventListener(Event.COMPLETE, _O100O0Oll);
_O10OOO1O0.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _O10Ol0l10);
}
private function _O0000Ol01(_arg1=null, _arg2:String="default", _arg3="", _arg4:int=0, _arg5:String="normal", _arg6:String="", _arg7:int=0, _arg8:int=0, _arg9:int=1, _arg10:Boolean=false):void{
OOO10O100 = _arg5;
OOOll0OO0 = _arg4;
_O11OO0110 = _arg2;
if (_arg3 == ""){
_OO1l1OO10 = _O11OO0110;
} else {
_OO1l1OO10 = _arg3;
};
if (((!((_arg1 == null))) && (!((_arg1.loaderInfo == null))))){
_O1l10l101 = _arg1.loaderInfo.parameters["username"];
_O001OO010 = _arg1.loaderInfo.parameters["hash"];
_OO0l101l1 = _arg1.loaderInfo.parameters["id"];
_O1OO1OllO = _arg1.loaderInfo.parameters["s"];
_O111O01OO = _arg1.loaderInfo.parameters["c"];
_O1Ol011l1 = "http://www8.agame.com/games/flash/highscore/SubmitterV2.swf";
if (_O00O00010(_arg10)){
_O01O1101l();
} else {
_O01OO1O00.dispatchEvent(new Event("LoadingFailed"));
};
};
_OOl10010l = _arg6;
_OO0l1lOO1 = _arg7;
_O01O0lOl0 = _arg8;
_OOO00l00l = _arg9;
}
private function _O0O1l0OO0():Boolean{
return (!((_O0l0OO01O == null)));
}
private function _O100O0Oll(_arg1:Event):void{
_O0l0OO01O = _arg1.currentTarget.content;
_O0l0OO01O.O0011ll110O0(_O1OO1OllO, 1, _OO0l101l1, _O111O01OO, OOOll0OO0, _OOl10010l, _OO0l1lOO1, _O01O0lOl0, _OOO00l00l, _O1l10l101, _O001OO010);
_O0l0OO01O.addEventListener("HyScorSubmitterLoaded", _OOl11lOOl);
_O0l0OO01O.addEventListener("ScoreLoadError", _OO0OO1OO0);
_O0l0OO01O.addEventListener("ScoreLoadTimeComplete", _OO0OO1OO0);
_O0l0OO01O.addEventListener("ScoreLoadSubmitComplete", _OO0OO1OO0);
_O0l0OO01O.addEventListener("ScoreLoadListComplete", _OO0OO1OO0);
_O0l0OO01O.addEventListener("ScoreLoadUserListComplete", _OO0OO1OO0);
_O0l0OO01O.addEventListener("AchievLoadError", _O0l0O1Oll);
_O0l0OO01O.addEventListener("AchievLoadTimeComplete", _O0l0O1Oll);
_O0l0OO01O.addEventListener("AchievLoadListComplete", _O0l0O1Oll);
_O0l0OO01O.addEventListener("AchievLoadInfoComplete", _O0l0O1Oll);
_O0l0OO01O.addEventListener("AchievLoadGrantComplete", _O0l0O1Oll);
_O01OO1O00["_O0Olll0lO"] = _O0Olll0lO;
_O01OO1O00["_O0O1l0OO0"] = _O0O1l0OO0;
_O01OO1O00["_O01Ol1O1O"] = _O01Ol1O1O;
_O01OO1O00["_O01lOO10O"] = _O01lOO10O;
_O01OO1O00["_O110l10ll"] = _O110l10ll;
_O01OO1O00["_O11lll1OO0"] = _O11lll1OO0;
_O01OO1O00["_O00OOl1Ol"] = _O00OOl1Ol;
_O01OO1O00["_O1OlO10OO"] = _O1OlO10OO;
_O01OO1O00["_OOlOOOll1"] = _OOlOOOll1;
_O01OO1O00["_O010ll111"] = _O010ll111;
}
private function _O00O00010(_arg1:Boolean=false):Boolean{
var _local4:String;
var _local5:O1OOO0O00;
var _local2:Boolean = _arg1;
if (!_local2){
_OOOOll01l = ["www8.agame.com"];
} else {
_OOOOll01l = ["localhost", "www8.agame.com", "www.zlonggames.com", "gamedev.dev.spilgames.com", "stg.pl.a10.com", "www.a10.com.gp.dev.spilgames.eu"];
};
var _local3:LocalConnection = new LocalConnection();
if (((isNaN((_OO0l101l1 as int))) || (isNaN((_O1OO1OllO as int))))){
return (false);
};
for each (_local4 in _OOOOll01l) {
if (_local3.domain == _local4){
_local5 = new O1OOO0O00();
if (_local5.O0111l110()){
_OO10001Ol = true;
return (true);
};
};
};
return (false);
}
private function _O00OOl1Ol(_arg1:String):void{
if (_O0l0OO01O){
_O0l0OO01O.OO00lO1l0(_arg1, _O1l10l101, _O001OO010);
};
}
private function _O0OlOOO1O(_arg1:Event):void{
var _local2 = (((_O10OOO1O0.contentLoaderInfo.bytesLoaded / _O10OOO1O0.contentLoaderInfo.bytesTotal) * 100) >> 0);
if (_local2 >= 100){
removeEventListener(Event.ENTER_FRAME, _O0OlOOO1O);
};
}
private function _OOl11lOOl(_arg1:Event):void{
if (_O0l0OO01O){
_O0l0OO01O.removeEventListener("HyScorSubmitterLoaded", _OOl11lOOl);
};
_O01OO1O00.dispatchEvent(new Event(Event.COMPLETE));
}
private function _O01lOO10O(_arg1:int):void{
if (_O0l0OO01O){
_O0l0OO01O.O0l01llOl(_arg1, _O1l10l101, _O001OO010);
};
}
private function _O0Olll0lO():Boolean{
return (_O00O00010(false));
}
private function _O1OlO10OO():void{
if (_O0l0OO01O){
_O0l0OO01O.O1l0OOl1l(_O1l10l101, _O001OO010);
};
}
private function _O10O00lO0():String{
if (_O0l0OO01O){
return (_O0l0OO01O.OOOO00ll0());
};
return (("FAILED " + _O0l0OO01O));
}
private function _O0l0O1Oll(_arg1:Event):void{
if ((((((_arg1.type == "AchievLoadListComplete")) || ((_arg1.type == "AchievLoadInfoComplete")))) || ((_arg1.type == "AchievLoadGrantComplete")))){
O1OlOO00O = _O0l0OO01O.O11OO0l0l();
} else {
O1OlOO00O = _O0l0OO01O.O0O100l0l();
};
_O01OO1O00.dispatchEvent(_arg1);
}
private function _O010ll111():void{
_O0l0OO01O.removeEventListener("ScoreLoadError", _OO0OO1OO0);
_O0l0OO01O.removeEventListener("ScoreLoadTimeComplete", _OO0OO1OO0);
_O0l0OO01O.removeEventListener("ScoreLoadSubmitComplete", _OO0OO1OO0);
_O0l0OO01O.removeEventListener("ScoreLoadListComplete", _OO0OO1OO0);
_O0l0OO01O.removeEventListener("ScoreLoadUserListComplete", _OO0OO1OO0);
_O0l0OO01O.removeEventListener("AchievLoadError", _O0l0O1Oll);
_O0l0OO01O.removeEventListener("AchievLoadTimeComplete", _O0l0O1Oll);
_O0l0OO01O.removeEventListener("AchievLoadListComplete", _O0l0O1Oll);
_O0l0OO01O.removeEventListener("AchievLoadInfoComplete", _O0l0O1Oll);
_O0l0OO01O.removeEventListener("AchievLoadGrantComplete", _O0l0O1Oll);
_O01OO1O00 = null;
_OOOOll01l = null;
_O0l0OO01O = null;
_O1l10l101 = null;
_O001OO010 = null;
_O10OOO1O0 = null;
O1lll0ll0 = null;
O0l00l0O0 = null;
O1OlOO00O = null;
}
private function _OOlOOOll1(_arg1:int):void{
if (_O0l0OO01O){
_O0l0OO01O.O1OlOO111(_arg1);
};
}
}
}//package
Section 120
//PlayerAmmo1 (PlayerAmmo1)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo1 extends MovieClip {
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerAmmo1(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 35;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo1Arr, this);
}
}
}//package
Section 121
//PlayerAmmo2 (PlayerAmmo2)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo2 extends MovieClip {
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerAmmo2(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 35;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo2Arr, this);
}
}
}//package
Section 122
//PlayerAmmo3 (PlayerAmmo3)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo3 extends MovieClip {
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerAmmo3(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 35;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo3Arr, this);
}
}
}//package
Section 123
//PlayerAmmo4 (PlayerAmmo4)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo4 extends MovieClip {
public var exist:Number;
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var pullUp:Number;
public var angle:Number;
public function PlayerAmmo4(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 12;
exist = 100;
pullUp = 0.1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
function frame3(){
stop();
}
public function looper(){
var _local1:Number;
_local1 = (Math.floor((Math.random() * (5 - 1))) + 1);
this.gotoAndStop(_local1);
exist = (exist - 2);
this.alpha = (exist * 0.01);
if (exist <= 0){
destruct("");
} else {
if (this.x > 680){
destruct("");
} else {
this.scaleX = (this.scaleX + 0.06);
this.scaleY = (this.scaleY + 0.06);
ySpd = (ySpd - pullUp);
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo4Arr, this);
}
function frame2(){
stop();
}
}
}//package
Section 124
//PlayerAmmo5 (PlayerAmmo5)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo5 extends MovieClip {
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerAmmo5(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = (Math.floor((Math.random() * ((_arg2 + 2) - (_arg2 - 2)))) + (_arg2 - 2));
this.rotation = (Math.floor((Math.random() * (2 - -2))) + -2);
init();
}
public function init(){
spd = 45;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo5Arr, this);
}
}
}//package
Section 125
//PlayerAmmo6 (PlayerAmmo6)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerAmmo6 extends MovieClip {
public var exist:Number;
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerAmmo6(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 40;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
if (MovieClip(parent.parent).fireWeapon == "open"){
this.y = MovieClip(parent).plyr_mc.y;
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo6Arr, this);
}
}
}//package
Section 126
//PlayerAmmo7 (PlayerAmmo7)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class PlayerAmmo7 extends MovieClip {
public var xSpd:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
private var smokeTrail:Timer;
public function PlayerAmmo7(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
smokeTrail = new Timer(2, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
init();
}
public function init(){
spd = 35;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if (x > 680){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo7Arr, this);
}
}
}//package
Section 127
//PlayerAmmo8 (PlayerAmmo8)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class PlayerAmmo8 extends MovieClip {
public var origYpos:Number;
public var xSpd:Number;
public var maxDist:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var origXpos:Number;
public var angle:Number;
private var smokeTrail:Timer;
public function PlayerAmmo8(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
origXpos = _arg1;
origYpos = _arg2;
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
smokeTrail = new Timer(80, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
init();
}
public function init(){
maxDist = 150;
spd = 20;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
trace("smoke");
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if (calDist(this.x, this.y, origXpos, origYpos) >= maxDist){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).attPlayerAmmo8a(this);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo8Arr, this);
} else {
if (x > 680){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo8Arr, this);
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo8Arr, this);
}
public function calDist(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = ((_arg1 - _arg3) * (_arg1 - _arg3));
_local6 = ((_arg2 - _arg4) * (_arg2 - _arg4));
_local7 = Math.sqrt((_local5 + _local6));
return (_local7);
}
}
}//package
Section 128
//PlayerAmmo8a (PlayerAmmo8a)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class PlayerAmmo8a extends MovieClip {
public var origYpos:Number;
public var xSpd:Number;
public var maxDist:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var origXpos:Number;
public var angle:Number;
private var smokeTrail:Timer;
public function PlayerAmmo8a(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
origXpos = _arg1;
origYpos = _arg2;
maxDist = (Math.floor((Math.random() * (150 - 75))) + 75);
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
smokeTrail = new Timer(80, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
init();
}
public function init(){
spd = 12;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
trace("smoke");
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if (calDist(this.x, this.y, origXpos, origYpos) >= maxDist){
MovieClip(parent.parent).attPlayerAmmo8b(this);
destruct("");
} else {
if ((((((((x < 0)) || ((x > 680)))) || ((y < 0)))) || ((y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo8aArr, this);
}
public function calDist(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = ((_arg1 - _arg3) * (_arg1 - _arg3));
_local6 = ((_arg2 - _arg4) * (_arg2 - _arg4));
_local7 = Math.sqrt((_local5 + _local6));
return (_local7);
}
}
}//package
Section 129
//PlayerAmmo8b (PlayerAmmo8b)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class PlayerAmmo8b extends MovieClip {
public var origYpos:Number;
public var xSpd:Number;
public var maxDist:Number;
public var speed:int;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var spd:Number;
public var origXpos:Number;
public var angle:Number;
private var smokeTrail:Timer;
public function PlayerAmmo8b(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
origXpos = _arg1;
origYpos = _arg2;
maxDist = (Math.floor((Math.random() * (150 - 75))) + 75);
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
smokeTrail = new Timer(80, 0);
smokeTrail.addEventListener(TimerEvent.TIMER, attSmoke);
smokeTrail.start();
init();
}
public function init(){
spd = 20;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function attSmoke(_arg1:TimerEvent){
trace("smoke");
MovieClip(parent.parent).attSmokeTrail(this);
}
public function looper(){
if ((((((((x < 0)) || ((x > 680)))) || ((y < 0)))) || ((y > 480)))){
destruct("");
} else {
this.x = (this.x + xSpd);
this.y = (this.y + ySpd);
this.rotation = ((Math.atan2(ySpd, xSpd) * 180) / Math.PI);
};
}
public function destruct(_arg1:String){
smokeTrail.stop();
smokeTrail.removeEventListener(TimerEvent.TIMER, attSmoke);
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerAmmo8bArr, this);
}
public function calDist(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = ((_arg1 - _arg3) * (_arg1 - _arg3));
_local6 = ((_arg2 - _arg4) * (_arg2 - _arg4));
_local7 = Math.sqrt((_local5 + _local6));
return (_local7);
}
}
}//package
Section 130
//PlayerSmokeTrail (PlayerSmokeTrail)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PlayerSmokeTrail extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PlayerSmokeTrail(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
spd = 0.01;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.2;
this.filters = [myGlow];
this.x = (_arg1.x - 20);
this.y = (_arg1.y + 10);
init();
}
public function init(){
}
public function looper(){
if (this.alpha <= 0){
destruct("");
} else {
this.x = (this.x - 5);
this.y = (this.y + 2);
this.rotation--;
this.alpha = (this.alpha - spd);
this.scaleX = (this.scaleX - spd);
this.scaleY = (this.scaleY - spd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).smokeArray, this);
}
}
}//package
Section 131
//PlayerSpecial1 (PlayerSpecial1)
package {
import flash.display.*;
import flash.events.*;
public class PlayerSpecial1 extends MovieClip {
public var xSpd:Number;
public var speed:int;
public var blink:Number;
public var ySpd:Number;
public var energy:Number;
public var spd:Number;
public var angle:Number;
public function PlayerSpecial1(_arg1:Number, _arg2:Number, _arg3:Number){
addFrameScript(0, frame1, 1, frame2);
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
blink = 2;
spd = 35;
energy = 200;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function blinker(){
if (blink == 2){
this.gotoAndStop(2);
blink--;
} else {
if (blink == 1){
this.gotoAndStop(1);
blink = 2;
};
};
}
public function looper(){
energy--;
if (energy < 0){
destruct("");
} else {
this.x = MovieClip(parent).plyr_mc.x;
this.y = MovieClip(parent).plyr_mc.y;
if (energy < 30){
this.alpha = 0.1;
} else {
if (energy < 50){
this.alpha = 0.25;
} else {
if (energy < 100){
this.alpha = 0.5;
} else {
if (energy < 150){
this.alpha = 0.75;
} else {
if (energy < 200){
this.alpha = 1;
};
};
};
};
};
blinker();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerSpecial1Arr, this);
}
}
}//package
Section 132
//PlayerSpecial2 (PlayerSpecial2)
package {
import flash.display.*;
import flash.events.*;
public class PlayerSpecial2 extends MovieClip {
public var xSpd:Number;
public var speed:int;
public var ySpd:Number;
public var spd:Number;
public var angle:Number;
public function PlayerSpecial2(_arg1:Number, _arg2:Number, _arg3:Number){
this.x = _arg1;
this.y = _arg2;
this.rotation = _arg3;
init();
}
public function init(){
spd = 35;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.scaleX > 10){
destruct("");
} else {
this.scaleX = (this.scaleX + 1);
this.scaleY = (this.scaleY + 1);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).playerSpecial2Arr, this);
}
}
}//package
Section 133
//PowerUp1 (PowerUp1)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp1 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp1(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 0.5;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
trace(("pwrup" + this.x));
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).lifeNumerator = (MovieClip(parent.parent).lifeNumerator + (MovieClip(parent.parent).lifeDenominator * 0.25));
MovieClip(parent.parent).plyPwrSnd();
MovieClip(parent.parent).attPwrUpInfo(this, 1);
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 134
//PowerUp2 (PowerUp2)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp2 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp2(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).lives++;
MovieClip(parent.parent).plyPwrSnd();
MovieClip(parent.parent).attPwrUpInfo(this, 2);
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 135
//PowerUp3 (PowerUp3)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp3 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp3(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).ammo1Inventory = MovieClip(parent.parent).ammo1Max;
MovieClip(parent.parent).ammo2Inventory = MovieClip(parent.parent).ammo2Max;
MovieClip(parent.parent).ammo3Inventory = MovieClip(parent.parent).ammo3Max;
MovieClip(parent.parent).ammo4Inventory = MovieClip(parent.parent).ammo4Max;
MovieClip(parent.parent).ammo5Inventory = MovieClip(parent.parent).ammo5Max;
MovieClip(parent.parent).ammo6Inventory = MovieClip(parent.parent).ammo6Max;
MovieClip(parent.parent).ammo7Inventory = MovieClip(parent.parent).ammo7Max;
MovieClip(parent.parent).ammo8Inventory = MovieClip(parent.parent).ammo8Max;
MovieClip(parent.parent).updateAmmoUI();
MovieClip(parent.parent).plyPwrSnd();
MovieClip(parent.parent).attPwrUpInfo(this, 3);
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 136
//PowerUp4 (PowerUp4)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp4 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp4(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).ammo5Inventory = MovieClip(parent.parent).ammo5Max;
MovieClip(parent.parent).ammo6Inventory = MovieClip(parent.parent).ammo6Max;
MovieClip(parent.parent).updateAmmoUI();
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 137
//PowerUp5 (PowerUp5)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp5 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp5(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).ammo7Inventory = MovieClip(parent.parent).ammo7Max;
MovieClip(parent.parent).ammo8Inventory = MovieClip(parent.parent).ammo8Max;
MovieClip(parent.parent).updateAmmoUI();
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 138
//PowerUp6 (PowerUp6)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp6 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp6(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).shield = "armed";
MovieClip(parent.parent).plyPwrSnd();
MovieClip(parent.parent).attPwrUpInfo(this, 4);
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 139
//PowerUp7 (PowerUp7)
package {
import flash.display.*;
import flash.events.*;
public class PowerUp7 extends MovieClip {
public var xSpd:Number;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUp7(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
init();
}
public function init(){
spd = 1;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.hitTestObject(MovieClip(parent).plyr_mc)){
MovieClip(parent.parent).emp = "armed";
MovieClip(parent.parent).plyPwrSnd();
MovieClip(parent.parent).attPwrUpInfo(this, 5);
destruct("");
} else {
if ((((this.x < -50)) || ((this.y > 480)))){
destruct("");
} else {
this.x = (this.x - 0.1);
this.y = (this.y + 2);
};
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 140
//PowerUpInfo (PowerUpInfo)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class PowerUpInfo extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var frmNum:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function PowerUpInfo(_arg1:Number, _arg2:Number, _arg3:Number){
myGlow = new GlowFilter();
super();
addFrameScript(0, frame1);
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.5;
this.filters = [myGlow];
this.x = _arg1;
this.y = _arg2;
this.gotoAndStop(_arg3);
init();
}
public function init(){
spd = 0.5;
grvty = 1;
angle = ((this.rotation / 180) * Math.PI);
xSpd = (Math.cos(angle) * spd);
ySpd = (Math.sin(angle) * spd);
}
public function looper(){
if (this.alpha < 0){
destruct("");
} else {
this.alpha = (this.alpha - 0.04);
this.y = (this.y - 0.4);
};
}
function frame1(){
stop();
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).powerupArray, this);
}
}
}//package
Section 141
//PwrUpSnd (PwrUpSnd)
package {
import flash.media.*;
public dynamic class PwrUpSnd extends Sound {
}
}//package
Section 142
//SmokeTrail (SmokeTrail)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class SmokeTrail extends MovieClip {
public var xSpd:Number;
private var myGlow:GlowFilter;
public var ySpd:Number;
public var mc:MovieClip;
public var spd:Number;
public var grvty:Number;
public var angle:Number;
public var rot:Number;
public function SmokeTrail(_arg1:MovieClip){
myGlow = new GlowFilter();
super();
spd = 0.1;
myGlow.inner = false;
myGlow.color = 0;
myGlow.blurX = 20;
myGlow.blurY = 20;
myGlow.alpha = 0.2;
this.filters = [myGlow];
this.x = _arg1.x;
this.y = _arg1.y;
this.rotation = rot;
init();
}
public function init(){
}
public function looper(){
if (this.alpha <= 0){
destruct("");
} else {
this.rotation--;
this.alpha = (this.alpha - spd);
this.scaleX = (this.scaleX - spd);
this.scaleY = (this.scaleY - spd);
};
}
public function destruct(_arg1:String){
MovieClip(parent.parent).removeFromArray(MovieClip(parent.parent).smokeArray, this);
}
}
}//package
Section 143
//Weapon1Snd (Weapon1Snd)
package {
import flash.media.*;
public dynamic class Weapon1Snd extends Sound {
}
}//package
Section 144
//Weapon2Snd (Weapon2Snd)
package {
import flash.media.*;
public dynamic class Weapon2Snd extends Sound {
}
}//package
Section 145
//Weapon3Snd (Weapon3Snd)
package {
import flash.media.*;
public dynamic class Weapon3Snd extends Sound {
}
}//package
Section 146
//Weapon4Snd (Weapon4Snd)
package {
import flash.media.*;
public dynamic class Weapon4Snd extends Sound {
}
}//package
Section 147
//Weapon5Snd (Weapon5Snd)
package {
import flash.media.*;
public dynamic class Weapon5Snd extends Sound {
}
}//package
Section 148
//Weapon6Snd (Weapon6Snd)
package {
import flash.media.*;
public dynamic class Weapon6Snd extends Sound {
}
}//package
Section 149
//Weapon7Snd (Weapon7Snd)
package {
import flash.media.*;
public dynamic class Weapon7Snd extends Sound {
}
}//package
Section 150
//Weapon8aSnd (Weapon8aSnd)
package {
import flash.media.*;
public dynamic class Weapon8aSnd extends Sound {
}
}//package