home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / squadron_angel.swf / scripts / DefineSprite_13 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  935 b   |  35 lines

  1. this.onEnterFrame = function()
  2. {
  3.    var _loc1_ = _parent;
  4.    chargeActuelle = _loc1_.getBytesLoaded();
  5.    chargeTotale = _loc1_.getBytesTotal();
  6.    pourcentage = Math.round(chargeActuelle / chargeTotale * 100);
  7.    chargeStatut.text = pourcentage + " %";
  8.    barre.gotoAndStop(pourcentage);
  9.    if(_loc1_.getBytesLoaded() / _loc1_.getBytesTotal() * 100 != 100)
  10.    {
  11.       trace("Chargement en cours (" + pourcentage + "%)");
  12.    }
  13.    else
  14.    {
  15.       trace("Chargement termin├⌐");
  16.       if(actionFinChargement == "gotoAndStop(imageDebut)")
  17.       {
  18.          _loc1_.gotoAndStop(imageDebut);
  19.       }
  20.       else if(actionFinChargement == "gotoAndPlay(imageDebut)")
  21.       {
  22.          _loc1_.gotoAndPlay(imageDebut);
  23.       }
  24.       else if(actionFinChargement == "nextFrame()")
  25.       {
  26.          _loc1_.nextFrame();
  27.       }
  28.       else
  29.       {
  30.          _loc1_.play();
  31.       }
  32.       delete this.onEnterFrame;
  33.    }
  34. };
  35.