home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / eroticos / spankthebooty.swf / scripts / __Packages / Preloader.as < prev    next >
Text File  |  2005-10-13  |  687b  |  31 lines

  1. class Preloader extends MovieClip
  2. {
  3.    function Preloader()
  4.    {
  5.       super();
  6.       this._parent.stop();
  7.    }
  8.    function onEnterFrame()
  9.    {
  10.       var _loc1_ = this;
  11.       if(_loc1_.maxWidth == undefined)
  12.       {
  13.          _loc1_.maxWidth = _loc1_.preloader_mc._width;
  14.       }
  15.       var _loc3_ = _loc1_._parent.getBytesLoaded();
  16.       var _loc2_ = _loc1_._parent.getBytesTotal();
  17.       if(_loc2_ < 4)
  18.       {
  19.          _loc1_.preloader_mc._width = 0;
  20.       }
  21.       else
  22.       {
  23.          _loc1_.preloader_mc._width = _loc1_.maxWidth * _loc3_ / _loc2_;
  24.       }
  25.       if(_loc3_ == _loc2_)
  26.       {
  27.          _loc1_._parent.gotoAndStop("splash");
  28.       }
  29.    }
  30. }
  31.