home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Frizzle_fraz.swf / scripts / Code / LIB / _lx496.as < prev    next >
Encoding:
Text File  |  2008-09-26  |  5.7 KB  |  182 lines

  1. package Code.LIB
  2. {
  3.    import Code.LIB.SOUND._wj196;
  4.    import Code.OPTIONS._dx111;
  5.    import flash.display.Sprite;
  6.    import flash.events.Event;
  7.    import flash.text.TextField;
  8.    import flash.text.TextFormat;
  9.    import flash.utils.getTimer;
  10.    
  11.    public class _lx496 extends _pd424
  12.    {
  13.        
  14.       
  15.       public var menuItem:int = -1;
  16.       
  17.       private var iTimer:int;
  18.       
  19.       protected var speakerMount:_iv163;
  20.       
  21.       protected var iBackground:_iv163;
  22.       
  23.       private var iFrame:_iv163;
  24.       
  25.       private var iDebugTextFormat:TextFormat;
  26.       
  27.       private var iDebugText:TextField;
  28.       
  29.       protected var iWindow:_ei76;
  30.       
  31.       public function _lx496()
  32.       {
  33.          var _loc1_:Sprite = null;
  34.          menuItem = -1;
  35.          iTimer = getTimer();
  36.          super();
  37.          _bm350._ij151();
  38.          _wj196._nk262(_dx111._wj196);
  39.          _loc1_ = new _dx111.TButtonMount();
  40.          _loc1_.scaleX = 80 / 200;
  41.          _loc1_.scaleY = 36 / 100;
  42.          _loc1_.alpha = 0.5;
  43.          speakerMount = _uu24._sa70(_loc1_);
  44.          speakerMount._gm53(695,3);
  45.          if(_bm350.iDebug)
  46.          {
  47.             iDebugText = new TextField();
  48.             iDebugTextFormat = new TextFormat(null,20,16777215);
  49.             iDebugText.x = 30;
  50.             super.addChild(iDebugText);
  51.          }
  52.          _nd174._nk262();
  53.          if(!_nd174._ai238)
  54.          {
  55.             _wj196._ao83 = 0.6;
  56.             _wj196._qt85 = 0.9;
  57.          }
  58.          else
  59.          {
  60.             _wj196._ao83 = _nd174._ai238[1].prMVolume;
  61.             _wj196._qt85 = _nd174._ai238[1].prSVolume;
  62.          }
  63.          this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
  64.          _bm350.prStage.addEventListener(Event.RESIZE,onResize);
  65.          iFrame = new _iv163();
  66.          addChild(iFrame);
  67.       }
  68.       
  69.       protected function onResize(param1:Event) : void
  70.       {
  71.          var _loc2_:_pd424 = null;
  72.          var _loc3_:TextField = null;
  73.          var _loc4_:int = 0;
  74.          var _loc5_:_iv163 = null;
  75.          var _loc6_:Sprite = null;
  76.          _bm350._ij151();
  77.          if(this.iWindow)
  78.          {
  79.             iWindow._fy281();
  80.             this.removeChild(iWindow);
  81.             this.iWindow = null;
  82.             if(!_nd174._ai238)
  83.             {
  84.                this.menuItem = _dx111.miEnterName;
  85.             }
  86.             else
  87.             {
  88.                menuItem = _dx111.miMenu;
  89.             }
  90.             this._dk329();
  91.          }
  92.          if(_bm350.iDebug)
  93.          {
  94.             _loc2_ = new _pd424();
  95.             _loc2_.graphics.clear();
  96.             _loc2_.graphics.lineStyle(2,16777215);
  97.             _loc2_.graphics.drawRect(0,0,800 * _bm350._tc204,600 * _bm350._tc204);
  98.             _loc2_.graphics.lineStyle(1,16777215,0.4);
  99.             _loc4_ = 0;
  100.             while(_loc4_ < 600 / 50)
  101.             {
  102.                _loc3_ = new TextField();
  103.                _loc3_.text = (_loc4_ * 50).toString();
  104.                _loc3_.x = 0;
  105.                _loc3_.y = (_loc4_ * 50 + 2) * _bm350._tc204;
  106.                _loc2_.graphics.moveTo(0,_loc4_ * 50 * _bm350._tc204);
  107.                _loc2_.graphics.lineTo(800 * _bm350._tc204,_loc4_ * 50 * _bm350._tc204);
  108.                _loc2_.addChild(_loc3_);
  109.                _loc4_++;
  110.             }
  111.             _loc4_ = 0;
  112.             while(_loc4_ < 800 / 50)
  113.             {
  114.                _loc3_ = new TextField();
  115.                _loc3_.text = (_loc4_ * 50).toString();
  116.                _loc3_.y = 0;
  117.                _loc3_.x = (_loc4_ * 50 + 2) * _bm350._tc204;
  118.                _loc2_.graphics.moveTo(_loc4_ * 50 * _bm350._tc204,0);
  119.                _loc2_.graphics.lineTo(_loc4_ * 50 * _bm350._tc204,600 * _bm350._tc204);
  120.                _loc2_.addChild(_loc3_);
  121.                _loc4_++;
  122.             }
  123.             _loc5_ = _uu24._ec508(_loc2_);
  124.             this.iFrame.bitmapData = _loc5_.bitmapData;
  125.             this.iFrame._vt351 = _loc5_._vt351;
  126.             this.iFrame._lh238 = _loc5_._lh238;
  127.          }
  128.          this.x = (_bm350.prStage.stageWidth - 800 * _bm350._tc204) / 2;
  129.          this.y = (_bm350.prStage.stageHeight - 600 * _bm350._tc204) / 2;
  130.          if(_wj196.iMusic)
  131.          {
  132.             _wj196.iMusic._vt351 = 700;
  133.             _wj196.iSound._vt351 = 740;
  134.             _wj196.iSound._lh238 = _wj196.iMusic._lh238 = 5;
  135.             if(speakerMount.parent)
  136.             {
  137.                removeChild(speakerMount);
  138.             }
  139.             (_loc6_ = new _dx111.TButtonMount()).scaleX = 80 / 200;
  140.             _loc6_.scaleY = 36 / 100;
  141.             _loc6_.alpha = 0.5;
  142.             speakerMount = _uu24._sa70(_loc6_);
  143.             speakerMount._vt351 = 695;
  144.             addChild(speakerMount);
  145.          }
  146.          this._yi289();
  147.       }
  148.       
  149.       protected function _yi289() : void
  150.       {
  151.          var _loc1_:Sprite = null;
  152.          if(iBackground)
  153.          {
  154.             removeChild(iBackground);
  155.          }
  156.          _loc1_ = new _dx111.BG() as Sprite;
  157.          _loc1_.scaleX = _bm350.prStage.stageWidth / _loc1_.width;
  158.          _loc1_.scaleY = _bm350.prStage.stageHeight / _loc1_.height;
  159.          _loc1_.x -= _bm350._cg260 * _bm350._tc204;
  160.          _loc1_.y -= _bm350._st175 * _bm350._tc204;
  161.          this.iBackground = _uu24._ec508(_loc1_);
  162.          addChildAt(iBackground,0);
  163.       }
  164.       
  165.       public function onEnterFrame(param1:Event) : void
  166.       {
  167.          var _loc2_:int = 0;
  168.          if(_bm350.iDebug)
  169.          {
  170.             _loc2_ = 1000 / (getTimer() - iTimer);
  171.             iDebugText.text = _loc2_.toString();
  172.             iDebugText.setTextFormat(iDebugTextFormat);
  173.             iTimer = getTimer();
  174.          }
  175.       }
  176.       
  177.       public function _dk329() : void
  178.       {
  179.       }
  180.    }
  181. }
  182.