home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / aether.swf / scripts / Aether_fla / MainTimeline.as < prev    next >
Text File  |  2008-09-11  |  134KB  |  3,481 lines

  1. package Aether_fla
  2. {
  3.    import flash.display.Bitmap;
  4.    import flash.display.BitmapData;
  5.    import flash.display.MovieClip;
  6.    import flash.display.SimpleButton;
  7.    import flash.events.Event;
  8.    import flash.events.KeyboardEvent;
  9.    import flash.events.MouseEvent;
  10.    import flash.events.ProgressEvent;
  11.    import flash.geom.ColorTransform;
  12.    import flash.geom.Rectangle;
  13.    import flash.media.SoundChannel;
  14.    import flash.media.SoundTransform;
  15.    import flash.net.URLRequest;
  16.    import flash.net.navigateToURL;
  17.    import flash.text.TextField;
  18.    
  19.    public dynamic class MainTimeline extends MovieClip
  20.    {
  21.        
  22.       
  23.       public var durrr:int;
  24.       
  25.       public var floating:Boolean;
  26.       
  27.       public var starsC:MovieClip;
  28.       
  29.       public var planet1mass;
  30.       
  31.       public var back2:MovieClip;
  32.       
  33.       public var gemed:Boolean;
  34.       
  35.       public var currentCloud:MovieClip;
  36.       
  37.       public var strength:Number;
  38.       
  39.       public var bg:MovieClip;
  40.       
  41.       public var speed:Vector;
  42.       
  43.       public var center:Vector;
  44.       
  45.       public var cc:int;
  46.       
  47.       public var stars:Array;
  48.       
  49.       public var bn:Number;
  50.       
  51.       public var SFX:Array;
  52.       
  53.       public var paus:Boolean;
  54.       
  55.       public var i:int;
  56.       
  57.       public var j:int;
  58.       
  59.       public var cn:Number;
  60.       
  61.       public var pos2:Vector;
  62.       
  63.       public var n;
  64.       
  65.       public var currentPlanet;
  66.       
  67.       public var f:int;
  68.       
  69.       public var speedFactor:Number;
  70.       
  71.       public var grounded:Boolean;
  72.       
  73.       public var kRight:Boolean;
  74.       
  75.       public var k:int;
  76.       
  77.       public var kUp:Boolean;
  78.       
  79.       public var abs;
  80.       
  81.       public var sfx:SoundChannel;
  82.       
  83.       public var dir:Dir;
  84.       
  85.       public var won:Array;
  86.       
  87.       public var momentum:Number;
  88.       
  89.       public var beatgame:Boolean;
  90.       
  91.       public var framey:String;
  92.       
  93.       public var area;
  94.       
  95.       public var srange:Number;
  96.       
  97.       public var flasher:Flasher;
  98.       
  99.       public var talk:Talk;
  100.       
  101.       public var ff:int;
  102.       
  103.       public var background5:Background5;
  104.       
  105.       public var speedC:Vector;
  106.       
  107.       public var clouds:Array;
  108.       
  109.       public var gg:int;
  110.       
  111.       public var explode:Boolean;
  112.       
  113.       public var back:MovieClip;
  114.       
  115.       public var density;
  116.       
  117.       public var speedP:Number;
  118.       
  119.       public var loadPerc:Number;
  120.       
  121.       public var i8:int;
  122.       
  123.       public var crazies:Array;
  124.       
  125.       public var fished:int;
  126.       
  127.       public var rope:MovieClip;
  128.       
  129.       public var GR:Vector;
  130.       
  131.       public var effects:MovieClip;
  132.       
  133.       public var j8:int;
  134.       
  135.       public var sdensity;
  136.       
  137.       public var pollupy:Number;
  138.       
  139.       public var sqrt;
  140.       
  141.       public var kA:Boolean;
  142.       
  143.       public var kD:Boolean;
  144.       
  145.       public var range:Number;
  146.       
  147.       public var kM:Boolean;
  148.       
  149.       public var kS:Boolean;
  150.       
  151.       public var kW:Boolean;
  152.       
  153.       public var btn1:SimpleButton;
  154.       
  155.       public var btn3:SimpleButton;
  156.       
  157.       public var mc2:MovieClip;
  158.       
  159.       public var mc3:MovieClip;
  160.       
  161.       public var splashes:Array;
  162.       
  163.       public var earths:Array;
  164.       
  165.       public var bubbles:Array;
  166.       
  167.       public var planet1r2;
  168.       
  169.       public var gemSounds:Array;
  170.       
  171.       public var fader:Number;
  172.       
  173.       public var transformSFX:SoundTransform;
  174.       
  175.       public var n2;
  176.       
  177.       public var bmp:Bitmap;
  178.       
  179.       public var n8:int;
  180.       
  181.       public var mc:MovieClip;
  182.       
  183.       public var planet:MovieClip;
  184.       
  185.       public var planet2:MovieClip;
  186.       
  187.       public var linkAG:SimpleButton;
  188.       
  189.       public var mp:int;
  190.       
  191.       public var fadery:MovieClip;
  192.       
  193.       public var planet1mass2;
  194.       
  195.       public var mus2:T2;
  196.       
  197.       public var mus3:T3;
  198.       
  199.       public var mus4:T4;
  200.       
  201.       public var mus5:T5;
  202.       
  203.       public var mus1:T1;
  204.       
  205.       public var box:MovieClip;
  206.       
  207.       public var musB:TB;
  208.       
  209.       public var planets:Array;
  210.       
  211.       public var talph:Number;
  212.       
  213.       public var planet1r;
  214.       
  215.       public var ttt:int;
  216.       
  217.       public var timerGGG:int;
  218.       
  219.       public var shrink:Boolean;
  220.       
  221.       public var namesT:int;
  222.       
  223.       public var len:Number;
  224.       
  225.       public var brange:Number;
  226.       
  227.       public var linkED:SimpleButton;
  228.       
  229.       public var anchored:Boolean;
  230.       
  231.       public var wholegame:MovieClip;
  232.       
  233.       public var Gravity:Vector;
  234.       
  235.       public var str:Number;
  236.       
  237.       public var transform1:SoundTransform;
  238.       
  239.       public var transform2:SoundTransform;
  240.       
  241.       public var transform4:SoundTransform;
  242.       
  243.       public var cut:MovieClip;
  244.       
  245.       public var transform5:SoundTransform;
  246.       
  247.       public var bdensity;
  248.       
  249.       public var transformB:SoundTransform;
  250.       
  251.       public var fish:Array;
  252.       
  253.       public var sn:Number;
  254.       
  255.       public var stag:BitmapData;
  256.       
  257.       public var grav:Vector;
  258.       
  259.       public var linkGG:SimpleButton;
  260.       
  261.       public var pos:Vector;
  262.       
  263.       public var arr:Array;
  264.       
  265.       public var transform3:SoundTransform;
  266.       
  267.       public var transformW:SoundTransform;
  268.       
  269.       public var aliens:Array;
  270.       
  271.       public var linkAG2:SimpleButton;
  272.       
  273.       public var particles:Array;
  274.       
  275.       public var controls:int;
  276.       
  277.       public var ended:Boolean;
  278.       
  279.       public var bobber:Bobber;
  280.       
  281.       public var base:BitmapData;
  282.       
  283.       public var elastic:Number;
  284.       
  285.       public var gassed:int;
  286.       
  287.       public var pauzz:Paus;
  288.       
  289.       public var mass:Number;
  290.       
  291.       public var friction:Number;
  292.       
  293.       public var kLeft:Boolean;
  294.       
  295.       public var rspeed:Number;
  296.       
  297.       public var latching:Boolean;
  298.       
  299.       public var timeE:int;
  300.       
  301.       public var faderTIM:int;
  302.       
  303.       public var log:logo;
  304.       
  305.       public var names:Names;
  306.       
  307.       public var hi1:Number;
  308.       
  309.       public var hi2:Number;
  310.       
  311.       public var kSpace:Boolean;
  312.       
  313.       public var mooned:int;
  314.       
  315.       public var Vecg:Vector;
  316.       
  317.       public var Vec:Vector;
  318.       
  319.       public var Vecp:Vector;
  320.       
  321.       public var sarea;
  322.       
  323.       public var ggg;
  324.       
  325.       public var channel2:SoundChannel;
  326.       
  327.       public var channel4:SoundChannel;
  328.       
  329.       public var channel1:SoundChannel;
  330.       
  331.       public var channel3:SoundChannel;
  332.       
  333.       public var channel5:SoundChannel;
  334.       
  335.       public var wi1:Number;
  336.       
  337.       public var wi2:Number;
  338.       
  339.       public var foregrounds:Array;
  340.       
  341.       public var gemCounter:int;
  342.       
  343.       public var charH:Number;
  344.       
  345.       public var channelW:SoundChannel;
  346.       
  347.       public var channelB:SoundChannel;
  348.       
  349.       public var loadBX:TextField;
  350.       
  351.       public var bubblesC:MovieClip;
  352.       
  353.       public var kDown:Boolean;
  354.       
  355.       public var cam:Cam;
  356.       
  357.       public var container1:MovieClip;
  358.       
  359.       public var container2:MovieClip;
  360.       
  361.       public var container3:MovieClip;
  362.       
  363.       public var container4:MovieClip;
  364.       
  365.       public var win1:Win1;
  366.       
  367.       public var win2:Win2;
  368.       
  369.       public var win3:Win3;
  370.       
  371.       public var win4:Win4;
  372.       
  373.       public var barea;
  374.       
  375.       public var inside:Boolean;
  376.       
  377.       public function MainTimeline()
  378.       {
  379.          super();
  380.          addFrameScript(0,frame1,2,frame3,3,frame4,4,frame5,5,frame6,6,frame7,7,frame8,8,frame9);
  381.       }
  382.       
  383.       public function backBTN(param1:Event) : *
  384.       {
  385.          framey = "game";
  386.          fadery.play();
  387.       }
  388.       
  389.       public function ag_btnclick2(param1:MouseEvent) : *
  390.       {
  391.          navigateToURL(new URLRequest("http://www.armorgames.com"),"_blank");
  392.       }
  393.       
  394.       public function ed_btnclick(param1:MouseEvent) : *
  395.       {
  396.          navigateToURL(new URLRequest("http://www.thisisacryforhelp.com"),"_blank");
  397.       }
  398.       
  399.       public function goBTN(param1:Event) : *
  400.       {
  401.          cut.play();
  402.       }
  403.       
  404.       public function updo() : *
  405.       {
  406.          gotoAndStop(framey);
  407.       }
  408.       
  409.       function frame5() : *
  410.       {
  411.          stop();
  412.          btn1.addEventListener(MouseEvent.CLICK,backBTN,false,0,true);
  413.       }
  414.       
  415.       function frame9() : *
  416.       {
  417.          stop();
  418.          btn1.addEventListener(MouseEvent.CLICK,backBTN2,false,0,true);
  419.       }
  420.       
  421.       function frame6() : *
  422.       {
  423.          stop();
  424.          framey = "inst";
  425.          btn1.addEventListener(MouseEvent.CLICK,goBTN,false,0,true);
  426.       }
  427.       
  428.       function frame1() : *
  429.       {
  430.          linkAG.addEventListener(MouseEvent.CLICK,ag_btnclick,false,0,true);
  431.          linkGG.addEventListener(MouseEvent.CLICK,gg_btnclick,false,0,true);
  432.          linkED.addEventListener(MouseEvent.CLICK,ed_btnclick,false,0,true);
  433.          stop();
  434.          base = new BitmapData(100,100,true,0);
  435.          stag = new BitmapData(stage.stageWidth,stage.stageHeight,true,2434861);
  436.          bmp = new Bitmap(stag);
  437.          box.addChild(bmp);
  438.          log = new logo();
  439.          base.draw(log);
  440.          abs = Math.abs;
  441.          sqrt = Math.sqrt;
  442.          arr = new Array();
  443.          loadPerc = new Number(0);
  444.          shrink = false;
  445.          wi1 = (stage.stageWidth - 400) / 2;
  446.          hi1 = (stage.stageHeight - 400) / 2;
  447.          wi2 = (stage.stageWidth - 200) / 2;
  448.          hi2 = (stage.stageHeight - 200) / 2;
  449.          timerGGG = 30;
  450.          i8 = 0;
  451.          while(i8 < 100)
  452.          {
  453.             j8 = 0;
  454.             while(j8 < 100)
  455.             {
  456.                arr.push(new Array(0,0,0,0,0));
  457.                n8 = arr.length - 1;
  458.                arr[n8][0] = base.getPixel32(i8,j8);
  459.                arr[n8][1] = new Number(i8 * 4 + wi1);
  460.                arr[n8][2] = new Number(j8 * 4 + hi1);
  461.                arr[n8][3] = Math.random() * 700;
  462.                arr[n8][4] = Math.random() * 700;
  463.                arr[n8][5] = Math.random() * 10 - 5;
  464.                arr[n8][6] = Math.random() * 10 - 5;
  465.                arr[n8][7] = i8;
  466.                arr[n8][8] = j8;
  467.                ++j8;
  468.             }
  469.             ++i8;
  470.          }
  471.          explode = false;
  472.          loaderInfo.addEventListener(ProgressEvent.PROGRESS,calculatepcent,false,0,true);
  473.          addEventListener(Event.ENTER_FRAME,update2,false,0,true);
  474.          stage.addEventListener(MouseEvent.MOUSE_DOWN,expl,false,0,true);
  475.          stage.addEventListener(MouseEvent.MOUSE_UP,uexpl,false,0,true);
  476.          stage.showDefaultContextMenu = false;
  477.          stage.quality = "MEDIUM";
  478.          framey = "title";
  479.          try
  480.          {
  481.             MochiBot.track(this,"c0587ff8");
  482.          }
  483.          catch(e:Error)
  484.          {
  485.          }
  486.       }
  487.       
  488.       public function advance() : *
  489.       {
  490.          framey = "title";
  491.          fadery.play();
  492.       }
  493.       
  494.       public function update2(param1:Event) : *
  495.       {
  496.          var _loc2_:Boolean = false;
  497.          var _loc3_:int = 0;
  498.          var _loc4_:Number = NaN;
  499.          if(loadPerc >= 1)
  500.          {
  501.             loadPerc = 1;
  502.             shrink = true;
  503.          }
  504.          loadBX.text = String(Math.round(loadPerc * 100)) + "% Loaded";
  505.          log.gotoAndStop(Math.floor(loadPerc * 100) + 1);
  506.          base.draw(log);
  507.          _loc2_ = false;
  508.          if(shrink == true)
  509.          {
  510.             if(abs(mouseX - stage.stageWidth / 2) <= 50 && abs(mouseY - stage.stageHeight / 2) < 50)
  511.             {
  512.                _loc2_ = true;
  513.             }
  514.          }
  515.          stag.colorTransform(new Rectangle(0,0,stage.stageWidth,stage.stageHeight),new ColorTransform(1,1,1,0.9,0,0,0,0));
  516.          if(timerGGG > 0)
  517.          {
  518.             _loc3_ = 0;
  519.             while(_loc3_ < arr.length)
  520.             {
  521.                if(timerGGG <= 0)
  522.                {
  523.                   arr[_loc3_][0] = 0;
  524.                }
  525.                else
  526.                {
  527.                   arr[_loc3_][0] = base.getPixel32(arr[_loc3_][7],arr[_loc3_][8]);
  528.                }
  529.                if(!shrink)
  530.                {
  531.                   arr[_loc3_][5] += (arr[_loc3_][1] - arr[_loc3_][3]) / 50;
  532.                   arr[_loc3_][6] += (arr[_loc3_][2] - arr[_loc3_][4]) / 50;
  533.                   _loc4_ = sqrt((arr[_loc3_][3] - mouseX) * (arr[_loc3_][3] - mouseX) + (arr[_loc3_][4] - mouseY) * (arr[_loc3_][4] - mouseY));
  534.                   if(explode)
  535.                   {
  536.                      arr[_loc3_][5] += 450 * (arr[_loc3_][3] - mouseX) / (_loc4_ * _loc4_ + 30);
  537.                      arr[_loc3_][6] += 450 * (arr[_loc3_][4] - mouseY) / (_loc4_ * _loc4_ + 30);
  538.                   }
  539.                   else
  540.                   {
  541.                      arr[_loc3_][5] += 90 * (arr[_loc3_][3] - mouseX) / (_loc4_ * _loc4_ + 30);
  542.                      arr[_loc3_][6] += 90 * (arr[_loc3_][4] - mouseY) / (_loc4_ * _loc4_ + 30);
  543.                   }
  544.                }
  545.                else
  546.                {
  547.                   arr[_loc3_][3] += ((arr[_loc3_][1] - wi1) / 2 + wi2 - arr[_loc3_][3]) / 5;
  548.                   arr[_loc3_][4] += ((arr[_loc3_][2] - hi1) / 2 + hi2 - arr[_loc3_][4]) / 5;
  549.                   arr[_loc3_][5] = 0;
  550.                   arr[_loc3_][6] = 0;
  551.                }
  552.                arr[_loc3_][5] *= 0.95;
  553.                arr[_loc3_][6] *= 0.95;
  554.                if(arr[_loc3_][5] > 50)
  555.                {
  556.                   arr[_loc3_][5] = 50;
  557.                }
  558.                if(arr[_loc3_][5] < -50)
  559.                {
  560.                   arr[_loc3_][5] = -50;
  561.                }
  562.                if(arr[_loc3_][6] > 50)
  563.                {
  564.                   arr[_loc3_][6] = 50;
  565.                }
  566.                if(arr[_loc3_][6] < -50)
  567.                {
  568.                   arr[_loc3_][6] = -50;
  569.                }
  570.                arr[_loc3_][3] += arr[_loc3_][5];
  571.                arr[_loc3_][4] += arr[_loc3_][6];
  572.                stag.fillRect(new Rectangle(arr[_loc3_][3],arr[_loc3_][4],2,2),arr[_loc3_][0]);
  573.                _loc3_++;
  574.             }
  575.          }
  576.          bmp.bitmapData = stag;
  577.          if(shrink == true)
  578.          {
  579.             timerGGG = timerGGG - 1;
  580.             if(timerGGG == 0)
  581.             {
  582.                box.addChild(log);
  583.                log.scaleX = 2;
  584.                log.scaleY = 2;
  585.                log.x = wi2;
  586.                log.y = hi2;
  587.             }
  588.             if(timerGGG <= 0)
  589.             {
  590.                if(abs(mouseX - stage.stageWidth / 2) <= 100 && abs(mouseY - stage.stageHeight / 2) < 100)
  591.                {
  592.                   log.gotoAndStop(101);
  593.                }
  594.                else
  595.                {
  596.                   log.gotoAndStop(100);
  597.                }
  598.                if(explode && abs(mouseX - stage.stageWidth / 2) <= 100 && abs(mouseY - stage.stageHeight / 2) < 100)
  599.                {
  600.                   framey = "logos";
  601.                   fadery.play();
  602.                   loaderInfo.removeEventListener(ProgressEvent.PROGRESS,calculatepcent);
  603.                   removeEventListener(Event.ENTER_FRAME,update2);
  604.                   stage.removeEventListener(MouseEvent.MOUSE_DOWN,expl);
  605.                   stage.removeEventListener(MouseEvent.MOUSE_UP,uexpl);
  606.                }
  607.             }
  608.             explode = false;
  609.          }
  610.       }
  611.       
  612.       function frame7() : *
  613.       {
  614.          stop();
  615.          paus = false;
  616.          pauzz = new Paus();
  617.          clouds = new Array();
  618.          crazies = new Array();
  619.          back = new MovieClip();
  620.          back2 = new MovieClip();
  621.          mc = new MovieClip();
  622.          mc2 = new MovieClip();
  623.          mc3 = new MovieClip();
  624.          starsC = new MovieClip();
  625.          container1 = new MovieClip();
  626.          mc.addChild(back2);
  627.          mc.addChild(starsC);
  628.          mc.addChild(back);
  629.          container2 = new MovieClip();
  630.          container3 = new MovieClip();
  631.          container4 = new MovieClip();
  632.          bg = new BG();
  633.          bubblesC = new MovieClip();
  634.          effects = new MovieClip();
  635.          bubbles = new Array();
  636.          aliens = new Array();
  637.          ttt = 0;
  638.          Gravity = new Vector(0,0);
  639.          mc.addChild(bg);
  640.          wholegame.addChild(mc3);
  641.          names = new Names();
  642.          wholegame.addChild(names);
  643.          wholegame.addChild(pauzz);
  644.          pauzz.visible = false;
  645.          names.gotoAndStop(2);
  646.          names.alpha = 0;
  647.          timeE = 90;
  648.          namesT = 0;
  649.          mc3.addChild(mc2);
  650.          mc2.addChild(mc);
  651.          mc.addChild(container1);
  652.          mc.addChild(container2);
  653.          mc.addChild(container3);
  654.          mc.addChild(container4);
  655.          fader = 1;
  656.          faderTIM = 0;
  657.          dir = new Dir();
  658.          dir.alpha = 0;
  659.          dir.d1.gotoAndStop(1);
  660.          dir.d2.gotoAndStop(2);
  661.          dir.d3.gotoAndStop(3);
  662.          dir.d4.gotoAndStop(4);
  663.          dir.d5.gotoAndStop(5);
  664.          ended = false;
  665.          durrr = 300;
  666.          dir.visible = false;
  667.          container4.addChild(dir);
  668.          range = 1900;
  669.          srange = 1300;
  670.          cam = new Cam(700,700,mc);
  671.          cam.x = range / 2;
  672.          cam.y = range / 2;
  673.          speedC = new Vector(0,4);
  674.          density = 1 / 90000;
  675.          area = range * range;
  676.          cn = density * area;
  677.          sdensity = 1 / 16000;
  678.          sarea = srange * srange;
  679.          sn = sdensity * sarea;
  680.          brange = 2800;
  681.          bdensity = 1 / 5000000;
  682.          barea = brange * brange;
  683.          bn = bdensity * barea;
  684.          momentum = 0;
  685.          mass = 20;
  686.          friction = 1;
  687.          strength = 1;
  688.          speed = new Vector(0,0);
  689.          pos = new Vector(0,0);
  690.          len = 180;
  691.          pos2 = new Vector(0,0);
  692.          rope = new MovieClip();
  693.          bobber = new Bobber();
  694.          center = new Vector(0,500);
  695.          anchored = false;
  696.          rspeed = 0;
  697.          speedFactor = 0.5;
  698.          controls = 1;
  699.          inside = false;
  700.          currentCloud = null;
  701.          elastic = 10;
  702.          speedP = 0;
  703.          charH = 30;
  704.          stars = new Array();
  705.          fish = new Array();
  706.          splashes = new Array();
  707.          floating = false;
  708.          pollupy = 0;
  709.          fished = 0;
  710.          won = new Array(false,false,false,false);
  711.          particles = new Array();
  712.          f = 0;
  713.          while(f < 10)
  714.          {
  715.             fish.push(new Array(new Fish(),new Vector(3,0),3,1));
  716.             fished += 1;
  717.             ++f;
  718.          }
  719.          ff = 0;
  720.          while(ff < 30)
  721.          {
  722.             fish.push(new Array(new Fish2(),new Vector(1,0),3,2));
  723.             ++ff;
  724.          }
  725.          k = 0;
  726.          while(k < fish.length)
  727.          {
  728.             bubblesC.addChild(fish[k][0]);
  729.             fish[k][0].x = 4000 + Math.random() * 500 - 250;
  730.             fish[k][0].y = 29000 + Math.random() * 500 - 250;
  731.             ++k;
  732.          }
  733.          background5 = new Background5();
  734.          container1.addChild(background5);
  735.          planets = new Array();
  736.          planets.push(new Array(new Planet1(),8000000,0));
  737.          planets.push(new Array(new Planet2(),8000000,0,0));
  738.          planets.push(new Array(new Planet3(),8000000,0,0));
  739.          planets.push(new Array(new Planet4(),8000000,0,0));
  740.          planets.push(new Array(new Planet5(),8000000,0));
  741.          planets.push(new Array(new Moon(),0,138 / 2,new Vector(0,0),1));
  742.          planets.push(new Array(new Moon(),0,138 / 2,new Vector(0,0),1));
  743.          planets.push(new Array(new Moon(),0,138 / 2,new Vector(0,0),1));
  744.          planets.push(new Array(new Moon(),0,138 / 2,new Vector(0,0),1));
  745.          container1.addChild(planets[5][0]);
  746.          container1.addChild(planets[6][0]);
  747.          container1.addChild(planets[7][0]);
  748.          container1.addChild(planets[8][0]);
  749.          container1.addChild(planets[0][0]);
  750.          container1.addChild(planets[1][0]);
  751.          container1.addChild(planets[2][0]);
  752.          container1.addChild(planets[3][0]);
  753.          container1.addChild(planets[4][0]);
  754.          foregrounds = new Array();
  755.          foregrounds.push(new Foreground2());
  756.          foregrounds.push(new Foreground3());
  757.          foregrounds.push(new Foreground4());
  758.          container3.addChild(foregrounds[0]);
  759.          container3.addChild(foregrounds[1]);
  760.          container3.addChild(foregrounds[2]);
  761.          planets[0][0].x = 0;
  762.          planets[0][0].y = 1000;
  763.          planets[1][0].x = 0;
  764.          planets[1][0].y = -20000;
  765.          foregrounds[0].x = 0;
  766.          foregrounds[0].y = -20000;
  767.          planets[2][0].x = 25000;
  768.          planets[2][0].y = 3000;
  769.          foregrounds[1].x = 25000;
  770.          foregrounds[1].y = 3000;
  771.          foregrounds[1].planet.visible = false;
  772.          planets[3][0].x = 4000;
  773.          planets[3][0].y = 29000;
  774.          foregrounds[2].x = 4000;
  775.          foregrounds[2].y = 29000;
  776.          planets[4][0].x = -30000;
  777.          planets[4][0].y = -10000;
  778.          background5.x = -30000;
  779.          background5.y = -10000;
  780.          planets[5][0].x = -30000;
  781.          planets[5][0].y = -11000;
  782.          planets[6][0].x = -31000;
  783.          planets[6][0].y = -10300;
  784.          planets[7][0].x = -29100;
  785.          planets[7][0].y = -10100;
  786.          planets[8][0].x = -29800;
  787.          planets[8][0].y = -8700;
  788.          planets[5][0].gotoAndStop(1);
  789.          planets[6][0].gotoAndStop(2);
  790.          planets[7][0].gotoAndStop(3);
  791.          planets[8][0].gotoAndStop(4);
  792.          planets.push(new Array(new Island(),0,157 / 2));
  793.          container1.addChild(planets[9][0]);
  794.          planets[9][0].x = 4000;
  795.          planets[9][0].y = 28600;
  796.          planets.push(new Array(new MoonE(),80000,187 / 2));
  797.          container1.addChild(planets[10][0]);
  798.          planets[10][0].x = 200;
  799.          planets[10][0].y = -700;
  800.          planets[10][0].rotation = Vector.angle2(new Vector(0,-1),new Vector(planets[10][0].x - planets[0][0].x,planets[10][0].y - planets[0][0].y));
  801.          planets.push(new Array(new MoonG(),80000,187 / 2));
  802.          container1.addChild(planets[11][0]);
  803.          planets[11][0].x = -200;
  804.          planets[11][0].y = -18000;
  805.          planets[11][0].rotation = Vector.angle2(new Vector(0,-1),new Vector(planets[11][0].x - planets[1][0].x,planets[11][0].y - planets[1][0].y));
  806.          planets.push(new Array(new MoonH(),80000,187 / 2));
  807.          container1.addChild(planets[12][0]);
  808.          planets[12][0].x = 23000;
  809.          planets[12][0].y = 3100;
  810.          planets[12][0].rotation = Vector.angle2(new Vector(0,-1),new Vector(planets[12][0].x - planets[2][0].x,planets[12][0].y - planets[2][0].y));
  811.          planets.push(new Array(new MoonB(),80000,187 / 2));
  812.          container1.addChild(planets[13][0]);
  813.          planets[13][0].x = -28000;
  814.          planets[13][0].y = -9500;
  815.          planets[13][0].rotation = Vector.angle2(new Vector(0,-1),new Vector(planets[13][0].x - planets[4][0].x,planets[13][0].y - planets[4][0].y));
  816.          planets.push(new Array(new MoonL(),80000,45));
  817.          container1.addChild(planets[14][0]);
  818.          planets[14][0].x = -27700;
  819.          planets[14][0].y = -9500;
  820.          planets[14][0].rotation = Vector.angle2(new Vector(0,-1),new Vector(planets[14][0].x - planets[4][0].x,planets[14][0].y - planets[4][0].y));
  821.          mp = 5;
  822.          while(mp < 9)
  823.          {
  824.             Vecp = new Vector(planets[mp][0].x - planets[4][0].x,planets[mp][0].y - planets[4][0].y);
  825.             planets[mp][0].rotation = Vector.angle2(new Vector(0,-1),Vecp);
  826.             ++mp;
  827.          }
  828.          mooned = 0;
  829.          gassed = 4;
  830.          gemCounter = 0;
  831.          planets[0][2] = 774 / 2;
  832.          planets[1][2] = 445.8 / 2;
  833.          planets[1][3] = 1616.4 / 2;
  834.          planets[2][2] = 1344.7 / 2;
  835.          planets[2][3] = 330.7 / 2;
  836.          planets[3][2] = 187 / 2;
  837.          planets[3][3] = 415;
  838.          planets[4][2] = 672;
  839.          earths = new Array(648 / 2,478 / 2,305 / 2,50);
  840.          talk = new Talk();
  841.          aliem();
  842.          container1.addChild(bubblesC);
  843.          container4.addChild(talk);
  844.          talk.alpha = 0;
  845.          talk.txt.text = "";
  846.          talk.visible = false;
  847.          container1.addChild(rope);
  848.          cc = 0;
  849.          while(cc < 8)
  850.          {
  851.             clouds.push(new Array(new Gem(),2));
  852.             container1.addChild(clouds[cc][0]);
  853.             clouds[cc][0].gotoAndStop(Math.floor(Math.random() * 3) + 1);
  854.             clouds[cc][0].rotation = Math.random() * 360;
  855.             Vec = new Vector(500,0);
  856.             Vec.rotate(cc * (360 / 8));
  857.             clouds[cc][0].x = planets[2][0].x + Vec.x;
  858.             clouds[cc][0].y = planets[2][0].y + Vec.y;
  859.             ++cc;
  860.          }
  861.          gg = 0;
  862.          while(gg < 4)
  863.          {
  864.             ggg = clouds.push(new Array(new Gasteroid(),3)) - 1;
  865.             container4.addChild(clouds[ggg][0]);
  866.             Vecg = new Vector(0,1300);
  867.             Vecg.rotate(gg * (360 / 4));
  868.             clouds[ggg][0].rotation = Vector.angle2(new Vector(0,-1),Vecg);
  869.             clouds[ggg][0].x = planets[1][0].x + Vecg.x;
  870.             clouds[ggg][0].y = planets[1][0].y + Vecg.y;
  871.             ++gg;
  872.          }
  873.          gemed = false;
  874.          grounded = false;
  875.          currentPlanet = 2;
  876.          container1.addChild(bobber);
  877.          container1.addChild(effects);
  878.          bobber.x = center.x;
  879.          bobber.y = center.y;
  880.          flasher = new Flasher();
  881.          wholegame.addChild(flasher);
  882.          latching = false;
  883.          while(Math.random() < cn)
  884.          {
  885.             --cn;
  886.             n = clouds.push(new Array(new Cloud(),0)) - 1;
  887.             container2.addChild(clouds[n][0]);
  888.             clouds[n][0].x = Math.random() * range;
  889.             clouds[n][0].y = Math.random() * range;
  890.             grav = new Vector(0,0);
  891.             i = 0;
  892.             while(i < 5)
  893.             {
  894.                planet = planets[i][0];
  895.                planet1mass = planets[i][1];
  896.                planet1r = planets[i][2];
  897.                GR = new Vector(planet.x - clouds[n][0].x,planet.y - clouds[n][0].y);
  898.                str = GR.length;
  899.                GR.length = planet1mass / (str * str);
  900.                grav.x += GR.x;
  901.                grav.y += GR.y;
  902.                ++i;
  903.             }
  904.             clouds[n][0].rotation = Vector.angle2(new Vector(0,1),grav);
  905.             clouds[n][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  906.             clouds[n][0].scaleX = (Math.round(Math.random()) - 0.5) * 2;
  907.             j = 0;
  908.             while(j < planets.length)
  909.             {
  910.                planet2 = planets[j][0];
  911.                planet1mass2 = planets[j][1];
  912.                planet1r2 = planets[j][2];
  913.                if(j == 1)
  914.                {
  915.                   if((clouds[n][0].x - planet2.x) * (clouds[n][0].x - planet2.x) + (clouds[n][0].y - planet2.y) * (clouds[n][0].y - planet2.y) < (planet1r + 100) * (planet1r2 + 100))
  916.                   {
  917.                      container2.removeChild(clouds[n][0]);
  918.                      clouds.splice(n,1);
  919.                      break;
  920.                   }
  921.                }
  922.                else if(j >= 5)
  923.                {
  924.                   if((clouds[n][0].x - planet2.x) * (clouds[n][0].x - planet2.x) + (clouds[n][0].y - planet2.y) * (clouds[n][0].y - planet2.y) < (planet1r2 + 25) * (planet1r2 + 25))
  925.                   {
  926.                      container2.removeChild(clouds[n][0]);
  927.                      clouds.splice(n,1);
  928.                      break;
  929.                   }
  930.                }
  931.                else if((clouds[n][0].x - planet2.x) * (clouds[n][0].x - planet2.x) + (clouds[n][0].y - planet2.y) * (clouds[n][0].y - planet2.y) < (planet1r2 + 200) * (planet1r2 + 200))
  932.                {
  933.                   container2.removeChild(clouds[n][0]);
  934.                   clouds.splice(n,1);
  935.                   break;
  936.                }
  937.                ++j;
  938.             }
  939.          }
  940.          while(Math.random() < sn)
  941.          {
  942.             --sn;
  943.             n2 = stars.push(new Star()) - 1;
  944.             starsC.addChild(stars[n2]);
  945.             stars[n2].x = Math.random() * srange;
  946.             stars[n2].y = Math.random() * srange;
  947.             stars[n2].rotation = Math.random() * 360;
  948.             stars[n2].gotoAndStop(Math.floor(Math.random() * 9) + 1);
  949.          }
  950.          stage.addEventListener(Event.RENDER,shake);
  951.          addEventListener(Event.ENTER_FRAME,update,false,0,true);
  952.          talph = 0;
  953.          kUp = false;
  954.          kDown = false;
  955.          kLeft = false;
  956.          kRight = false;
  957.          kSpace = false;
  958.          kW = false;
  959.          kA = false;
  960.          kS = false;
  961.          kD = false;
  962.          kM = false;
  963.          stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandelerD,false,0,true);
  964.          stage.addEventListener(KeyboardEvent.KEY_UP,keyHandelerU,false,0,true);
  965.          stage.addEventListener(MouseEvent.MOUSE_DOWN,mouseHandelerD,false,0,true);
  966.          stage.addEventListener(MouseEvent.MOUSE_UP,mouseHandelerU,false,0,true);
  967.       }
  968.       
  969.       public function keyHandelerD(param1:KeyboardEvent) : *
  970.       {
  971.          var _loc2_:* = undefined;
  972.          if(!paus)
  973.          {
  974.             if(param1.keyCode == 87)
  975.             {
  976.                kW = true;
  977.             }
  978.             if(param1.keyCode == 65)
  979.             {
  980.                kA = true;
  981.             }
  982.             if(param1.keyCode == 83)
  983.             {
  984.                kS = true;
  985.             }
  986.             if(param1.keyCode == 68)
  987.             {
  988.                kD = true;
  989.             }
  990.             if(param1.keyCode == 38)
  991.             {
  992.                kUp = true;
  993.             }
  994.             if(param1.keyCode == 40)
  995.             {
  996.                kDown = true;
  997.             }
  998.             if(param1.keyCode == 37)
  999.             {
  1000.                kLeft = true;
  1001.             }
  1002.             if(param1.keyCode == 39)
  1003.             {
  1004.                kRight = true;
  1005.             }
  1006.             if(param1.keyCode == 32)
  1007.             {
  1008.                kSpace = true;
  1009.             }
  1010.          }
  1011.          if(param1.keyCode == 27 || param1.keyCode == 80)
  1012.          {
  1013.             if(paus == false)
  1014.             {
  1015.                paus = true;
  1016.                stage.frameRate = 0;
  1017.                pauzz.visible = true;
  1018.             }
  1019.             else
  1020.             {
  1021.                paus = false;
  1022.                stage.frameRate = 30;
  1023.                pauzz.visible = false;
  1024.             }
  1025.          }
  1026.          if(param1.keyCode == 81)
  1027.          {
  1028.             _loc2_ = stage.quality;
  1029.             if(_loc2_ == "LOW")
  1030.             {
  1031.                stage.quality = "HIGH";
  1032.             }
  1033.             if(_loc2_ == "MEDIUM")
  1034.             {
  1035.                stage.quality = "LOW";
  1036.             }
  1037.             if(_loc2_ == "HIGH")
  1038.             {
  1039.                stage.quality = "MEDIUM";
  1040.             }
  1041.          }
  1042.       }
  1043.       
  1044.       public function updo2() : *
  1045.       {
  1046.          framey = "inst";
  1047.          fadery.play();
  1048.       }
  1049.       
  1050.       public function ag_btnclick(param1:MouseEvent) : *
  1051.       {
  1052.          navigateToURL(new URLRequest("http://www.armorgames.com"),"_blank");
  1053.       }
  1054.       
  1055.       public function keyHandelerU(param1:KeyboardEvent) : *
  1056.       {
  1057.          if(param1.keyCode == 87)
  1058.          {
  1059.             kW = false;
  1060.          }
  1061.          if(param1.keyCode == 65)
  1062.          {
  1063.             kA = false;
  1064.          }
  1065.          if(param1.keyCode == 83)
  1066.          {
  1067.             kS = false;
  1068.          }
  1069.          if(param1.keyCode == 68)
  1070.          {
  1071.             kD = false;
  1072.          }
  1073.          if(param1.keyCode == 38)
  1074.          {
  1075.             kUp = false;
  1076.          }
  1077.          if(param1.keyCode == 40)
  1078.          {
  1079.             kDown = false;
  1080.          }
  1081.          if(param1.keyCode == 37)
  1082.          {
  1083.             kLeft = false;
  1084.          }
  1085.          if(param1.keyCode == 39)
  1086.          {
  1087.             kRight = false;
  1088.          }
  1089.          if(param1.keyCode == 32)
  1090.          {
  1091.             kSpace = false;
  1092.          }
  1093.       }
  1094.       
  1095.       function frame3() : *
  1096.       {
  1097.          if(gemSounds == undefined)
  1098.          {
  1099.             beatgame = false;
  1100.             mus1 = new T1();
  1101.             mus2 = new T2();
  1102.             mus3 = new T3();
  1103.             mus4 = new T4();
  1104.             mus5 = new T5();
  1105.             musB = new TB();
  1106.             gemSounds = new Array(new G1(),new G2(),new G3(),new G4(),new G5(),new G6(),new G7(),new G8());
  1107.             SFX = new Array(new SFX1(),new SFX2(),new SFX3(),new SFX4(),new SFX5(),new SFX6(),new SFX7());
  1108.             win1 = new Win1();
  1109.             win2 = new Win2();
  1110.             win3 = new Win3();
  1111.             win4 = new Win4();
  1112.             channel1 = new SoundChannel();
  1113.             channel2 = new SoundChannel();
  1114.             channel3 = new SoundChannel();
  1115.             channel4 = new SoundChannel();
  1116.             channel5 = new SoundChannel();
  1117.             channelW = new SoundChannel();
  1118.             channelB = new SoundChannel();
  1119.             sfx = new SoundChannel();
  1120.             transform1 = new SoundTransform(0,0);
  1121.             transform2 = new SoundTransform(0,0);
  1122.             transform3 = new SoundTransform(0,0);
  1123.             transform4 = new SoundTransform(0,0);
  1124.             transform5 = new SoundTransform(0,0);
  1125.             transformW = new SoundTransform(1.5,0);
  1126.             transformB = new SoundTransform(1,0);
  1127.             transformSFX = new SoundTransform(1,0);
  1128.             channel2 = mus2.play(0,65535);
  1129.             channel5 = mus5.play(channel2.position,65535);
  1130.             channel1 = mus1.play(channel2.position,65535);
  1131.             channelB = musB.play(channel2.position,65535);
  1132.             channel3 = mus4.play(channel2.position,65535);
  1133.             channel4 = mus3.play(channel2.position,65535);
  1134.             channel1.soundTransform = transform1;
  1135.             channel2.soundTransform = transform2;
  1136.             channel3.soundTransform = transform3;
  1137.             channel4.soundTransform = transform4;
  1138.             channel5.soundTransform = transform5;
  1139.             channelB.soundTransform = transformB;
  1140.             channelW.soundTransform = transformW;
  1141.             sfx.soundTransform = transformSFX;
  1142.          }
  1143.       }
  1144.       
  1145.       function frame8() : *
  1146.       {
  1147.          stop();
  1148.          beatgame = true;
  1149.          removeEventListener(Event.ENTER_FRAME,update);
  1150.          removeEventListener(KeyboardEvent.KEY_DOWN,keyHandelerD);
  1151.          removeEventListener(KeyboardEvent.KEY_UP,keyHandelerU);
  1152.          removeEventListener(MouseEvent.MOUSE_DOWN,mouseHandelerD);
  1153.          removeEventListener(MouseEvent.MOUSE_UP,mouseHandelerU);
  1154.          btn1.addEventListener(MouseEvent.CLICK,goBTN,false,0,true);
  1155.       }
  1156.       
  1157.       public function update(param1:Event) : *
  1158.       {
  1159.          var i:int = 0;
  1160.          var vSPEED:Number = NaN;
  1161.          var force:Vector = null;
  1162.          var rad2:Vector = null;
  1163.          var pFl:* = undefined;
  1164.          var netForce:Vector = null;
  1165.          var busty:Boolean = false;
  1166.          var numcg:Boolean = false;
  1167.          var bbbbbbb:Boolean = false;
  1168.          var strn:* = undefined;
  1169.          var winned:int = 0;
  1170.          var planet:MovieClip = null;
  1171.          var planet1mass:* = undefined;
  1172.          var planet1r:* = undefined;
  1173.          var GR:Vector = null;
  1174.          var str:Number = NaN;
  1175.          var aaaaaa:Vector = null;
  1176.          var nnn:* = undefined;
  1177.          var rVAL:Vector = null;
  1178.          var bobbery:Vector = null;
  1179.          var n:Vector = null;
  1180.          var C:Number = NaN;
  1181.          var Y:Number = NaN;
  1182.          var X:Number = NaN;
  1183.          var xp1:Vector = null;
  1184.          var xp2:Vector = null;
  1185.          var rad:Vector = null;
  1186.          var j:int = 0;
  1187.          var pp:int = 0;
  1188.          var ang:Vector = null;
  1189.          var disss:Vector = null;
  1190.          var dissst:Vector = null;
  1191.          var disst:Vector = null;
  1192.          var nnnn:Vector = null;
  1193.          var aaan:Vector = null;
  1194.          var shortestC:int = 0;
  1195.          var distC:Number = NaN;
  1196.          var ass:Boolean = false;
  1197.          var grav:Vector = null;
  1198.          var planet2:MovieClip = null;
  1199.          var planet1mass2:* = undefined;
  1200.          var planet1r2:* = undefined;
  1201.          var CFF:int = 0;
  1202.          var rrr:Vector = null;
  1203.          var rr:Vector = null;
  1204.          var targSiz:Number = NaN;
  1205.          var e:Event = param1;
  1206.          try
  1207.          {
  1208.             if(ended)
  1209.             {
  1210.                lockControls();
  1211.             }
  1212.             i = 0;
  1213.             while(i < clouds.length)
  1214.             {
  1215.                if(clouds[i] == null || clouds[i] == undefined || clouds[i][0] == null || clouds[i][0] == undefined || clouds[i][1] == null || clouds[i][1] == undefined || isNaN(clouds[i][1]))
  1216.                {
  1217.                   clouds.splice(i,1);
  1218.                   i--;
  1219.                }
  1220.                i++;
  1221.             }
  1222.             vSPEED = 0;
  1223.             foregrounds[0].alpha = gassed / 4;
  1224.             if(!inside && planets[2][0].planet.currentFrame == 1)
  1225.             {
  1226.                foregrounds[1].planet.visible = false;
  1227.                planets[2][0].planet.visible = true;
  1228.             }
  1229.             if(inside && planets[2][0].planet.currentFrame == 1)
  1230.             {
  1231.                planets[2][0].planet.play();
  1232.                foregrounds[1].planet.play();
  1233.                foregrounds[1].planet.visible = true;
  1234.                planets[2][0].planet.visible = false;
  1235.             }
  1236.             if(!inside && planets[2][0].planet.currentFrame != 1)
  1237.             {
  1238.                planets[2][0].planet.play();
  1239.                foregrounds[1].planet.play();
  1240.             }
  1241.             if(planets[0][0].currentFrame == 6)
  1242.             {
  1243.                if(currentPlanet == 10 || grounded)
  1244.                {
  1245.                   timeE = timeE - 1;
  1246.                   if(timeE <= 0)
  1247.                   {
  1248.                      framey = "ending";
  1249.                      fadery.play();
  1250.                   }
  1251.                }
  1252.             }
  1253.             Gravity = new Vector(0,0);
  1254.             i = 0;
  1255.             while(i < planets.length)
  1256.             {
  1257.                planet = planets[i][0];
  1258.                planet1mass = planets[i][1];
  1259.                planet1r = planets[i][2];
  1260.                GR = new Vector(planet.x - bobber.x,planet.y - bobber.y);
  1261.                str = GR.length;
  1262.                GR.length = planet1mass / (str * str);
  1263.                Gravity.x += GR.x;
  1264.                Gravity.y += GR.y;
  1265.                i++;
  1266.             }
  1267.             if(Gravity.length > 2)
  1268.             {
  1269.                Gravity.length = 2;
  1270.             }
  1271.             if(Gravity.length < 0.2 && planets[0][0].currentFrame != 6)
  1272.             {
  1273.                names.gotoAndStop(6);
  1274.             }
  1275.             force = new Vector((Number(kD) - Number(kA)) * strength,(Number(kS) - Number(kW)) * strength);
  1276.             if(grounded && kW && controls == 2)
  1277.             {
  1278.                bobber.gotoAndStop(6);
  1279.                force.y *= 25;
  1280.                controls = 1;
  1281.             }
  1282.             if(grounded && currentPlanet >= 5)
  1283.             {
  1284.                aaaaaa = new Vector(bobber.x - planets[currentPlanet][0].x,bobber.y - planets[currentPlanet][0].y);
  1285.                force.rotate(Vector.angle2(new Vector(0,-1),aaaaaa));
  1286.             }
  1287.             else
  1288.             {
  1289.                force.rotate(Vector.angle2(new Vector(0,1),Gravity));
  1290.             }
  1291.             if(force.length > 0 && !anchored && !latching && bobber.currentFrame == 1 && controls == 1)
  1292.             {
  1293.                bobber.ani.play();
  1294.                rspeed = Vector.angle2(new Vector(0,-1).rotateNew(bobber.rotation),force) / 5;
  1295.             }
  1296.             if(bobber.currentFrame == 7 && bobber.ani.currentFrame == 8)
  1297.             {
  1298.                bobber.gotoAndStop(1);
  1299.             }
  1300.             friction = 1 - Gravity.length / 100;
  1301.             if(anchored)
  1302.             {
  1303.                friction = 1;
  1304.             }
  1305.             if(planets[0][0].currentFrame == 5)
  1306.             {
  1307.                aaaaaa = new Vector(bobber.x - planets[0][0].x,bobber.y - planets[0][0].y);
  1308.                if(aaaaaa.length < 700)
  1309.                {
  1310.                   namesT = 200;
  1311.                   names.gotoAndStop(1);
  1312.                   friction = 0.95;
  1313.                   force.x = 0;
  1314.                   force.y = 0;
  1315.                   lockControls();
  1316.                   if(speed.length > 10)
  1317.                   {
  1318.                      speed.length -= (speed.length - 10) / 10;
  1319.                   }
  1320.                }
  1321.             }
  1322.             rad2 = new Vector(planets[1][0].x - bobber.x,planets[1][0].y - bobber.y);
  1323.             if(rad2.length < planets[1][3])
  1324.             {
  1325.                if(names.currentFrame != 2)
  1326.                {
  1327.                   namesT = 200;
  1328.                   names.gotoAndStop(2);
  1329.                }
  1330.                friction -= gassed * 0.05;
  1331.                if(anchored)
  1332.                {
  1333.                   friction = 1 - gassed * 0.007;
  1334.                }
  1335.                else if(!grounded)
  1336.                {
  1337.                   force.scale(10);
  1338.                }
  1339.             }
  1340.             rad2 = new Vector(planets[3][0].x - bobber.x,planets[3][0].y - bobber.y);
  1341.             pFl = floating;
  1342.             floating = false;
  1343.             if(rad2.length < planets[3][3])
  1344.             {
  1345.                Gravity.scale(-1);
  1346.                floating = true;
  1347.                if(names.currentFrame != 4)
  1348.                {
  1349.                   namesT = 200;
  1350.                   names.gotoAndStop(4);
  1351.                }
  1352.                if(anchored)
  1353.                {
  1354.                   friction = 0.99;
  1355.                }
  1356.                else
  1357.                {
  1358.                   friction = 0.94;
  1359.                }
  1360.             }
  1361.             if(floating == !pFl && speed.length > 25)
  1362.             {
  1363.                sfx = SFX[4].play();
  1364.                transformSFX.volume = 3;
  1365.                nnn = splashes.push(new Splash()) - 1;
  1366.                effects.addChild(splashes[nnn]);
  1367.                GR = new Vector(planets[3][0].x - (bobber.x + speed.x),planets[3][0].y - (bobber.y + speed.y));
  1368.                GR.length = planets[3][3];
  1369.                splashes[nnn].x = planets[3][0].x - GR.x;
  1370.                splashes[nnn].y = planets[3][0].y - GR.y;
  1371.                splashes[nnn].rotation = Vector.angle2(new Vector(0,1),GR);
  1372.             }
  1373.             if(rad2.length < planets[3][3] - 30)
  1374.             {
  1375.                if(foregrounds[2].alpha > 0.2)
  1376.                {
  1377.                   foregrounds[2].alpha -= 0.02;
  1378.                }
  1379.             }
  1380.             else if(foregrounds[2].alpha < 1)
  1381.             {
  1382.                foregrounds[2].alpha += 0.1;
  1383.             }
  1384.             if(!anchored && !grounded)
  1385.             {
  1386.                if(!floating)
  1387.                {
  1388.                   force.scale(0.1);
  1389.                }
  1390.                else
  1391.                {
  1392.                   force.scale(3);
  1393.                }
  1394.             }
  1395.             if(anchored)
  1396.             {
  1397.                force.scale(1.5);
  1398.             }
  1399.             netForce = new Vector(0,0);
  1400.             netForce = Vector.add(Gravity,netForce);
  1401.             netForce = Vector.add(force,netForce);
  1402.             speed.x += netForce.x;
  1403.             speed.y += netForce.y;
  1404.             speed.scale(friction);
  1405.             busty = false;
  1406.             if(anchored)
  1407.             {
  1408.                center.x = currentCloud.x;
  1409.                center.y = currentCloud.y;
  1410.                controls = 1;
  1411.                grounded = false;
  1412.                rVAL = new Vector(pos.x,pos.y);
  1413.                pos.x += speed.x * speedFactor;
  1414.                pos.y += speed.y * speedFactor;
  1415.                if(pos.length > len)
  1416.                {
  1417.                   n = new Vector(pos.length - len,0);
  1418.                   n.rotate(Vector.angle2(new Vector(1,0),pos));
  1419.                   speed.x += n.x / -elastic;
  1420.                   speed.y += n.y / -elastic;
  1421.                   pos.length -= n.length / elastic;
  1422.                }
  1423.                rope.graphics.clear();
  1424.                if(pos.length < len)
  1425.                {
  1426.                   C = len / 2;
  1427.                   Y = pos.length / 2;
  1428.                   X = Math.sqrt(C * C - Y * Y);
  1429.                   xp1 = new Vector(pos.x,pos.y);
  1430.                   xp1 = xp1.perpendicular(-1);
  1431.                   xp2 = new Vector(pos.x,pos.y);
  1432.                   xp2 = xp2.perpendicular(1);
  1433.                   xp1.length = X;
  1434.                   xp2.length = X;
  1435.                   xp1.x += pos.x / 2;
  1436.                   xp1.y += pos.y / 2;
  1437.                   xp2.x += pos.x / 2;
  1438.                   xp2.y += pos.y / 2;
  1439.                   if((xp1.x - pos2.x) * (xp1.x - pos2.x) + (xp1.y - pos2.y) * (xp1.y - pos2.y) < (xp2.x - pos2.x) * (xp2.x - pos2.x) + (xp2.y - pos2.y) * (xp2.y - pos2.y))
  1440.                   {
  1441.                      pos2.x = xp1.x;
  1442.                      pos2.y = xp1.y;
  1443.                   }
  1444.                   else
  1445.                   {
  1446.                      pos2.x = xp2.x;
  1447.                      pos2.y = xp2.y;
  1448.                   }
  1449.                }
  1450.                else
  1451.                {
  1452.                   pos2.x = pos.x / 2;
  1453.                   pos2.y = pos.y / 2;
  1454.                }
  1455.                if(!floating)
  1456.                {
  1457.                   rspeed += Vector.angle2(new Vector(0,1).rotateNew(bobber.rotation),Vector.add(Vector.subtract(pos,pos2),Gravity)) / 30;
  1458.                }
  1459.                else
  1460.                {
  1461.                   rspeed += Vector.angle2(new Vector(0,1).rotateNew(bobber.rotation),Vector.add(Gravity,Vector.subtract(pos,pos2))) / 30;
  1462.                }
  1463.                vSPEED = Vector.angle2(rVAL,pos);
  1464.                rspeed *= 0.95;
  1465.                bobbery = new Vector(0,-charH).rotateNew(bobber.rotation + rspeed * speedFactor);
  1466.                bobber.x = pos.x + center.x + bobbery.x;
  1467.                bobber.y = pos.y + center.y + bobbery.y;
  1468.                i = 0;
  1469.                while(i < planets.length)
  1470.                {
  1471.                   if(!(i == 0 && planets[0][0].currentFrame == 6))
  1472.                   {
  1473.                      if(!(i >= 5 && i <= 8 && planets[i][4] == 0))
  1474.                      {
  1475.                         planet = planets[i][0];
  1476.                         planet1mass = planets[i][1];
  1477.                         planet1r = planets[i][2];
  1478.                         rad = new Vector(planet.x - bobber.x,planet.y - bobber.y);
  1479.                         if(inside && i == 2)
  1480.                         {
  1481.                            if(rad.length > planet1r + 30)
  1482.                            {
  1483.                               inside = false;
  1484.                               j = 0;
  1485.                               while(j < 10)
  1486.                               {
  1487.                                  pp = particles.push(new Array(new Particle2(),new Vector(0,Math.random() * 3 + 10),new Vector(Gravity.x / 3,Gravity.y / 3),0.99,Math.random() * 100 - 50,20)) - 1;
  1488.                                  particles[pp][1].rotate(Vector.angle2(new Vector(0,-1),Gravity) + Math.random() * 30 - 15);
  1489.                                  particles[pp][0].x = planets[2][0].x - rad.x / rad.length * planets[2][2];
  1490.                                  particles[pp][0].y = planets[2][0].y - rad.y / rad.length * planets[2][2];
  1491.                                  particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  1492.                                  particles[pp][0].rotation = Math.random() * 360;
  1493.                                  effects.addChild(particles[pp][0]);
  1494.                                  j++;
  1495.                               }
  1496.                               nnn = splashes.push(new Poof()) - 1;
  1497.                               effects.addChild(splashes[nnn]);
  1498.                               splashes[nnn].x = planets[currentPlanet][0].x - rad.x / rad.length * planets[2][2];
  1499.                               splashes[nnn].y = planets[currentPlanet][0].y - rad.y / rad.length * planets[2][2];
  1500.                               splashes[nnn].rotation = Vector.angle2(new Vector(0,1),rad);
  1501.                            }
  1502.                            else
  1503.                            {
  1504.                               planet1r = planets[i][3];
  1505.                            }
  1506.                         }
  1507.                         if(rad.length < planet1r + charH)
  1508.                         {
  1509.                            busty = true;
  1510.                            rad.length = planet1r + charH;
  1511.                            bobber.x = planet.x - rad.x;
  1512.                            bobber.y = planet.y - rad.y;
  1513.                            rad.length = Vector.dot(rad,speed) / rad.length;
  1514.                            speed.x -= rad.x * 1.4;
  1515.                            speed.y -= rad.y * 1.4;
  1516.                            if(i >= 5)
  1517.                            {
  1518.                               speed.rotate(Vector.angle2(new Vector(0,1),rad));
  1519.                               speed.y = 0;
  1520.                               speed.rotate(-Vector.angle2(new Vector(0,1),rad));
  1521.                            }
  1522.                         }
  1523.                      }
  1524.                   }
  1525.                   i++;
  1526.                }
  1527.                rope.graphics.lineStyle(4,14277081);
  1528.                rope.graphics.moveTo(center.x,center.y);
  1529.                rope.graphics.curveTo(pos2.x + center.x,pos2.y + center.y,bobber.x + bobbery.x,bobber.y + bobbery.y);
  1530.                rope.graphics.lineStyle(1,16777215);
  1531.                rope.graphics.moveTo(center.x,center.y);
  1532.                rope.graphics.curveTo(pos2.x + center.x,pos2.y + center.y,bobber.x + bobbery.x,bobber.y + bobbery.y);
  1533.             }
  1534.             else
  1535.             {
  1536.                rspeed *= 0.99;
  1537.                rope.graphics.clear();
  1538.                ang = new Vector(bobber.x - planets[currentPlanet][0].x,bobber.y - planets[currentPlanet][0].y);
  1539.                if(currentPlanet == 2 && !inside && planets[2][0].box.hitTestObject(bobber.box) && ang.length < planets[currentPlanet][2] + charH + 5)
  1540.                {
  1541.                   inside = true;
  1542.                   if(controls == 2)
  1543.                   {
  1544.                      speed = new Vector(speedP * planets[2][2] * (Math.PI / 180),0);
  1545.                      speed.rotate(Vector.angle2(new Vector(0,-1),ang));
  1546.                   }
  1547.                   controls = 1;
  1548.                   grounded = false;
  1549.                }
  1550.                if(controls == 1)
  1551.                {
  1552.                   bobber.x += speed.x * speedFactor;
  1553.                   bobber.y += speed.y * speedFactor;
  1554.                }
  1555.                else if(controls == 2)
  1556.                {
  1557.                   if(kD)
  1558.                   {
  1559.                      speedP += 0.2;
  1560.                      if(inside)
  1561.                      {
  1562.                         speedP += 0.4;
  1563.                      }
  1564.                      if(currentPlanet == 0)
  1565.                      {
  1566.                         speedP += 0.16;
  1567.                      }
  1568.                      if(currentPlanet == 1)
  1569.                      {
  1570.                         speedP += 0.2 - gassed * 0.05;
  1571.                      }
  1572.                      if(currentPlanet >= 5)
  1573.                      {
  1574.                         speedP += 1;
  1575.                      }
  1576.                      if(currentPlanet == 0)
  1577.                      {
  1578.                         speedP += (planets[0][0].currentFrame - 1) / 10;
  1579.                      }
  1580.                   }
  1581.                   if(kA)
  1582.                   {
  1583.                      speedP -= 0.2;
  1584.                      if(inside)
  1585.                      {
  1586.                         speedP -= 0.4;
  1587.                      }
  1588.                      if(currentPlanet == 1)
  1589.                      {
  1590.                         speedP -= 0.2 - gassed * 0.05;
  1591.                      }
  1592.                      if(currentPlanet == 0)
  1593.                      {
  1594.                         speedP -= 0.16;
  1595.                      }
  1596.                      if(currentPlanet >= 5)
  1597.                      {
  1598.                         speedP = speedP - 1;
  1599.                      }
  1600.                      if(currentPlanet == 0)
  1601.                      {
  1602.                         speedP -= (planets[0][0].currentFrame - 1) / 10;
  1603.                      }
  1604.                   }
  1605.                   speedP *= 0.92;
  1606.                   ang.rotate(speedP * speedFactor);
  1607.                   speed = new Vector(speedP * ang.length * (Math.PI / 180),0);
  1608.                   speed.rotate(Vector.angle2(new Vector(0,-1),ang));
  1609.                   ang.length = planets[currentPlanet][2];
  1610.                   if(inside)
  1611.                   {
  1612.                      ang.length = planets[currentPlanet][3];
  1613.                   }
  1614.                   if(!floating)
  1615.                   {
  1616.                      bobber.x = ang.x + planets[currentPlanet][0].x;
  1617.                      bobber.y = ang.y + planets[currentPlanet][0].y;
  1618.                   }
  1619.                }
  1620.                grounded = false;
  1621.                i = planets.length - 1;
  1622.                while(i >= 0)
  1623.                {
  1624.                   if(!(i == 0 && planets[0][0].currentFrame == 6))
  1625.                   {
  1626.                      if(!(i >= 5 && i <= 8 && planets[i][4] == 0))
  1627.                      {
  1628.                         planet = planets[i][0];
  1629.                         planet1mass = planets[i][1];
  1630.                         planet1r = planets[i][2];
  1631.                         rad = new Vector(planet.x - bobber.x,planet.y - bobber.y);
  1632.                         if(rad.length < planet1r + charH + 50 && !floating && i <= 4 || bobber.currentFrame == 6 && rad.length < planet1r + 180 && !floating && i <= 4 || rad.length < planet1r + charH && !floating && i > 4)
  1633.                         {
  1634.                            bobber.rotation += Vector.angle2(new Vector(0,1).rotateNew(bobber.rotation),rad) / 4;
  1635.                         }
  1636.                         if(inside && i == 2)
  1637.                         {
  1638.                            if(rad.length > planet1r + charH + 6)
  1639.                            {
  1640.                               inside = false;
  1641.                               j = 0;
  1642.                               while(j < 10)
  1643.                               {
  1644.                                  pp = particles.push(new Array(new Particle2(),new Vector(0,Math.random() * 3 + 10),new Vector(Gravity.x / 3,Gravity.y / 3),0.99,Math.random() * 100 - 50,20)) - 1;
  1645.                                  particles[pp][1].rotate(Vector.angle2(new Vector(0,-1),Gravity) + Math.random() * 30 - 15);
  1646.                                  particles[pp][0].x = planets[2][0].x - rad.x / rad.length * planets[2][2];
  1647.                                  particles[pp][0].y = planets[2][0].y - rad.y / rad.length * planets[2][2];
  1648.                                  particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  1649.                                  particles[pp][0].rotation = Math.random() * 360;
  1650.                                  effects.addChild(particles[pp][0]);
  1651.                                  j++;
  1652.                               }
  1653.                               nnn = splashes.push(new Poof()) - 1;
  1654.                               effects.addChild(splashes[nnn]);
  1655.                               splashes[nnn].x = planets[currentPlanet][0].x - rad.x / rad.length * planets[2][2];
  1656.                               splashes[nnn].y = planets[currentPlanet][0].y - rad.y / rad.length * planets[2][2];
  1657.                               splashes[nnn].rotation = Vector.angle2(new Vector(0,1),rad);
  1658.                            }
  1659.                            else
  1660.                            {
  1661.                               planet1r = planets[i][3];
  1662.                            }
  1663.                         }
  1664.                         if(rad.length < planet1r + charH)
  1665.                         {
  1666.                            if(i == 0 && planets[0][0].currentFrame == 5)
  1667.                            {
  1668.                               planets[0][0].gotoAndStop(6);
  1669.                               ended = true;
  1670.                               sfx = SFX[5].play();
  1671.                               transformSFX.volume = 3;
  1672.                               speed.scale(0.5);
  1673.                               if(speed.length > 5)
  1674.                               {
  1675.                                  speed.length = 5;
  1676.                               }
  1677.                               planets[0][1] = 0;
  1678.                               j = 0;
  1679.                               while(j < 40)
  1680.                               {
  1681.                                  pp = particles.push(new Array(new Particle1(),new Vector(Math.random() * 10 + 5,0),new Vector(0,0),0.95,Math.random() * 100 - 50,40)) - 1;
  1682.                                  particles[pp][1].rotate(Math.random() * 360);
  1683.                                  particles[pp][0].x = planets[0][0].x;
  1684.                                  particles[pp][0].y = planets[0][0].y;
  1685.                                  particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  1686.                                  particles[pp][0].rotation = Math.random() * 360;
  1687.                                  effects.addChild(particles[pp][0]);
  1688.                                  j++;
  1689.                               }
  1690.                            }
  1691.                            else
  1692.                            {
  1693.                               rad.length = planet1r + charH;
  1694.                               bobber.x = planet.x - rad.x;
  1695.                               bobber.y = planet.y - rad.y;
  1696.                               rad.length = Vector.dot(rad,speed) / rad.length;
  1697.                               speed.x -= rad.x * 1.2;
  1698.                               speed.y -= rad.y * 1.2;
  1699.                               rspeed = 0;
  1700.                               grounded = true;
  1701.                               if(Math.abs(Vector.dot(speed,rad) / rad.length) < 25 && !floating)
  1702.                               {
  1703.                                  if(controls == 1)
  1704.                                  {
  1705.                                     speedP = Vector.dot(speed.perpendicular(),rad) / (rad.length * planet1r) * (180 / Math.PI);
  1706.                                     speed = new Vector(speedP * planet1r * (Math.PI / 180),0);
  1707.                                     speed.rotate(Vector.angle2(new Vector(0,1),rad));
  1708.                                  }
  1709.                                  controls = 2;
  1710.                                  if(currentPlanet != i)
  1711.                                  {
  1712.                                     currentPlanet = i;
  1713.                                  }
  1714.                                  if(i <= 4 && names.currentFrame != i + 1)
  1715.                                  {
  1716.                                     namesT = 200;
  1717.                                     names.gotoAndStop(i + 1);
  1718.                                  }
  1719.                               }
  1720.                            }
  1721.                         }
  1722.                      }
  1723.                   }
  1724.                   i--;
  1725.                }
  1726.             }
  1727.             if(bobber.currentFrame != 1 && bobber.currentFrame != 2 && bobber.currentFrame != 7 && (floating || Gravity.length < 1))
  1728.             {
  1729.                bobber.gotoAndStop(1);
  1730.             }
  1731.             if(currentPlanet == 9 && floating && controls == 2)
  1732.             {
  1733.                controls = 1;
  1734.                grounded = false;
  1735.             }
  1736.             if(mooned != 4)
  1737.             {
  1738.                i = 0;
  1739.                while(i < 4)
  1740.                {
  1741.                   disss = new Vector(planets[4][0].x - planets[5 + i][0].x,planets[4][0].y - planets[5 + i][0].y);
  1742.                   if(disss.length < planets[4][2] + planets[5 + i][2] + 100)
  1743.                   {
  1744.                      planets[5 + i][4] = 0;
  1745.                      if(controls == 2 && currentPlanet == 5 + i)
  1746.                      {
  1747.                         controls = 1;
  1748.                         grounded = false;
  1749.                      }
  1750.                   }
  1751.                   if(disss.length < planets[4][2] + planets[5 + i][2] && planets[5 + i][0].visible)
  1752.                   {
  1753.                      j = 0;
  1754.                      while(j < 3)
  1755.                      {
  1756.                         pp = particles.push(new Array(new Particle2(),new Vector(0,Math.random() * 3 + 10),new Vector(Gravity.x / 3,Gravity.y / 3),0.99,Math.random() * 100 - 50,20)) - 1;
  1757.                         particles[pp][1].rotate(Vector.angle2(new Vector(0,-1),Gravity) + Math.random() * 60 - 30);
  1758.                         disst = new Vector(disss.x,disss.y);
  1759.                         disst.norm();
  1760.                         disst.rotate(Math.random() * 6 - 3);
  1761.                         particles[pp][0].x = planets[4][0].x - disst.x * planets[4][2];
  1762.                         particles[pp][0].y = planets[4][0].y - disst.y * planets[4][2];
  1763.                         particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  1764.                         particles[pp][0].rotation = Math.random() * 360;
  1765.                         effects.addChild(particles[pp][0]);
  1766.                         j++;
  1767.                      }
  1768.                      nnn = splashes.push(new Smoke()) - 1;
  1769.                      effects.addChild(splashes[nnn]);
  1770.                      dissst = new Vector(disss.x,disss.y);
  1771.                      dissst.norm();
  1772.                      dissst.rotate(Math.random() * 6 - 3);
  1773.                      splashes[nnn].x = planets[4][0].x - dissst.x * planets[4][2] + Math.random() * 40 - 20;
  1774.                      splashes[nnn].y = planets[4][0].y - dissst.y * planets[4][2] + Math.random() * 40 - 20;
  1775.                      splashes[nnn].rotation = Math.random() * 360;
  1776.                      if(planets[4][0].currentFrame == 1)
  1777.                      {
  1778.                         planets[4][0].gotoAndStop(2);
  1779.                         sfx = SFX[6].play();
  1780.                         transformSFX.volume = 1.5;
  1781.                      }
  1782.                   }
  1783.                   if(disss.length < planets[4][2] - planets[5 + i][2] - 50)
  1784.                   {
  1785.                      planets[5 + i][3].scale(0);
  1786.                      if(planets[4][0].currentFrame == 2 && planets[5 + i][0].visible)
  1787.                      {
  1788.                         planets[4][0].gotoAndStop(1);
  1789.                         mooned += 1;
  1790.                         sfx.stop();
  1791.                         sfx = SFX[2].play();
  1792.                         transformSFX.volume = 2;
  1793.                      }
  1794.                      planets[5 + i][0].visible = false;
  1795.                   }
  1796.                   if(currentPlanet == 5 + i && controls == 2 && grounded)
  1797.                   {
  1798.                      if(planets[5 + i][0].ani.currentFrame == 1 && talph == 0)
  1799.                      {
  1800.                         planets[5 + i][0].ani.gotoAndStop(2);
  1801.                         talph = 1;
  1802.                      }
  1803.                      if(talph == 1)
  1804.                      {
  1805.                         talk.visible = true;
  1806.                         if(i == 0)
  1807.                         {
  1808.                            talk.txt.text = "\nI\'ll never go back home.";
  1809.                         }
  1810.                         if(i == 1)
  1811.                         {
  1812.                            talk.txt.text = "\nI\'ll go home when he leaves!";
  1813.                         }
  1814.                         if(i == 2)
  1815.                         {
  1816.                            talk.txt.text = "\nPersonally, I think hes pretty cool";
  1817.                         }
  1818.                         if(i == 3)
  1819.                         {
  1820.                            talk.txt.text = "\nI hate him so much...";
  1821.                         }
  1822.                         talk.bubb.scaleX = -1;
  1823.                         nnnn = new Vector(talk.bubb.scaleX * -130 * talk.scaleX,-100 * talk.scaleY);
  1824.                         nnnn.rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(planets[5 + i][0].rotation)));
  1825.                         talk.x = planets[5 + i][0].x + nnnn.x;
  1826.                         talk.y = planets[5 + i][0].y + nnnn.y;
  1827.                         talk.rotation = planets[5 + i][0].rotation;
  1828.                      }
  1829.                   }
  1830.                   else if(planets[5 + i][0].ani.currentFrame == 2)
  1831.                   {
  1832.                      planets[5 + i][0].ani.gotoAndStop(1);
  1833.                      talph = 0;
  1834.                   }
  1835.                   if(currentPlanet == 5 + i && controls == 2 && grounded)
  1836.                   {
  1837.                      aaan = new Vector(planets[5 + i][0].x - bobber.x,planets[5 + i][0].y - bobber.y);
  1838.                      if(Vector.angle(aaan,Gravity) < 30)
  1839.                      {
  1840.                         aaan.norm();
  1841.                         planets[5 + i][3].x += aaan.x / 7;
  1842.                         planets[5 + i][3].y += aaan.y / 7;
  1843.                      }
  1844.                   }
  1845.                   if(planets[5 + i][4] != 0)
  1846.                   {
  1847.                      planets[5 + i][3].scale(0.95);
  1848.                   }
  1849.                   else if(planets[5 + i][3].length < 1)
  1850.                   {
  1851.                      planets[5 + i][3].length = 1;
  1852.                   }
  1853.                   planets[5 + i][0].x += planets[5 + i][3].x;
  1854.                   planets[5 + i][0].y += planets[5 + i][3].y;
  1855.                   i++;
  1856.                }
  1857.             }
  1858.             if(mooned == 4 && planets[4][0].currentFrame == 1)
  1859.             {
  1860.                planets[4][0].gotoAndStop(3);
  1861.             }
  1862.             bobber.rotation += rspeed * speedFactor;
  1863.             if(latching && !anchored)
  1864.             {
  1865.                latching = false;
  1866.                anchored = true;
  1867.                bobbery = new Vector(0,-charH).rotateNew(bobber.rotation);
  1868.                center.x = currentCloud.x;
  1869.                center.y = currentCloud.y;
  1870.                pos.x = bobber.x - bobbery.x - center.x;
  1871.                pos.y = bobber.y - bobbery.y - center.y;
  1872.                len = pos.length;
  1873.                if(len < 100 + Gravity.length * 20)
  1874.                {
  1875.                   len = 100 + Gravity.length * 20;
  1876.                }
  1877.                if(len > 600)
  1878.                {
  1879.                   len = 600;
  1880.                }
  1881.                rope.graphics.lineStyle(4,14277081);
  1882.                rope.graphics.moveTo(bobber.x + bobbery.x,bobber.y + bobbery.y);
  1883.                rope.graphics.lineTo(bobber.x + bobbery.x - 2 * (bobber.x + bobbery.x - center.x) / 3,bobber.y + bobbery.y - 2 * (bobber.y + bobbery.y - center.y) / 3);
  1884.                rope.graphics.lineStyle(1,16777215);
  1885.                rope.graphics.moveTo(bobber.x + bobbery.x,bobber.y + bobbery.y);
  1886.                rope.graphics.lineTo(bobber.x + bobbery.x - 2 * (bobber.x + bobbery.x - center.x) / 3,bobber.y + bobbery.y - 2 * (bobber.y + bobbery.y - center.y) / 3);
  1887.             }
  1888.             if(kM && !anchored && !latching && bobber.currentFrame != 2)
  1889.             {
  1890.                shortestC = -1;
  1891.                distC = 150 * 150;
  1892.                i = 0;
  1893.                while(i < clouds.length)
  1894.                {
  1895.                   if((clouds[i][1] == 0 || clouds[i][1] == 3) && !inside || clouds[i][1] == 2 && inside)
  1896.                   {
  1897.                      if((clouds[i][0].x - mc.mouseX) * (clouds[i][0].x - mc.mouseX) + (clouds[i][0].y - mc.mouseY) * (clouds[i][0].y - mc.mouseY) < distC)
  1898.                      {
  1899.                         if((clouds[i][0].x - bobber.x) * (clouds[i][0].x - bobber.x) + (clouds[i][0].y - bobber.y) * (clouds[i][0].y - bobber.y) < 600 * 600)
  1900.                         {
  1901.                            distC = (clouds[i][0].x - mc.mouseX) * (clouds[i][0].x - mc.mouseX) + (clouds[i][0].y - mc.mouseY) * (clouds[i][0].y - mc.mouseY);
  1902.                            shortestC = i;
  1903.                         }
  1904.                      }
  1905.                   }
  1906.                   i++;
  1907.                }
  1908.                if(shortestC != -1)
  1909.                {
  1910.                   center.x = clouds[shortestC][0].x;
  1911.                   center.y = clouds[shortestC][0].y;
  1912.                   currentCloud = clouds[shortestC][0];
  1913.                   bobber.gotoAndStop(2);
  1914.                }
  1915.             }
  1916.             if(bobber.currentFrame == 2 && bobber.ani != undefined && bobber.ani.currentFrame == 3 && !latching)
  1917.             {
  1918.                latching = true;
  1919.                bobbery = new Vector(0,-charH).rotateNew(bobber.rotation);
  1920.                rope.graphics.lineStyle(4,14277081);
  1921.                rope.graphics.moveTo(bobber.x + bobbery.x,bobber.y + bobbery.y);
  1922.                rope.graphics.lineTo(bobber.x + bobbery.x - (bobber.x + bobbery.x - center.x) / 3,bobber.y + bobbery.y - (bobber.y + bobbery.y - center.y) / 3);
  1923.                rope.graphics.lineStyle(1,16777215);
  1924.                rope.graphics.moveTo(bobber.x + bobbery.x,bobber.y + bobbery.y);
  1925.                rope.graphics.lineTo(bobber.x + bobbery.x - (bobber.x + bobbery.x - center.x) / 3,bobber.y + bobbery.y - (bobber.y + bobbery.y - center.y) / 3);
  1926.             }
  1927.             if(!anchored && !latching && bobber.currentFrame == 2 && bobber.ani != undefined && bobber.ani.currentFrame == 6 && controls == 1)
  1928.             {
  1929.                bobber.gotoAndStop(1);
  1930.             }
  1931.             if(bobber.currentFrame == 2 && !anchored)
  1932.             {
  1933.                rspeed = 0;
  1934.                bobber.rotation += Vector.angle2(new Vector(0,-1).rotateNew(bobber.rotation),new Vector(currentCloud.x - bobber.x,currentCloud.y - bobber.y)) / 3;
  1935.             }
  1936.             if(!kM)
  1937.             {
  1938.                anchored = false;
  1939.                latching = false;
  1940.                currentCloud = null;
  1941.                if(bobber.currentFrame == 2)
  1942.                {
  1943.                   bobber.gotoAndStop(1);
  1944.                }
  1945.             }
  1946.             speedC.x = -cam.x;
  1947.             speedC.y = -cam.y;
  1948.             cam.x += (cam.x - bobber.x) / -4;
  1949.             cam.y += (cam.y - bobber.y) / -4;
  1950.             speedC.x += cam.x;
  1951.             speedC.y += cam.y;
  1952.             area = range * Math.abs(speedC.x) + (range - Math.abs(speedC.x)) * Math.abs(speedC.y);
  1953.             cn = area * density;
  1954.             while(Math.random() < cn)
  1955.             {
  1956.                ass = false;
  1957.                if(Math.random() > Gravity.length - 0.3)
  1958.                {
  1959.                   ass = true;
  1960.                }
  1961.                --cn;
  1962.                if(ass && Math.random() > 0.5 || !ass)
  1963.                {
  1964.                   nnn = clouds.push(new Array(new Cloud(),0)) - 1;
  1965.                   container2.addChild(clouds[nnn][0]);
  1966.                   if(Math.random() < Math.abs(range * speedC.x) / area)
  1967.                   {
  1968.                      clouds[nnn][0].x = cam.x + Math.random() * speedC.x + range / 2 * (Math.abs(speedC.x) / speedC.x) - speedC.x;
  1969.                      clouds[nnn][0].y = cam.y + Math.random() * range - range / 2;
  1970.                   }
  1971.                   else
  1972.                   {
  1973.                      clouds[nnn][0].x = cam.x + Math.random() * range - range / 2;
  1974.                      clouds[nnn][0].y = cam.y + Math.random() * speedC.y + range / 2 * (Math.abs(speedC.y) / speedC.y) - speedC.y;
  1975.                   }
  1976.                   if(!ass)
  1977.                   {
  1978.                      grav = new Vector(0,0);
  1979.                      i = 0;
  1980.                      while(i < 5)
  1981.                      {
  1982.                         planet = planets[i][0];
  1983.                         planet1mass = planets[i][1];
  1984.                         planet1r = planets[i][2];
  1985.                         GR = new Vector(planet.x - clouds[nnn][0].x,planet.y - clouds[nnn][0].y);
  1986.                         str = GR.length;
  1987.                         GR.length = planet1mass / (str * str);
  1988.                         grav.x += GR.x;
  1989.                         grav.y += GR.y;
  1990.                         i++;
  1991.                      }
  1992.                      clouds[nnn][0].rotation = Vector.angle2(new Vector(0,1),grav);
  1993.                      clouds[nnn][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  1994.                   }
  1995.                   else
  1996.                   {
  1997.                      clouds[nnn][0].rotation = Math.random() * 360;
  1998.                      clouds[nnn][0].gotoAndStop(Math.floor(Math.random() * 6) + 5);
  1999.                   }
  2000.                   clouds[nnn][0].scaleX = (Math.round(Math.random()) - 0.5) * 2;
  2001.                   j = 0;
  2002.                   while(j < planets.length)
  2003.                   {
  2004.                      planet2 = planets[j][0];
  2005.                      planet1mass2 = planets[j][1];
  2006.                      planet1r2 = planets[j][2];
  2007.                      if(j == 3)
  2008.                      {
  2009.                         planet1r2 = planets[3][3];
  2010.                      }
  2011.                      if(j == 1)
  2012.                      {
  2013.                         if((clouds[nnn][0].x - planet2.x) * (clouds[nnn][0].x - planet2.x) + (clouds[nnn][0].y - planet2.y) * (clouds[nnn][0].y - planet2.y) < (planet1r2 + 100) * (planet1r2 + 100))
  2014.                         {
  2015.                            container2.removeChild(clouds[nnn][0]);
  2016.                            clouds.splice(nnn,1);
  2017.                            break;
  2018.                         }
  2019.                      }
  2020.                      else if(j >= 5)
  2021.                      {
  2022.                         if((clouds[nnn][0].x - planet2.x) * (clouds[nnn][0].x - planet2.x) + (clouds[nnn][0].y - planet2.y) * (clouds[nnn][0].y - planet2.y) < (planet1r2 + 25) * (planet1r2 + 25))
  2023.                         {
  2024.                            container2.removeChild(clouds[nnn][0]);
  2025.                            clouds.splice(nnn,1);
  2026.                            break;
  2027.                         }
  2028.                      }
  2029.                      else if((clouds[nnn][0].x - planet2.x) * (clouds[nnn][0].x - planet2.x) + (clouds[nnn][0].y - planet2.y) * (clouds[nnn][0].y - planet2.y) < (planet1r2 + 200) * (planet1r2 + 200))
  2030.                      {
  2031.                         container2.removeChild(clouds[nnn][0]);
  2032.                         clouds.splice(nnn,1);
  2033.                         break;
  2034.                      }
  2035.                      j++;
  2036.                   }
  2037.                }
  2038.             }
  2039.             numcg = true;
  2040.             bbbbbbb = false;
  2041.             i = 0;
  2042.             while(i < clouds.length)
  2043.             {
  2044.                if(clouds[i][1] == 0)
  2045.                {
  2046.                   if(Math.abs(cam.x - clouds[i][0].x) > range / 2 || Math.abs(cam.y - clouds[i][0].y) > range / 2)
  2047.                   {
  2048.                      container2.removeChild(clouds[i][0]);
  2049.                      clouds.splice(i,1);
  2050.                      i--;
  2051.                   }
  2052.                   if(inside && currentCloud == clouds[i][0])
  2053.                   {
  2054.                      anchored = false;
  2055.                      latching = false;
  2056.                      currentCloud = null;
  2057.                      if(bobber.currentFrame == 2)
  2058.                      {
  2059.                         bobber.gotoAndStop(1);
  2060.                      }
  2061.                   }
  2062.                }
  2063.                if(clouds[i][1] == 2)
  2064.                {
  2065.                   clouds[i][0].visible = foregrounds[1].planet.visible;
  2066.                   if(currentCloud == clouds[i][0] && clouds[i][0].ani.currentFrame == 1 && anchored && !((grounded || controls == 2 || busty || !inside) && !gemed))
  2067.                   {
  2068.                      if(gemCounter != -1)
  2069.                      {
  2070.                         clouds[i][0].ani.gotoAndStop(2);
  2071.                         sfx = gemSounds[gemCounter].play();
  2072.                         transformSFX.volume = 1;
  2073.                         gemCounter += 1;
  2074.                      }
  2075.                   }
  2076.                   if((grounded || controls == 2 || busty || !inside) && clouds[i][0].ani.currentFrame == 2 && !gemed)
  2077.                   {
  2078.                      clouds[i][0].ani.gotoAndStop(1);
  2079.                      if(gemCounter != -1)
  2080.                      {
  2081.                         sfx = SFX[3].play();
  2082.                         transformSFX.volume = 2;
  2083.                      }
  2084.                      gemCounter = -1;
  2085.                   }
  2086.                   if(!inside && currentCloud == clouds[i][0])
  2087.                   {
  2088.                      anchored = false;
  2089.                      latching = false;
  2090.                      currentCloud = null;
  2091.                      if(bobber.currentFrame == 2)
  2092.                      {
  2093.                         bobber.gotoAndStop(1);
  2094.                      }
  2095.                   }
  2096.                   if(clouds[i][0].ani.currentFrame == 1)
  2097.                   {
  2098.                      numcg = false;
  2099.                   }
  2100.                }
  2101.                if(clouds[i][1] == 3)
  2102.                {
  2103.                   if(currentCloud == clouds[i][0])
  2104.                   {
  2105.                      bbbbbbb = true;
  2106.                      pollupy += vSPEED;
  2107.                      CFF = Math.abs(pollupy) / 3;
  2108.                      if(CFF <= 1)
  2109.                      {
  2110.                         CFF = 2;
  2111.                      }
  2112.                      if(CFF >= 201)
  2113.                      {
  2114.                         clouds[i][0].gaser.gotoAndPlay(201);
  2115.                         j = 0;
  2116.                         while(j < 20)
  2117.                         {
  2118.                            pp = particles.push(new Array(new Particle1(),new Vector(Math.random() * 10 + 5,0),new Vector(0,0),0.97,Math.random() * 100 - 50,40)) - 1;
  2119.                            particles[pp][1].rotate(Math.random() * 360);
  2120.                            particles[pp][0].x = clouds[i][0].x;
  2121.                            particles[pp][0].y = clouds[i][0].y;
  2122.                            particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  2123.                            particles[pp][0].rotation = Math.random() * 360;
  2124.                            effects.addChild(particles[pp][0]);
  2125.                            j++;
  2126.                         }
  2127.                         sfx = SFX[1].play();
  2128.                         transformSFX.volume = 1;
  2129.                         clouds[i][0].gas.play();
  2130.                         gassed = gassed - 1;
  2131.                         clouds[i][1] = -1;
  2132.                         anchored = false;
  2133.                         latching = false;
  2134.                         currentCloud = null;
  2135.                         if(bobber.currentFrame == 2)
  2136.                         {
  2137.                            bobber.gotoAndStop(1);
  2138.                         }
  2139.                      }
  2140.                      else if(clouds[i][0].gaser.currentFrame != CFF)
  2141.                      {
  2142.                         clouds[i][0].gaser.gotoAndStop(CFF);
  2143.                         stage.invalidate();
  2144.                      }
  2145.                   }
  2146.                   else if(clouds[i][0].gaser.currentFrame != 1 && clouds[i][1] == 3)
  2147.                   {
  2148.                      CFF = Math.abs(pollupy) / 3;
  2149.                      if(CFF <= 0)
  2150.                      {
  2151.                         CFF = 1;
  2152.                      }
  2153.                      if(CFF >= 201)
  2154.                      {
  2155.                         clouds[i][0].gaser.gotoAndPlay(201);
  2156.                         j = 0;
  2157.                         while(j < 20)
  2158.                         {
  2159.                            pp = particles.push(new Array(new Particle1(),new Vector(Math.random() * 10 + 5,0),new Vector(0,0),0.97,Math.random() * 100 - 50,40)) - 1;
  2160.                            particles[pp][1].rotate(Math.random() * 360);
  2161.                            particles[pp][0].x = clouds[i][0].x;
  2162.                            particles[pp][0].y = clouds[i][0].y;
  2163.                            particles[pp][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  2164.                            particles[pp][0].rotation = Math.random() * 360;
  2165.                            effects.addChild(particles[pp][0]);
  2166.                            j++;
  2167.                         }
  2168.                         sfx = SFX[1].play();
  2169.                         transformSFX.volume = 1;
  2170.                         gassed = gassed - 1;
  2171.                         clouds[i][1] = -1;
  2172.                         anchored = false;
  2173.                         latching = false;
  2174.                         currentCloud = null;
  2175.                         if(bobber.currentFrame == 2)
  2176.                         {
  2177.                            bobber.gotoAndStop(1);
  2178.                         }
  2179.                      }
  2180.                      else if(clouds[i][0].gaser.currentFrame != CFF)
  2181.                      {
  2182.                         clouds[i][0].gaser.gotoAndStop(CFF);
  2183.                         stage.invalidate();
  2184.                      }
  2185.                   }
  2186.                }
  2187.                i++;
  2188.             }
  2189.             if(gemCounter == -1 && !anchored)
  2190.             {
  2191.                gemCounter = 0;
  2192.             }
  2193.             if(pollupy != 0)
  2194.             {
  2195.                if(pollupy > 0)
  2196.                {
  2197.                   pollupy -= 3;
  2198.                   if(pollupy < 0)
  2199.                   {
  2200.                      pollupy = 0;
  2201.                   }
  2202.                }
  2203.                else
  2204.                {
  2205.                   pollupy += 3;
  2206.                   if(pollupy > 0)
  2207.                   {
  2208.                      pollupy = 0;
  2209.                   }
  2210.                }
  2211.             }
  2212.             if(!bbbbbbb && pollupy != 0)
  2213.             {
  2214.                pollupy = Math.abs(pollupy);
  2215.                pollupy -= 15;
  2216.                if(pollupy < 0)
  2217.                {
  2218.                   pollupy = 0;
  2219.                }
  2220.             }
  2221.             if(numcg)
  2222.             {
  2223.                gemed = true;
  2224.             }
  2225.             alien();
  2226.             speedC.scale(2);
  2227.             sarea = srange * Math.abs(speedC.x) + (srange - Math.abs(speedC.x)) * Math.abs(speedC.y);
  2228.             sn = sarea * sdensity;
  2229.             while(Math.random() < sn)
  2230.             {
  2231.                --sn;
  2232.                nnn = stars.push(new Star()) - 1;
  2233.                starsC.addChild(stars[nnn]);
  2234.                if(Math.random() < Math.abs(srange * speedC.x) / sarea)
  2235.                {
  2236.                   stars[nnn].x = cam.x + Math.random() * speedC.x + srange / 2 * (Math.abs(speedC.x) / speedC.x) - speedC.x;
  2237.                   stars[nnn].y = cam.y + Math.random() * srange - srange / 2;
  2238.                }
  2239.                else
  2240.                {
  2241.                   stars[nnn].x = cam.x + Math.random() * srange - srange / 2;
  2242.                   stars[nnn].y = cam.y + Math.random() * speedC.y + srange / 2 * (Math.abs(speedC.y) / speedC.y) - speedC.y;
  2243.                }
  2244.                stars[nnn].rotation = Math.random() * 360;
  2245.                stars[nnn].gotoAndStop(Math.floor(Math.random() * 9) + 1);
  2246.             }
  2247.             i = 0;
  2248.             while(i < stars.length)
  2249.             {
  2250.                stars[i].x += speedC.x / 3;
  2251.                stars[i].y += speedC.y / 3;
  2252.                if(stars[i].visible)
  2253.                {
  2254.                   if(stars[i].currentFrame >= 4 && Math.random() < 0.1)
  2255.                   {
  2256.                      stars[i].visible = !stars[i].visible;
  2257.                   }
  2258.                }
  2259.                else if(stars[i].currentFrame >= 4 && Math.random() < 0.5)
  2260.                {
  2261.                   stars[i].visible = !stars[i].visible;
  2262.                }
  2263.                if(Math.abs(cam.x - stars[i].x) > srange / 2 || Math.abs(cam.y - stars[i].y) > srange / 2)
  2264.                {
  2265.                   starsC.removeChild(stars[i]);
  2266.                   stars.splice(i,1);
  2267.                   i--;
  2268.                }
  2269.                i++;
  2270.             }
  2271.             barea = brange * Math.abs(speedC.x) + (brange - Math.abs(speedC.x)) * Math.abs(speedC.y);
  2272.             bn += barea * bdensity;
  2273.             while(Math.random() < bn)
  2274.             {
  2275.                --bn;
  2276.                if(crazies.length <= 5)
  2277.                {
  2278.                   if(Math.random() < 0.3)
  2279.                   {
  2280.                      nnn = crazies.push(new Array(new Crazy(),1)) - 1;
  2281.                      back.addChild(crazies[nnn][0]);
  2282.                      if(Math.random() < Math.abs(brange * speedC.x) / barea)
  2283.                      {
  2284.                         crazies[nnn][0].x = cam.x + Math.random() * speedC.x + brange / 2 * (Math.abs(speedC.x) / speedC.x) - speedC.x;
  2285.                         crazies[nnn][0].y = cam.y + Math.random() * brange - brange / 2;
  2286.                      }
  2287.                      else
  2288.                      {
  2289.                         crazies[nnn][0].x = cam.x + Math.random() * brange - brange / 2;
  2290.                         crazies[nnn][0].y = cam.y + Math.random() * speedC.y + brange / 2 * (Math.abs(speedC.y) / speedC.y) - speedC.y;
  2291.                      }
  2292.                      crazies[nnn][0].rotation = Math.random() * 360;
  2293.                      crazies[nnn][0].scaleX = (Math.round(Math.random()) - 0.5) * 2;
  2294.                      crazies[nnn][0].gotoAndStop(Math.floor(Math.random() * 4) + 1);
  2295.                      if(won[crazies[nnn][0].currentFrame - 1] == false)
  2296.                      {
  2297.                         crazies[nnn][0].gotoAndStop(5);
  2298.                      }
  2299.                   }
  2300.                   else
  2301.                   {
  2302.                      nnn = crazies.push(new Array(new Planets(),2)) - 1;
  2303.                      back2.addChild(crazies[nnn][0]);
  2304.                      if(Math.random() < Math.abs(brange * speedC.x) / barea)
  2305.                      {
  2306.                         crazies[nnn][0].x = cam.x + Math.random() * speedC.x + brange / 2 * (Math.abs(speedC.x) / speedC.x) - speedC.x;
  2307.                         crazies[nnn][0].y = cam.y + Math.random() * brange - brange / 2;
  2308.                      }
  2309.                      else
  2310.                      {
  2311.                         crazies[nnn][0].x = cam.x + Math.random() * brange - brange / 2;
  2312.                         crazies[nnn][0].y = cam.y + Math.random() * speedC.y + brange / 2 * (Math.abs(speedC.y) / speedC.y) - speedC.y;
  2313.                      }
  2314.                      crazies[nnn][0].rotation = Math.random() * 360;
  2315.                      crazies[nnn][0].scaleX = (Math.round(Math.random()) - 0.5) * 2;
  2316.                      crazies[nnn][0].gotoAndStop(Math.floor(Math.random() * 11) + 1);
  2317.                   }
  2318.                }
  2319.             }
  2320.             i = 0;
  2321.             while(i < crazies.length)
  2322.             {
  2323.                if(crazies[i][1] == 1)
  2324.                {
  2325.                   crazies[i][0].x += speedC.x / 4;
  2326.                   crazies[i][0].y += speedC.y / 4;
  2327.                   if(Math.abs(cam.x - crazies[i][0].x) > brange / 2 || Math.abs(cam.y - crazies[i][0].y) > brange / 2)
  2328.                   {
  2329.                      back.removeChild(crazies[i][0]);
  2330.                      crazies.splice(i,1);
  2331.                      i--;
  2332.                   }
  2333.                }
  2334.                else
  2335.                {
  2336.                   crazies[i][0].x += speedC.x / 2.5;
  2337.                   crazies[i][0].y += speedC.y / 2.5;
  2338.                   if(Math.abs(cam.x - crazies[i][0].x) > brange / 2 || Math.abs(cam.y - crazies[i][0].y) > brange / 2)
  2339.                   {
  2340.                      back2.removeChild(crazies[i][0]);
  2341.                      crazies.splice(i,1);
  2342.                      i--;
  2343.                   }
  2344.                }
  2345.                i++;
  2346.             }
  2347.             if(bg.b1.alpha <= 0)
  2348.             {
  2349.                bg.b1.alpha = 0;
  2350.                bg.b1.visible = false;
  2351.             }
  2352.             else
  2353.             {
  2354.                bg.b1.visible = true;
  2355.             }
  2356.             if(bg.b2.alpha <= 0)
  2357.             {
  2358.                bg.b2.alpha = 0;
  2359.                bg.b2.visible = false;
  2360.             }
  2361.             else
  2362.             {
  2363.                bg.b2.visible = true;
  2364.             }
  2365.             if(bg.b3.alpha <= 0)
  2366.             {
  2367.                bg.b3.alpha = 0;
  2368.                bg.b3.visible = false;
  2369.             }
  2370.             else
  2371.             {
  2372.                bg.b3.visible = true;
  2373.             }
  2374.             if(bg.b4.alpha <= 0)
  2375.             {
  2376.                bg.b4.alpha = 0;
  2377.                bg.b4.visible = false;
  2378.             }
  2379.             else
  2380.             {
  2381.                bg.b4.visible = true;
  2382.             }
  2383.             if(bg.b5.alpha <= 0)
  2384.             {
  2385.                bg.b5.alpha = 0;
  2386.                bg.b5.visible = false;
  2387.             }
  2388.             else
  2389.             {
  2390.                bg.b5.visible = true;
  2391.             }
  2392.             dir.alpha = (1 - (bg.b1.alpha + bg.b2.alpha + bg.b3.alpha + bg.b4.alpha + bg.b5.alpha)) * 3;
  2393.             if(dir.alpha <= 0)
  2394.             {
  2395.                dir.visible = false;
  2396.             }
  2397.             else
  2398.             {
  2399.                dir.visible = true;
  2400.             }
  2401.             if(floating && Math.random() < 0.2)
  2402.             {
  2403.                nnn = bubbles.push(new Bubble()) - 1;
  2404.                bubblesC.addChild(bubbles[nnn]);
  2405.                bobbery = new Vector(0,-charH).rotateNew(bobber.rotation);
  2406.                bubbles[nnn].x = bobber.x + bobbery.x;
  2407.                bubbles[nnn].y = bobber.y + bobbery.y;
  2408.                bubbles[nnn].gotoAndStop(Math.floor(Math.random() * 3) + 1);
  2409.             }
  2410.             i = 0;
  2411.             while(i < bubbles.length)
  2412.             {
  2413.                rrr = new Vector(bubbles[i].x - planets[3][0].x,bubbles[i].y - planets[3][0].y);
  2414.                if(rrr.length > planets[3][3])
  2415.                {
  2416.                   bubblesC.removeChild(bubbles[i]);
  2417.                   bubbles.splice(i,1);
  2418.                   i--;
  2419.                }
  2420.                else
  2421.                {
  2422.                   rrr.norm();
  2423.                   rrr.scale(2);
  2424.                   bubbles[i].x += rrr.x + Math.random() - 0.5;
  2425.                   bubbles[i].y += rrr.y + Math.random() - 0.5;
  2426.                }
  2427.                i++;
  2428.             }
  2429.             if(planets[3][0].visible)
  2430.             {
  2431.                i = 0;
  2432.                while(i < fish.length)
  2433.                {
  2434.                   fish[i][0].visible = true;
  2435.                   rr = new Vector(fish[i][0].x - planets[3][0].x,fish[i][0].y - planets[3][0].y);
  2436.                   if(rr.length == 0)
  2437.                   {
  2438.                      rr.x = 0.1;
  2439.                   }
  2440.                   fish[i][0].rotation = Vector.angle2(new Vector(0,-1),rr);
  2441.                   fish[i][1].rotate(fish[i][2]);
  2442.                   if(Math.random() < 0.05)
  2443.                   {
  2444.                      fish[i][2] = Math.random() * 10 - 5;
  2445.                   }
  2446.                   if(rr.length > planets[3][3] - 50)
  2447.                   {
  2448.                      fish[i][1].x -= rr.x / rr.length;
  2449.                      fish[i][1].y -= rr.y / rr.length;
  2450.                   }
  2451.                   if(rr.length < planets[3][2] + 30)
  2452.                   {
  2453.                      fish[i][1].x += rr.x / rr.length;
  2454.                      fish[i][1].y += rr.y / rr.length;
  2455.                   }
  2456.                   if(Vector.dot(rr.perpendicular(),fish[i][1]) < 0)
  2457.                   {
  2458.                      fish[i][0].scaleX = -1;
  2459.                   }
  2460.                   else
  2461.                   {
  2462.                      fish[i][0].scaleX = 1;
  2463.                   }
  2464.                   if(fish[i][3] == 1)
  2465.                   {
  2466.                      if(fish[i][1].length < 1)
  2467.                      {
  2468.                         fish[i][1].length = 1;
  2469.                      }
  2470.                      if(fish[i][1].length > 4)
  2471.                      {
  2472.                         fish[i][1].length = 4;
  2473.                      }
  2474.                   }
  2475.                   else
  2476.                   {
  2477.                      if(fish[i][1].length < 0.3)
  2478.                      {
  2479.                         fish[i][1].length = 0.3;
  2480.                      }
  2481.                      if(fish[i][1].length > 2)
  2482.                      {
  2483.                         fish[i][1].length = 2;
  2484.                      }
  2485.                   }
  2486.                   fish[i][0].x += fish[i][1].x;
  2487.                   fish[i][0].y += fish[i][1].y;
  2488.                   if(fish[i][0].box.hitTestObject(bobber.mouth) && fish[i][3] == 1)
  2489.                   {
  2490.                      if(bobber.currentFrame != 7)
  2491.                      {
  2492.                         bobber.gotoAndStop(7);
  2493.                         sfx = SFX[0].play();
  2494.                         transformSFX.volume = 1;
  2495.                      }
  2496.                      if(fish[i][3] == 1)
  2497.                      {
  2498.                         fished = fished - 1;
  2499.                      }
  2500.                      bubblesC.removeChild(fish[i][0]);
  2501.                      fish.splice(i,0);
  2502.                      i--;
  2503.                   }
  2504.                   i++;
  2505.                }
  2506.             }
  2507.             else
  2508.             {
  2509.                i = 0;
  2510.                while(i < fish.length)
  2511.                {
  2512.                   fish[i][0].visible = false;
  2513.                   i++;
  2514.                }
  2515.             }
  2516.             i = 0;
  2517.             while(i < splashes.length)
  2518.             {
  2519.                if(splashes[i].currentFrame == 20)
  2520.                {
  2521.                   effects.removeChild(splashes[i]);
  2522.                   splashes.splice(i,1);
  2523.                   i--;
  2524.                }
  2525.                i++;
  2526.             }
  2527.             i = 0;
  2528.             while(i < particles.length)
  2529.             {
  2530.                particles[i][1].x += particles[i][2].x;
  2531.                particles[i][1].y += particles[i][2].y;
  2532.                particles[i][1].scale(particles[i][3]);
  2533.                particles[i][0].x += particles[i][1].x;
  2534.                particles[i][0].y += particles[i][1].y;
  2535.                particles[i][0].rotation += particles[i][4];
  2536.                --particles[i][5];
  2537.                if(particles[i][5] < 0)
  2538.                {
  2539.                   particles[i][0].alpha -= 0.08;
  2540.                }
  2541.                if(particles[i][0].alpha <= 0)
  2542.                {
  2543.                   effects.removeChild(particles[i][0]);
  2544.                   particles.splice(i,1);
  2545.                   i--;
  2546.                }
  2547.                i++;
  2548.             }
  2549.             if(controls == 2)
  2550.             {
  2551.                if(kA)
  2552.                {
  2553.                   bobber.scaleX = 1;
  2554.                }
  2555.                if(kD)
  2556.                {
  2557.                   bobber.scaleX = -1;
  2558.                }
  2559.             }
  2560.             if(bobber.currentFrame == 5 && bobber.ani.currentFrame == 3)
  2561.             {
  2562.                bobber.gotoAndStop(3);
  2563.             }
  2564.             ++ttt;
  2565.             if(ttt > 4)
  2566.             {
  2567.                ttt = 0;
  2568.             }
  2569.             if(bobber.currentFrame == 4 && ttt == 0)
  2570.             {
  2571.                nnn = splashes.push(new Dust()) - 1;
  2572.                effects.addChild(splashes[nnn]);
  2573.                GR = new Vector(planets[currentPlanet][0].x - bobber.x,planets[currentPlanet][0].y - bobber.y);
  2574.                GR.length -= charH;
  2575.                splashes[nnn].x = planets[currentPlanet][0].x - GR.x;
  2576.                splashes[nnn].scaleX = bobber.scaleX;
  2577.                splashes[nnn].y = planets[currentPlanet][0].y - GR.y;
  2578.                splashes[nnn].rotation = Vector.angle2(new Vector(0,1),GR);
  2579.             }
  2580.             if(controls == 2 && bobber.currentFrame != 3 && bobber.currentFrame != 2 && bobber.currentFrame != 5)
  2581.             {
  2582.                if(bobber.currentFrame == 4)
  2583.                {
  2584.                   if(!kA && !kD)
  2585.                   {
  2586.                      bobber.gotoAndStop(3);
  2587.                   }
  2588.                }
  2589.                else
  2590.                {
  2591.                   bobber.gotoAndStop(5);
  2592.                   nnn = splashes.push(new Poof()) - 1;
  2593.                   effects.addChild(splashes[nnn]);
  2594.                   GR = new Vector(planets[currentPlanet][0].x - (bobber.x + speed.x),planets[currentPlanet][0].y - (bobber.y + speed.y));
  2595.                   GR.length -= charH;
  2596.                   splashes[nnn].x = planets[currentPlanet][0].x - GR.x;
  2597.                   splashes[nnn].y = planets[currentPlanet][0].y - GR.y;
  2598.                   splashes[nnn].rotation = Vector.angle2(new Vector(0,1),GR);
  2599.                }
  2600.             }
  2601.             if(controls == 2 && (kA || kD) && bobber.currentFrame != 4 && bobber.currentFrame != 2 && bobber.currentFrame != 5)
  2602.             {
  2603.                bobber.gotoAndStop(4);
  2604.                ttt = 4;
  2605.             }
  2606.             if(faderTIM > 0)
  2607.             {
  2608.                fader = 3;
  2609.                faderTIM = faderTIM - 1;
  2610.             }
  2611.             else
  2612.             {
  2613.                fader = 1;
  2614.             }
  2615.             Gravity = new Vector(planets[0][0].x - bobber.x,planets[0][0].y - bobber.y);
  2616.             strn = Gravity.length;
  2617.             Gravity.length = 672.35 / strn * 2;
  2618.             if(Gravity.length > 1)
  2619.             {
  2620.                Gravity.length = 1;
  2621.             }
  2622.             dir.d1.rotation = Vector.angle2(new Vector(0,-1),Gravity);
  2623.             transform1.volume = Gravity.length * 1.5 / fader;
  2624.             bg.b1.alpha = Gravity.length * 1.2 - 0.2;
  2625.             Gravity = new Vector(planets[1][0].x - bobber.x,planets[1][0].y - bobber.y);
  2626.             strn = Gravity.length;
  2627.             Gravity.length = 672.35 / strn * 2;
  2628.             if(Gravity.length > 1)
  2629.             {
  2630.                Gravity.length = 1;
  2631.             }
  2632.             dir.d2.rotation = Vector.angle2(new Vector(0,-1),Gravity);
  2633.             if(gassed == 0)
  2634.             {
  2635.                transform2.volume = 0.65 / fader;
  2636.                if(won[0] == false)
  2637.                {
  2638.                   flasher.play();
  2639.                   planets[1][0].gotoAndStop(2);
  2640.                   won[0] = true;
  2641.                   transformW.volume = 1.5;
  2642.                   channelW.soundTransform = transformW;
  2643.                   channelW = win1.play();
  2644.                   faderTIM = 120;
  2645.                }
  2646.             }
  2647.             else
  2648.             {
  2649.                transform2.volume = Gravity.length / fader;
  2650.             }
  2651.             bg.b2.alpha = Gravity.length * 1.2 - 0.2;
  2652.             Gravity = new Vector(planets[2][0].x - bobber.x,planets[2][0].y - bobber.y);
  2653.             strn = Gravity.length;
  2654.             Gravity.length = 672.35 / strn * 2;
  2655.             if(Gravity.length > 1)
  2656.             {
  2657.                Gravity.length = 1;
  2658.             }
  2659.             dir.d3.rotation = Vector.angle2(new Vector(0,-1),Gravity);
  2660.             if(gemed)
  2661.             {
  2662.                transform3.volume = 1 / fader;
  2663.                if(won[1] == false)
  2664.                {
  2665.                   flasher.play();
  2666.                   planets[2][0].gotoAndStop(2);
  2667.                   foregrounds[1].gotoAndStop(2);
  2668.                   stage.invalidate();
  2669.                   won[1] = true;
  2670.                   transformW.volume = 1.75;
  2671.                   channelW.soundTransform = transformW;
  2672.                   channelW = win2.play();
  2673.                   faderTIM = 120;
  2674.                }
  2675.             }
  2676.             else
  2677.             {
  2678.                transform3.volume = Gravity.length * 1.3 / fader;
  2679.             }
  2680.             bg.b3.alpha = Gravity.length * 1.2 - 0.2;
  2681.             Gravity = new Vector(planets[3][0].x - bobber.x,planets[3][0].y - bobber.y);
  2682.             strn = Gravity.length;
  2683.             Gravity.length = 672.35 / strn * 2;
  2684.             if(Gravity.length > 1)
  2685.             {
  2686.                Gravity.length = 1;
  2687.             }
  2688.             dir.d4.rotation = Vector.angle2(new Vector(0,-1),Gravity);
  2689.             if(fished == 0)
  2690.             {
  2691.                transform4.volume = 0.8 / fader;
  2692.                if(won[2] == false)
  2693.                {
  2694.                   flasher.play();
  2695.                   planets[3][0].gotoAndStop(2);
  2696.                   foregrounds[2].gotoAndStop(2);
  2697.                   planets[9][0].gotoAndStop(2);
  2698.                   won[2] = true;
  2699.                   transformW.volume = 1.5;
  2700.                   channelW.soundTransform = transformW;
  2701.                   channelW = win3.play();
  2702.                   faderTIM = 120;
  2703.                }
  2704.             }
  2705.             else
  2706.             {
  2707.                transform4.volume = Gravity.length * 1.3 / fader;
  2708.             }
  2709.             bg.b4.alpha = Gravity.length * 1.2 - 0.2;
  2710.             Gravity = new Vector(planets[4][0].x - bobber.x,planets[4][0].y - bobber.y);
  2711.             strn = Gravity.length;
  2712.             Gravity.length = 672.35 / strn * 2;
  2713.             if(Gravity.length > 1)
  2714.             {
  2715.                Gravity.length = 1;
  2716.             }
  2717.             dir.d5.rotation = Vector.angle2(new Vector(0,-1),Gravity);
  2718.             if(mooned == 4)
  2719.             {
  2720.                transform5.volume = 1 / fader;
  2721.                if(won[3] == false)
  2722.                {
  2723.                   flasher.play();
  2724.                   won[3] = true;
  2725.                   transformW.volume = 2;
  2726.                   channelW.soundTransform = transformW;
  2727.                   channelW = win4.play();
  2728.                   faderTIM = 120;
  2729.                }
  2730.             }
  2731.             else
  2732.             {
  2733.                transform5.volume = Gravity.length * 2 / fader;
  2734.             }
  2735.             bg.b5.alpha = Gravity.length * 1.2 - 0.2;
  2736.             sfx.soundTransform = transformSFX;
  2737.             channel1.soundTransform = transform1;
  2738.             channel2.soundTransform = transform2;
  2739.             channel3.soundTransform = transform3;
  2740.             channel4.soundTransform = transform4;
  2741.             channel5.soundTransform = transform5;
  2742.             channelB.soundTransform = transformB;
  2743.             Gravity = new Vector(0,0);
  2744.             i = 0;
  2745.             while(i < 5)
  2746.             {
  2747.                planet = planets[i][0];
  2748.                planet1mass = planets[i][1];
  2749.                planet1r = planets[i][2];
  2750.                GR = new Vector(planet.x - bobber.x,planet.y - bobber.y);
  2751.                str = GR.length;
  2752.                GR.length = planet1mass / (str * str);
  2753.                Gravity.x += GR.x;
  2754.                Gravity.y += GR.y;
  2755.                i++;
  2756.             }
  2757.             if(Gravity.length > 5)
  2758.             {
  2759.                targSiz = 900 - 5 * 70;
  2760.             }
  2761.             else
  2762.             {
  2763.                targSiz = 900 - Gravity.length * 70;
  2764.             }
  2765.             i = 5;
  2766.             while(i < planets.length)
  2767.             {
  2768.                planet = planets[i][0];
  2769.                planet1mass = planets[i][1];
  2770.                planet1r = planets[i][2];
  2771.                GR = new Vector(planet.x - bobber.x,planet.y - bobber.y);
  2772.                str = GR.length;
  2773.                GR.length = planet1mass / (str * str);
  2774.                Gravity.x += GR.x;
  2775.                Gravity.y += GR.y;
  2776.                i++;
  2777.             }
  2778.             if(Gravity.length > 5)
  2779.             {
  2780.                Gravity.length = 5;
  2781.             }
  2782.             if(!ended)
  2783.             {
  2784.                cam.w += (cam.w - targSiz) / -4;
  2785.                cam.h += (cam.h - targSiz) / -4;
  2786.                cam.r += Vector.angle2(new Vector(0,1).rotateNew(cam.r),Gravity) / 8;
  2787.             }
  2788.             dir.x = cam.x;
  2789.             dir.y = cam.y;
  2790.             bg.x = cam.x;
  2791.             bg.y = cam.y;
  2792.             bg.rotation = cam.r;
  2793.             i = 0;
  2794.             while(i < 5)
  2795.             {
  2796.                planet = planets[i][0];
  2797.                GR = new Vector(planet.x - cam.x,planet.y - cam.y);
  2798.                if(GR.length > 2000)
  2799.                {
  2800.                   planet.visible = false;
  2801.                }
  2802.                else
  2803.                {
  2804.                   planet.visible = true;
  2805.                }
  2806.                i++;
  2807.             }
  2808.             i = 0;
  2809.             while(i < foregrounds.length)
  2810.             {
  2811.                planet = foregrounds[i];
  2812.                GR = new Vector(planet.x - cam.x,planet.y - cam.y);
  2813.                if(GR.length > 2000)
  2814.                {
  2815.                   planet.visible = false;
  2816.                }
  2817.                else
  2818.                {
  2819.                   planet.visible = true;
  2820.                }
  2821.                i++;
  2822.             }
  2823.             if(isNaN(bobber.rotation) || bobber.rotation == undefined)
  2824.             {
  2825.                bobber.rotation = 0;
  2826.             }
  2827.             if(speed.x == undefined || isNaN(speed.x) || speed.y == undefined || isNaN(speed.y))
  2828.             {
  2829.                speed.x = 0;
  2830.                speed.y = 0;
  2831.             }
  2832.             if(namesT != 0)
  2833.             {
  2834.                namesT = namesT - 1;
  2835.                names.visible = true;
  2836.                if(names.alpha < 1)
  2837.                {
  2838.                   names.alpha += 0.03;
  2839.                }
  2840.             }
  2841.             else if(names.alpha > 0)
  2842.             {
  2843.                names.alpha -= 0.03;
  2844.             }
  2845.             else
  2846.             {
  2847.                names.visible = false;
  2848.             }
  2849.             dir.d2.visible = !won[0];
  2850.             dir.d3.visible = !won[1];
  2851.             dir.d4.visible = !won[2];
  2852.             dir.d5.visible = !won[3];
  2853.             if(planets[0][0].currentFrame == 6)
  2854.             {
  2855.                dir.d1.visible = false;
  2856.             }
  2857.             winned = int(won[0]) + int(won[1]) + int(won[2]) + int(won[3]);
  2858.             if(planets[0][0].currentFrame != winned + 1 && planets[0][0].currentFrame != 6)
  2859.             {
  2860.                planets[0][0].gotoAndStop(winned + 1);
  2861.                planets[0][2] = earths[winned - 1];
  2862.             }
  2863.             talk.scaleX = cam.sx + 0.3;
  2864.             talk.scaleY = cam.sy + 0.3;
  2865.             dir.scaleX = cam.sx;
  2866.             dir.scaleY = cam.sy;
  2867.             bg.scaleX = cam.sy;
  2868.             bg.scaleY = cam.sy;
  2869.             cam.update();
  2870.          }
  2871.          catch(e:Error)
  2872.          {
  2873.          }
  2874.       }
  2875.       
  2876.       function frame4() : *
  2877.       {
  2878.          stop();
  2879.          linkAG.addEventListener(MouseEvent.CLICK,ag_btnclick,false,0,true);
  2880.          linkAG2.addEventListener(MouseEvent.CLICK,ag_btnclick2,false,0,true);
  2881.          linkGG.addEventListener(MouseEvent.CLICK,gg_btnclick,false,0,true);
  2882.          linkED.addEventListener(MouseEvent.CLICK,ed_btnclick,false,0,true);
  2883.          btn1.addEventListener(MouseEvent.CLICK,playBTN,false,0,true);
  2884.          btn3.addEventListener(MouseEvent.CLICK,downloadable,false,0,true);
  2885.       }
  2886.       
  2887.       public function mouseHandelerD(param1:MouseEvent) : *
  2888.       {
  2889.          if(!paus)
  2890.          {
  2891.             kM = true;
  2892.          }
  2893.       }
  2894.       
  2895.       public function lockControls() : *
  2896.       {
  2897.          kW = false;
  2898.          kS = false;
  2899.          kA = false;
  2900.          kD = false;
  2901.          kUp = false;
  2902.          kDown = false;
  2903.          kLeft = false;
  2904.          kRight = false;
  2905.          kM = false;
  2906.          kSpace = false;
  2907.       }
  2908.       
  2909.       public function mouseHandelerU(param1:MouseEvent) : *
  2910.       {
  2911.          if(!paus)
  2912.          {
  2913.             kM = false;
  2914.          }
  2915.       }
  2916.       
  2917.       public function gg_btnclick(param1:MouseEvent) : *
  2918.       {
  2919.          navigateToURL(new URLRequest("http://www.glaielgames.com"),"_blank");
  2920.       }
  2921.       
  2922.       public function credy() : *
  2923.       {
  2924.          framey = "credits";
  2925.          fadery.play();
  2926.       }
  2927.       
  2928.       public function downloadable(param1:MouseEvent) : *
  2929.       {
  2930.          navigateToURL(new URLRequest("http://www.armorgames.com/misc/downloads/aether.zip"),"_blank");
  2931.       }
  2932.       
  2933.       public function expl(param1:MouseEvent) : *
  2934.       {
  2935.          explode = true;
  2936.       }
  2937.       
  2938.       public function goBTN2(param1:Event) : *
  2939.       {
  2940.          cut.play();
  2941.       }
  2942.       
  2943.       public function calculatepcent(param1:ProgressEvent) : *
  2944.       {
  2945.          loadPerc = param1.bytesLoaded / param1.bytesTotal;
  2946.       }
  2947.       
  2948.       public function playBTN(param1:Event) : *
  2949.       {
  2950.          framey = "cutscene";
  2951.          fadery.play();
  2952.       }
  2953.       
  2954.       public function aliem() : *
  2955.       {
  2956.          var _loc1_:int = 0;
  2957.          var _loc2_:int = 0;
  2958.          var _loc3_:int = 0;
  2959.          var _loc4_:int = 0;
  2960.          var _loc5_:int = 0;
  2961.          var _loc6_:int = 0;
  2962.          var _loc7_:int = 0;
  2963.          var _loc8_:Vector = null;
  2964.          var _loc9_:Vector = null;
  2965.          var _loc10_:int = 0;
  2966.          var _loc11_:MovieClip = null;
  2967.          var _loc12_:* = undefined;
  2968.          var _loc13_:* = undefined;
  2969.          var _loc14_:Vector = null;
  2970.          var _loc15_:Number = NaN;
  2971.          aliens.push(new Array(new Hippo(),1,2,0,0.4,new Array("\nSometimes my stomach hurts...","\nI\'ll be happy when I\'m dead."),new Vector(100,-90)));
  2972.          aliens.push(new Array(new Bird(),1,100,0,3,new Array("\nIt\'s sad to be alone.","\nAt least no one can hurt me here."),new Vector(50,-50)));
  2973.          _loc1_ = 0;
  2974.          while(_loc1_ < 15)
  2975.          {
  2976.             aliens.push(new Array(new Bird(),1.1,2,0,0.8,new Array(""),new Vector(0,0)));
  2977.             _loc1_++;
  2978.          }
  2979.          aliens.push(new Array(new Boy1(),1,1,0,1,new Array("\nI\'m stuck \nhere because I\'m ┬ábad.","I\'m going to blow this place up one day."),new Vector(70,-80)));
  2980.          aliens.push(new Array(new Boy2(),1.2,1,0,1,new Array("...\nWhy do you look like me?\n..."),new Vector(0,-170)));
  2981.          aliens.push(new Array(new Dead(),1.2,12,0,1,new Array("\nI\'m cool cause I\'m dead.","\n\nMy feet itch..."),new Vector(50,-70)));
  2982.          aliens.push(new Array(new Screamo2(),1,11,0,1,new Array("\n\nAAAAHHHHH!!","\n\nDon\'t Hurt Me!"),new Vector(70,-90)));
  2983.          _loc2_ = 0;
  2984.          while(_loc2_ < 4)
  2985.          {
  2986.             aliens.push(new Array(new Screamo1(),1.1,11,0,1.5,new Array(""),new Vector(60,-70)));
  2987.             _loc2_++;
  2988.          }
  2989.          aliens.push(new Array(new Slug(),1.3,4,0,0.2,new Array("I\'ll never amount to anything, they all think I\'m dumb.","\nOne day I\'ll be great and show them all!"),new Vector(140,-130)));
  2990.          aliens.push(new Array(new Sunfish(),2,3,new Vector(3,0),3,new Array("\nYou\'re nothing special.","\nLeave me alone."),new Vector(90,-70),planets[3][2],planets[3][3] - 100,0));
  2991.          _loc3_ = 0;
  2992.          while(_loc3_ < 70)
  2993.          {
  2994.             _loc7_ = aliens.push(new Array(new Wiggle(),2.1,4,new Vector(Math.random() * 4 - 2,Math.random() * 4 - 2),2,new Array(""),new Vector(0,0),planets[4][2] + 20,planets[4][2] + 200,0));
  2995.             aliens[_loc7_ - 1][0].ani.gotoAndPlay(Math.floor(Math.random() * 16) + 1);
  2996.             _loc3_++;
  2997.          }
  2998.          _loc4_ = 0;
  2999.          while(_loc4_ < 25)
  3000.          {
  3001.             aliens.push(new Array(new Birdy(),2.2,0,new Vector(0,-5),6,new Array(""),new Vector(0,0),planets[0][2],planets[0][2] + 300,0));
  3002.             _loc4_++;
  3003.          }
  3004.          aliens.push(new Array(new Tube1(),3,14,0,0.4,new Array("\n\nI\'m glad I left.","\nI wonder if they think about me."),new Vector(70,-70)));
  3005.          aliens.push(new Array(new Tube2(),3.2,13,0,0.4,new Array("\nWe are glad he\'s gone."),new Vector(70,-70)));
  3006.          aliens.push(new Array(new Tube2(),3.1,13,0,0.4,new Array(""),new Vector(70,-70)));
  3007.          aliens.push(new Array(new Tube2(),3.1,13,0,0.4,new Array(""),new Vector(70,-70)));
  3008.          _loc5_ = aliens.push(new Array(new Runaway(),4,-1,0,0.4,new Array("\nI\'m so outta here!","\nWhere\'s the bathroom?"),new Vector(100,-80))) - 1;
  3009.          aliens[_loc5_][0].x = 0;
  3010.          aliens[_loc5_][0].y = 10000;
  3011.          _loc5_ = aliens.push(new Array(new Spaceman(),4,-1,0,0.4,new Array("\nYou really shouldn\'t be out here.","\nIt\'s not safe out here alone."),new Vector(100,-80))) - 1;
  3012.          aliens[_loc5_][0].x = 10000;
  3013.          aliens[_loc5_][0].y = -1000;
  3014.          _loc5_ = aliens.push(new Array(new Lost(),4,-1,0,0.4,new Array("\nAm I going to die?"),new Vector(60,-50))) - 1;
  3015.          aliens[_loc5_][0].x = -12000;
  3016.          aliens[_loc5_][0].y = 1000;
  3017.          _loc6_ = 0;
  3018.          while(_loc6_ < aliens.length)
  3019.          {
  3020.             container1.addChild(aliens[_loc6_][0]);
  3021.             if(aliens[_loc6_][1] != 4)
  3022.             {
  3023.                if(aliens[_loc6_][2] != 100)
  3024.                {
  3025.                   if(aliens[_loc6_][1] != 1.2)
  3026.                   {
  3027.                      (_loc8_ = new Vector(planets[aliens[_loc6_][2]][2],0)).rotate(Math.random() * 360);
  3028.                      aliens[_loc6_][0].x = planets[aliens[_loc6_][2]][0].x + _loc8_.x;
  3029.                      aliens[_loc6_][0].y = planets[aliens[_loc6_][2]][0].y + _loc8_.y;
  3030.                      aliens[_loc6_][0].rotation = Vector.angle2(new Vector(0,-1),_loc8_);
  3031.                   }
  3032.                   else
  3033.                   {
  3034.                      _loc8_ = new Vector(0,-planets[aliens[_loc6_][2]][2]);
  3035.                      aliens[_loc6_][0].x = planets[aliens[_loc6_][2]][0].x + _loc8_.x;
  3036.                      aliens[_loc6_][0].y = planets[aliens[_loc6_][2]][0].y + _loc8_.y;
  3037.                      aliens[_loc6_][0].rotation = Vector.angle2(new Vector(0,-1),_loc8_);
  3038.                   }
  3039.                }
  3040.                else
  3041.                {
  3042.                   (_loc8_ = new Vector(planets[2][3],0)).rotate(Math.random() * 360);
  3043.                   aliens[_loc6_][0].x = planets[2][0].x + _loc8_.x;
  3044.                   aliens[_loc6_][0].y = planets[2][0].y + _loc8_.y;
  3045.                   aliens[_loc6_][0].rotation = Vector.angle2(new Vector(0,-1),_loc8_);
  3046.                }
  3047.             }
  3048.             else
  3049.             {
  3050.                _loc9_ = new Vector(0,0);
  3051.                _loc10_ = 0;
  3052.                while(_loc10_ < 5)
  3053.                {
  3054.                   _loc11_ = planets[_loc10_][0];
  3055.                   _loc12_ = planets[_loc10_][1];
  3056.                   _loc13_ = planets[_loc10_][2];
  3057.                   _loc15_ = (_loc14_ = new Vector(_loc11_.x - aliens[_loc6_][0].x,_loc11_.y - aliens[_loc6_][0].y)).length;
  3058.                   _loc14_.length = _loc12_ / (_loc15_ * _loc15_);
  3059.                   _loc9_.x += _loc14_.x;
  3060.                   _loc9_.y += _loc14_.y;
  3061.                   _loc10_++;
  3062.                }
  3063.                aliens[_loc6_][0].rotation = Vector.angle2(new Vector(0,1),_loc9_);
  3064.             }
  3065.             _loc6_++;
  3066.          }
  3067.       }
  3068.       
  3069.       public function alien() : *
  3070.       {
  3071.          var _loc1_:int = 0;
  3072.          var _loc2_:Number = NaN;
  3073.          var _loc3_:MovieClip = null;
  3074.          var _loc4_:Number = NaN;
  3075.          var _loc5_:Vector = null;
  3076.          var _loc6_:Vector = null;
  3077.          var _loc7_:Vector = null;
  3078.          var _loc8_:Number = NaN;
  3079.          var _loc9_:Number = NaN;
  3080.          var _loc10_:Vector = null;
  3081.          _loc1_ = 0;
  3082.          while(_loc1_ < aliens.length)
  3083.          {
  3084.             if(aliens[_loc1_][2] != 100 && aliens[_loc1_][2] != -1)
  3085.             {
  3086.                aliens[_loc1_][0].visible = planets[aliens[_loc1_][2]][0].visible;
  3087.             }
  3088.             if(aliens[_loc1_][0].visible)
  3089.             {
  3090.                if(aliens[_loc1_][1] == 1 || aliens[_loc1_][1] == 1.1 || aliens[_loc1_][1] == 1.2 || aliens[_loc1_][1] == 1.3)
  3091.                {
  3092.                   if(Math.random() < 0.05)
  3093.                   {
  3094.                      aliens[_loc1_][3] = (Math.floor(Math.random() * 3) - 1) * aliens[_loc1_][4];
  3095.                   }
  3096.                   if(aliens[_loc1_][2] == 2 && aliens[_loc1_][0].y < planets[2][0].y && aliens[_loc1_][0].x - planets[2][0].x < 100 && aliens[_loc1_][0].x - planets[2][0].x >= 0)
  3097.                   {
  3098.                      aliens[_loc1_][3] = aliens[_loc1_][4];
  3099.                   }
  3100.                   if(aliens[_loc1_][2] == 2 && aliens[_loc1_][0].y < planets[2][0].y && aliens[_loc1_][0].x - planets[2][0].x > -100 && aliens[_loc1_][0].x - planets[2][0].x < 0)
  3101.                   {
  3102.                      aliens[_loc1_][3] = -aliens[_loc1_][4];
  3103.                   }
  3104.                   if(aliens[_loc1_][1] == 1.2)
  3105.                   {
  3106.                      aliens[_loc1_][3] = 0;
  3107.                   }
  3108.                   if(aliens[_loc1_][2] == 100)
  3109.                   {
  3110.                      _loc2_ = planets[2][3];
  3111.                      _loc3_ = planets[2][0];
  3112.                   }
  3113.                   else
  3114.                   {
  3115.                      _loc2_ = planets[aliens[_loc1_][2]][2];
  3116.                      _loc3_ = planets[aliens[_loc1_][2]][0];
  3117.                   }
  3118.                   _loc4_ = (aliens[_loc1_][0].x - bobber.x) * (aliens[_loc1_][0].x - bobber.x) + (aliens[_loc1_][0].y - bobber.y) * (aliens[_loc1_][0].y - bobber.y);
  3119.                   if(aliens[_loc1_][1] != 1.1)
  3120.                   {
  3121.                      if(_loc4_ < 100 * 100 || _loc4_ < 150 * 150 && aliens[_loc1_][1] == 1.3)
  3122.                      {
  3123.                         if(talph == 0)
  3124.                         {
  3125.                            if(aliens[_loc1_][0].currentFrame != 3 && aliens[_loc1_][0].currentFrame != 4)
  3126.                            {
  3127.                               if(aliens[_loc1_][1] == 1.3)
  3128.                               {
  3129.                                  _loc5_ = new Vector(aliens[_loc1_][0].y - bobber.y,-aliens[_loc1_][0].x + bobber.x);
  3130.                                  if(Vector.dot(_loc5_,Gravity) < 0)
  3131.                                  {
  3132.                                     aliens[_loc1_][0].gotoAndStop(4);
  3133.                                     talk.visible = true;
  3134.                                     talk.txt.text = aliens[_loc1_][5][0];
  3135.                                     talph = 1;
  3136.                                     talk.bubb.scaleX = 1;
  3137.                                  }
  3138.                                  else
  3139.                                  {
  3140.                                     aliens[_loc1_][0].gotoAndStop(3);
  3141.                                     talk.visible = true;
  3142.                                     talk.txt.text = aliens[_loc1_][5][1];
  3143.                                     talph = 1;
  3144.                                     talk.bubb.scaleX = -1;
  3145.                                  }
  3146.                                  _loc6_ = new Vector(talk.bubb.scaleX * -aliens[_loc1_][6].x * talk.scaleX,aliens[_loc1_][6].y * talk.scaleY);
  3147.                                  if(talk.bubb.scaleX == 1)
  3148.                                  {
  3149.                                     _loc6_.y = -90;
  3150.                                  }
  3151.                                  _loc6_.rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(aliens[_loc1_][0].rotation)));
  3152.                                  talk.x = aliens[_loc1_][0].x + _loc6_.x;
  3153.                                  talk.y = aliens[_loc1_][0].y + _loc6_.y;
  3154.                                  talk.rotation = aliens[_loc1_][0].rotation;
  3155.                               }
  3156.                               else
  3157.                               {
  3158.                                  aliens[_loc1_][0].gotoAndStop(3);
  3159.                                  talk.visible = true;
  3160.                                  talk.txt.text = aliens[_loc1_][5][Math.floor(Math.random() * aliens[_loc1_][5].length)];
  3161.                                  talph = 1;
  3162.                               }
  3163.                            }
  3164.                         }
  3165.                         if(talph == 1 && (aliens[_loc1_][0].currentFrame == 3 || aliens[_loc1_][0].currentFrame == 4))
  3166.                         {
  3167.                            if(aliens[_loc1_][1] != 1.2 && aliens[_loc1_][1] != 1.3)
  3168.                            {
  3169.                               _loc5_ = new Vector(aliens[_loc1_][0].y - bobber.y,-aliens[_loc1_][0].x + bobber.x);
  3170.                               if(Vector.dot(_loc5_,Gravity) < 0)
  3171.                               {
  3172.                                  aliens[_loc1_][0].scaleX = 1;
  3173.                               }
  3174.                               else
  3175.                               {
  3176.                                  aliens[_loc1_][0].scaleX = -1;
  3177.                               }
  3178.                            }
  3179.                            if(aliens[_loc1_][1] != 1.3)
  3180.                            {
  3181.                               (_loc6_ = new Vector(aliens[_loc1_][0].scaleX * -aliens[_loc1_][6].x * talk.scaleX,aliens[_loc1_][6].y * talk.scaleY)).rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(aliens[_loc1_][0].rotation)));
  3182.                               talk.x = aliens[_loc1_][0].x + _loc6_.x;
  3183.                               talk.y = aliens[_loc1_][0].y + _loc6_.y;
  3184.                               talk.rotation = aliens[_loc1_][0].rotation;
  3185.                               talk.bubb.scaleX = aliens[_loc1_][0].scaleX;
  3186.                            }
  3187.                         }
  3188.                      }
  3189.                      else if((aliens[_loc1_][0].currentFrame == 3 || aliens[_loc1_][0].currentFrame == 4) && (_loc4_ > 150 * 150 && aliens[_loc1_][1] != 1.3 || _loc4_ > 200 * 200 && aliens[_loc1_][1] == 1.3))
  3190.                      {
  3191.                         if(aliens[_loc1_][0].currentFrame == 3 || aliens[_loc1_][0].currentFrame == 4)
  3192.                         {
  3193.                            aliens[_loc1_][0].gotoAndStop(1);
  3194.                            talph = 0;
  3195.                         }
  3196.                      }
  3197.                   }
  3198.                   if(aliens[_loc1_][3] != 0 && aliens[_loc1_][0].currentFrame != 3 && aliens[_loc1_][0].currentFrame != 4)
  3199.                   {
  3200.                      (_loc7_ = new Vector(aliens[_loc1_][0].x - _loc3_.x,aliens[_loc1_][0].y - _loc3_.y)).rotate(aliens[_loc1_][3]);
  3201.                      _loc7_.length = _loc2_;
  3202.                      if(aliens[_loc1_][1] != 1.3)
  3203.                      {
  3204.                         if(aliens[_loc1_][3] > 0)
  3205.                         {
  3206.                            aliens[_loc1_][0].scaleX = -1;
  3207.                         }
  3208.                         else
  3209.                         {
  3210.                            aliens[_loc1_][0].scaleX = 1;
  3211.                         }
  3212.                      }
  3213.                      if(aliens[_loc1_][0].currentFrame == 1)
  3214.                      {
  3215.                         aliens[_loc1_][0].gotoAndStop(2);
  3216.                      }
  3217.                      aliens[_loc1_][0].x = _loc3_.x + _loc7_.x;
  3218.                      aliens[_loc1_][0].y = _loc3_.y + _loc7_.y;
  3219.                      aliens[_loc1_][0].rotation = Vector.angle2(new Vector(0,-1),_loc7_);
  3220.                   }
  3221.                   else if(aliens[_loc1_][0].currentFrame == 2)
  3222.                   {
  3223.                      aliens[_loc1_][0].gotoAndStop(1);
  3224.                   }
  3225.                   if(aliens[_loc1_][2] == 1 && gassed == 0)
  3226.                   {
  3227.                      container1.removeChild(aliens[_loc1_][0]);
  3228.                      aliens.splice(_loc1_,1);
  3229.                      _loc1_--;
  3230.                   }
  3231.                }
  3232.             }
  3233.             if(aliens[_loc1_][1] == 2.2)
  3234.             {
  3235.                aliens[_loc1_][7] = planets[0][2];
  3236.                if(planets[0][2] < 100)
  3237.                {
  3238.                   container1.removeChild(aliens[_loc1_][0]);
  3239.                   aliens.splice(_loc1_,1);
  3240.                   _loc1_--;
  3241.                }
  3242.             }
  3243.             if(aliens[_loc1_][1] == 2 || aliens[_loc1_][1] == 2.1 || aliens[_loc1_][1] == 2.2)
  3244.             {
  3245.                _loc8_ = aliens[_loc1_][7];
  3246.                _loc9_ = aliens[_loc1_][8];
  3247.                if(aliens[_loc1_][2] == 100)
  3248.                {
  3249.                   _loc3_ = planets[2][0];
  3250.                }
  3251.                else
  3252.                {
  3253.                   _loc3_ = planets[aliens[_loc1_][2]][0];
  3254.                }
  3255.                if((_loc10_ = new Vector(aliens[_loc1_][0].x - _loc3_.x,aliens[_loc1_][0].y - _loc3_.y)).length2 == 0)
  3256.                {
  3257.                   _loc10_.x = 0.1;
  3258.                }
  3259.                aliens[_loc1_][0].rotation = Vector.angle2(new Vector(0,-1),_loc10_);
  3260.                if(aliens[_loc1_][1] != 2.1)
  3261.                {
  3262.                   aliens[_loc1_][3].rotate(aliens[_loc1_][9]);
  3263.                   if(Math.random() < 0.05)
  3264.                   {
  3265.                      aliens[_loc1_][9] = Math.random() * 20 - 10;
  3266.                   }
  3267.                }
  3268.                if(_loc10_.length2 > _loc9_ * _loc9_)
  3269.                {
  3270.                   aliens[_loc1_][3].x -= _loc10_.x / _loc10_.length;
  3271.                   aliens[_loc1_][3].y -= _loc10_.y / _loc10_.length;
  3272.                }
  3273.                if(_loc10_.length2 < _loc8_ * _loc8_)
  3274.                {
  3275.                   aliens[_loc1_][3].x += _loc10_.x / _loc10_.length;
  3276.                   aliens[_loc1_][3].y += _loc10_.y / _loc10_.length;
  3277.                   if(aliens[_loc1_][1] == 2.2 && aliens[_loc1_][0].currentFrame == 1)
  3278.                   {
  3279.                      aliens[_loc1_][0].gotoAndStop(4);
  3280.                   }
  3281.                }
  3282.                if(aliens[_loc1_][1] != 2.1)
  3283.                {
  3284.                   if(Vector.dot(_loc10_.perpendicular(),aliens[_loc1_][3]) < 0)
  3285.                   {
  3286.                      aliens[_loc1_][0].scaleX = -1;
  3287.                   }
  3288.                   else
  3289.                   {
  3290.                      aliens[_loc1_][0].scaleX = 1;
  3291.                   }
  3292.                }
  3293.                if(aliens[_loc1_][3].length2 < 1)
  3294.                {
  3295.                   aliens[_loc1_][3].length = 1;
  3296.                }
  3297.                if(aliens[_loc1_][3].length2 > aliens[_loc1_][4] * aliens[_loc1_][4])
  3298.                {
  3299.                   aliens[_loc1_][3].length = aliens[_loc1_][4];
  3300.                }
  3301.                _loc4_ = (aliens[_loc1_][0].x - bobber.x) * (aliens[_loc1_][0].x - bobber.x) + (aliens[_loc1_][0].y - bobber.y) * (aliens[_loc1_][0].y - bobber.y);
  3302.                if(aliens[_loc1_][1] == 2.2 && (_loc4_ < 100 * 100 || Math.random() < 0.005 || _loc10_.length2 > (_loc8_ + 10) * (_loc8_ + 10)) && aliens[_loc1_][0].currentFrame == 4)
  3303.                {
  3304.                   aliens[_loc1_][0].gotoAndStop(1);
  3305.                }
  3306.                if(aliens[_loc1_][0].currentFrame != 4)
  3307.                {
  3308.                   aliens[_loc1_][0].x += aliens[_loc1_][3].x;
  3309.                   aliens[_loc1_][0].y += aliens[_loc1_][3].y;
  3310.                }
  3311.                if(aliens[_loc1_][1] != 2.1 && aliens[_loc1_][1] != 2.2)
  3312.                {
  3313.                   if(_loc4_ < 150 * 150)
  3314.                   {
  3315.                      if(talph == 0)
  3316.                      {
  3317.                         if(aliens[_loc1_][0].currentFrame != 2 && aliens[_loc1_][0].currentFrame != 3)
  3318.                         {
  3319.                            aliens[_loc1_][0].gotoAndStop(2);
  3320.                            talk.visible = true;
  3321.                            talk.txt.text = aliens[_loc1_][5][Math.floor(Math.random() * aliens[_loc1_][5].length)];
  3322.                            talph = 1;
  3323.                         }
  3324.                      }
  3325.                      if(talph == 1 && (aliens[_loc1_][0].currentFrame == 2 || aliens[_loc1_][0].currentFrame == 3))
  3326.                      {
  3327.                         (_loc6_ = new Vector(-aliens[_loc1_][0].scaleX * -aliens[_loc1_][6].x * talk.scaleX,aliens[_loc1_][6].y * talk.scaleY)).rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(aliens[_loc1_][0].rotation)));
  3328.                         talk.x = aliens[_loc1_][0].x + _loc6_.x;
  3329.                         talk.y = aliens[_loc1_][0].y + _loc6_.y;
  3330.                         talk.rotation = aliens[_loc1_][0].rotation;
  3331.                         talk.bubb.scaleX = -aliens[_loc1_][0].scaleX;
  3332.                      }
  3333.                   }
  3334.                   else if((aliens[_loc1_][0].currentFrame == 2 || aliens[_loc1_][0].currentFrame == 3) && _loc4_ > 150 * 150)
  3335.                   {
  3336.                      if(aliens[_loc1_][0].currentFrame == 2 || aliens[_loc1_][0].currentFrame == 3)
  3337.                      {
  3338.                         aliens[_loc1_][0].gotoAndStop(1);
  3339.                         talph = 0;
  3340.                      }
  3341.                   }
  3342.                }
  3343.             }
  3344.             if(aliens[_loc1_][1] == 3 || aliens[_loc1_][1] == 3.1 || aliens[_loc1_][1] == 3.2)
  3345.             {
  3346.                _loc4_ = (aliens[_loc1_][0].x - bobber.x) * (aliens[_loc1_][0].x - bobber.x) + (aliens[_loc1_][0].y - bobber.y) * (aliens[_loc1_][0].y - bobber.y);
  3347.                if(aliens[_loc1_][1] == 3)
  3348.                {
  3349.                   if(_loc4_ < 150 * 150 && currentPlanet == aliens[_loc1_][2])
  3350.                   {
  3351.                      if(aliens[_loc1_][0].currentFrame == 1 && aliens[_loc1_][0].ani != null && aliens[_loc1_][0].ani.currentFrame >= 9)
  3352.                      {
  3353.                         aliens[_loc1_][0].gotoAndStop(2);
  3354.                      }
  3355.                   }
  3356.                   else if(aliens[_loc1_][0].currentFrame == 2 && aliens[_loc1_][0].ani != null && aliens[_loc1_][0].ani.currentFrame >= 9)
  3357.                   {
  3358.                      aliens[_loc1_][0].gotoAndStop(1);
  3359.                   }
  3360.                }
  3361.                else if(Math.random() < 0.03 && aliens[_loc1_][0].currentFrame != 3)
  3362.                {
  3363.                   if(aliens[_loc1_][0].currentFrame == 1 && aliens[_loc1_][0].ani != null && aliens[_loc1_][0].ani.currentFrame >= 9)
  3364.                   {
  3365.                      aliens[_loc1_][0].gotoAndStop(2);
  3366.                   }
  3367.                   else if(aliens[_loc1_][0].currentFrame == 2 && aliens[_loc1_][0].ani != null && aliens[_loc1_][0].ani.currentFrame >= 9)
  3368.                   {
  3369.                      aliens[_loc1_][0].gotoAndStop(1);
  3370.                   }
  3371.                }
  3372.                if(_loc4_ < 50 * 50 && aliens[_loc1_][0].currentFrame == 2)
  3373.                {
  3374.                   if(talph == 0 && aliens[_loc1_][1] != 3.1)
  3375.                   {
  3376.                      if(aliens[_loc1_][0].currentFrame == 2 && aliens[_loc1_][0].ani != null && aliens[_loc1_][0].ani.currentFrame >= 9)
  3377.                      {
  3378.                         aliens[_loc1_][0].gotoAndStop(3);
  3379.                         talk.visible = true;
  3380.                         talk.txt.text = aliens[_loc1_][5][Math.floor(Math.random() * aliens[_loc1_][5].length)];
  3381.                         talph = 1;
  3382.                         talk.bubb.scaleX = 1;
  3383.                         (_loc6_ = new Vector(aliens[_loc1_][0].scaleX * -aliens[_loc1_][6].x * talk.scaleX,aliens[_loc1_][6].y * talk.scaleY)).rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(aliens[_loc1_][0].rotation)));
  3384.                         talk.x = aliens[_loc1_][0].x + _loc6_.x;
  3385.                         talk.y = aliens[_loc1_][0].y + _loc6_.y;
  3386.                         talk.rotation = aliens[_loc1_][0].rotation;
  3387.                         talk.bubb.scaleX = aliens[_loc1_][0].scaleX;
  3388.                      }
  3389.                   }
  3390.                }
  3391.                if(_loc4_ > 100 * 100 && aliens[_loc1_][0].currentFrame == 3)
  3392.                {
  3393.                   talph = 0;
  3394.                   aliens[_loc1_][0].gotoAndStop(1);
  3395.                }
  3396.             }
  3397.             if(aliens[_loc1_][1] == 4)
  3398.             {
  3399.                if((_loc4_ = (aliens[_loc1_][0].x - bobber.x) * (aliens[_loc1_][0].x - bobber.x) + (aliens[_loc1_][0].y - bobber.y) * (aliens[_loc1_][0].y - bobber.y)) < 150 * 150)
  3400.                {
  3401.                   if(talph == 0)
  3402.                   {
  3403.                      if(aliens[_loc1_][0].currentFrame == 1)
  3404.                      {
  3405.                         aliens[_loc1_][0].gotoAndStop(2);
  3406.                         talk.visible = true;
  3407.                         talk.txt.text = aliens[_loc1_][5][Math.floor(Math.random() * aliens[_loc1_][5].length)];
  3408.                         talph = 1;
  3409.                         talk.bubb.scaleX = 1;
  3410.                         (_loc6_ = new Vector(aliens[_loc1_][0].scaleX * -aliens[_loc1_][6].x * talk.scaleX,aliens[_loc1_][6].y * talk.scaleY)).rotate(Vector.angle2(new Vector(0,-1),new Vector(0,-1).rotateNew(aliens[_loc1_][0].rotation)));
  3411.                         talk.x = aliens[_loc1_][0].x + _loc6_.x;
  3412.                         talk.y = aliens[_loc1_][0].y + _loc6_.y;
  3413.                         talk.rotation = aliens[_loc1_][0].rotation;
  3414.                         talk.bubb.scaleX = aliens[_loc1_][0].scaleX;
  3415.                      }
  3416.                   }
  3417.                }
  3418.                if(_loc4_ > 200 * 200 && aliens[_loc1_][0].currentFrame == 2)
  3419.                {
  3420.                   talph = 0;
  3421.                   aliens[_loc1_][0].gotoAndStop(1);
  3422.                }
  3423.             }
  3424.             _loc1_++;
  3425.          }
  3426.          talk.alpha += (talph - (talk.alpha - (talph - 0.5))) / 10;
  3427.          if(talk.alpha < 0.01)
  3428.          {
  3429.             talk.visible = false;
  3430.          }
  3431.          else
  3432.          {
  3433.             talk.visible = true;
  3434.          }
  3435.       }
  3436.       
  3437.       public function backBTN2(param1:Event) : *
  3438.       {
  3439.          framey = "title";
  3440.          fadery.play();
  3441.       }
  3442.       
  3443.       public function shake(param1:Event) : *
  3444.       {
  3445.          var e:Event = param1;
  3446.          try
  3447.          {
  3448.             if(clouds[8][1] != -1)
  3449.             {
  3450.                clouds[8][0].gaser.poppy.gotoAndPlay(Math.floor(Math.random() * 5) + 1);
  3451.             }
  3452.             if(clouds[9][1] != -1)
  3453.             {
  3454.                clouds[9][0].gaser.poppy.gotoAndPlay(Math.floor(Math.random() * 5) + 1);
  3455.             }
  3456.             if(clouds[10][1] != -1)
  3457.             {
  3458.                clouds[10][0].gaser.poppy.gotoAndPlay(Math.floor(Math.random() * 5) + 1);
  3459.             }
  3460.             if(clouds[11][1] != -1)
  3461.             {
  3462.                clouds[11][0].gaser.poppy.gotoAndPlay(Math.floor(Math.random() * 5) + 1);
  3463.             }
  3464.             if(gemed && inside)
  3465.             {
  3466.                foregrounds[1].planet.gotoAndStop(30);
  3467.                planets[2][0].planet.gotoAndStop(30);
  3468.             }
  3469.          }
  3470.          catch(e:Error)
  3471.          {
  3472.          }
  3473.       }
  3474.       
  3475.       public function uexpl(param1:MouseEvent) : *
  3476.       {
  3477.          explode = false;
  3478.       }
  3479.    }
  3480. }
  3481.