home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / antipacman.swf / scripts / DefineSprite_182 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  19.6 KB  |  663 lines

  1. if(Key.isDown(77))
  2. {
  3.    if(!MPressed)
  4.    {
  5.       _parent.MusicOn = !_parent.MusicOn;
  6.       if(_parent.MusicOn)
  7.       {
  8.          _parent.Music.start(0,1000000000);
  9.       }
  10.       else
  11.       {
  12.          _parent.Music.stop();
  13.       }
  14.    }
  15.    MPressed = true;
  16. }
  17. else
  18. {
  19.    MPressed = false;
  20. }
  21. if(Key.isDown(83))
  22. {
  23.    if(!SPressed)
  24.    {
  25.       _parent.SFXOn = !_parent.SFXOn;
  26.       if(_parent.SFXOn)
  27.       {
  28.          EatDot.setVolume(100);
  29.       }
  30.       else
  31.       {
  32.          EatDot.setVolume(0);
  33.       }
  34.    }
  35.    SPressed = true;
  36. }
  37. else
  38. {
  39.    SPressed = false;
  40. }
  41. if(Key.isDown(80))
  42. {
  43.    if(!PPressed)
  44.    {
  45.       Paused = !Paused;
  46.    }
  47.    PPressed = true;
  48.    PauseScreen.gotoAndStop(1);
  49. }
  50. else
  51. {
  52.    PPressed = false;
  53. }
  54. if(Paused)
  55. {
  56.    PauseScreen.RL._visible = _parent.Lives > 1;
  57.    PauseScreen._visible = true;
  58.    if(PauseScreen._currentframe == 1)
  59.    {
  60.       if(Key.isDown(69))
  61.       {
  62.          if(!EPressed)
  63.          {
  64.             PauseScreen.gotoAndStop(2);
  65.          }
  66.          EPressed = true;
  67.       }
  68.       else
  69.       {
  70.          EPressed = false;
  71.       }
  72.       if(_parent.Lives > 1 and Key.isDown(82))
  73.       {
  74.          if(!RPressed)
  75.          {
  76.             PauseScreen.gotoAndStop(3);
  77.          }
  78.          RPressed = true;
  79.       }
  80.       else
  81.       {
  82.          RPressed = false;
  83.       }
  84.    }
  85.    if(PauseScreen._currentframe == 2)
  86.    {
  87.       if(Key.isDown(89))
  88.       {
  89.          if(!YPressed)
  90.          {
  91.             _parent.gotoAndStop("Game Over");
  92.          }
  93.          YPressed = true;
  94.       }
  95.       else
  96.       {
  97.          YPressed = false;
  98.       }
  99.       if(Key.isDown(78))
  100.       {
  101.          if(!NPressed)
  102.          {
  103.             PauseScreen.gotoAndStop(1);
  104.          }
  105.          NPressed = true;
  106.       }
  107.       else
  108.       {
  109.          NPressed = false;
  110.       }
  111.    }
  112.    if(PauseScreen._currentframe == 3)
  113.    {
  114.       if(Key.isDown(89))
  115.       {
  116.          if(!YPressed)
  117.          {
  118.             _parent.gotoAndStop("Life Lost");
  119.          }
  120.          YPressed = true;
  121.       }
  122.       else
  123.       {
  124.          YPressed = false;
  125.       }
  126.       if(Key.isDown(78))
  127.       {
  128.          if(!NPressed)
  129.          {
  130.             PauseScreen.gotoAndStop(1);
  131.          }
  132.          NPressed = true;
  133.       }
  134.       else
  135.       {
  136.          NPressed = false;
  137.       }
  138.    }
  139. }
  140. else
  141. {
  142.    PauseScreen._visible = false;
  143.    if(Mode == 1)
  144.    {
  145.       if(Key.isDown(49) and GhostsNum >= 1 and !Characters[1].Dead)
  146.       {
  147.          UnderControl = 1;
  148.       }
  149.       if(Key.isDown(50) and GhostsNum >= 2 and !Characters[2].Dead)
  150.       {
  151.          UnderControl = 2;
  152.       }
  153.       if(Key.isDown(51) and GhostsNum >= 3 and !Characters[3].Dead)
  154.       {
  155.          UnderControl = 3;
  156.       }
  157.       if(Key.isDown(52) and GhostsNum >= 4 and !Characters[4].Dead)
  158.       {
  159.          UnderControl = 4;
  160.       }
  161.    }
  162.    if(Key.isDown(37))
  163.    {
  164.       Characters[UnderControl].PendingDir = 4;
  165.    }
  166.    if(Key.isDown(39))
  167.    {
  168.       Characters[UnderControl].PendingDir = 2;
  169.    }
  170.    if(Key.isDown(38))
  171.    {
  172.       Characters[UnderControl].PendingDir = 1;
  173.    }
  174.    if(Key.isDown(40))
  175.    {
  176.       Characters[UnderControl].PendingDir = 3;
  177.    }
  178.    for(cr in Characters)
  179.    {
  180.       if(Characters[cr].Dir != 0)
  181.       {
  182.          Characters[cr].CameFrom = Characters[cr].Dir;
  183.       }
  184.       if(cr == 0 and Mode == 1)
  185.       {
  186.          FillMatrix(Characters[0].AppSquareX,Characters[0].AppSquareY);
  187.          MaxPref = -Infinity;
  188.          SelDir = 0;
  189.          AllZero = true;
  190.          sd = 1;
  191.          while(sd <= 4)
  192.          {
  193.             if(!DirsPref[sd].Zero)
  194.             {
  195.                AllZero = false;
  196.                break;
  197.             }
  198.             sd++;
  199.          }
  200.          if(!AllZero)
  201.          {
  202.             sd = 1;
  203.             while(sd <= 4)
  204.             {
  205.                if(Level[Characters[0].AppSquareX + DirsX[sd]][Characters[0].AppSquareY + DirsY[sd]] != 2 and Level[Characters[0].AppSquareX + DirsX[sd]][Characters[0].AppSquareY + DirsY[sd]] != 4 and DirsPref[sd].Score > MaxPref)
  206.                {
  207.                   MaxPref = DirsPref[sd].Score;
  208.                   SelDir = sd;
  209.                }
  210.                sd++;
  211.             }
  212.             Characters[0].PendingDir = SelDir;
  213.          }
  214.          else
  215.          {
  216.             ClosestOne = Infinity;
  217.             ClosestX = NaN;
  218.             ClosestY = NaN;
  219.             xx = 2;
  220.             while(xx < Level.length - 2)
  221.             {
  222.                yy = 2;
  223.                while(yy < Level[xx].length - 2)
  224.                {
  225.                   Dist = Math.abs(xx - Characters[0].SquareX) + Math.abs(yy - Characters[0].SquareY);
  226.                   if(Level[xx][yy] == 1 and Dist < ClosestOne)
  227.                   {
  228.                      ClosestOne = Dist;
  229.                      ClosestX = xx;
  230.                      ClosestY = yy;
  231.                   }
  232.                   yy++;
  233.                }
  234.                xx++;
  235.             }
  236.             Characters[0].PendingDir = FindDir(cr,Characters[0].AppSquareX,Characters[0].AppSquareY,ClosestX,ClosestY);
  237.          }
  238.       }
  239.       if(cr > 0 and Mode == 2)
  240.       {
  241.          if(Characters[cr].SquareX > 12 and Characters[cr].SquareX < 17 and Characters[cr].SquareY > 12 and Characters[cr].SquareY < 16 and !GhostsBlue)
  242.          {
  243.             Characters[cr].PendingDir = FindDir(cr,Characters[cr].SquareX,Characters[cr].SquareY,15,0);
  244.          }
  245.          FillGhostMatrix(cr,Characters[cr].AppSquareX,Characters[cr].AppSquareY);
  246.          MaxPref = -Infinity;
  247.          SelDir = 0;
  248.          AllZero = true;
  249.          sd = 1;
  250.          while(sd <= 4)
  251.          {
  252.             if(!DirsPref[sd].Zero)
  253.             {
  254.                AllZero = false;
  255.                break;
  256.             }
  257.             sd++;
  258.          }
  259.          if(!AllZero)
  260.          {
  261.             sd = 1;
  262.             while(sd <= 4)
  263.             {
  264.                if(Level[Characters[cr].AppSquareX + DirsX[sd]][Characters[cr].AppSquareY + DirsY[sd]] != 2 and DirsPref[sd].Score > MaxPref)
  265.                {
  266.                   MaxPref = DirsPref[sd].Score;
  267.                   if(!DirsPref[sd].Zero)
  268.                   {
  269.                      AllZero = false;
  270.                   }
  271.                   SelDir = sd;
  272.                }
  273.                sd++;
  274.             }
  275.             Characters[cr].PendingDir = SelDir;
  276.          }
  277.          else if(Characters[cr].Dir == 0 or random(25) == 0)
  278.          {
  279.             RandomDirection(Character[cr]);
  280.          }
  281.       }
  282.       if(Mode == 1 and cr > 0 and cr != UnderControl and Characters[cr].Dir == 0)
  283.       {
  284.          RandomDirection(Characters[cr]);
  285.          Characters[cr].PendingDir = 0;
  286.       }
  287.       if(cr != 0 and cr == UnderControl)
  288.       {
  289.          Characters[cr].Symbol.Glow._visible = true;
  290.          sd = 1;
  291.          while(sd <= GhostsNum)
  292.          {
  293.             if(Characters[cr].Symbol.getDepth() < Characters[sd].Symbol.getDepth())
  294.             {
  295.                Characters[cr].Symbol.swapDepths(Characters[sd].Symbol);
  296.             }
  297.             sd++;
  298.          }
  299.       }
  300.       if(cr != 0 and cr != UnderControl)
  301.       {
  302.          Characters[cr].Symbol.Glow._visible = false;
  303.       }
  304.       if(cr > 0 and Mode == 1 and cr != UnderControl and random(25) == 0)
  305.       {
  306.          Characters[cr].PendingDir = random(4) + 1;
  307.       }
  308.       Characters[cr].MoveX = DirsX[Characters[cr].Dir];
  309.       Characters[cr].MoveY = DirsY[Characters[cr].Dir];
  310.       Characters[cr].NewX = Characters[cr].x + Characters[cr].MoveX * MoveSpeed;
  311.       Characters[cr].NewY = Characters[cr].y + Characters[cr].MoveY * MoveSpeed;
  312.       Characters[cr].AppSquareX = Math.round(Characters[cr].NewX / 15);
  313.       Characters[cr].AppSquareY = Math.round(Characters[cr].NewY / 15);
  314.       if(Characters[cr].NewX == Characters[cr].AppSquareX * 15 and Characters[cr].NewY == Characters[cr].AppSquareY * 15)
  315.       {
  316.          Characters[cr].SquareX = Characters[cr].AppSquareX;
  317.          Characters[cr].SquareY = Characters[cr].AppSquareY;
  318.          if(Level[Characters[cr].SquareX + Characters[cr].MoveX][Characters[cr].SquareY + Characters[cr].MoveY] == 2 or cr == 0 and Level[Characters[cr].SquareX + Characters[cr].MoveX][Characters[cr].SquareY + Characters[cr].MoveY] == 4)
  319.          {
  320.             if(cr != UnderControl and cr != 0)
  321.             {
  322.                RandomDirection(Characters[cr]);
  323.             }
  324.             else
  325.             {
  326.                Characters[cr].Dir = 0;
  327.                if(cr == 0)
  328.                {
  329.                   Characters[cr].Symbol.Inside.gotoAndStop(3);
  330.                   Characters[cr].Symbol.Eye.gotoAndStop(3);
  331.                }
  332.             }
  333.          }
  334.          if(Characters[cr].PendingDir > 0 and Level[Characters[cr].SquareX + DirsX[Characters[cr].PendingDir]][Characters[cr].SquareY + DirsY[Characters[cr].PendingDir]] != 2 and (cr != 0 or Level[Characters[cr].SquareX + DirsX[Characters[cr].PendingDir]][Characters[cr].SquareY + DirsY[Characters[cr].PendingDir]] != 4))
  335.          {
  336.             Characters[cr].Dir = Characters[cr].PendingDir;
  337.             Characters[cr].PendingDir = 0;
  338.          }
  339.       }
  340.       if(cr == 0 and Characters[cr].Dir != 0)
  341.       {
  342.          Characters[cr].Symbol.Inside.play();
  343.          Characters[cr].Symbol.Eye.play();
  344.       }
  345.       if(cr == 0 and (Level[Characters[cr].SquareX][Characters[cr].SquareY] == 1 or Level[Characters[cr].SquareX][Characters[cr].SquareY] == 3))
  346.       {
  347.          this["S" + Characters[cr].SquareX + "x" + Characters[cr].SquareY]._visible = false;
  348.          if(Level[Characters[cr].SquareX][Characters[cr].SquareY] == 3)
  349.          {
  350.             if(_parent.SFXOn)
  351.             {
  352.                BigDot.start();
  353.             }
  354.             TurnGhostsBlue();
  355.             if(Mode == 1)
  356.             {
  357.                _parent.Score -= 20;
  358.             }
  359.             else
  360.             {
  361.                _parent.Score += 20;
  362.             }
  363.          }
  364.          if(Level[Characters[cr].SquareX][Characters[cr].SquareY] == 1)
  365.          {
  366.             if(_parent.SFXOn)
  367.             {
  368.                EatDot.start();
  369.             }
  370.             EatenDots++;
  371.             if(Mode == 1)
  372.             {
  373.                _parent.Score--;
  374.             }
  375.             else
  376.             {
  377.                _parent.Score = _parent.Score + 1;
  378.             }
  379.             if(EatenDots == 241)
  380.             {
  381.                if(Mode == 1)
  382.                {
  383.                   _parent.gotoAndStop("Life Lost");
  384.                }
  385.                else
  386.                {
  387.                   AddLevelScore();
  388.                   _parent.gotoAndStop("Level Complete");
  389.                }
  390.             }
  391.          }
  392.          Level[Characters[cr].SquareX][Characters[cr].SquareY] = 0;
  393.       }
  394.       if(Characters[cr].Fading)
  395.       {
  396.          Characters[cr].FadeCounter += Characters[cr].FadeDir;
  397.          if(Characters[cr].FadeCounter > 10)
  398.          {
  399.             Characters[cr].FadeCounter = 10;
  400.          }
  401.          if(Characters[cr].FadeCounter < 0)
  402.          {
  403.             Characters[cr].FadeCounter = 0;
  404.          }
  405.          Characters[cr].BCol.setTransform({ra:Characters[cr].R * (1 - Characters[cr].FadeCounter / 10),rb:0,ga:Characters[cr].G * (1 - Characters[cr].FadeCounter / 10),gb:0,ba:Characters[cr].B * (1 - Characters[cr].FadeCounter / 10),bb:Characters[cr].FadeCounter * 20,aa:100 - Characters[cr].FadeCounter * 5,ab:0});
  406.          Characters[cr].NCol.setTransform({ra:Characters[cr].FadeCounter * 10,rb:0,ga:Characters[cr].FadeCounter * 10,gb:0,ba:Characters[cr].FadeCounter * 10,bb:0,aa:100,ab:0});
  407.          if(Characters[cr].FadeCounter == 10 or Characters[cr].FadeCounter == 0)
  408.          {
  409.             Characters[cr].Fading = false;
  410.             if(Characters[cr].FadeCounter == 0)
  411.             {
  412.                GhostsBlue = false;
  413.             }
  414.          }
  415.       }
  416.       if(cr != 0)
  417.       {
  418.          switch(Characters[cr].Dir)
  419.          {
  420.             case 1:
  421.                Characters[cr].Symbol.Num._x = 0;
  422.                Characters[cr].Symbol.Num._y = 5.5;
  423.                Characters[cr].Symbol.Num._xscale = 75;
  424.                Characters[cr].Symbol.Num._yscale = 75;
  425.                break;
  426.             case 2:
  427.                Characters[cr].Symbol.Num._x = 5;
  428.                Characters[cr].Symbol.Num._y = 6.5;
  429.                Characters[cr].Symbol.Num._xscale = 50;
  430.                Characters[cr].Symbol.Num._yscale = 75;
  431.                break;
  432.             case 3:
  433.                Characters[cr].Symbol.Num._x = 0;
  434.                Characters[cr].Symbol.Num._y = 7.5;
  435.                Characters[cr].Symbol.Num._xscale = 75;
  436.                Characters[cr].Symbol.Num._yscale = 60;
  437.                break;
  438.             case 4:
  439.                Characters[cr].Symbol.Num._x = -5;
  440.                Characters[cr].Symbol.Num._y = 6.5;
  441.                Characters[cr].Symbol.Num._xscale = 50;
  442.                Characters[cr].Symbol.Num._yscale = 75;
  443.          }
  444.       }
  445.       if(!Characters[cr].Dead)
  446.       {
  447.          Characters[cr].x = Characters[cr].NewX;
  448.          Characters[cr].y = Characters[cr].NewY;
  449.          Characters[cr].Symbol._x = Characters[cr].x + 5;
  450.          Characters[cr].Symbol._y = Characters[cr].y + 5;
  451.          Characters[cr].Symbol.gotoAndStop(Characters[cr].Dir);
  452.       }
  453.       if(Characters[cr].SquareX == 0 and Characters[cr].SquareY == 15 and Characters[cr].Dir == 4)
  454.       {
  455.          Characters[cr].HasCopy = true;
  456.          Characters[cr].x += 435;
  457.          Characters[cr].Symbol._x = Characters[cr].x + 5;
  458.          Characters[cr].SquareX += 29;
  459.          Characters[cr].CopyShift = -435;
  460.       }
  461.       if(Characters[cr].SquareX == 29 and Characters[cr].SquareY == 15 and Characters[cr].Dir == 2)
  462.       {
  463.          Characters[cr].HasCopy = true;
  464.          Characters[cr].x -= 435;
  465.          Characters[cr].Symbol._x = Characters[cr].x + 5;
  466.          Characters[cr].SquareX -= 29;
  467.          Characters[cr].CopyShift = 435;
  468.       }
  469.       if(Characters[cr].HasCopy)
  470.       {
  471.          Characters[cr].Copy._visible = true;
  472.          Characters[cr].Copy._x = Characters[cr].Symbol._x + Characters[cr].CopyShift;
  473.          Characters[cr].Copy._y = Characters[cr].Symbol._y;
  474.          Characters[cr]._alpha = Characters[cr].Symbol._alpha;
  475.          Characters[cr].Copy.gotoAndStop(Characters[cr].Symbol._currentframe);
  476.          if(cr == 0)
  477.          {
  478.             Characters[cr].Copy.Inside.gotoAndStop(Characters[cr].Symbol.Inside._currentframe);
  479.             Characters[cr].Copy.Eye.gotoAndStop(Characters[cr].Symbol.Eye._currentframe);
  480.          }
  481.          else
  482.          {
  483.             Characters[cr].Copy.Num.gotoAndStop(Characters[cr].Symbol.Num._currentframe);
  484.             Characters[cr].Copy.Num._x = Characters[cr].Symbol.Num._x;
  485.             Characters[cr].Copy.Num._y = Characters[cr].Symbol.Num._y;
  486.             Characters[cr].Copy.Num._xscale = Characters[cr].Symbol.Num._xscale;
  487.             Characters[cr].Copy.Num._yscale = Characters[cr].Symbol.Num._yscale;
  488.             Characters[cr].Copy.Glow._visible = Characters[cr].Symbol.Glow._visible;
  489.             Characters[cr].CBCol.setTransform(Characters[cr].BCol.getTransform());
  490.             Characters[cr].CNCol.setTransform(Characters[cr].NCol.getTransform());
  491.             Characters[cr].Copy.swapDepths(Characters[cr].Symbol.getDepth() + 1);
  492.          }
  493.       }
  494.       else
  495.       {
  496.          Characters[cr].Copy._visible = false;
  497.       }
  498.       if(cr != 0 and !Characters[cr].Dead and !Characters[0].Dead and Math.abs(Characters[cr].x - Characters[0].x) + Math.abs(Characters[cr].y - Characters[0].y) <= 20)
  499.       {
  500.          if(GhostsBlue)
  501.          {
  502.             if(_parent.SFXOn)
  503.             {
  504.                GhostDie.start();
  505.             }
  506.             Characters[cr].Dead = true;
  507.             Characters[cr].Die = true;
  508.             Characters[cr].DieCounter = 0;
  509.             if(cr == UnderControl)
  510.             {
  511.                UnderControl = undefined;
  512.             }
  513.             this["GI" + cr].BCol.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0});
  514.             this["GI" + cr].NCol.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0});
  515.             if(Mode == 1)
  516.             {
  517.                _parent.Score -= 100;
  518.             }
  519.             else
  520.             {
  521.                _parent.Score += 100;
  522.             }
  523.          }
  524.          else
  525.          {
  526.             if(_parent.SFXOn)
  527.             {
  528.                PacmanDie.start();
  529.             }
  530.             Characters[0].Dead = true;
  531.             Characters[0].Die = true;
  532.             Characters[0].DieCounter = 0;
  533.          }
  534.       }
  535.       if(Characters[cr].Die)
  536.       {
  537.          Characters[cr].DieCounter = Characters[cr].DieCounter + 1;
  538.          Characters[cr].Symbol._alpha = 100 - Characters[cr].DieCounter * 10;
  539.          if(Characters[cr].DieCounter == 10)
  540.          {
  541.             Characters[cr].Die = false;
  542.             Characters[cr]._visible = false;
  543.             if(cr > 0)
  544.             {
  545.                AllDead = true;
  546.                tg = 1;
  547.                while(tg <= GhostsNum)
  548.                {
  549.                   if(!Characters[tg].Dead)
  550.                   {
  551.                      AllDead = false;
  552.                      break;
  553.                   }
  554.                   tg++;
  555.                }
  556.                AnyGhostsAlive = !AllDead;
  557.             }
  558.             if(Mode == 1)
  559.             {
  560.                if(cr == 0)
  561.                {
  562.                   AddLevelScore();
  563.                   _parent.gotoAndStop("Level Complete");
  564.                }
  565.                else if(!AnyGhostsAlive)
  566.                {
  567.                   _parent.gotoAndStop("Life Lost");
  568.                }
  569.             }
  570.             if(Mode == 2)
  571.             {
  572.                if(cr == 0)
  573.                {
  574.                   _parent.gotoAndStop("Life Lost");
  575.                }
  576.             }
  577.          }
  578.       }
  579.    }
  580.    if(GhostsBlue)
  581.    {
  582.       BlueCounter++;
  583.       if(BlueCounter == BlueTime)
  584.       {
  585.          gh = 1;
  586.          while(gh <= GhostsNum)
  587.          {
  588.             Characters[gh].Fading = true;
  589.             Characters[gh].FadeDir = -1;
  590.             Characters[gh].FadeCounter = 10;
  591.             gh++;
  592.          }
  593.       }
  594.    }
  595.    Bonuses._visible = BonusOut;
  596.    if(Mode == 2 and AnyGhostsAlive and !BonusOut and random(250) == 0)
  597.    {
  598.       BonusOut = true;
  599.       BonusCounter = 250;
  600.       BonusType = random(Bonuses._totalframes) + 1;
  601.       Bonuses.gotoAndStop(BonusType);
  602.    }
  603.    if(BonusOut)
  604.    {
  605.       BonusCounter--;
  606.       if(BonusCounter >= 200)
  607.       {
  608.          Bonuses._alpha = (250 - BonusCounter) * 2;
  609.       }
  610.       if(BonusCounter < 50)
  611.       {
  612.          Bonuses._alpha = BonusCounter * 2;
  613.       }
  614.       if(BonusCounter == 0)
  615.       {
  616.          BonusOut = false;
  617.       }
  618.       if((Characters[0].SquareX == 14 or Characters[0].SquareX == 15) and Characters[0].SquareY == 18)
  619.       {
  620.          BonusOut = false;
  621.          switch(BonusType)
  622.          {
  623.             case 1:
  624.                _parent.Score += 100;
  625.                break;
  626.             case 2:
  627.                _parent.Score += 200;
  628.                break;
  629.             case 3:
  630.                _parent.Score += 300;
  631.                break;
  632.             case 4:
  633.                _parent.Lives = _parent.Lives + 1;
  634.                break;
  635.             case 5:
  636.                TurnGhostsBlue();
  637.          }
  638.          if(_parent.SFXOn)
  639.          {
  640.             EatBonus.start();
  641.          }
  642.       }
  643.    }
  644.    gi = 1;
  645.    while(gi <= GhostsNum)
  646.    {
  647.       if(gi == UnderControl)
  648.       {
  649.          this["GI" + gi].Selected._visible = true;
  650.       }
  651.       else
  652.       {
  653.          this["GI" + gi].Selected._visible = false;
  654.       }
  655.       gi++;
  656.    }
  657.    UpdateIndicator(ScoreInd,_parent.Score);
  658.    UpdateIndicator(LevelInd,LevelRep);
  659.    UpdateIndicator(LivesInd,_parent.Lives);
  660. }
  661. MusicOff._visible = !_parent.MusicOn;
  662. SFXOff._visible = !_parent.SFXOn;
  663.