Section 1
//Armegalogo1_169 (BlackH_fla.Armegalogo1_169)
package BlackH_fla {
import flash.display.*;
public dynamic class Armegalogo1_169 extends MovieClip {
public var squigler:MovieClip;
}
}//package BlackH_fla
Section 2
//Armegalogo3_167 (BlackH_fla.Armegalogo3_167)
package BlackH_fla {
import flash.display.*;
public dynamic class Armegalogo3_167 extends MovieClip {
public var armegaButton:SimpleButton;
public var a2:MovieClip;
public var a3:MovieClip;
public var a1:MovieClip;
}
}//package BlackH_fla
Section 3
//fls_Symbol169_172 (BlackH_fla.fls_Symbol169_172)
package BlackH_fla {
import flash.display.*;
public dynamic class fls_Symbol169_172 extends MovieClip {
public var stingState;
public function fls_Symbol169_172(){
addFrameScript(0, frame1, 133, frame134);
}
function frame1(){
stingState = "playing";
}
function frame134(){
stingState = "finished";
}
}
}//package BlackH_fla
Section 4
//FWG_158 (BlackH_fla.FWG_158)
package BlackH_fla {
import flash.display.*;
import FWG.*;
import flash.text.*;
public dynamic class FWG_158 extends MovieClip {
public var btnVh:BtnVh;
public var btnX:BtnX;
public var btnSubmit:BtnSubmit;
public var scoreTxt:TextField;
public var nameTxt:TextField;
public function FWG_158(){
addFrameScript(2, frame3);
}
function frame3(){
btnVh._release = function ():void{
Net.getURL(("http://www.freeworldgroup.com/score/index.asp?game=" + SubmitScore(parent).game_name));
};
}
}
}//package BlackH_fla
Section 5
//holdall_13 (BlackH_fla.holdall_13)
package BlackH_fla {
import flash.display.*;
import FWG.*;
public dynamic class holdall_13 extends MovieClip {
public var btnSs:BtnSs;
public function holdall_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 6
//hum_140 (BlackH_fla.hum_140)
package BlackH_fla {
import flash.display.*;
public dynamic class hum_140 extends MovieClip {
public function hum_140(){
addFrameScript(15, frame16);
}
function frame16(){
this.parent.removeChild(this);
stop();
}
}
}//package BlackH_fla
Section 7
//Loader_3 (BlackH_fla.Loader_3)
package BlackH_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Loader_3 extends MovieClip {
public var lpc:TextField;
public var gob:MovieClip;
public var gob3:MovieClip;
public var gob2:MovieClip;
}
}//package BlackH_fla
Section 8
//logo_gra_9 (BlackH_fla.logo_gra_9)
package BlackH_fla {
import flash.display.*;
public dynamic class logo_gra_9 extends MovieClip {
public function logo_gra_9(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package BlackH_fla
Section 9
//mute_18 (BlackH_fla.mute_18)
package BlackH_fla {
import flash.display.*;
public dynamic class mute_18 extends MovieClip {
public var thisOff:SimpleButton;
}
}//package BlackH_fla
Section 10
//mute_19 (BlackH_fla.mute_19)
package BlackH_fla {
import flash.display.*;
public dynamic class mute_19 extends MovieClip {
public var on_mc:MovieClip;
}
}//package BlackH_fla
Section 11
//mute_23 (BlackH_fla.mute_23)
package BlackH_fla {
import flash.display.*;
public dynamic class mute_23 extends MovieClip {
public var thisOff:SimpleButton;
}
}//package BlackH_fla
Section 12
//PowerUppp_63 (BlackH_fla.PowerUppp_63)
package BlackH_fla {
import flash.display.*;
public dynamic class PowerUppp_63 extends MovieClip {
public var frm:Number;
public function PowerUppp_63(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
gotoAndStop((frm + this.currentFrame));
}
function frame1(){
}
}
}//package BlackH_fla
Section 13
//Symbol1_141 (BlackH_fla.Symbol1_141)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol1_141 extends MovieClip {
public function Symbol1_141(){
addFrameScript(15, frame16);
}
function frame16(){
this.parent.removeChild(this);
stop();
}
}
}//package BlackH_fla
Section 14
//Symbol1_175 (BlackH_fla.Symbol1_175)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol1_175 extends MovieClip {
public function Symbol1_175(){
addFrameScript(0, frame1, 18, frame19, 82, frame83);
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame83(){
stop();
}
}
}//package BlackH_fla
Section 15
//Symbol10_106 (BlackH_fla.Symbol10_106)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol10_106 extends MovieClip {
public var ship:MovieClip;
public function Symbol10_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 16
//Symbol11_100 (BlackH_fla.Symbol11_100)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol11_100 extends MovieClip {
public var ship:MovieClip;
public function Symbol11_100(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 17
//Symbol12_150 (BlackH_fla.Symbol12_150)
package BlackH_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Symbol12_150 extends MovieClip {
public var lastmovecount:Number;
public var thismode:Number;
public var gen:MovieClip;
public var stateec:MovieClip;
public function Symbol12_150(){
addFrameScript(0, frame1);
}
function frame1(){
lastmovecount = 0;
addEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event){
if (thismode == 1){
if (Math.random() < 0.8){
lastmovecount = (lastmovecount - 1);
if (lastmovecount < 0){
gen.gotoAndStop((int((Math.random() * gen.totalFrames)) + 1));
lastmovecount = 3;
};
} else {
gen.gotoAndStop(2);
};
};
stateec.gotoAndStop((int((Math.random() * 3)) + 1));
}
}
}//package BlackH_fla
Section 18
//Symbol13_148 (BlackH_fla.Symbol13_148)
package BlackH_fla {
import flash.events.*;
import flash.net.*;
import flash.filters.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Symbol13_148 extends MovieClip {
public var count:Number;
public var speaker:MovieClip;
public function Symbol13_148(){
addFrameScript(0, frame1, 1, frame2, 4, frame5, 47, frame48);
}
function frame1(){
stop();
speaker.visible = false;
}
function frame5(){
play();
}
function frame2(){
speaker.faces.thismode = 1;
addEventListener(Event.ENTER_FRAME, doiit);
speaker.visible = true;
}
function frame48(){
stop();
speaker.visible = false;
}
public function doiit(_arg1:Event){
count = (count - 1);
if (count < 0){
speaker.faces.thismode = 0;
removeEventListener(Event.ENTER_FRAME, doiit);
gotoAndPlay(5);
};
}
}
}//package BlackH_fla
Section 19
//Symbol14_149 (BlackH_fla.Symbol14_149)
package BlackH_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol14_149 extends MovieClip {
public var faces:MovieClip;
public var general:TextField;
}
}//package BlackH_fla
Section 20
//Symbol2_60 (BlackH_fla.Symbol2_60)
package BlackH_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol2_60 extends MovieClip {
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var txt4:TextField;
}
}//package BlackH_fla
Section 21
//Symbol217_174 (BlackH_fla.Symbol217_174)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol217_174 extends MovieClip {
public var stingState:String;
public function Symbol217_174(){
addFrameScript(0, frame1);
}
function frame1(){
stingState = "finished";
}
}
}//package BlackH_fla
Section 22
//Symbol3dfgdsgf_151 (BlackH_fla.Symbol3dfgdsgf_151)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol3dfgdsgf_151 extends MovieClip {
public function Symbol3dfgdsgf_151(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 23
//Symbol64_143 (BlackH_fla.Symbol64_143)
package BlackH_fla {
import flash.events.*;
import flash.net.*;
import flash.filters.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Symbol64_143 extends MovieClip {
public function Symbol64_143(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
this.rotation = (Math.random() * 360);
this.scaleX = (this.scaleX * 1.1);
this.scaley = (this.scaley * 1.1);
}
function frame2(){
this.rotation = (Math.random() * 360);
this.scaleX = (this.scaleX * 1.1);
this.scaley = (this.scaley * 1.1);
}
}
}//package BlackH_fla
Section 24
//Symbol66_89 (BlackH_fla.Symbol66_89)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol66_89 extends MovieClip {
public var hole:MovieClip;
}
}//package BlackH_fla
Section 25
//Symbol7_212 (BlackH_fla.Symbol7_212)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbol7_212 extends MovieClip {
public function Symbol7_212(){
addFrameScript(371, frame372);
}
function frame372(){
stop();
}
}
}//package BlackH_fla
Section 26
//Symbol71_91 (BlackH_fla.Symbol71_91)
package BlackH_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Symbol71_91 extends MovieClip {
public function Symbol71_91(){
addFrameScript(0, frame1);
}
public function doo(_arg1:Event):void{
this.rotation = (Math.random() * 360);
this.scaleX = (Math.random() * 2);
this.scaleY = (Math.random() * 2);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, doo);
}
}
}//package BlackH_fla
Section 27
//Symbol79_198 (BlackH_fla.Symbol79_198)
package BlackH_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Symbol79_198 extends MovieClip {
public var prevbut:SimpleButton;
public var nextbut:SimpleButton;
public function Symbol79_198(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 7, frame8);
}
public function prev(_arg1:MouseEvent):void{
prevFrame();
}
function frame7(){
nextbut.visible = true;
}
function frame1(){
prevbut.addEventListener(MouseEvent.CLICK, prev, false, 0, true);
nextbut.addEventListener(MouseEvent.CLICK, nextt, false, 0, true);
prevbut.visible = false;
stop();
}
function frame8(){
nextbut.visible = false;
}
function frame2(){
prevbut.visible = true;
}
public function nextt(_arg1:MouseEvent):void{
nextFrame();
}
}
}//package BlackH_fla
Section 28
//Symbosdsdsddsfgfgdl7_97 (BlackH_fla.Symbosdsdsddsfgfgdl7_97)
package BlackH_fla {
import flash.display.*;
public dynamic class Symbosdsdsddsfgfgdl7_97 extends MovieClip {
public var ship:MovieClip;
public function Symbosdsdsddsfgfgdl7_97(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 29
//Symdddddbol2_109 (BlackH_fla.Symdddddbol2_109)
package BlackH_fla {
import flash.display.*;
public dynamic class Symdddddbol2_109 extends MovieClip {
public var ship:MovieClip;
}
}//package BlackH_fla
Section 30
//Sysdssdsdmbol6_88 (BlackH_fla.Sysdssdsdmbol6_88)
package BlackH_fla {
import flash.display.*;
public dynamic class Sysdssdsdmbol6_88 extends MovieClip {
public var ship:MovieClip;
public var holegen:MovieClip;
public function Sysdssdsdmbol6_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BlackH_fla
Section 31
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package caurina.transitions
Section 32
//Equations (caurina.transitions.Equations)
package caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5, _arg6));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5, _arg6));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_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:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
}
}//package caurina.transitions
Section 33
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var modifierParameters:Array;
public var valueComplete:Number;
public var modifierFunction:Function;
public var hasModifier:Boolean;
public var valueStart:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Array){
valueStart = _arg1;
valueComplete = _arg2;
hasModifier = Boolean(_arg3);
modifierFunction = _arg3;
modifierParameters = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 34
//SpecialPropertiesDefault (caurina.transitions.SpecialPropertiesDefault)
package caurina.transitions {
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
public class SpecialPropertiesDefault {
public function SpecialPropertiesDefault(){
trace("SpecialProperties is a static class and should not be instantiated.");
}
public static function _sound_volume_get(_arg1:Object):Number{
return (_arg1.soundTransform.volume);
}
public static function _color_splitter(_arg1, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if (_arg1 == null){
_local3.push({name:"_color_ra", value:1});
_local3.push({name:"_color_rb", value:0});
_local3.push({name:"_color_ga", value:1});
_local3.push({name:"_color_gb", value:0});
_local3.push({name:"_color_ba", value:1});
_local3.push({name:"_color_bb", value:0});
} else {
_local3.push({name:"_color_ra", value:0});
_local3.push({name:"_color_rb", value:AuxFunctions.numberToR(_arg1)});
_local3.push({name:"_color_ga", value:0});
_local3.push({name:"_color_gb", value:AuxFunctions.numberToG(_arg1)});
_local3.push({name:"_color_ba", value:0});
_local3.push({name:"_color_bb", value:AuxFunctions.numberToB(_arg1)});
};
return (_local3);
}
public static function frame_get(_arg1:Object):Number{
return (_arg1.currentFrame);
}
public static function _sound_pan_get(_arg1:Object):Number{
return (_arg1.soundTransform.pan);
}
public static function _color_property_get(_arg1:Object, _arg2:Array):Number{
return (_arg1.transform.colorTransform[_arg2[0]]);
}
public static function _sound_volume_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
}
public static function _autoAlpha_get(_arg1:Object):Number{
return (_arg1.alpha);
}
public static function _filter_splitter(_arg1:BitmapFilter, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if ((_arg1 is BlurFilter)){
_local3.push({name:"_blur_blurX", value:BlurFilter(_arg1).blurX});
_local3.push({name:"_blur_blurY", value:BlurFilter(_arg1).blurY});
_local3.push({name:"_blur_quality", value:BlurFilter(_arg1).quality});
} else {
trace("??");
};
return (_local3);
}
public static function init():void{
Tweener.registerSpecialProperty("_frame", frame_get, frame_set);
Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["redMultiplier"]);
Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]);
Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["greenMultiplier"]);
Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]);
Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["blueMultiplier"]);
Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]);
Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["alphaMultiplier"]);
Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]);
Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [BlurFilter, "blurX"]);
Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [BlurFilter, "blurY"]);
Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [BlurFilter, "quality"]);
Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
}
public static function _sound_pan_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.pan = _arg2;
_arg1.soundTransform = _local3;
}
public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:ColorTransform;
_local4 = _arg1.transform.colorTransform;
_local4[_arg3[0]] = _arg2;
_arg1.transform.colorTransform = _local4;
}
public static function _filter_property_get(_arg1:Object, _arg2:Array):Number{
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local3 = _arg1.filters;
_local5 = _arg2[0];
_local6 = _arg2[1];
_local4 = 0;
while (_local4 < _local3.length) {
if ((((_local3[_local4] is BlurFilter)) && ((_local5 == BlurFilter)))){
return (_local3[_local4][_local6]);
};
_local4++;
};
switch (_local5){
case BlurFilter:
_local7 = {blurX:0, blurY:0, quality:NaN};
break;
};
return (_local7[_local6]);
}
public static function _bezier_get(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local5:uint;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg4.length == 1){
return ((_arg1 + (_arg3 * (((2 * (1 - _arg3)) * (_arg4[0] - _arg1)) + (_arg3 * (_arg2 - _arg1))))));
};
_local5 = Math.floor((_arg3 * _arg4.length));
_local6 = ((_arg3 - (_local5 * (1 / _arg4.length))) * _arg4.length);
if (_local5 == 0){
_local7 = _arg1;
_local8 = ((_arg4[0] + _arg4[1]) / 2);
} else {
if (_local5 == (_arg4.length - 1)){
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = _arg2;
} else {
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = ((_arg4[_local5] + _arg4[(_local5 + 1)]) / 2);
};
};
return ((_local7 + (_local6 * (((2 * (1 - _local6)) * (_arg4[_local5] - _local7)) + (_local6 * (_local8 - _local7))))));
}
public static function frame_set(_arg1:Object, _arg2:Number):void{
_arg1.gotoAndStop(Math.round(_arg2));
}
public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:Array;
var _local5:uint;
var _local6:Object;
var _local7:String;
var _local8:BitmapFilter;
_local4 = _arg1.filters;
_local6 = _arg3[0];
_local7 = _arg3[1];
_local5 = 0;
while (_local5 < _local4.length) {
if ((((_local4[_local5] is BlurFilter)) && ((_local6 == BlurFilter)))){
_local4[_local5][_local7] = _arg2;
_arg1.filters = _local4;
return;
};
_local5++;
};
if (_local4 == null){
_local4 = new Array();
};
switch (_local6){
case BlurFilter:
_local8 = new BlurFilter(0, 0);
break;
};
_local8[_local7] = _arg2;
_local4.push(_local8);
_arg1.filters = _local4;
}
public static function _autoAlpha_set(_arg1:Object, _arg2:Number):void{
_arg1.alpha = _arg2;
_arg1.visible = (_arg2 > 0);
}
public static function _scale_splitter(_arg1:Number, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
_local3.push({name:"scaleX", value:_arg1});
_local3.push({name:"scaleY", value:_arg1});
return (_local3);
}
public static function _colorTransform_splitter(_arg1, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if (_arg1 == null){
_local3.push({name:"_color_ra", value:1});
_local3.push({name:"_color_rb", value:0});
_local3.push({name:"_color_ga", value:1});
_local3.push({name:"_color_gb", value:0});
_local3.push({name:"_color_ba", value:1});
_local3.push({name:"_color_bb", value:0});
} else {
if (_arg1.ra != undefined){
_local3.push({name:"_color_ra", value:_arg1.ra});
};
if (_arg1.rb != undefined){
_local3.push({name:"_color_rb", value:_arg1.rb});
};
if (_arg1.ga != undefined){
_local3.push({name:"_color_ba", value:_arg1.ba});
};
if (_arg1.gb != undefined){
_local3.push({name:"_color_bb", value:_arg1.bb});
};
if (_arg1.ba != undefined){
_local3.push({name:"_color_ga", value:_arg1.ga});
};
if (_arg1.bb != undefined){
_local3.push({name:"_color_gb", value:_arg1.gb});
};
if (_arg1.aa != undefined){
_local3.push({name:"_color_aa", value:_arg1.aa});
};
if (_arg1.ab != undefined){
_local3.push({name:"_color_ab", value:_arg1.ab});
};
};
return (_local3);
}
public static function _bezier_modifier(_arg1):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local6:Object;
_local2 = [];
if ((_arg1 is Array)){
_local3 = _arg1;
} else {
_local3 = [_arg1];
};
_local6 = {};
_local4 = 0;
while (_local4 < _local3.length) {
for (_local5 in _local3[_local4]) {
if (_local6[_local5] == undefined){
_local6[_local5] = [];
};
_local6[_local5].push(_local3[_local4][_local5]);
};
_local4++;
};
for (_local5 in _local6) {
_local2.push({name:_local5, parameters:_local6[_local5]});
};
return (_local2);
}
}
}//package caurina.transitions
Section 35
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var getValue:Function;
public var setValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 36
//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 37
//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;
}
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 38
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null):void{
var _local5:SpecialProperty;
if (!_inited){
init();
};
_local5 = new SpecialProperty(_arg2, _arg3, _arg4);
_specialPropertyList[_arg1] = _local5;
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Function;
var _local11:TweenListObj;
var _local12:Number;
var _local13:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local7 = arguments[(arguments.length - 1)];
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
if (typeof(_local7.transition) == "string"){
_local13 = _local7.transition.toLowerCase();
_local10 = _transitionList[_local13];
} else {
_local10 = _local7.transition;
};
if (!Boolean(_local10)){
_local10 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local11 = new TweenListObj(_local4[_local5], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), (_local7.useFrames == true), _local10);
_local11.properties = null;
_local11.onStart = _local7.onStart;
_local11.onUpdate = _local7.onUpdate;
_local11.onComplete = _local7.onComplete;
_local11.onOverwrite = _local7.onOverwrite;
_local11.onStartParams = _local7.onStartParams;
_local11.onUpdateParams = _local7.onUpdateParams;
_local11.onCompleteParams = _local7.onCompleteParams;
_local11.onOverwriteParams = _local7.onOverwriteParams;
_local11.isCaller = true;
_local11.count = _local7.count;
_local11.waitFrames = _local7.waitFrames;
_tweenList.push(_local11);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local12 = (_tweenList.length - 1);
updateTweenByIndex(_local12);
removeTweenByIndex(_local12);
};
_local5++;
};
return (true);
}
public static function init(_arg1=null):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
SpecialPropertiesDefault.init();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local2.timeStart = (_local2.timeStart + (_currentTime - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_currentTime - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function debug_getList():String{
var _local1:String;
var _local2:uint;
var _local3:uint;
_local1 = "";
_local2 = 0;
while (_local2 < _tweenList.length) {
_local1 = (_local1 + (("[" + _local2) + "] ::\n"));
_local3 = 0;
while (_local3 < _tweenList[_local2].properties.length) {
_local1 = (_local1 + ((((" " + _tweenList[_local2].properties[_local3].name) + " -> ") + _tweenList[_local2].properties[_local3].valueComplete) + "\n"));
_local3++;
};
_local2++;
};
return (_local1);
}
public static function getVersion():String{
return ("AS3 1.26.62");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var tScope:Object;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
if (_currentTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(_currentTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (_currentTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
try {
tTweening.onStart.apply(tScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "onStart");
};
};
for (pName in tTweening.properties) {
pv = getPropertyValue(tScope, pName);
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.hasStarted = true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (_currentTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (_currentTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
setPropertyValue(tScope, pName, nv);
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
try {
tTweening.onUpdate.apply(tScope, tTweening.onUpdateParams);
} catch(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
try {
tTweening.onComplete.apply(tScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_tweenList[_local2].timeStart = (_currentTime - (((_currentTime - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_currentTime - (((_currentTime - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_currentTime - (((_currentTime - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
try {
pTweening.onError.apply(pTweening.scope, [pTweening.scope, pError]);
} catch(metaError:Error) {
trace("## [Tweener] Error:", pTweening.scope, "raised an error while executing the 'onError' handler. Original error:\n", pError.getStackTrace(), "\nonError error:", metaError.getStackTrace());
};
} else {
if (!Boolean(pTweening.onError)){
trace("## [Tweener] Error: :", 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);
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:String;
var _local9:Object;
var _local10:Number;
var _local11:Number;
var _local12:Array;
var _local13:Object;
var _local14:Object;
var _local15:Function;
var _local16:Object;
var _local17:TweenListObj;
var _local18:Number;
var _local19:Array;
var _local20:Array;
var _local21:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local9 = TweenListObj.makePropertiesChain(arguments[(arguments.length - 1)]);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local10 = (isNaN(_local9.time)) ? 0 : _local9.time;
_local11 = (isNaN(_local9.delay)) ? 0 : _local9.delay;
_local12 = new Array();
_local13 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true};
_local14 = new Object();
for (_local7 in _local9) {
if (!_local13[_local7]){
if (_specialPropertySplitterList[_local7]){
_local19 = _specialPropertySplitterList[_local7].splitValues(_local9[_local7], _specialPropertySplitterList[_local7].parameters);
_local5 = 0;
while (_local5 < _local19.length) {
_local12[_local19[_local5].name] = {valueStart:undefined, valueComplete:_local19[_local5].value};
_local5++;
};
} else {
if (_specialPropertyModifierList[_local7] != undefined){
_local20 = _specialPropertyModifierList[_local7].modifyValues(_local9[_local7]);
_local5 = 0;
while (_local5 < _local20.length) {
_local14[_local20[_local5].name] = {modifierParameters:_local20[_local5].parameters, modifierFunction:_specialPropertyModifierList[_local7].getValue};
_local5++;
};
} else {
_local12[_local7] = {valueStart:undefined, valueComplete:_local9[_local7]};
};
};
};
};
for (_local7 in _local14) {
if (_local12[_local7] != undefined){
_local12[_local7].modifierParameters = _local14[_local7].modifierParameters;
_local12[_local7].modifierFunction = _local14[_local7].modifierFunction;
};
};
if (typeof(_local9.transition) == "string"){
_local21 = _local9.transition.toLowerCase();
_local15 = _transitionList[_local21];
} else {
_local15 = _local9.transition;
};
if (!Boolean(_local15)){
_local15 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local16 = new Object();
for (_local7 in _local12) {
_local16[_local7] = new PropertyInfoObj(_local12[_local7].valueStart, _local12[_local7].valueComplete, _local12[_local7].modifierFunction, _local12[_local7].modifierParameters);
};
_local17 = new TweenListObj(_local4[_local5], (_currentTime + ((_local11 * 1000) / _timeScale)), (_currentTime + (((_local11 * 1000) + (_local10 * 1000)) / _timeScale)), (_local9.useFrames == true), _local15);
_local17.properties = _local16;
_local17.onStart = _local9.onStart;
_local17.onUpdate = _local9.onUpdate;
_local17.onComplete = _local9.onComplete;
_local17.onOverwrite = _local9.onOverwrite;
_local17.onError = _local9.onError;
_local17.onStartParams = _local9.onStartParams;
_local17.onUpdateParams = _local9.onUpdateParams;
_local17.onCompleteParams = _local9.onCompleteParams;
_local17.onOverwriteParams = _local9.onOverwriteParams;
_local17.rounded = _local9.rounded;
_local17.skipUpdates = _local9.skipUpdates;
removeTweensByTime(_local17.scope, _local17.properties, _local17.timeStart, _local17.timeComplete);
_tweenList.push(_local17);
if ((((_local10 == 0)) && ((_local11 == 0)))){
_local18 = (_tweenList.length - 1);
updateTweenByIndex(_local18);
removeTweenByIndex(_local18);
};
_local5++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
private static function setPropertyValue(_arg1:Object, _arg2:String, _arg3:Number):void{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
_specialPropertyList[_arg2].setValue(_arg1, _arg3, _specialPropertyList[_arg2].parameters);
} else {
_specialPropertyList[_arg2].setValue(_arg1, _arg3);
};
} else {
_arg1[_arg2] = _arg3;
};
}
private static function getPropertyValue(_arg1:Object, _arg2:String):Number{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
return (_specialPropertyList[_arg2].getValue(_arg1, _specialPropertyList[_arg2].parameters));
};
return (_specialPropertyList[_arg2].getValue(_arg1));
} else {
};
return (!NULL!);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = _currentTime;
_local2.isPaused = true;
return (true);
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
try {
_tweenList[i].onOverwrite.apply(_tweenList[i].scope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 39
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var auxProperties:Object;
public var timeComplete:Number;
public var onStartParams:Array;
public var rounded:Boolean;
public var properties:Object;
public var onUpdateParams:Array;
public var onComplete:Function;
public var updatesSkipped:Number;
public var onStart:Function;
public var skipUpdates:Number;
public var scope:Object;
public var isCaller:Boolean;
public var timePaused:Number;
public var transition:Function;
public var onCompleteParams:Array;
public var onError:Function;
public var timesCalled:Number;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
auxProperties = new Object();
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:uint;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = 0;
while (_local2 < properties.length) {
if (_local2 > 0){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local2].name));
_local1 = (_local1 + (",valueStart:" + properties[_local2].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local2].valueComplete));
_local1 = (_local1 + "]");
_local2++;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (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 (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 40
//SoundManager (com.hydrotik.utils.SoundManager)
package com.hydrotik.utils {
import flash.events.*;
import caurina.transitions.*;
import flash.media.*;
import flash.utils.*;
public class SoundManager {
private var _currPos:int;
private var _itemArray:Array;
private var _seqIsManual:Boolean;
private var _seqArray:Array;
private var _isMuted:Boolean;// = false
private var _currSequenceItem:String;// = ""
private var _nextSequenceItem:String;// = ""
private var _xFadeNext:Boolean;
public static const AUTHOR:String = "Donovan Adams - donovan[(at)]hydrotik.com - http://blog.hydrotik.com";
public static const VERSION:String = "SoundManager 0.0.2";
private static var _oSoundManager:SoundManager;
public static var _sndArray:Dictionary;
private static var _channelArray:Dictionary;
private static var _soundTransform:SoundTransform;
public function SoundManager(_arg1:SingletonEnforcer):void{
_seqArray = new Array();
_currSequenceItem = "";
_nextSequenceItem = "";
_itemArray = new Array();
_isMuted = false;
super();
if (_arg1 == null){
throw (new Error("SoundManager: Instantiation failed - Use SoundManager.getInstance() instead of new."));
};
_sndArray = new Dictionary(true);
_channelArray = new Dictionary(true);
}
public function stop(_arg1:String):void{
var snd = _arg1;
try {
_channelArray[snd].stop();
} catch(e:Error) {
throw (new Error((("SoundManager: " + snd) + " has not been loaded into the SoundManager.")));
};
}
public function getItem(_arg1:String){
return (_sndArray[_arg1]);
}
private function soundCompleteHandler(_arg1:Event):void{
}
public function addItem(_arg1):void{
_sndArray[getQualifiedClassName(_arg1)] = (_arg1 as Sound);
_itemArray.push(getQualifiedClassName(_arg1));
}
public function startSequencer(_arg1):void{
if ((_arg1 is Array)){
_seqArray = _arg1;
_seqIsManual = false;
} else {
_seqIsManual = true;
_currSequenceItem = _arg1;
};
enableAll();
advanceSequencer();
}
private function stopAllComplete(_arg1:String):void{
stop(_arg1);
}
public function pan(_arg1:String, _arg2:Number, _arg3:Number=0.5, _arg4:String="linear"):void{
var snd = _arg1;
var pan = _arg2;
var t = _arg3;
var ease = _arg4;
try {
Tweener.addTween(_channelArray[snd], {_sound_pan:pan, time:t, transition:ease});
} catch(e:Error) {
throw (new Error((("SoundManager: " + snd) + " has not been loaded into the SoundManager.")));
};
}
public function enableAll():void{
_isMuted = false;
}
public function dispose():void{
var _local1:int;
_nextSequenceItem = null;
_xFadeNext = false;
_local1 = 0;
while (_local1 < _itemArray.length) {
_channelArray[_itemArray[_local1]] = null;
_sndArray[_itemArray[_local1]] = null;
_local1++;
};
_isMuted = false;
}
public function get muted():Boolean{
return (_isMuted);
}
private function advanceSequencer(_arg1:Event=null):void{
if (_seqIsManual){
if (_nextSequenceItem != ""){
play(_nextSequenceItem, 0, (_xFadeNext) ? 0 : 0.8, true);
if (_xFadeNext){
play(_currSequenceItem, 0, 0.8, false);
fade(_currSequenceItem, 0, (_sndArray[_currSequenceItem].length * 0.001), "easeinquad");
fade(_nextSequenceItem, 0.8, (_sndArray[_nextSequenceItem].length * 0.001), "easeoutquad");
};
_currSequenceItem = _nextSequenceItem;
_nextSequenceItem = "";
_xFadeNext = false;
} else {
play(_currSequenceItem, 0, 0.8, true);
};
} else {
_currPos++;
play(_seqArray[(_currPos - 1)], 0, 0.8, ((_currPos)==_seqArray.length) ? false : true);
if (_seqArray[_currPos] != _seqArray[(_currPos - 1)]){
play(_seqArray[_currPos], 0, 0, false);
fade(_seqArray[(_currPos - 1)], 0, (_sndArray[_seqArray[(_currPos - 1)]].length * 0.001), "easeinquad");
fade(_seqArray[_currPos], 0.8, (_sndArray[_seqArray[_currPos]].length * 0.001), "easeoutquad");
};
};
}
public function play(_arg1:String, _arg2:int=0, _arg3:Number=1, _arg4:Boolean=false):void{
var snd = _arg1;
var l = _arg2;
var vol = _arg3;
var isSeq = _arg4;
if (!_isMuted){
try {
_channelArray[snd] = _sndArray[snd].play(0, l);
if (vol != -1){
_soundTransform = _channelArray[snd].soundTransform;
_soundTransform.volume = vol;
_channelArray[snd].soundTransform = _soundTransform;
};
if (isSeq){
_channelArray[snd].addEventListener(Event.SOUND_COMPLETE, advanceSequencer, false, 0, true);
} else {
_channelArray[snd].addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler, false, 0, true);
};
_soundTransform = null;
} catch(e:Error) {
throw (new Error((("SoundManager: " + snd) + " has not been loaded into the SoundManager.")));
};
};
}
public function addSequenceItem(_arg1:String, _arg2:Boolean=false):void{
_nextSequenceItem = _arg1;
_xFadeNext = _arg2;
}
public function removeItem(_arg1:String):void{
_channelArray[_arg1] = null;
_sndArray[_arg1] = null;
_itemArray.splice(_itemArray.indexOf(_arg1), 1);
}
public function fade(_arg1:String, _arg2:Number, _arg3:Number=0.5, _arg4:String="linear"):void{
var snd = _arg1;
var vol = _arg2;
var t = _arg3;
var ease = _arg4;
try {
Tweener.addTween(_channelArray[snd], {_sound_volume:vol, time:t, transition:ease});
} catch(e:Error) {
throw (new Error((("SoundManager: " + snd) + " has not been loaded into the SoundManager.")));
};
}
public function stopAll(_arg1:Number=0):void{
var _local2:int;
_channelArray[_currSequenceItem].removeEventListener(Event.SOUND_COMPLETE, advanceSequencer);
_nextSequenceItem = "";
_xFadeNext = false;
_local2 = 0;
while (_local2 < _itemArray.length) {
Tweener.addTween(_channelArray[_itemArray[_local2]], {_sound_volume:0, time:_arg1, transition:"linear", onComplete:stopAllComplete});
_local2++;
};
_isMuted = true;
}
public static function getInstance():SoundManager{
if (_oSoundManager == null){
_oSoundManager = new SoundManager(new SingletonEnforcer());
};
return (_oSoundManager);
}
}
}//package com.hydrotik.utils
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 41
//Key (delta.ui.Key)
package delta.ui {
import flash.events.*;
public class Key {
private var keys:Array;
public function Key(_arg1:Object):void{
keys = new Array(222);
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, downhandle, false, 0, true);
_arg1.addEventListener(KeyboardEvent.KEY_UP, uphandle, false, 0, true);
}
public function resetKeys():void{
var _local1:Number;
_local1 = 0;
while (_local1 < keys.length) {
keys[_local1] = false;
_local1++;
};
}
public function isUp(_arg1:uint, ... _args):Boolean{
var _local3:uint;
if (_args.length == 0){
return (!(keys[_arg1]));
};
if (keys[_arg1]){
return (false);
};
_local3 = 0;
while (_local3 < _args.length) {
if (keys[_args[_local3]]){
return (false);
};
_local3++;
};
return (true);
}
private function uphandle(_arg1:KeyboardEvent):void{
keys[_arg1.keyCode] = false;
}
public function isDown(_arg1:uint, ... _args):Boolean{
var _local3:uint;
if (_args.length == 0){
return (keys[_arg1]);
};
if (!keys[_arg1]){
return (false);
};
_local3 = 0;
while (_local3 < _args.length) {
if (!keys[_args[_local3]]){
return (false);
};
_local3++;
};
return (true);
}
public function resetKey(_arg1):void{
keys[_arg1] = false;
}
private function downhandle(_arg1:KeyboardEvent):void{
keys[_arg1.keyCode] = true;
}
}
}//package delta.ui
Section 42
//BtnSs (FWG.BtnSs)
package FWG {
public dynamic class BtnSs extends SBtn {
}
}//package FWG
Section 43
//BtnSubmit (FWG.BtnSubmit)
package FWG {
public dynamic class BtnSubmit extends SBtn {
}
}//package FWG
Section 44
//BtnVh (FWG.BtnVh)
package FWG {
public dynamic class BtnVh extends SBtn {
}
}//package FWG
Section 45
//BtnX (FWG.BtnX)
package FWG {
public dynamic class BtnX extends SBtn {
}
}//package FWG
Section 46
//SBtn (FWG.SBtn)
package FWG {
import flash.events.*;
import flash.filters.*;
import flash.display.*;
public class SBtn extends MovieClip {
public var _press:Function;
public var _rollOver:Function;
public var btn;
public var _rollOut:Function;
public var _release:Function;
public function SBtn(){
var i:int;
var child:*;
super();
btn = this.getChildAt(0);
_rollOver = function (){
};
_rollOut = function (){
};
_press = function (){
};
_release = function (){
};
if ((btn is MovieClip)){
btn.buttonMode = true;
btn.gotoAndStop(1);
};
btn.addEventListener(MouseEvent.MOUSE_OVER, _onRollOver, false, 0, true);
btn.addEventListener(MouseEvent.MOUSE_OUT, _onRollOut, false, 0, true);
btn.addEventListener(MouseEvent.MOUSE_DOWN, _onPress, false, 0, true);
btn.addEventListener(MouseEvent.MOUSE_UP, _onRelease, false, 0, true);
i = this.numChildren;
while ((i = (i - 1)), (i - 1) >= 0) {
child = this.getChildAt(i);
if ((child is InteractiveObject)){
child.mouseEnabled = false;
if ((child is DisplayObjectContainer)){
child.mouseChildren = false;
};
};
};
btn.mouseEnabled = true;
}
public function release():void{
}
public function press():void{
}
public function _onRollOut(_arg1:MouseEvent):void{
rollOut();
_rollOut();
}
public function rollOut():void{
}
public function _onRelease(_arg1:MouseEvent):void{
release();
_release();
}
public function _onRollOver(_arg1:MouseEvent):void{
rollOver();
_rollOver();
}
public function _onPress(_arg1:MouseEvent):void{
press();
_press();
}
public function rollOver():void{
}
}
}//package FWG
Section 47
//SubmitScore (FWG.SubmitScore)
package FWG {
import flash.events.*;
import flash.net.*;
import flash.display.*;
public class SubmitScore extends Sprite {
private var windowBg;
public var score:int;
private var windowBody;
public var game_name:String;
public function SubmitScore(){
GameI.submitScore = this;
windowBody = this.getChildAt(1);
windowBg = this.getChildAt(0);
windowBody.stop();
windowBody.btnSubmit._release = checkSubmit;
windowBody.btnX._release = fadeHide;
hide();
}
private function errorHandler(_arg1:IOErrorEvent):void{
trace(("error: " + _arg1));
}
public function hide():void{
this.removeChild(windowBody);
this.removeChild(windowBg);
}
public function checkSubmit():void{
var _local1:String;
var _local2:URLVariables;
_local1 = windowBody.nameTxt.text;
if (_local1 == ""){
_local1 = ("guest" + int((Math.random() * 1000)));
};
if (score > 0){
_local2 = new URLVariables();
_local2.game = game_name;
_local2.score = windowBody.scoreTxt.text;
_local2.name = _local1;
Net.sendData(_local2, "http://www.freeworldgroup.com/score/score.asp", completeHandler, errorHandler);
windowBody.gotoAndStop(2);
GameI.btnSs.visible = false;
} else {
trace("score is 0! can't submit!");
};
}
public function fadeShow():void{
show();
windowBody.nameTxt.stage.focus = windowBody.nameTxt;
windowBody.nameTxt.setSelection(0, windowBody.nameTxt.text.length);
}
private function completeHandler(_arg1:Event):void{
windowBody.gotoAndStop(3);
}
public function fadeHide():void{
hide();
}
public function show():void{
this.addChild(windowBg);
this.addChild(windowBody);
windowBody.nameTxt.maxChars = 10;
windowBody.nameTxt.text = "";
windowBody.scoreTxt.text = score;
trace(((("playerName=" + windowBody.nameTxt.text) + ",score=") + windowBody.scoreTxt.text));
}
}
}//package FWG
Section 48
//HitRec (ui.HitRec)
package ui {
import flash.display.*;
public dynamic class HitRec extends MovieClip {
}
}//package ui
Section 49
//WindowBg (ui.WindowBg)
package ui {
import flash.display.*;
public dynamic class WindowBg extends MovieClip {
}
}//package ui
Section 50
//ArmegaloStingy (ArmegaloStingy)
package {
public dynamic class ArmegaloStingy extends sting_controller {
public var stingState:String;
public function ArmegaloStingy(){
addFrameScript(0, frame1, 69, frame70);
}
function frame70(){
stingState = "finished";
}
function frame1(){
stingState = "playing";
}
}
}//package
Section 51
//ArmourLevel (ArmourLevel)
package {
import flash.display.*;
public dynamic class ArmourLevel extends MovieClip {
public var temp:MovieClip;
}
}//package
Section 52
//BlackH (BlackH)
package {
import flash.events.*;
import flash.net.*;
import delta.ui.*;
import flash.display.*;
import FWG.*;
import flash.text.*;
import flash.geom.*;
import flash.ui.*;
public class BlackH extends MovieClip {
private const topAccel:Number = 2.2;
private const accelAccel:Number = 1.1;
private const topSplits:Number = 10;
private const timePause:Number = 100;
private var holesToDie:Array;
private var Shops:MovieClip;
public var ctrltxt:TextField;
public var ctrlbut:SimpleButton;
private var A:Number;// = 65
private var D:Number;// = 68
private var W:Number;// = 87
private var S:Number;// = 83
private var SGH:MovieClip;
private var itemAltDescription:Array;
private var PowerUpAtts:Array;
public var gameDifficulty2:Number;// = -1
private var ldr_centreX:Number;// = 275
private var ldr_centreY:Number;// = 200
private var stats:Object;
private var gameToldComplete:Boolean;// = false
public var menuBut:SimpleButton;
private var ldr_SGH:MovieClip;
private var screenHeight:Number;// = 360
private var screenWidth:Number;// = 550
private var gravityStrength:Number;// = 50
private var PauseBut:SimpleButton;
public var spectxt:TextField;
private var enemysToDie:Array;
private var GH:MovieClip;
public var specbut:SimpleButton;
public var ultrabak:MovieClip;
public var Lives:LifeDisplay;
public var fwg_boards:Array;
private var EBullAtts:Array;
public var besttext:TextField;
private var PGH:MovieClip;
private var keyui:Key;
public var armegaButton:SimpleButton;
public var EnemyProbs:Array;
private var PowerUpProbs:Array;
private var itemPrices:Array;
private var gameDifficulty:String;// = "None"
private var levelData:Object;
private var WeaponPowers:Array;
private var ldr_startScale:Number;
public var siteButton:SimpleButton;
private var xxx:Number;// = 0
private var EnemyAtts:Array;
private var yyy:Number;// = 0
private var DTGH:MovieClip;
private var timePauseTimer:Number;// = 0
private var disp:MovieClip;
private var ldr_startPoint:Number;// = 5
public var bob:MovieClip;
private var GeneratorMax:Number;// = 4
private var ldr_minSpeed;
public var killedBy:String;// = "Nothing"
private var BullAtts:Array;
private var permission:Boolean;// = true
private var powerUpsToDie:Array;
private var ldr_starCount:uint;// = 200
public var btnSs:BtnSs;
public var sting:ArmegaloStingy;
private var ldr_stars:Array;
private var skipIntros:Boolean;// = false
public var SmartBombs:SmartBombDisplay;
private var ldr_bottomEdge:int;
private var ldr_rightEdge:int;
public var ldr:MovieClip;
private var ldr_frameCounter:uint;// = 0
private var SpeckAtts:Array;
private var Enemys:Array;
private var PowerUps:Array;
private var maxboms:Number;// = 10
private var bombs:Number;// = 3
private var reportCounterMax:Number;// = 35
private var reportCounter:Number;// = 0
private var ldr_universalAccel;// = 1.1
private var keyProfile:String;// = "None"
private var so:SharedObject;
public var sting2:MovieClip;
public var sting3:MovieClip;
private var WHIGH:MovieClip;
public var InstructionsBut:SimpleButton;
private var Specks:Array;
private var WeaponNames:Array;
public var MoreGamesBut:SimpleButton;
private var countToStart:Number;// = 0
public var score:TextField;
private var myMouseDown:Boolean;// = false
private var EnemyScoreWorth:Array;
private var ldr_starXS:Number;
public var finalScore:Number;// = 0
private var ldr_starYS:Number;
private var bulletsToDie:Array;
private var screenFlash:MovieClip;
private var itemDescription:Array;
private var StartBut:SimpleButton;
private var HoleAtts:Array;
private var ldr_leftEdge:int;
private var holeScaleInc:Number;// = 1.4
public var OptionsBut:SimpleButton;
public var bestscore:TextField;
private var CharAtt:Object;
private var specksToDie:Array;
private var ldr_topEdge:int;
private var soundMod;
private var Char:MovieClip;
public var PlayBute:SimpleButton;
public var PlayButh:SimpleButton;
public var PlayButm:SimpleButton;
public var level:Number;// = 1
private var Bullets:Array;
private var Holes:Array;
private var emptyScreenCounter:Number;// = 0
private var BHGH:MovieClip;
private var EBullets:Array;
private var WeaponMaxPowers:Array;
private var EnemyHitPoints:Array;
private var eBulletsToDie:Array;
private var EGH:MovieClip;
public var BackBut:SimpleButton;
public function BlackH(){
ldr_starCount = 200;
ldr_stars = [];
ldr_startPoint = 5;
ldr_starXS = (0.25 * ldr_startPoint);
ldr_starYS = (0.25 * ldr_startPoint);
ldr_minSpeed = (0.01 * ldr_startPoint);
ldr_startScale = (0.005 * ldr_startPoint);
ldr_SGH = new MovieClip();
ldr_centreX = (550 / 2);
ldr_centreY = (400 / 2);
ldr_universalAccel = 1.1;
ldr_leftEdge = -((ldr_centreX * 1.5));
ldr_rightEdge = (ldr_centreX * 1.5);
ldr_topEdge = -((ldr_centreY * 1.5));
ldr_bottomEdge = (ldr_centreY * 1.5);
ldr_frameCounter = 0;
permission = true;
skipIntros = false;
keyui = new Key(stage);
so = SharedObject.getLocal("genericdata");
PowerUps = [];
PowerUpAtts = [];
powerUpsToDie = [];
Holes = [];
HoleAtts = [];
holesToDie = [];
Bullets = [];
BullAtts = [];
bulletsToDie = [];
Specks = [];
SpeckAtts = [];
specksToDie = [];
EBullets = [];
EBullAtts = [];
eBulletsToDie = [];
Enemys = [];
EnemyAtts = [];
enemysToDie = [];
screenWidth = 550;
screenHeight = 360;
holeScaleInc = 1.4;
gravityStrength = 50;
A = 65;
S = 83;
D = 68;
W = 87;
myMouseDown = false;
level = 1;
stats = {Kills:0, ShotsFired:0};
levelData = {PowerUpFreq:450, HoleFreq:300, EnemyFreq:200, MaxEmptyScreen:30, holeScaleInc:1.004, holeHPInc:1.001, MineFreq:100};
xxx = 0;
yyy = 0;
timePauseTimer = 0;
EnemyProbs = [-1, 40, 10, 10, 10];
EnemyScoreWorth = [-1, 30, 20, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5];
EnemyHitPoints = [-1, 10, 10, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20];
PowerUpProbs = [50, 29, 8, 7, 6, 5, -1, 15, 13, 12, 3, 15, 15, 15, 10, 10];
WeaponPowers = [1, 1, 0, 0, 0, 0, 0];
WeaponMaxPowers = [1, 4, 5, 6, 7, 8, 9];
GeneratorMax = 4;
WeaponNames = ["No Weapon", "1 Shot", "2 Shot", "3 Shot", "4 Shot", "5 Shot", "6 Shot"];
emptyScreenCounter = 0;
itemDescription = ["", "Upgrade One Shot - Increases power to single shot. Each upgrade of this type requires more coolant", "Upgrade Two Shot - Increases power to double shot. Each upgrade of this type requires more coolant", "Upgrade Three Shot - Increases power to triple shot. Each upgrade of this type requires more coolant", "Upgrade Four Shot - Increases power to quadruple shot. Each upgrade of this type requires more coolant", "Upgrade Five Shot - Increases power to quintuple shot. Each upgrade of this type requires more coolant", "Upgrade Six Shot - Increases power to sextuple shot. Each upgrade of this type requires more coolant", "Replenish Shield - Adds half total shield strength so you can get back in the battle!", "Engine Upgrade - go faster, brake better!", "Extra Coolant - Fire more shots before your weapons overheat!", "Upgrade Generator - Upgrades all weapons. Will need more coolant for maximum effectiveness.", "Extra Life - Always handy", "Upgrade Shield - So you can take even more hits!"];
itemPrices = [0, 20, 40, 60, 80, 100, 120, 20, 20, 20, 200, 300, 60];
itemAltDescription = ["", "Install One Shot", "Install Two Shot", "Install Three Shot", "Install Four Shot", "Install Five Shot", "Install Six Shot", "Install Shield", "Install Engine", "Install Coolant", "Install Generator", "Install Lives", "Install Shield"];
keyProfile = "None";
bombs = 3;
maxboms = 10;
countToStart = 0;
reportCounter = 0;
reportCounterMax = 35;
killedBy = "Nothing";
gameToldComplete = false;
gameDifficulty = "None";
gameDifficulty2 = -1;
fwg_boards = ["suckaz_easy", "suckaz_med", "suckaz_hard"];
finalScore = 0;
super();
addFrameScript(0, frame1, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
setupContextMenu();
ldr_init();
}
private function fireMouse():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (CharAtt.WeaponTemp < 100){
CharAtt.WeaponTemp = (CharAtt.WeaponTemp + ((WeaponPowers[CharAtt.WeaponSelected] * CharAtt.BulletHP) * CharAtt.BulletsPerShot));
_local1 = (Char.x - mouseX);
_local2 = (Char.y - mouseY);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((_local1 / _local3) * CharAtt.BulletSpeed);
_local5 = ((_local2 / _local3) * CharAtt.BulletSpeed);
stats.ShotsFired = (stats.ShotsFired + 1);
_local6 = 0;
_local7 = 0;
while (_local7 < CharAtt.BulletsPerShot) {
if (CharAtt.SpreadMode == 0){
_local6 = ((((_local7 * 20) + 180) - Char.rotation) - ((CharAtt.BulletsPerShot - 1) * 10));
} else {
if (CharAtt.SpreadMode == 1){
_local6 = ((((360 / CharAtt.BulletsPerShot) * _local7) - Char.rotation) + 180);
};
};
getCoords(_local6);
_local4 = (xxx * CharAtt.BulletSpeed);
_local5 = (yyy * CharAtt.BulletSpeed);
initBullet((Char.x + _local4), (Char.y + _local5), (_local4 + CharAtt.XS), (_local5 + CharAtt.YS), CharAtt.BulletType, (WeaponPowers[CharAtt.WeaponSelected] * CharAtt.BulletHP));
_local7++;
};
};
}
private function moveDown():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS + CharAtt.Accel);
} else {
moveChar(0);
};
}
private function initWormHoleIn(){
var _local1:WormHoleIn;
_local1 = new WormHoleIn();
_local1.myRoot = this;
do {
_local1.x = (Math.random() * screenWidth);
_local1.y = (Math.random() * screenHeight);
} while (isRange(_local1, Char) < 200);
WHIGH.addChild(_local1);
soundMod.soundSound(1);
}
private function initLife():void{
updateLives();
PGH.addChild(Char);
Char.x = (screenWidth / 2);
Char.y = (screenHeight / 2);
CharAtt.XS = 0;
CharAtt.YS = 0;
emptyScreenCounter = 0;
CharAtt.HP = CharAtt.MaxHP;
killedBy = "Nothing";
flashScreen();
if (CharAtt.Score > 0){
soundMod.soundSmart();
};
}
private function onContextMenuHandler(_arg1:ContextMenuEvent):void{
}
public function ldr_init():void{
var _local1:Array;
var _local2:String;
var _local3:Number;
addChild(ldr_SGH);
setChildIndex(ldr_SGH, 0);
setChildIndex(ultrabak, 0);
ldr_SGH.x = ldr_centreX;
ldr_SGH.y = ldr_centreY;
addEventListener(Event.ENTER_FRAME, ldr_onEnterFrame);
addEventListener(Event.ENTER_FRAME, ldr_checkLoad);
armegaButton.addEventListener(MouseEvent.CLICK, callArmegalo);
siteButton.addEventListener(MouseEvent.CLICK, callFunnylishus);
_local1 = [];
_local1.push("http://www.armegalo.com");
_local1.push("http://armegalo.com");
_local1.push("http://www.funnylishus.com");
_local1.push("http://funnylishus.com");
_local1.push("file:///D|/MAIN/Flash/");
_local1.push("D:/MAIN/Flash/D%2DFence/D%2DFence3.swf");
_local1.push("file:///E|/DDrive/MAIN/Flash/");
_local1.push("E:/DDrive/MAIN/Flash/");
_local2 = this.loaderInfo.url;
_local3 = 0;
while (_local3 < _local1.length) {
if (_local2.substr(0, _local1[_local3].length) == _local1[_local3]){
permission = true;
};
_local3++;
};
}
private function updateThermom():void{
if (CharAtt.WeaponTemp > 100){
disp.Thermom.temp.scaleX = 1;
} else {
disp.Thermom.temp.scaleX = (CharAtt.WeaponTemp / 100);
};
}
function frame10(){
initOptions();
}
private function ldr_processRot():void{
ldr_SGH.rotation = (ldr_SGH.rotation + Math.sin((ldr_frameCounter / 200)));
}
function frame12(){
initGrats();
GameI.submitScore.score = finalScore;
GameI.btnSs = btnSs;
GameI.submitScore.game_name = fwg_boards[gameDifficulty2];
btnSs._release = function ():void{
GameI.submitScore.fadeShow();
};
}
public function initEnemy(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Enemies;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Object;
_local7 = new Enemies();
if (_arg1 == 1){
_local11 = (200 - (level * 2));
if (_local11 < 30){
_local11 = 30;
};
_local7.x = _arg2;
_local7.y = _arg3;
if ((Math.random() * 2) < 1){
_local4 = (Math.random() * screenWidth);
_local5 = _local7.y;
_local6 = new Point(_local4, _local5);
rotateObjectToPoint(_local7, _local6);
} else {
_local4 = _local7.x;
_local5 = (Math.random() * screenHeight);
_local6 = new Point(_local4, _local5);
rotateObjectToPoint(_local7, _local6);
};
_local8 = 2;
_local9 = (level * EnemyHitPoints[_arg1]);
_local10 = (level * EnemyHitPoints[_arg1]);
soundMod.soundSound(2);
} else {
if (_arg1 == 2){
_local11 = (30 - level);
if (_local11 < 10){
_local11 = 10;
};
_local7.x = _arg2;
_local7.y = _arg3;
_local4 = 0;
_local5 = 0;
_local8 = 0;
_local9 = (level * EnemyHitPoints[_arg1]);
_local10 = (level * EnemyHitPoints[_arg1]);
soundMod.soundSound(2);
} else {
if (_arg1 == 3){
_local11 = 25;
_local7.x = _arg2;
_local7.y = _arg3;
_local4 = 0;
_local5 = 0;
_local8 = 4;
_local9 = (level * EnemyHitPoints[_arg1]);
_local10 = (level * EnemyHitPoints[_arg1]);
soundMod.soundSound(2);
} else {
if (_arg1 == 4){
_local11 = (60 - level);
if (_local11 < 4){
_local11 = 4;
};
_local7.x = _arg2;
_local7.y = _arg3;
if ((Math.random() * 2) < 1){
_local4 = (Math.random() * screenWidth);
_local5 = _local7.y;
_local6 = new Point(_local4, _local5);
rotateObjectToPoint(_local7, _local6);
} else {
_local4 = _local7.x;
_local5 = (Math.random() * screenHeight);
_local6 = new Point(_local4, _local5);
rotateObjectToPoint(_local7, _local6);
};
_local8 = 2;
_local9 = (level * EnemyHitPoints[_arg1]);
_local10 = (level * EnemyHitPoints[_arg1]);
soundMod.soundSound(2);
} else {
if (_arg1 == 20){
_local7.x = _arg2;
_local7.y = _arg3;
_local4 = 0;
_local5 = 0;
_local8 = 0;
_local9 = 0.1;
_local10 = (level * EnemyHitPoints[_arg1]);
};
};
};
};
};
if (gameDifficulty == "Medium"){
(_local9 * 1.1);
};
if (gameDifficulty == "Hard"){
(_local9 * 1.2);
};
if ((Math.random() * 10) < (Math.random() * level)){
_local12 = _local11;
} else {
_local12 = int((((Math.random() * _local11) - 15) + 15));
};
_local13 = {BeenAlive:0, Level:level, ReloadCount:_local12, ReloadTime:_local11, HP:_local9, KillHP:_local10, Type:_arg1, XS:0, YS:0, XT:_local4, YT:_local5, Accel:_local8, BulletType:1, BulletSpeed:2, SpreadMode:0, BulletsPerShot:2, BulletHP:level, ShotFreq:40};
_local7.gotoAndStop(_local13.Type);
Enemys.push(_local7);
EnemyAtts.push(_local13);
EGH.addChild(_local7);
if (_arg1 == 20){
EGH.setChildIndex(_local7, 0);
};
}
function frame11(){
initMainGame();
}
private function runEnemys():void{
var _local1:Boolean;
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = false;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = 0;
while (_local7 < Enemys.length) {
if (((Enemys[_local7].hitTestObject(Char.detect)) && ((killedBy == "Nothing")))){
_local6 = EnemyAtts[_local7].KillHP;
if (_local6 > CharAtt.HP){
EnemyAtts[_local7].HP = (EnemyAtts[_local7].HP - CharAtt.HP);
CharAtt.HP = -1;
Enemys[_local7].nme.gotoAndPlay(2);
Enemys[_local7].nme.play();
Char.play();
_local1 = true;
} else {
EnemyAtts[_local7].HP = (EnemyAtts[_local7].HP - CharAtt.HP);
CharAtt.HP = (CharAtt.HP - _local6);
Char.play();
};
};
if (EnemyAtts[_local7].HP < 0){
enemysToDie.push(_local7);
if (!_local1){
soundMod.soundEncouragement(gameToldComplete);
};
explode(Enemys[_local7], 1, 1);
if (EnemyAtts[_local7].Type != 20){
stats.Kills = (stats.Kills + 1);
initPowerUp(13, Enemys[_local7].x, Enemys[_local7].y);
CharAtt.Score = (CharAtt.Score + EnemyScoreWorth[Enemys[_local7].currentFrame]);
updateScoreStats();
} else {
CharAtt.Score = (CharAtt.Score + EnemyScoreWorth[Enemys[_local7].currentFrame]);
updateScoreStats();
};
};
_local7++;
};
if (timePauseTimer < 1){
if (((((Math.random() * levelData.EnemyFreq) < 2.2)) || ((((emptyScreenCounter > levelData.MaxEmptyScreen)) && ((killedBy == "Nothing")))))){
initWormHoleIn();
};
_local7 = 0;
while (_local7 < Enemys.length) {
EnemyAtts[_local7].ReloadCount = (EnemyAtts[_local7].ReloadCount - 1);
if (EnemyAtts[_local7].Type == 1){
Enemys[_local7].nme.holegen.gotoAndStop(EnemyAtts[_local7].ReloadCount);
if (EnemyAtts[_local7].ReloadCount == 0){
if (isRange(Enemys[_local7], Char) > 50){
initHole(Enemys[_local7].x, Enemys[_local7].y);
} else {
EnemyAtts[_local7].ReloadCount = (EnemyAtts[_local7].ReloadCount + 3);
};
};
if (Enemys[_local7].x < EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].x > EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y < EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y > EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y - EnemyAtts[_local7].Accel);
};
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
if (isRange(_local2, Enemys[_local7]) < 3){
if ((Math.random() * 2) < 1){
EnemyAtts[_local7].XT = (Math.random() * screenWidth);
EnemyAtts[_local7].YT = Enemys[_local7].y;
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
rotateObjectToPoint(Enemys[_local7], _local2);
} else {
EnemyAtts[_local7].XT = Enemys[_local7].x;
EnemyAtts[_local7].YT = (Math.random() * screenHeight);
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
rotateObjectToPoint(Enemys[_local7], _local2);
};
};
} else {
if (EnemyAtts[_local7].Type == 2){
rotateObjectToPoint(Enemys[_local7], Char);
if (EnemyAtts[_local7].ReloadCount == 0){
_local8 = 0;
while (_local8 < EnemyAtts[_local7].BulletsPerShot) {
if (EnemyAtts[_local7].SpreadMode == 0){
_local3 = (((((EnemyAtts[_local7].BulletsPerShot - 1) * (10 / EnemyAtts[_local7].BulletsPerShot)) * 2) + 180) - (Enemys[_local7].rotation + ((_local8 * (20 / EnemyAtts[_local7].BulletsPerShot)) * 2)));
} else {
if (EnemyAtts[_local7].SpreadMode == 1){
_local3 = (((((EnemyAtts[_local7].BulletsPerShot - 1) * (45 / EnemyAtts[_local7].BulletsPerShot)) * 2) + 180) - (Enemys[_local7].rotation + ((_local8 * (90 / EnemyAtts[_local7].BulletsPerShot)) * 2)));
} else {
if (EnemyAtts[_local7].SpreadMode == 2){
_local3 = ((((360 / EnemyAtts[_local7].BulletsPerShot) * _local8) - Enemys[_local7].rotation) + 180);
};
};
};
getCoords(_local3);
_local4 = ((xxx * EnemyAtts[_local7].BulletSpeed) + EnemyAtts[_local7].XS);
_local5 = ((yyy * EnemyAtts[_local7].BulletSpeed) + EnemyAtts[_local7].YS);
initEBullet((Enemys[_local7].x + (_local4 * 13)), (Enemys[_local7].y + (_local5 * 13)), _local4, _local5, EnemyAtts[_local7].BulletType, EnemyAtts[_local7].BulletHP);
_local8++;
};
};
} else {
if (EnemyAtts[_local7].Type == 3){
if ((((EnemyAtts[_local7].XT == 0)) && ((EnemyAtts[_local7].YT == 0)))){
if (Enemys[_local7].x > Char.x){
Enemys[_local7].x = (Enemys[_local7].x - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].x < Char.x){
Enemys[_local7].x = (Enemys[_local7].x + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y > Char.y){
Enemys[_local7].y = (Enemys[_local7].y - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y < Char.y){
Enemys[_local7].y = (Enemys[_local7].y + EnemyAtts[_local7].Accel);
};
_local2 = new Point(Char.x, Char.y);
} else {
if (Enemys[_local7].x > EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].x < EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y > EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y < EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y + EnemyAtts[_local7].Accel);
};
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
};
rotateObjectToPoint(Enemys[_local7], _local2);
if (isRange(_local2, Enemys[_local7]) < (40 - level)){
if ((Math.random() * 2) < 1){
EnemyAtts[_local7].XT = (Math.random() * screenWidth);
EnemyAtts[_local7].YT = Enemys[_local7].y;
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
rotateObjectToPoint(Enemys[_local7], _local2);
} else {
EnemyAtts[_local7].XT = Enemys[_local7].x;
EnemyAtts[_local7].YT = (Math.random() * screenHeight);
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
};
};
} else {
if (EnemyAtts[_local7].Type == 4){
if (EnemyAtts[_local7].ReloadCount == 0){
initEnemy(20, Enemys[_local7].x, Enemys[_local7].y);
};
if (Enemys[_local7].x < EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].x > EnemyAtts[_local7].XT){
Enemys[_local7].x = (Enemys[_local7].x - EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y < EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y + EnemyAtts[_local7].Accel);
};
if (Enemys[_local7].y > EnemyAtts[_local7].YT){
Enemys[_local7].y = (Enemys[_local7].y - EnemyAtts[_local7].Accel);
};
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
if (isRange(_local2, Enemys[_local7]) < 3){
if ((Math.random() * 2) < 1){
EnemyAtts[_local7].XT = (Math.random() * screenWidth);
EnemyAtts[_local7].YT = Enemys[_local7].y;
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
rotateObjectToPoint(Enemys[_local7], _local2);
} else {
EnemyAtts[_local7].XT = Enemys[_local7].x;
EnemyAtts[_local7].YT = (Math.random() * screenHeight);
_local2 = new Point(EnemyAtts[_local7].XT, EnemyAtts[_local7].YT);
rotateObjectToPoint(Enemys[_local7], _local2);
};
};
} else {
if (EnemyAtts[_local7].Type == 20){
};
};
};
};
};
if (EnemyAtts[_local7].ReloadCount < 1){
EnemyAtts[_local7].ReloadCount = EnemyAtts[_local7].ReloadTime;
};
_local7++;
};
};
}
private function openShop():void{
DTGH.addChild(Shops);
Shops.exitBut.addEventListener(MouseEvent.CLICK, reStartGame, false, 0, true);
Shops.but1.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but2.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but3.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but4.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but5.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but6.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but7.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but8.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but9.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but10.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but11.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but12.addEventListener(MouseEvent.CLICK, buyItem, false, 0, true);
Shops.but1.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but2.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but3.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but4.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but5.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but6.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but7.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but8.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but9.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but10.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but11.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but12.addEventListener(MouseEvent.ROLL_OVER, seeItem, false, 0, true);
Shops.but1.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but2.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but3.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but4.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but5.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but6.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but7.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but8.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but9.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but10.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but11.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
Shops.but12.addEventListener(MouseEvent.ROLL_OUT, blankItem, false, 0, true);
blankItem2();
}
function frame1(){
stop();
}
function frame6(){
globalInit();
gotoAndStop("menu");
}
function frame7(){
initMenuScreen();
}
function frame8(){
initMenuScreenPt2();
stop();
}
private function moveUpLeft():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS - (CharAtt.Accel * 0.75));
CharAtt.XS = (CharAtt.XS - (CharAtt.Accel * 0.75));
} else {
moveChar(225);
};
}
function frame9(){
initInstructions();
}
private function flashScreen():void{
DTGH.addChild(screenFlash);
screenFlash.gotoAndPlay(2);
screenFlash.play();
}
private function updateShopStats():void{
Shops.w1.text = WeaponPowers[1];
Shops.w2.text = WeaponPowers[2];
Shops.w3.text = WeaponPowers[3];
Shops.w4.text = WeaponPowers[4];
Shops.w5.text = WeaponPowers[5];
Shops.w6.text = WeaponPowers[6];
Shops.generatorlevel.text = CharAtt.BulletHP;
Shops.maximumshield.text = CharAtt.MaxHP;
Shops.currentshield.text = CharAtt.HP;
Shops.enginelevel.text = CharAtt.Accel;
Shops.coolantlevel.text = CharAtt.WeaponCool;
}
private function runSystem():void{
var _local1:Number;
soundMod.processSoundCounters();
if ((((CharAtt.Score > CharAtt.ScoreTarget)) && (!(gameToldComplete)))){
gameToldComplete = soundMod.soundComplete();
};
_local1 = 0;
while (_local1 < Enemys.length) {
EnemyAtts[_local1].BeenAlive = (EnemyAtts[_local1].BeenAlive + 1);
if (EnemyAtts[_local1].BeenAlive == 2){
Enemys[_local1].nme.ship.gotoAndStop(EnemyAtts[_local1].Level);
};
_local1++;
};
}
private function setMouseDown(_arg1:MouseEvent):void{
myMouseDown = true;
}
private function onEnterFrame(_arg1:Event):void{
stage.focus = this;
runSystem();
initFrame();
runKeys();
runReports();
runMoveCalc();
if (timePauseTimer > 0){
timePauseTimer = (timePauseTimer - 1);
} else {
runHoles();
runSpecks();
};
runPowerUps();
runEnemys();
runBullets();
runEBullets();
killSpecks();
killEnemys();
killEBullets();
killHoles();
killBullets();
killPowerUps();
}
private function checkMoveOn(_arg1:Event):void{
if (currentLabel == "Intro1"){
if (sting.stingState == "finished"){
gotoAndStop("Intro2");
};
} else {
if (currentLabel == "Intro2"){
if (sting2.stingState == "finished"){
gotoAndStop("Intro3");
};
} else {
if (currentLabel == "Intro3"){
if (sting3.stingState == "finished"){
gotoAndStop("firstRun");
removeEventListener(Event.ENTER_FRAME, checkMoveOn);
};
} else {
gotoAndStop("firstRun");
removeEventListener(Event.ENTER_FRAME, checkMoveOn);
};
};
};
}
private function runReports():void{
reportCounter = (reportCounter + 1);
if (reportCounter > reportCounterMax){
reportCounter = 0;
reportScroll();
};
}
private function runSpecks():void{
var _local1:Number;
var _local2:Point;
var _local3:Number;
if (so.data.SpeckSettings == "Specks = On"){
if (Holes.length > 0){
_local1 = 0;
while (_local1 < Specks.length) {
Specks[_local1].play();
_local1++;
};
if (Specks.length < 30){
initSpeck();
};
};
_local1 = 0;
while (_local1 < Specks.length) {
_local3 = 0;
while (_local3 < Holes.length) {
doGrav(Specks[_local1], Holes[_local3], SpeckAtts[_local1]);
if (isRange(Specks[_local1], Holes[_local3]) < (Holes[_local3].width / 4)){
specksToDie.push(_local1);
};
_local3++;
};
_local2 = new Point((Specks[_local1].x + SpeckAtts[_local1].XS), (Specks[_local1].y + SpeckAtts[_local1].YS));
rotateObjectToPoint(Specks[_local1], _local2);
Specks[_local1].x = (Specks[_local1].x + SpeckAtts[_local1].XS);
Specks[_local1].y = (Specks[_local1].y + SpeckAtts[_local1].YS);
SpeckAtts[_local1].XS = (SpeckAtts[_local1].XS * 0.98);
SpeckAtts[_local1].YS = (SpeckAtts[_local1].YS * 0.98);
_local1++;
};
};
}
private function moveRight():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.XS = (CharAtt.XS + CharAtt.Accel);
} else {
moveChar(90);
};
}
private function initMenuScreenPt2():void{
addEventListener(Event.ENTER_FRAME, preStartManagement);
PlayBute.addEventListener(MouseEvent.CLICK, startGame, false, 0, true);
PlayButm.addEventListener(MouseEvent.CLICK, startGame, false, 0, true);
PlayButh.addEventListener(MouseEvent.CLICK, startGame, false, 0, true);
InstructionsBut.addEventListener(MouseEvent.CLICK, callInstructions, false, 0, true);
MoreGamesBut.addEventListener(MouseEvent.CLICK, callMoreGames, false, 0, true);
OptionsBut.addEventListener(MouseEvent.CLICK, callOptions, false, 0, true);
}
private function endGameEF(_arg1:Event):void{
soundMod.processSoundCounters();
}
private function initSpeck():void{
var _local1:Speck;
var _local2:Object;
_local1 = new Speck();
Specks.push(_local1);
_local1.x = (Math.random() * screenWidth);
_local1.y = (Math.random() * screenHeight);
_local2 = {XS:0, YS:0};
SpeckAtts.push(_local2);
SGH.addChild(_local1);
}
private function setupContextMenu():void{
var _local1:ContextMenu;
_local1 = new ContextMenu();
_local1.addEventListener(ContextMenuEvent.MENU_SELECT, onContextMenuHandler);
_local1.hideBuiltInItems();
_local1.builtInItems.quality = true;
_local1.builtInItems.zoom = true;
this.contextMenu = _local1;
}
private function closeShop():void{
Shops.exitBut.addEventListener(MouseEvent.CLICK, reStartGame);
DTGH.removeChild(Shops);
}
private function explode(_arg1, _arg2:Number, _arg3):void{
var _local4:Splosions;
var _local5:Number;
soundMod.soundExplosion();
_local5 = 0;
while (_local5 < _arg2) {
_local4 = new Splosions();
_local4.x = ((_arg1.x + (Math.random() * _arg3)) - (_arg3 / 2));
_local4.y = ((_arg1.y + (Math.random() * _arg3)) - (_arg3 / 2));
EGH.addChild(_local4);
_local4.gotoAndStop(int((Math.random() * 4)));
_local4.rotation = (Math.random() * 360);
_local5++;
};
}
private function clearScreen():void{
var _local1:Number;
_local1 = 0;
while (_local1 < Holes.length) {
BHGH.removeChild(Holes[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < Bullets.length) {
GH.removeChild(Bullets[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < PowerUps.length) {
BHGH.removeChild(PowerUps[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < Enemys.length) {
EGH.removeChild(Enemys[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < EBullets.length) {
GH.removeChild(EBullets[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < Specks.length) {
SGH.removeChild(Specks[_local1]);
_local1++;
};
Specks.splice(0);
SpeckAtts.splice(0);
Enemys.splice(0);
EnemyAtts.splice(0);
HoleAtts.splice(0);
PowerUpAtts.splice(0);
Holes.splice(0);
Bullets.splice(0);
BullAtts.splice(0);
EBullets.splice(0);
EBullAtts.splice(0);
PowerUps.splice(0);
holesToDie.splice(0);
bulletsToDie.splice(0);
powerUpsToDie.splice(0);
eBulletsToDie.splice(0);
specksToDie.splice(0);
}
private function preStartManagement(_arg1:Event):void{
soundMod.processSoundCounters();
}
private function reportScroll():void{
disp.Reports.txt.txt1.text = disp.Reports.txt.txt2.text;
disp.Reports.txt.txt2.text = disp.Reports.txt.txt3.text;
disp.Reports.txt.txt3.text = "";
}
private function killEBullets():void{
var _local1:Number;
var _local2:Number;
eBulletsToDie.sort(Array.NUMERIC);
_local1 = -1;
_local2 = (eBulletsToDie.length - 1);
while (_local2 > -1) {
if (_local1 != eBulletsToDie[_local2]){
GH.removeChild(EBullets[eBulletsToDie[_local2]]);
EBullets.splice(eBulletsToDie[_local2], 1);
EBullAtts.splice(eBulletsToDie[_local2], 1);
};
_local1 = eBulletsToDie[_local2];
_local2--;
};
eBulletsToDie.splice(0);
}
private function report(_arg1:String, _arg2:Number):void{
reportCounter = 0;
if (disp.Reports.txt.txt1.text == ""){
disp.Reports.txt.txt1.text = _arg1;
} else {
if (disp.Reports.txt.txt2.text == ""){
disp.Reports.txt.txt2.text = _arg1;
} else {
if (disp.Reports.txt.txt3.text == ""){
disp.Reports.txt.txt3.text = _arg1;
} else {
reportScroll();
disp.Reports.txt.txt3.text = _arg1;
};
};
};
}
private function levelUp():void{
level = (level + 1);
report(((">>>>>LEVEL " + level) + "<<<<<"), 0);
if (gameDifficulty == "Easy"){
levelData.EnemyFreq = (200 - (level * 5));
if (level > 8){
levelData.EnemyFreq = (levelData.EnemyFreq - ((level - 8) * 8));
};
if (levelData.EnemyFreq < 50){
levelData.EnemyFreq = 50;
};
if (level > 13){
levelData.holeScaleInc = (levelData.holeScaleInc * 1.0002);
levelData.holeHPInc = (levelData.holeHPInc * 1.0002);
};
} else {
if (gameDifficulty == "Medium"){
levelData.EnemyFreq = (200 - (level * 5.5));
if (level > 6){
levelData.EnemyFreq = (levelData.EnemyFreq - ((level - 6) * 8));
};
if (levelData.EnemyFreq < 50){
levelData.EnemyFreq = 50;
};
if (level > 11){
levelData.holeScaleInc = (levelData.holeScaleInc * 1.0002);
levelData.holeHPInc = (levelData.holeHPInc * 1.0002);
};
} else {
if (gameDifficulty == "Hard"){
levelData.EnemyFreq = (200 - (level * 7));
if (level > 4){
levelData.EnemyFreq = (levelData.EnemyFreq - ((level - 4) * 8));
};
if (levelData.EnemyFreq < 50){
levelData.EnemyFreq = 50;
};
if (level > 9){
levelData.holeScaleInc = (levelData.holeScaleInc * 1.0002);
levelData.holeHPInc = (levelData.holeHPInc * 1.0002);
};
};
};
};
if (level > 30){
levelData.EnemyFreq = (levelData.EnemyFreq - (level - 30));
};
soundMod.soundLevelUp();
}
private function ldr_processStars():void{
var _local1:uint;
_local1 = 0;
while (_local1 < ldr_stars.length) {
ldr_stars[_local1].star.x = (ldr_stars[_local1].star.x + ldr_stars[_local1].xs);
ldr_stars[_local1].star.y = (ldr_stars[_local1].star.y + ldr_stars[_local1].ys);
ldr_stars[_local1].xs = (ldr_stars[_local1].xs * ldr_universalAccel);
ldr_stars[_local1].ys = (ldr_stars[_local1].ys * ldr_universalAccel);
ldr_stars[_local1].scal = (ldr_stars[_local1].scal * ldr_universalAccel);
ldr_stars[_local1].star.scaleX = ldr_stars[_local1].scal;
ldr_stars[_local1].star.scaleY = ldr_stars[_local1].scal;
ldr_stars[_local1].star.rotation = -(ldr_SGH.rotation);
if (((((((((ldr_stars[_local1].star.x + (ldr_stars[_local1].star.width / 2)) < ldr_leftEdge)) || (((ldr_stars[_local1].star.y + (ldr_stars[_local1].star.height / 2)) < ldr_topEdge)))) || (((ldr_stars[_local1].star.x - (ldr_stars[_local1].star.width / 2)) > ldr_rightEdge)))) || (((ldr_stars[_local1].star.y - (ldr_stars[_local1].star.height / 2)) > ldr_bottomEdge)))){
ldr_SGH.removeChild(ldr_stars[_local1].star);
ldr_stars.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function submitScore(_arg1:MouseEvent):void{
}
public function callArmegalo(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var event = _arg1;
soundMod.soundClick();
url = "http://www.armegalo.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
private function appDeactivate(_arg1:Event):void{
keyui.resetKeys();
}
public function callFunnylishus(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var event = _arg1;
soundMod.soundClick();
url = "http://www.freeworldgroup.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
private function doGrav(_arg1, _arg2, _arg3){
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local4 = (_arg1.x - _arg2.x);
_local5 = (_arg1.y - _arg2.y);
_local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_local7 = ((1 / (_local6 * _local6)) * ((_arg2.scaleY * gravityStrength) * (_arg2.scaleY * gravityStrength)));
_local8 = ((Math.abs(_local4) + Math.abs(_local5)) / 100);
_local9 = (Math.abs(_local4) / _local8);
_local10 = (Math.abs(_local5) / _local8);
_local11 = (_local7 / 100);
_local12 = (_local11 * _local9);
_local13 = (_local11 * _local10);
if (_arg2.x < _arg1.x){
_arg3.XS = (_arg3.XS - _local12);
} else {
if (_arg2.x > _arg1.x){
_arg3.XS = (_arg3.XS + _local12);
};
};
if (_arg2.y < _arg1.y){
_arg3.YS = (_arg3.YS - _local13);
} else {
if (_arg2.y > _arg1.y){
_arg3.YS = (_arg3.YS + _local13);
};
};
}
private function updateShield():void{
if (CharAtt.HP > CharAtt.MaxHP){
CharAtt.HP = CharAtt.MaxHP;
};
if (CharAtt.HP < 0.001){
disp.HPReadout.temp.scaleX = 0.001;
loseLife("Death by DAMAGE!!!");
explode(Char, 5, 50);
killedBy = "Damage";
soundMod.soundDeath(killedBy, CharAtt.Lives);
} else {
disp.HPReadout.temp.scaleX = (CharAtt.HP / CharAtt.MaxHP);
};
}
private function runMoveCalc():void{
CharAtt.XS = (CharAtt.XS * CharAtt.Friction);
CharAtt.YS = (CharAtt.YS * CharAtt.Friction);
Char.x = (Char.x + CharAtt.XS);
Char.y = (Char.y + CharAtt.YS);
if (Char.x < 0){
Char.x = 0;
CharAtt.XS = -(CharAtt.XS);
};
if (Char.x > screenWidth){
Char.x = screenWidth;
CharAtt.XS = -(CharAtt.XS);
};
if (Char.y < 0){
Char.y = 0;
CharAtt.YS = -(CharAtt.YS);
};
if (Char.y > screenHeight){
Char.y = screenHeight;
CharAtt.YS = -(CharAtt.YS);
};
}
private function updateOptions():void{
spectxt.text = so.data.SpeckSettings;
ctrltxt.text = so.data.CtrlSettings;
}
private function deInitMainGame():void{
clearScreen();
myMouseDown = false;
removeEventListener(MouseEvent.MOUSE_DOWN, setMouseDown);
removeEventListener(MouseEvent.MOUSE_UP, setMouseUp);
}
private function runPowerUps():void{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
_local2 = 0;
while (_local2 < PowerUps.length) {
if (timePauseTimer < 1){
PowerUpAtts[_local2].LifeTime = (PowerUpAtts[_local2].LifeTime - 1);
};
if (PowerUps[_local2].hitTestObject(Char)){
_local3 = upgrade(PowerUpAtts[_local2].Type);
PowerUps[_local2].gotoAndPlay("got");
powerUpsToDie.push(_local2);
soundMod.soundPicUp();
};
if (PowerUpAtts[_local2].LifeTime < 0){
PowerUps[_local2].gotoAndPlay("died");
powerUpsToDie.push(_local2);
};
_local2++;
};
}
private function restartGame2():void{
closeShop();
keyProfile = "Playing";
keyui.resetKey(27);
removeEventListener(Event.ENTER_FRAME, preStartManagement);
removeEventListener(Event.ENTER_FRAME, pauseManagement);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
StartBut.addEventListener(MouseEvent.CLICK, reStartGame);
DTGH.removeChild(StartBut);
DTGH.addChild(PauseBut);
PauseBut.x = 0;
PauseBut.y = 0;
PauseBut.addEventListener(MouseEvent.CLICK, pauseGame, false, 0, true);
}
private function updateLives():void{
Lives.gotoAndStop((CharAtt.Lives + 1));
}
private function moveDownRight():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS + (CharAtt.Accel * 0.75));
CharAtt.XS = (CharAtt.XS + (CharAtt.Accel * 0.75));
} else {
moveChar(45);
};
}
private function ldr_startStar():void{
var _local1:ldr_StarContainer;
var _local2:Number;
var _local3:Number;
var _local4:Object;
_local1 = new ldr_StarContainer();
do {
_local2 = ((Math.random() * ldr_starXS) - (ldr_starXS / 2));
_local3 = ((Math.random() * ldr_starYS) - (ldr_starYS / 2));
} while ((((((((_local2 < ldr_minSpeed)) && ((_local2 > -(ldr_minSpeed))))) && ((_local3 < ldr_minSpeed)))) && ((_local3 > -(ldr_minSpeed)))));
_local4 = {xs:_local2, ys:_local3, star:_local1, typeOfStar:int((Math.random() * 2)), scal:ldr_startScale};
if ((Math.random() * 200) < 1){
_local4.typeOfStar = 2;
};
_local4.star.x = ((_local4.xs * ((Math.random() * 2000) / ldr_startPoint)) * ldr_universalAccel);
_local4.star.y = ((_local4.ys * ((Math.random() * 2000) / ldr_startPoint)) * ldr_universalAccel);
_local4.star.gotoAndStop((_local4.typeOfStar + 1));
ldr_SGH.addChild(_local4.star);
ldr_stars.push(_local4);
}
private function initHole(_arg1:Number, _arg2:Number):void{
var _local3:BlackHole;
var _local4:Object;
soundMod.soundSound(3);
_local3 = new BlackHole();
_local4 = {HP:(level * 10), Mode:"Normal"};
_local3.x = _arg1;
_local3.y = _arg2;
_local3.scaleX = 0.1;
_local3.scaleY = 0.1;
Holes.push(_local3);
HoleAtts.push(_local4);
BHGH.addChild(_local3);
BHGH.setChildIndex(_local3, 0);
}
private function seeItem(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = _arg1.currentTarget.name.slice(3, _arg1.currentTarget.name.length);
Shops.cost.text = ("Item Cost: " + itemPrices[_local2]);
Shops.cash.text = ("My Cash: " + CharAtt.Cash);
if ((((_local2 < 7)) && ((WeaponPowers[_local2] < 1)))){
Shops.infos.text = itemAltDescription[_local2];
} else {
Shops.infos.text = itemDescription[_local2];
};
}
public function ldr_checkLoad(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
_local2 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
ldr.lpc.text = (int(_local2) + "%");
_local3 = (_local2 * _local2);
_local3 = (_local3 / 100);
ldr.gob.rotation = (ldr.gob.rotation + _local3);
ldr.gob2.rotation = (ldr.gob.rotation - (_local3 * 0.15));
ldr.gob3.rotation = (ldr.gob.rotation - (_local3 * 0.3));
ldr.gob.gotoAndStop(int(_local2));
ldr.gob2.gotoAndStop(int(_local2));
ldr.gob3.gotoAndStop(int(_local2));
if ((((_local2 == 100)) && (permission))){
removeEventListener(Event.ENTER_FRAME, ldr_checkLoad);
removeEventListener(Event.ENTER_FRAME, ldr_onEnterFrame);
_local4 = 0;
while (_local4 < ldr_stars.length) {
ldr_SGH.removeChild(ldr_stars[_local4].star);
_local4++;
};
ldr_stars.splice(0);
removeChild(ldr_SGH);
if (skipIntros){
gotoAndPlay("firstRun");
} else {
gotoAndStop("Intro1");
addEventListener(Event.ENTER_FRAME, checkMoveOn);
};
};
}
private function rotateObjectToPoint(_arg1, _arg2):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local6 = Math.asin((_local4 / _local5));
_local7 = ((180 / Math.PI) * _local6);
if (_local3 < 0){
_local7 = (180 - _local7);
};
_arg1.rotation = (_local7 - 90);
}
private function between_lives(_arg1:Event):void{
stage.focus = this;
runSystem();
initFrame();
runReports();
runHoles();
runSpecks();
runEnemys();
runBullets();
runEBullets();
if (killedBy == "Damage"){
if ((Math.random() * 4) < 1){
explode(Char, 2, 30);
};
};
killSpecks();
killEnemys();
killEBullets();
killHoles();
killBullets();
killPowerUps();
countToStart = (countToStart - 1);
if (countToStart <= 0){
if (CharAtt.Lives > -1){
initLife();
clearScreen();
removeEventListener(Event.ENTER_FRAME, between_lives);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
} else {
deInitMainGame();
gotoAndStop("grats");
soundMod.soundEnd(CharAtt.Score, CharAtt.ScoreTarget);
removeEventListener(Event.ENTER_FRAME, between_lives);
};
};
}
private function upgrade(_arg1:Number):Boolean{
var _local2:Boolean;
var _local3:Number;
_local2 = true;
_local3 = 0;
_local3 = 1;
while (_local3 < 7) {
if (_arg1 == _local3){
if (WeaponPowers[_local3] < WeaponMaxPowers[_local3]){
report((WeaponNames[_local3] + "++"), 1);
WeaponPowers[_local3] = (WeaponPowers[_local3] + 1);
} else {
report((WeaponNames[_local3] + " Maxxed"), 1);
_local2 = false;
};
};
_local3++;
};
if (_arg1 == 7){
if (CharAtt.HP == CharAtt.MaxHP){
report("Shield Full", 1);
_local2 = false;
} else {
CharAtt.HP = (CharAtt.HP + (CharAtt.MaxHP / 2));
report("Shield++", 1);
if (CharAtt.HP > CharAtt.MaxHP){
CharAtt.HP = CharAtt.MaxHP;
};
};
updateShield();
};
if (_arg1 == 8){
if (CharAtt.Accel > topAccel){
report("Engine Maxxed ", 1);
_local2 = false;
} else {
CharAtt.Accel = (CharAtt.Accel * accelAccel);
report("Engine++", 1);
};
};
if (_arg1 == 9){
CharAtt.WeaponCool = (CharAtt.WeaponCool + 0.5);
report("Weapon Coolent++", 1);
};
if (_arg1 == 10){
if (CharAtt.BulletHP < GeneratorMax){
CharAtt.BulletHP = (CharAtt.BulletHP + 1);
report("Weapon Generator++", 1);
} else {
report("Weapon Generator Maxxed", 1);
_local2 = false;
};
};
if (_arg1 == 11){
if (CharAtt.Lives < CharAtt.MaxLives){
CharAtt.Lives = (CharAtt.Lives + 1);
report("Lives++", 1);
updateLives();
} else {
report("Lives Maxxed", 1);
_local2 = false;
};
};
if (_arg1 == 12){
CharAtt.MaxHP = (CharAtt.MaxHP + 10);
report("Max HP++", 1);
CharAtt.HP = CharAtt.MaxHP;
report("Shield Full", 1);
updateLives();
updateShield();
};
if (_arg1 == 13){
_local3 = (1 + int((level / 3)));
CharAtt.Cash = (CharAtt.Cash + _local3);
updateCashStats();
report(("Cash+=" + _local3), 1);
};
if (_arg1 == 14){
_local3 = (1 + int((level * 4)));
CharAtt.Cash = (CharAtt.Cash + _local3);
updateCashStats();
report(("Cash+=" + _local3), 1);
};
if (_arg1 == 15){
timePauseTimer = timePause;
report("Time Shield", 1);
};
if (_arg1 == 16){
report("Smart Bomb", 1);
if (CharAtt.Bombs < CharAtt.MaxBombs){
report("Smart Bomb", 1);
CharAtt.Bombs = (CharAtt.Bombs + 1);
updateBombs();
} else {
report("Bombs Maxxed", 1);
_local2 = false;
};
};
return (_local2);
}
private function pauseGame2():void{
keyProfile = "Paused";
keyui.resetKey(27);
DTGH.removeChild(PauseBut);
DTGH.addChild(StartBut);
StartBut.x = 0;
StartBut.y = 0;
StartBut.addEventListener(MouseEvent.CLICK, reStartGame, false, 0, true);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, pauseManagement);
openShop();
}
private function initBullet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Bullet;
var _local8:Object;
var _local9:Point;
_local7 = new Bullet();
Bullets.push(_local7);
_local7.x = _arg1;
_local7.y = _arg2;
_local7.gotoAndStop(_arg6);
_local8 = {XS:Number(_arg3), YS:Number(_arg4), Type:_arg5, HP:_arg6};
BullAtts.push(_local8);
GH.addChild(_local7);
_local9 = new Point((_arg1 + _arg3), (_arg2 + _arg4));
rotateObjectToPoint(_local7, _local9);
}
private function isRange(_arg1, _arg2):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
return (_local5);
}
private function appActivate(_arg1:Event):void{
}
private function changeCtrl(_arg1:MouseEvent):void{
if (so.data.CtrlSettings == "Controls = Straight"){
so.data.CtrlSettings = "Controls = Rotational";
} else {
so.data.CtrlSettings = "Controls = Straight";
};
so.flush();
updateOptions();
}
private function initFrame():void{
var _local1:Number;
var _local2:Number;
CharAtt.Score = (CharAtt.Score + int((Math.random() * 10)));
updateScoreStats();
_local1 = 0;
_local2 = 0;
while (_local2 < Enemys.length) {
if (Enemys[_local2].currentFrame != 20){
_local1 = (_local1 + 1);
};
_local2++;
};
_local1 = (_local1 + WHIGH.numChildren);
if (_local1 == 0){
emptyScreenCounter = (emptyScreenCounter + 1);
} else {
emptyScreenCounter = 0;
};
if (CharAtt.Score > (level * 5000)){
levelUp();
};
if ((Math.random() * levelData.PowerUpFreq) < 2){
initPowerUp(-1, -1, -1);
};
CharAtt.WeaponTemp = (CharAtt.WeaponTemp - CharAtt.WeaponCool);
if (CharAtt.WeaponTemp < 0.1){
CharAtt.WeaponTemp = 0.1;
};
updateThermom();
if (countToStart <= 0){
rotateChar();
updateShield();
};
}
private function backToMenu(_arg1:MouseEvent):void{
gotoAndStop("menu2");
}
private function moveUp():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS - CharAtt.Accel);
} else {
moveChar(180);
};
}
private function waitOneFrameToStartGame(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, waitOneFrameToStartGame);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function callOptions(_arg1:MouseEvent):void{
gotoAndStop("options");
}
private function initMainGame():void{
DTGH.addChild(disp);
disp.x = -3;
disp.y = -2;
soundMod.soundIntro2();
bob.gotoAndPlay(2);
CharAtt = {Cash:0, Score:0, ScoreTarget:80000, Lives:3, MaxLives:10, Bombs:3, MaxBombs:10, WeaponSelected:1, XS:0, YS:0, Accel:0.3, Friction:0.96, BulletSpeed:15, BulletHP:1, BulletType:1, BulletsPerShot:1, SpreadMode:0, WeaponTemp:0, WeaponCool:0.9, HP:100, MaxHP:100};
WeaponPowers = [1, 1, 0, 0, 0, 0, 0];
WeaponMaxPowers = [1, 4, 5, 6, 7, 8, 9];
GeneratorMax = 4;
updateScoreStats();
updateCashStats();
initLife();
updateBombs();
stats.Kills = 0;
stats.ShotsFired = 0;
clearScreen();
myMouseDown = false;
level = 0;
levelUp();
timePauseTimer = 0;
addEventListener(MouseEvent.MOUSE_DOWN, setMouseDown);
addEventListener(MouseEvent.MOUSE_UP, setMouseUp);
keyProfile = "Playing";
killedBy = "Nothing";
gameToldComplete = false;
}
private function reStartGame(_arg1:MouseEvent):void{
restartGame2();
}
private function updateCashStats():void{
disp.cashStats.txt1.text = ("Cash: " + String(CharAtt.Cash));
}
private function blankItem(_arg1:MouseEvent):void{
blankItem2();
}
private function initEBullet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:EBullet;
var _local8:*;
var _local9:Object;
_local7 = new EBullet();
EBullets.push(_local7);
_local7.x = _arg1;
_local7.y = _arg2;
_local8 = Math.sqrt(_arg6);
_local7.scaleX = _local8;
_local7.scaleY = _local8;
_local9 = {XS:Number(_arg3), YS:Number(_arg4), Type:_arg5, HP:_arg6, KillHP:_arg6};
EBullAtts.push(_local9);
GH.addChild(_local7);
}
private function killBullets():void{
var _local1:Number;
var _local2:Number;
bulletsToDie.sort(Array.NUMERIC);
_local1 = -1;
_local2 = (bulletsToDie.length - 1);
while (_local2 > -1) {
if (_local1 != bulletsToDie[_local2]){
GH.removeChild(Bullets[bulletsToDie[_local2]]);
Bullets.splice(bulletsToDie[_local2], 1);
BullAtts.splice(bulletsToDie[_local2], 1);
};
_local1 = bulletsToDie[_local2];
_local2--;
};
bulletsToDie.splice(0);
}
private function blankItem2():void{
updateShopStats();
Shops.cost.text = "";
Shops.cash.text = ("My Cash: " + CharAtt.Cash);
Shops.infos.text = "Roll your mouse over a Powerup to see it's decription";
}
private function initGrats():void{
finalScore = CharAtt.Score;
DTGH.removeChild(disp);
menuBut.addEventListener(MouseEvent.CLICK, returnToMenu, false, 0, true);
addEventListener(Event.ENTER_FRAME, endGameEF);
score.text = CharAtt.Score;
if (CharAtt.Score > so.data.PersonalBest){
so.data.PersonalBest = CharAtt.Score;
so.flush();
besttext.text = "Well Done! It's a new Personal Best!!!";
} else {
besttext.text = "Your Personal Best is...";
};
bestscore.text = so.data.PersonalBest;
bob.gotoAndPlay(20);
soundMod.soundGameOver();
}
private function runBullets():void{
var _local1:Number;
var _local2:Number;
_local1 = 0;
_local2 = 0;
while (_local2 < Bullets.length) {
Bullets[_local2].x = (Bullets[_local2].x + BullAtts[_local2].XS);
Bullets[_local2].y = (Bullets[_local2].y + BullAtts[_local2].YS);
if ((((((((Bullets[_local2].x < 0)) || ((Bullets[_local2].x > screenWidth)))) || ((Bullets[_local2].y < 0)))) || ((Bullets[_local2].y > screenHeight)))){
bulletsToDie.push(_local2);
};
_local1 = 0;
while (_local1 < Holes.length) {
if (((Holes[_local1].detect2.hitTestObject(Bullets[_local2])) && ((HoleAtts[_local1].Mode == "Normal")))){
bulletsToDie.push(_local2);
Holes[_local1].scaleX = (Holes[_local1].scaleX * 0.96);
Holes[_local1].scaleY = (Holes[_local1].scaleY * 0.96);
HoleAtts[_local1].HP = (HoleAtts[_local1].HP - BullAtts[_local2].HP);
};
_local1++;
};
_local1 = 0;
while (_local1 < Enemys.length) {
if (Bullets[_local2].hitTestObject(Enemys[_local1])){
bulletsToDie.push(_local2);
EnemyAtts[_local1].HP = (EnemyAtts[_local1].HP - BullAtts[_local2].HP);
EnemyAtts[_local1].KillHP = (EnemyAtts[_local1].KillHP - BullAtts[_local2].HP);
Enemys[_local1].nme.gotoAndPlay(2);
Enemys[_local1].nme.play();
};
_local1++;
};
_local2++;
};
}
private function moveDownLeft():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS + (CharAtt.Accel * 0.75));
CharAtt.XS = (CharAtt.XS - (CharAtt.Accel * 0.75));
} else {
moveChar(315);
};
}
private function moveChar(_arg1:Number):void{
_arg1 = (_arg1 + -(Char.rotation));
getCoords(_arg1);
CharAtt.XS = (CharAtt.XS + (xxx * CharAtt.Accel));
CharAtt.YS = (CharAtt.YS + (yyy * CharAtt.Accel));
}
private function updateBombs():void{
SmartBombs.gotoAndStop((CharAtt.Bombs + 1));
}
private function initInstructions():void{
soundMod.soundIntro();
BackBut.addEventListener(MouseEvent.CLICK, backToMenu, false, 0, true);
}
private function updateScoreStats():void{
disp.scoreStats.txt1.text = ("Escaped: " + String(CharAtt.Score));
}
private function pauseManagement(_arg1:Event):void{
stage.focus = this;
runSystem();
runKeys();
runReports();
runSpecks();
killSpecks();
}
private function ldr_onEnterFrame(_arg1:Event):void{
var _local2:uint;
_local2 = 0;
while (_local2 < 5) {
ldr_startStar();
_local2++;
};
ldr_processStars();
ldr_processRot();
ldr_frameCounter = (ldr_frameCounter + 1);
}
private function killHoles():void{
var _local1:Number;
var _local2:Number;
_local1 = 0;
while (_local1 < Holes.length) {
if ((((HoleAtts[_local1].HP < 0.01)) && ((HoleAtts[_local1].Mode == "Normal")))){
holesToDie.push(_local1);
stats.Kills = (stats.Kills + 1);
soundMod.soundSound(4);
explode(Holes[_local1], 3, 30);
};
_local1++;
};
holesToDie.sort(Array.NUMERIC);
_local2 = -1;
_local1 = (holesToDie.length - 1);
while (_local1 > -1) {
if (_local2 != holesToDie[_local1]){
BHGH.removeChild(Holes[holesToDie[_local1]]);
Holes.splice(holesToDie[_local1], 1);
HoleAtts.splice(holesToDie[_local1], 1);
};
_local2 = holesToDie[_local1];
_local1--;
};
holesToDie.splice(0);
}
private function buyItem(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = _arg1.currentTarget.name.slice(3, _arg1.currentTarget.name.length);
if (CharAtt.Cash >= itemPrices[_local2]){
if (upgrade(_local2)){
CharAtt.Cash = (CharAtt.Cash - itemPrices[_local2]);
updateCashStats();
soundMod.soundPicUp();
};
} else {
report("You can't afford that!!!", 1);
};
Shops.cash.text = ("My Cash: " + CharAtt.Cash);
updateShopStats();
}
private function killEnemys():void{
var _local1:Number;
var _local2:Number;
enemysToDie.sort(Array.NUMERIC);
_local1 = -1;
_local2 = (enemysToDie.length - 1);
while (_local2 > -1) {
if (_local1 != enemysToDie[_local2]){
EGH.removeChild(Enemys[enemysToDie[_local2]]);
Enemys.splice(enemysToDie[_local2], 1);
EnemyAtts.splice(enemysToDie[_local2], 1);
};
_local1 = enemysToDie[_local2];
_local2--;
};
enemysToDie.splice(0);
}
private function pauseGame(_arg1:MouseEvent):void{
pauseGame2();
}
private function getCoords(_arg1:Number):void{
var _local2:Number;
_local2 = (_arg1 / (180 / Math.PI));
xxx = Math.sin(_local2);
yyy = Math.cos(_local2);
}
public function callInstructions(_arg1:MouseEvent):void{
soundMod.soundClick();
gotoAndStop("instructions");
}
private function moveUpRight():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.YS = (CharAtt.YS - (CharAtt.Accel * 0.75));
CharAtt.XS = (CharAtt.XS + (CharAtt.Accel * 0.75));
} else {
moveChar(135);
};
}
private function runEBullets():void{
var _local1:Number;
var _local2:Number;
_local1 = 0;
_local2 = 0;
while (_local2 < EBullets.length) {
if (timePauseTimer < 1){
EBullets[_local2].x = (EBullets[_local2].x + EBullAtts[_local2].XS);
EBullets[_local2].y = (EBullets[_local2].y + EBullAtts[_local2].YS);
if ((((((((EBullets[_local2].x < 0)) || ((EBullets[_local2].x > screenWidth)))) || ((EBullets[_local2].y < 0)))) || ((EBullets[_local2].y > screenHeight)))){
eBulletsToDie.push(_local2);
};
};
if (((EBullets[_local2].hitTestObject(Char.detect)) && ((killedBy == "Nothing")))){
eBulletsToDie.push(_local2);
CharAtt.HP = (CharAtt.HP - EBullAtts[_local2].KillHP);
Char.play();
};
_local2++;
};
}
private function runKeys():void{
var _local1:Number;
if (keyProfile == "Playing"){
if (keyui.isDown(27)){
pauseGame2();
};
_local1 = 0;
while (_local1 < 6) {
if (keyui.isDown((49 + _local1))){
keyui.resetKey((49 + _local1));
if (WeaponPowers[(_local1 + 1)] > 0){
CharAtt.WeaponSelected = (_local1 + 1);
CharAtt.BulletsPerShot = (_local1 + 1);
report(WeaponNames[CharAtt.WeaponSelected], 1);
} else {
report("Not Installed", 1);
};
};
_local1++;
};
if (keyui.isDown(13)){
keyui.resetKey(13);
if (CharAtt.SpreadMode == 0){
CharAtt.SpreadMode = 1;
report("Spread Full", 1);
} else {
if (CharAtt.SpreadMode == 1){
CharAtt.SpreadMode = 0;
report("Spread Narrow", 1);
};
};
};
if (keyui.isDown(32)){
keyui.resetKey(32);
if (CharAtt.Bombs > 0){
CharAtt.Bombs = (CharAtt.Bombs - 1);
report("BOOOOOM!!!", 1);
BombIT();
updateBombs();
} else {
report("No Smart Bombs", 1);
};
};
if (((keyui.isDown(S)) || (keyui.isDown(Keyboard.DOWN)))){
if (((keyui.isDown(D)) || (keyui.isDown(Keyboard.RIGHT)))){
moveDownRight();
} else {
if (((keyui.isDown(A)) || (keyui.isDown(Keyboard.LEFT)))){
moveDownLeft();
} else {
moveDown();
};
};
} else {
if (((keyui.isDown(W)) || (keyui.isDown(Keyboard.UP)))){
if (((keyui.isDown(D)) || (keyui.isDown(Keyboard.RIGHT)))){
moveUpRight();
} else {
if (((keyui.isDown(A)) || (keyui.isDown(Keyboard.LEFT)))){
moveUpLeft();
} else {
moveUp();
};
};
} else {
if (((keyui.isDown(D)) || (keyui.isDown(Keyboard.RIGHT)))){
moveRight();
} else {
if (((keyui.isDown(A)) || (keyui.isDown(Keyboard.LEFT)))){
moveLeft();
};
};
};
};
if (myMouseDown){
fireMouse();
};
} else {
if (keyProfile == "Paused"){
if (keyui.isDown(27)){
restartGame2();
};
};
};
}
private function initPowerUp(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:PowerUp;
var _local5:Object;
var _local6:*;
_local4 = new PowerUp();
do {
if (_arg1 == -1){
_arg1 = 7;
_local6 = 0;
while (_local6 < PowerUpProbs.length) {
if ((Math.random() * 100) < PowerUpProbs[_local6]){
if ((((((WeaponPowers[_local6] < 1)) || ((WeaponPowers[(_local6 + 1)] >= WeaponMaxPowers[(_local6 + 1)])))) && ((_local6 < 7)))){
_arg1 = -1;
} else {
_arg1 = (_local6 + 1);
};
};
_local6++;
};
if ((((CharAtt.Score > 2000)) && ((WeaponPowers[1] < 2)))){
_arg1 = 1;
};
if ((((_arg1 == 7)) && ((CharAtt.HP >= CharAtt.MaxHP)))){
_arg1 = -1;
};
if ((((_arg1 == 8)) && ((CharAtt.Accel > topAccel)))){
_arg1 = -1;
};
if ((((_arg1 == 10)) && ((CharAtt.BulletHP >= GeneratorMax)))){
_arg1 = -1;
};
if ((((_arg1 == 11)) && ((CharAtt.Lives >= CharAtt.MaxLives)))){
_arg1 = -1;
};
if ((((_arg1 == 16)) && ((CharAtt.Bombs >= CharAtt.MaxBombs)))){
_arg1 = -1;
};
};
} while (_arg1 == -1);
_local4.Power.frm = _arg1;
_local4.Power.play();
BHGH.addChild(_local4);
if ((((_arg2 == -1)) && ((_arg3 == -1)))){
do {
_local4.x = (Math.random() * screenWidth);
_local4.y = (Math.random() * screenHeight);
} while (isRange(_local4, Char) < 100);
} else {
_local4.x = _arg2;
_local4.y = _arg3;
};
_local5 = {LifeTime:100, Type:_local4.Power.frm};
PowerUps.push(_local4);
PowerUpAtts.push(_local5);
}
public function globalInit():void{
DTGH = new GameHolder();
GH = new GameHolder();
BHGH = new GameHolder();
SGH = new GameHolder();
EGH = new GameHolder();
PGH = new GameHolder();
WHIGH = new GameHolder();
StartBut = new StartButton();
PauseBut = new PauseButton();
Char = new mainship();
screenFlash = new screenFlasher();
disp = new dt();
Shops = new Shop();
if (so.data.written2 == undefined){
so.data.SpeckSettings = "Specks = On";
so.data.CtrlSettings = "Controls = Straight";
so.data.PersonalBest = 0;
so.data.written2 = "yes";
so.flush();
};
soundMod = new soundModule(this);
addChild(GH);
addChild(DTGH);
GH.addChild(BHGH);
GH.addChild(SGH);
GH.addChild(EGH);
GH.addChild(WHIGH);
GH.addChild(PGH);
DTGH.addChild(soundMod);
stage.addEventListener(Event.ACTIVATE, appActivate);
stage.addEventListener(Event.DEACTIVATE, appDeactivate);
}
private function setMouseUp(_arg1:MouseEvent):void{
myMouseDown = false;
}
private function rotateChar():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = (Char.x - mouseX);
_local2 = (Char.y - mouseY);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = Math.asin((_local2 / _local3));
_local5 = ((180 / Math.PI) * _local4);
if (_local1 < 0){
_local5 = (180 - _local5);
};
Char.rotation = (_local5 - 90);
}
private function initOptions():void{
updateOptions();
specbut.addEventListener(MouseEvent.CLICK, changeSpec, false, 0, true);
ctrlbut.addEventListener(MouseEvent.CLICK, changeCtrl, false, 0, true);
BackBut.addEventListener(MouseEvent.CLICK, backToMenu, false, 0, true);
}
private function killSpecks():void{
var _local1:Number;
var _local2:Number;
specksToDie.sort(Array.NUMERIC);
_local1 = -1;
_local2 = (specksToDie.length - 1);
while (_local2 > -1) {
if (_local1 != specksToDie[_local2]){
SGH.removeChild(Specks[specksToDie[_local2]]);
Specks.splice(specksToDie[_local2], 1);
SpeckAtts.splice(specksToDie[_local2], 1);
};
_local1 = specksToDie[_local2];
_local2--;
};
specksToDie.splice(0);
}
private function killPowerUps():void{
var _local1:Number;
var _local2:Number;
powerUpsToDie.sort(Array.NUMERIC);
_local1 = -1;
_local2 = (powerUpsToDie.length - 1);
while (_local2 > -1) {
if (_local1 != powerUpsToDie[_local2]){
PowerUps.splice(powerUpsToDie[_local2], 1);
PowerUpAtts.splice(powerUpsToDie[_local2], 1);
};
_local1 = powerUpsToDie[_local2];
_local2--;
};
powerUpsToDie.splice(0);
}
private function BombIT():void{
var _local1:Number;
_local1 = 0;
while (_local1 < Holes.length) {
holesToDie.push(_local1);
_local1++;
};
_local1 = 0;
while (_local1 < Enemys.length) {
enemysToDie.push(_local1);
_local1++;
};
_local1 = 0;
while (_local1 < EBullets.length) {
eBulletsToDie.push(_local1);
_local1++;
};
flashScreen();
soundMod.soundSmart();
}
private function moveLeft():void{
if (so.data.CtrlSettings == "Controls = Straight"){
CharAtt.XS = (CharAtt.XS - CharAtt.Accel);
} else {
moveChar(270);
};
}
private function changeSpec(_arg1:MouseEvent):void{
if (so.data.SpeckSettings == "Specks = On"){
so.data.SpeckSettings = "Specks = Off";
} else {
so.data.SpeckSettings = "Specks = On";
};
so.flush();
updateOptions();
}
private function startGame(_arg1:MouseEvent):void{
var _local2:String;
_local2 = _arg1.currentTarget.name.slice(7, _arg1.currentTarget.name.length);
if (_local2 == "e"){
gameDifficulty = "Easy";
gameDifficulty2 = 0;
} else {
if (_local2 == "m"){
gameDifficulty = "Medium";
gameDifficulty2 = 1;
} else {
if (_local2 == "h"){
gameDifficulty = "Hard";
gameDifficulty2 = 2;
};
};
};
removeEventListener(Event.ENTER_FRAME, preStartManagement);
addEventListener(Event.ENTER_FRAME, waitOneFrameToStartGame);
DTGH.addChild(PauseBut);
PauseBut.x = 0;
PauseBut.y = 0;
PauseBut.addEventListener(MouseEvent.CLICK, pauseGame, false, 0, true);
gotoAndStop("game");
}
private function loseLife(_arg1:String):void{
CharAtt.Lives = (CharAtt.Lives - 1);
updateLives();
countToStart = 60;
report(_arg1, 2);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, between_lives);
PGH.removeChild(Char);
}
public function callMoreGames(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var event = _arg1;
soundMod.soundClick();
url = "http://www.freeworldgroup.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
private function returnToMenu(_arg1:MouseEvent):void{
removeEventListener(Event.ENTER_FRAME, endGameEF);
bob.gotoAndStop(1);
gotoAndStop("menu");
}
public function generalSpeak(_arg1:Number):void{
var leng = _arg1;
try {
disp.TheGeneral.speaker.general.text = soundMod.speeches[soundMod.tipOfTongue];
disp.TheGeneral.count = (leng - 20);
disp.TheGeneral.gotoAndStop(2);
} catch(err:Error) {
};
}
private function initMenuScreen():void{
gotoAndStop("menu2");
}
private function runHoles():void{
var _local1:Number;
_local1 = 0;
while (_local1 < Holes.length) {
doGrav(Char, Holes[_local1], CharAtt);
if (HoleAtts[_local1].Mode == "Normal"){
if (Holes[_local1].scaleX < 1){
Holes[_local1].scaleX = (Holes[_local1].scaleX * holeScaleInc);
Holes[_local1].scaleY = (Holes[_local1].scaleY * holeScaleInc);
} else {
Holes[_local1].scaleX = (Holes[_local1].scaleX * levelData.holeScaleInc);
Holes[_local1].scaleY = (Holes[_local1].scaleY * levelData.holeScaleInc);
HoleAtts[_local1].HP = (HoleAtts[_local1].HP * levelData.holeHPInc);
};
Holes[_local1].rotation = (Holes[_local1].rotation - 0.3);
} else {
Holes[_local1].scaleX = (Holes[_local1].scaleX * 1.03);
Holes[_local1].scaleY = (Holes[_local1].scaleY * 1.03);
Holes[_local1].rotation = (Holes[_local1].rotation - 5);
};
if (((((Holes[_local1].detect.hitTestObject(Char)) && ((HoleAtts[_local1].HP > 0)))) && ((killedBy == "Nothing")))){
if (countToStart <= 0){
BHGH.setChildIndex(Holes[_local1], (BHGH.numChildren - 1));
HoleAtts[_local1].Mode = "Sucking";
loseLife("Sucked into a BLACK HOLE!");
killedBy = "Hole";
soundMod.soundDeath(killedBy, CharAtt.Lives);
};
};
_local1++;
};
}
}
}//package
Section 53
//BlackHole (BlackHole)
package {
import flash.display.*;
public dynamic class BlackHole extends MovieClip {
public var detect:MovieClip;
public var detect2:MovieClip;
}
}//package
Section 54
//bomb (bomb)
package {
import flash.display.*;
public dynamic class bomb extends MovieClip {
public function bomb(){
addFrameScript(9, frame10);
}
function frame10(){
this.parent.removeChild(this);
stop();
}
}
}//package
Section 55
//BOOM1 (BOOM1)
package {
import flash.media.*;
public dynamic class BOOM1 extends Sound {
}
}//package
Section 56
//BOOM2 (BOOM2)
package {
import flash.media.*;
public dynamic class BOOM2 extends Sound {
}
}//package
Section 57
//BOOM3 (BOOM3)
package {
import flash.media.*;
public dynamic class BOOM3 extends Sound {
}
}//package
Section 58
//BOOM4 (BOOM4)
package {
import flash.media.*;
public dynamic class BOOM4 extends Sound {
}
}//package
Section 59
//BOOM5 (BOOM5)
package {
import flash.media.*;
public dynamic class BOOM5 extends Sound {
}
}//package
Section 60
//BOOM6 (BOOM6)
package {
import flash.media.*;
public dynamic class BOOM6 extends Sound {
}
}//package
Section 61
//bubblishus (bubblishus)
package {
import flash.events.*;
import flash.display.*;
public class bubblishus extends MovieClip {
private var ox:Number;// = 0
public var a6:MovieClip;
public var a4:MovieClip;
public var a9:MovieClip;
private var oy:Number;// = 0
public var a5:MovieClip;
public var a8:MovieClip;
public var a11:MovieClip;
private var maxxs:Number;// = 2.5
public var a10:MovieClip;
private var maxys:Number;// = 2.5
public var a2:MovieClip;
public var a3:MovieClip;
public var a7:MovieClip;
public var a1:MovieClip;
public function bubblishus(){
maxxs = 2.5;
maxys = 2.5;
ox = 0;
oy = 0;
super();
ox = this.x;
oy = this.y;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(_arg1:Event){
this.x = ((ox + ((Math.random() * maxxs) * 2)) - maxxs);
this.y = ((oy + ((Math.random() * maxys) * 2)) - maxys);
}
}
}//package
Section 62
//Bullet (Bullet)
package {
import flash.display.*;
public dynamic class Bullet extends MovieClip {
public function Bullet(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 63
//channel (channel)
package {
import flash.media.*;
public dynamic class channel extends Sound {
}
}//package
Section 64
//complete1 (complete1)
package {
import flash.media.*;
public dynamic class complete1 extends Sound {
}
}//package
Section 65
//dead1 (dead1)
package {
import flash.media.*;
public dynamic class dead1 extends Sound {
}
}//package
Section 66
//dead2 (dead2)
package {
import flash.media.*;
public dynamic class dead2 extends Sound {
}
}//package
Section 67
//dead3 (dead3)
package {
import flash.media.*;
public dynamic class dead3 extends Sound {
}
}//package
Section 68
//dead4 (dead4)
package {
import flash.media.*;
public dynamic class dead4 extends Sound {
}
}//package
Section 69
//dead5 (dead5)
package {
import flash.media.*;
public dynamic class dead5 extends Sound {
}
}//package
Section 70
//dead6 (dead6)
package {
import flash.media.*;
public dynamic class dead6 extends Sound {
}
}//package
Section 71
//dt (dt)
package {
import flash.display.*;
public dynamic class dt extends MovieClip {
public var cashStats:StatReporter;
public var scoreStats:StatReporter;
public var Thermom:ArmourLevel;
public var TheGeneral:MovieClip;
public var Reports:Reporter;
public var HPReadout:ArmourLevel;
}
}//package
Section 72
//EBullet (EBullet)
package {
import flash.display.*;
public dynamic class EBullet extends MovieClip {
public var ship:MovieClip;
}
}//package
Section 73
//encourage1 (encourage1)
package {
import flash.media.*;
public dynamic class encourage1 extends Sound {
}
}//package
Section 74
//encourage10 (encourage10)
package {
import flash.media.*;
public dynamic class encourage10 extends Sound {
}
}//package
Section 75
//encourage11 (encourage11)
package {
import flash.media.*;
public dynamic class encourage11 extends Sound {
}
}//package
Section 76
//encourage12 (encourage12)
package {
import flash.media.*;
public dynamic class encourage12 extends Sound {
}
}//package
Section 77
//encourage13 (encourage13)
package {
import flash.media.*;
public dynamic class encourage13 extends Sound {
}
}//package
Section 78
//encourage14 (encourage14)
package {
import flash.media.*;
public dynamic class encourage14 extends Sound {
}
}//package
Section 79
//encourage15 (encourage15)
package {
import flash.media.*;
public dynamic class encourage15 extends Sound {
}
}//package
Section 80
//encourage16 (encourage16)
package {
import flash.media.*;
public dynamic class encourage16 extends Sound {
}
}//package
Section 81
//encourage2 (encourage2)
package {
import flash.media.*;
public dynamic class encourage2 extends Sound {
}
}//package
Section 82
//encourage3 (encourage3)
package {
import flash.media.*;
public dynamic class encourage3 extends Sound {
}
}//package
Section 83
//encourage4 (encourage4)
package {
import flash.media.*;
public dynamic class encourage4 extends Sound {
}
}//package
Section 84
//encourage5 (encourage5)
package {
import flash.media.*;
public dynamic class encourage5 extends Sound {
}
}//package
Section 85
//encourage6 (encourage6)
package {
import flash.media.*;
public dynamic class encourage6 extends Sound {
}
}//package
Section 86
//encourage7 (encourage7)
package {
import flash.media.*;
public dynamic class encourage7 extends Sound {
}
}//package
Section 87
//encourage8 (encourage8)
package {
import flash.media.*;
public dynamic class encourage8 extends Sound {
}
}//package
Section 88
//encourage9 (encourage9)
package {
import flash.media.*;
public dynamic class encourage9 extends Sound {
}
}//package
Section 89
//endbad1 (endbad1)
package {
import flash.media.*;
public dynamic class endbad1 extends Sound {
}
}//package
Section 90
//endbad2 (endbad2)
package {
import flash.media.*;
public dynamic class endbad2 extends Sound {
}
}//package
Section 91
//endgood (endgood)
package {
import flash.media.*;
public dynamic class endgood extends Sound {
}
}//package
Section 92
//endmedium (endmedium)
package {
import flash.media.*;
public dynamic class endmedium extends Sound {
}
}//package
Section 93
//Enemies (Enemies)
package {
import flash.display.*;
public dynamic class Enemies extends MovieClip {
public var nme:MovieClip;
}
}//package
Section 94
//Explosion (Explosion)
package {
import flash.display.*;
public dynamic class Explosion extends MovieClip {
public function Explosion(){
addFrameScript(14, frame15);
}
function frame15(){
this.parent.removeChild(this);
stop();
}
}
}//package
Section 95
//GameHolder (GameHolder)
package {
import flash.display.*;
public dynamic class GameHolder extends MovieClip {
}
}//package
Section 96
//GameI (GameI)
package {
import FWG.*;
public class GameI {
public static var submitScore:SubmitScore;
public static var btnSs:BtnSs;
}
}//package
Section 97
//gameover (gameover)
package {
import flash.media.*;
public dynamic class gameover extends Sound {
}
}//package
Section 98
//intro1 (intro1)
package {
import flash.media.*;
public dynamic class intro1 extends Sound {
}
}//package
Section 99
//intro2 (intro2)
package {
import flash.media.*;
public dynamic class intro2 extends Sound {
}
}//package
Section 100
//ldr_StarContainer (ldr_StarContainer)
package {
import flash.display.*;
public dynamic class ldr_StarContainer extends MovieClip {
}
}//package
Section 101
//levelup (levelup)
package {
import flash.media.*;
public dynamic class levelup extends Sound {
}
}//package
Section 102
//LifeDisplay (LifeDisplay)
package {
import flash.display.*;
public dynamic class LifeDisplay extends MovieClip {
}
}//package
Section 103
//mainship (mainship)
package {
import flash.display.*;
public dynamic class mainship extends MovieClip {
public var detect:MovieClip;
public function mainship(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 104
//Muteneer (Muteneer)
package {
import flash.display.*;
public dynamic class Muteneer extends MovieClip {
public var fx_mc:MovieClip;
public var music_but:SimpleButton;
public var fx_but:SimpleButton;
public var music_mc:MovieClip;
}
}//package
Section 105
//Net (Net)
package {
import flash.events.*;
import flash.net.*;
public class Net {
private static var loader:URLLoader;
private static var request:URLRequest;
public static function sendData(_arg1:URLVariables, _arg2:String, _arg3:Function, _arg4:Function):void{
request = new URLRequest(_arg2);
request.data = _arg1;
request.method = URLRequestMethod.POST;
trace(((("sendToURL: " + request.url) + "?") + request.data));
sendToURL(request);
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, _arg3, false, 0, true);
loader.addEventListener(IOErrorEvent.IO_ERROR, _arg4, false, 0, true);
loader.load(request);
}
public static function getURL(_arg1:String):void{
var url = _arg1;
try {
navigateToURL(new URLRequest(url), "_blank");
} catch(e) {
trace(("Net.getURL:e=" + e));
};
}
}
}//package
Section 106
//PauseButton (PauseButton)
package {
import flash.display.*;
public dynamic class PauseButton extends SimpleButton {
}
}//package
Section 107
//picup (picup)
package {
import flash.media.*;
public dynamic class picup extends Sound {
}
}//package
Section 108
//PowerUp (PowerUp)
package {
import flash.display.*;
public dynamic class PowerUp extends MovieClip {
public var Power:MovieClip;
public function PowerUp(){
addFrameScript(0, frame1, 6, frame7, 16, frame17);
}
function frame7(){
this.parent.removeChild(this);
stop();
}
function frame1(){
stop();
}
function frame17(){
this.parent.removeChild(this);
stop();
}
}
}//package
Section 109
//reallynicelarf (reallynicelarf)
package {
import flash.media.*;
public dynamic class reallynicelarf extends Sound {
}
}//package
Section 110
//Reporter (Reporter)
package {
import flash.display.*;
public dynamic class Reporter extends MovieClip {
public var txt:MovieClip;
public function Reporter(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 111
//screenFlasher (screenFlasher)
package {
import flash.display.*;
public dynamic class screenFlasher extends MovieClip {
public function screenFlasher(){
addFrameScript(0, frame1, 1, frame2, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
this.parent.removeChild(this);
}
function frame2(){
play();
}
}
}//package
Section 112
//Shop (Shop)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Shop extends MovieClip {
public var w5:TextField;
public var but9:SimpleButton;
public var currentshield:TextField;
public var cash:TextField;
public var but12:SimpleButton;
public var but11:SimpleButton;
public var coolantlevel:TextField;
public var exitBut:SimpleButton;
public var maximumshield:TextField;
public var generatorlevel:TextField;
public var but10:SimpleButton;
public var w1:TextField;
public var w4:TextField;
public var w6:TextField;
public var infos:TextField;
public var enginelevel:TextField;
public var w2:TextField;
public var w3:TextField;
public var cost:TextField;
public var but1:SimpleButton;
public var but2:SimpleButton;
public var but3:SimpleButton;
public var but4:SimpleButton;
public var but5:SimpleButton;
public var but6:SimpleButton;
public var but7:SimpleButton;
public var but8:SimpleButton;
}
}//package
Section 113
//smart (smart)
package {
import flash.media.*;
public dynamic class smart extends Sound {
}
}//package
Section 114
//SmartBombDisplay (SmartBombDisplay)
package {
import flash.display.*;
public dynamic class SmartBombDisplay extends MovieClip {
}
}//package
Section 115
//sound1 (sound1)
package {
import flash.media.*;
public dynamic class sound1 extends Sound {
}
}//package
Section 116
//sound2 (sound2)
package {
import flash.media.*;
public dynamic class sound2 extends Sound {
}
}//package
Section 117
//sound3 (sound3)
package {
import flash.media.*;
public dynamic class sound3 extends Sound {
}
}//package
Section 118
//sound4 (sound4)
package {
import flash.media.*;
public dynamic class sound4 extends Sound {
}
}//package
Section 119
//soundModule (soundModule)
package {
import flash.events.*;
import flash.net.*;
import com.hydrotik.utils.*;
import flash.display.*;
public class soundModule extends MovieClip {
private const channelSpeechGap:Number = 15;
private var laserCount:Number;// = 0
private var boomCount:Number;// = 0
public var speeches:Array;
private var medFxVol:Number;// = 0.5
private var rooot;
private var soundsPlayingThisFrame:Array;
private var topFxVol:Number;// = 1
private var laserInitCount:Number;// = 0
public var so:SharedObject;
public var musicScene:String;// = "Normal"
public var musicState:String;
public var muteButtons:Muteneer;
private var missileCount:Number;// = 0
private var fxVol:Number;
private var shockCount:Number;// = 0
private var slowDownCount:Number;// = 0
private var speechCounter:Number;// = -1
private var littleGunCount:Number;// = 0
public var tipOfTongue:String;// = ""
private var bigGunCount:Number;// = 0
public var fxState:String;
private var waitingToSpeakTimer:Number;// = 0
public function soundModule(_arg1):void{
muteButtons = new Muteneer();
so = SharedObject.getLocal("genericmutesettings4");
missileCount = 0;
littleGunCount = 0;
bigGunCount = 0;
boomCount = 0;
slowDownCount = 0;
shockCount = 0;
laserCount = 0;
laserInitCount = 0;
topFxVol = 1;
medFxVol = 0.5;
fxVol = topFxVol;
soundsPlayingThisFrame = [-1, -1, -1, -1, -1];
speechCounter = -1;
musicScene = "Normal";
tipOfTongue = "";
waitingToSpeakTimer = 0;
speeches = new Array();
super();
speeches["intro1"] = "The Primulan Dynasty have begun their invasion. You'll have to hold them off while we evacuate the planet!";
speeches["intro2"] = "Good Luck Commander. All our lives depend on you!";
speeches["encourage1"] = "Boom, Boom, Bang, Bang! Lovely!";
speeches["encourage2"] = "Keep fighting commander, there's all to play for!";
speeches["encourage3"] = "That's right! Slaughter them please!";
speeches["encourage4"] = "Black Holes SUCK!";
speeches["encourage5"] = "Booooommm ahahahhahaaa!";
speeches["encourage6"] = "Smash their little faces in!";
speeches["encourage7"] = "Excellent!";
speeches["encourage8"] = "Keep going commander!";
speeches["encourage9"] = "That one really had it coming!";
speeches["encourage10"] = "Their evil little suckers, arne't they";
speeches["encourage11"] = "Keep fighting commander - it's not all about jellybabies you know!";
speeches["encourage12"] = "Bwahahahahaa!";
speeches["encourage13"] = "Explodey!";
speeches["encourage14"] = "Kill as many as you can!";
speeches["encourage15"] = "Keep fighting.";
speeches["encourage16"] = "Very Good";
speeches["endbad1"] = "You're not very good at this, are you!";
speeches["endbad2"] = "That was a particularly pathetic effort!";
speeches["endgood"] = "Good Effort, you've done us proud";
speeches["endmedium"] = "You did your best commander, that's all that counts!";
speeches["complete1"] = "Well done Commander. We've got all the important people off the planet now. You can caryy on if you like, but it's just hairdressers and accountants!";
speeches["dead1"] = "Ohh Noo, you've been sucked into a Black Hole";
speeches["dead2"] = "Oh Nooo, you've been sucked into a Black Hole";
speeches["dead3"] = "Never mind Commander, here's another ship. And look... we've let off a smart bomb for you as well!";
speeches["dead4"] = "Ooopsie!!!";
speeches["dead5"] = "That looked painful!";
speeches["dead6"] = "Never mind!";
rooot = _arg1;
initSounds();
if (so.data.fxState == undefined){
so.data.fxState = "ALLON";
so.data.fxVol = topFxVol;
};
if (so.data.musicState == undefined){
so.data.musicState = "TUNE1";
};
fxState = so.data.fxState;
musicState = so.data.musicState;
fxVol = so.data.fxVol;
addChild(muteButtons);
muteButtons.x = 548;
muteButtons.y = 0;
muteButtons.fx_mc.gotoAndStop(fxState);
muteButtons.music_mc.gotoAndStop(musicState);
muteButtons.fx_but.addEventListener(MouseEvent.CLICK, switchFx);
muteButtons.music_but.addEventListener(MouseEvent.CLICK, switchMusic);
startMusic();
}
public function soundSmart():void{
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play("smart", 1, fxVol);
};
}
public function soundEnd(_arg1:Number, _arg2:Number):void{
var _local3:Number;
_local3 = 3;
if (_arg1 < (_arg2 / 2)){
openChannel();
_local3 = int(((Math.random() * 2) + 1));
tipOfTongue = ("endbad" + _local3);
} else {
if (_arg1 < _arg2){
openChannel();
tipOfTongue = "endmedium";
} else {
openChannel();
tipOfTongue = "endgood";
};
};
speechCounter = getSoundWait(tipOfTongue);
}
public function startMusic():void{
if (musicState != "ALLOFF"){
SoundManager.getInstance().startSequencer(musicState);
};
}
public function finallySpeak():void{
if (fxState == "ALLON"){
SoundManager.getInstance().play(tipOfTongue, 1, (fxVol * 0.8));
};
rooot.generalSpeak(getSoundWait(tipOfTongue));
}
public function waitingToSpeak(_arg1:Event):void{
waitingToSpeakTimer = (waitingToSpeakTimer - 1);
if (waitingToSpeakTimer == 5){
if (fxState == "ALLON"){
SoundManager.getInstance().play("channel", 1, (fxVol * 0.8));
};
};
if (waitingToSpeakTimer < 1){
removeEventListener(Event.ENTER_FRAME, waitingToSpeak);
finallySpeak();
};
}
public function switchFx(_arg1:Event){
if (fxState == "ALLON"){
fxState = "HALFON";
} else {
if (fxState == "HALFON"){
fxState = "ALLOFF";
} else {
if (fxState == "ALLOFF"){
fxState = "ALLON";
};
};
};
muteButtons.fx_mc.gotoAndStop(fxState);
so.data.fxState = fxState;
so.data.fxVol = fxVol;
so.flush();
}
private function initSounds(){
SoundManager.getInstance().addItem(new intro1());
SoundManager.getInstance().addItem(new intro2());
SoundManager.getInstance().addItem(new encourage1());
SoundManager.getInstance().addItem(new encourage2());
SoundManager.getInstance().addItem(new encourage3());
SoundManager.getInstance().addItem(new encourage4());
SoundManager.getInstance().addItem(new encourage5());
SoundManager.getInstance().addItem(new encourage6());
SoundManager.getInstance().addItem(new encourage7());
SoundManager.getInstance().addItem(new encourage8());
SoundManager.getInstance().addItem(new encourage9());
SoundManager.getInstance().addItem(new encourage10());
SoundManager.getInstance().addItem(new encourage11());
SoundManager.getInstance().addItem(new encourage12());
SoundManager.getInstance().addItem(new encourage13());
SoundManager.getInstance().addItem(new encourage14());
SoundManager.getInstance().addItem(new encourage15());
SoundManager.getInstance().addItem(new encourage16());
SoundManager.getInstance().addItem(new dead1());
SoundManager.getInstance().addItem(new dead2());
SoundManager.getInstance().addItem(new dead3());
SoundManager.getInstance().addItem(new dead4());
SoundManager.getInstance().addItem(new dead5());
SoundManager.getInstance().addItem(new dead6());
SoundManager.getInstance().addItem(new BOOM1());
SoundManager.getInstance().addItem(new BOOM2());
SoundManager.getInstance().addItem(new BOOM3());
SoundManager.getInstance().addItem(new BOOM4());
SoundManager.getInstance().addItem(new BOOM5());
SoundManager.getInstance().addItem(new BOOM6());
SoundManager.getInstance().addItem(new complete1());
SoundManager.getInstance().addItem(new channel());
SoundManager.getInstance().addItem(new TUNE1());
SoundManager.getInstance().addItem(new endbad1());
SoundManager.getInstance().addItem(new endbad2());
SoundManager.getInstance().addItem(new endmedium());
SoundManager.getInstance().addItem(new endgood());
SoundManager.getInstance().addItem(new gameover());
SoundManager.getInstance().addItem(new picup());
SoundManager.getInstance().addItem(new levelup());
SoundManager.getInstance().addItem(new smart());
SoundManager.getInstance().addItem(new sound1());
SoundManager.getInstance().addItem(new sound2());
SoundManager.getInstance().addItem(new sound3());
SoundManager.getInstance().addItem(new sound4());
}
public function soundIntro2():void{
if (speechCounter < 1){
openChannel();
tipOfTongue = "intro2";
speechCounter = getSoundWait(tipOfTongue);
};
}
public function soundLevelUp():void{
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play("levelup", 1, fxVol);
};
}
public function stopMusic():void{
if (musicState != "ALLOFF"){
SoundManager.getInstance().stop(musicState);
};
}
public function switchMusic(_arg1:Event){
if (musicScene == "Normal"){
stopMusic();
};
if (musicState == "TUNE1"){
musicState = "ALLOFF";
} else {
if (musicState == "ALLOFF"){
musicState = "TUNE1";
};
};
if (musicScene == "Normal"){
startMusic();
};
muteButtons.music_mc.gotoAndStop(musicState);
so.data.musicState = musicState;
so.flush();
}
public function soundSound(_arg1:Number):void{
if (soundsPlayingThisFrame[_arg1] < 0){
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play(("sound" + _arg1), 1, fxVol);
};
soundsPlayingThisFrame[_arg1] = 1;
};
}
public function openChannel():void{
waitingToSpeakTimer = channelSpeechGap;
addEventListener(Event.ENTER_FRAME, waitingToSpeak);
}
public function soundComplete():Boolean{
var _local1:Boolean;
_local1 = false;
if (speechCounter < 1){
openChannel();
tipOfTongue = "complete1";
_local1 = true;
speechCounter = getSoundWait(tipOfTongue);
};
return (_local1);
}
public function processSoundCounters():void{
var _local1:Number;
_local1 = 0;
while (_local1 < soundsPlayingThisFrame.length) {
soundsPlayingThisFrame[_local1] = (soundsPlayingThisFrame[_local1] - 1);
speechCounter = (speechCounter - 1);
_local1++;
};
}
public function soundGameOver():void{
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play("gameover", 1, (fxVol * 0.6));
};
}
public function soundIntro():void{
if (speechCounter < 1){
openChannel();
tipOfTongue = "intro1";
speechCounter = getSoundWait(tipOfTongue);
};
}
private function getSoundWait(_arg1:String):Number{
return ((int((SoundManager._sndArray[_arg1].length / 50)) + 30));
}
public function soundDeath(_arg1:String, _arg2:Number){
var _local3:Number;
_local3 = 3;
if (speechCounter < 1){
if (_arg1 != "Damage"){
_local3 = int(((Math.random() * 2) + 1));
openChannel();
tipOfTongue = ("dead" + _local3);
speechCounter = getSoundWait(tipOfTongue);
} else {
do {
_local3 = int(((Math.random() * 4) + 3));
} while ((((_arg2 < 1)) && ((_local3 == 3))));
openChannel();
tipOfTongue = ("dead" + _local3);
speechCounter = getSoundWait(tipOfTongue);
};
};
}
public function soundEncouragement(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
_local2 = (0.1 - (rooot.level / 300));
if (_local2 < 0.001){
_local2 = 0.001;
};
if (speechCounter < 1){
if (Math.random() < _local2){
do {
_local3 = (int((Math.random() * 16)) + 1);
} while (((_arg1) && ((((((((((_local3 == 2)) || ((_local3 == 3)))) || ((_local3 == 8)))) || ((_local3 == 11)))) || ((_local3 == 15))))));
openChannel();
tipOfTongue = ("encourage" + _local3);
speechCounter = getSoundWait(tipOfTongue);
};
};
}
public function soundExplosion():void{
var _local1:Number;
_local1 = int(((Math.random() * 6) + 1));
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play(("BOOM" + _local1), 1, fxVol);
};
}
public function soundClick():void{
}
public function soundPicUp():void{
if ((((fxState == "ALLON")) || ((fxState == "HALFON")))){
SoundManager.getInstance().play("picup", 1, fxVol);
};
}
}
}//package
Section 120
//Speck (Speck)
package {
import flash.display.*;
public dynamic class Speck extends MovieClip {
public function Speck(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 121
//Splosions (Splosions)
package {
import flash.display.*;
public dynamic class Splosions extends MovieClip {
}
}//package
Section 122
//StartButton (StartButton)
package {
import flash.display.*;
public dynamic class StartButton extends SimpleButton {
}
}//package
Section 123
//StatReporter (StatReporter)
package {
import flash.display.*;
import flash.text.*;
public dynamic class StatReporter extends MovieClip {
public var txt1:TextField;
}
}//package
Section 124
//sting_controller (sting_controller)
package {
import flash.events.*;
import flash.net.*;
import flash.display.*;
public class sting_controller extends MovieClip {
public var clip:MovieClip;
private var aas:Array;
private var thisMode:Array;
private var yys:Array;
private var mose:Number;// = 1
private var xxs:Array;
private var qwik:Number;// = 10
public function sting_controller(){
aas = new Array();
xxs = new Array();
yys = new Array();
mose = 1;
qwik = 10;
thisMode = new Array();
super();
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
clip.armegaButton.addEventListener(MouseEvent.CLICK, callArmegalo, false, 0, true);
play();
aas.push(clip.a1);
aas.push(clip.a2);
aas.push(clip.a3);
aas.forEach(setEmUp);
}
public function callArmegalo(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armegalo.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function onEnterFrame(_arg1:Event):void{
if ((Math.random() * 5) < 1){
mose = 0;
qwik = 2;
} else {
mose = 1;
qwik = 10;
};
aas.forEach(doMaThang);
}
private function doMaThang(_arg1, _arg2:int, _arg3:Array):void{
if (thisMode[_arg2] == 0){
if ((Math.random() * 4) < 2){
thisMode[_arg2] = int((Math.random() * 4));
};
_arg1.x = ((xxs[_arg2] + (Math.random() * 12)) - 6);
_arg1.y = ((yys[_arg2] + (Math.random() * 12)) - 6);
if (mose == 1){
this.scaleY = ((Math.random() / 20) + 0.975);
this.scaleY = ((Math.random() / 20) + 0.975);
} else {
this.scaleX = ((Math.random() / 10) + 0.9);
this.scaleY = ((Math.random() / 10) + 0.9);
};
} else {
if (thisMode[_arg2] == 1){
this.scaleX = (this.scaleX - (this.scaleX / 100));
this.scaleY = (this.scaleY + (this.scaleY / 100));
} else {
if (thisMode[_arg2] == 2){
this.scaleX = (this.scaleX + (this.scaleX / 100));
this.scaleY = (this.scaleY + (this.scaleY / 100));
} else {
if (thisMode[_arg2] == 3){
this.scaleX = (this.scaleX + (this.scaleX / 100));
this.scaleY = (this.scaleY - (this.scaleY / 100));
};
};
};
if ((Math.random() * qwik) < 1.5){
thisMode[_arg2] = 0;
};
};
}
private function setEmUp(_arg1, _arg2:int, _arg3:Array):void{
xxs[_arg2] = _arg1.x;
yys[_arg2] = _arg1.y;
thisMode[_arg2] = 0;
}
}
}//package
Section 125
//Symbol136 (Symbol136)
package {
public dynamic class Symbol136 extends bubblishus {
}
}//package
Section 126
//Symbol137 (Symbol137)
package {
public dynamic class Symbol137 extends bubblishus {
}
}//package
Section 127
//Symbol138 (Symbol138)
package {
public dynamic class Symbol138 extends bubblishus {
}
}//package
Section 128
//Symbol139 (Symbol139)
package {
public dynamic class Symbol139 extends bubblishus {
}
}//package
Section 129
//Symbol140 (Symbol140)
package {
public dynamic class Symbol140 extends bubblishus {
}
}//package
Section 130
//Symbol141 (Symbol141)
package {
public dynamic class Symbol141 extends bubblishus {
}
}//package
Section 131
//Symbol142 (Symbol142)
package {
public dynamic class Symbol142 extends bubblishus {
}
}//package
Section 132
//Symbol143 (Symbol143)
package {
public dynamic class Symbol143 extends bubblishus {
}
}//package
Section 133
//Symbol144 (Symbol144)
package {
public dynamic class Symbol144 extends bubblishus {
}
}//package
Section 134
//Symbol145 (Symbol145)
package {
public dynamic class Symbol145 extends bubblishus {
}
}//package
Section 135
//Symbol146 (Symbol146)
package {
public dynamic class Symbol146 extends bubblishus {
}
}//package
Section 136
//TUNE1 (TUNE1)
package {
import flash.media.*;
public dynamic class TUNE1 extends Sound {
}
}//package
Section 137
//WeaponTemp (WeaponTemp)
package {
import flash.display.*;
public dynamic class WeaponTemp extends MovieClip {
public var temp:MovieClip;
}
}//package
Section 138
//WormHoleIn (WormHoleIn)
package {
import flash.events.*;
import flash.net.*;
import flash.filters.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class WormHoleIn extends MovieClip {
public var a:Number;
public var n:Number;
public var myRoot;
public function WormHoleIn(){
addFrameScript(0, frame1, 8, frame9, 16, frame17);
}
function frame1(){
}
function frame9(){
a = 1;
n = 1;
while (n < (myRoot.EnemyProbs.length + 1)) {
if ((Math.random() * 100) < myRoot.EnemyProbs[n]){
a = n;
};
n++;
};
if (myRoot.killedBy == "Nothing"){
myRoot.initEnemy(a, this.x, this.y);
};
}
function frame17(){
this.parent.removeChild(this);
stop();
}
}
}//package