1 Reply Latest reply on Jun 12, 2006 10:50 PM by Newsgroup_User

    preloader thingy

    Jimmathy Level 1
      what actionscript would i use to set it up so that after every 10 percent is loaded a movie clip called guy goes to and playsat a frame called throw?????i would really appreciate help.
      thanks
        • 1. Re: preloader thingy
          Level 7
          "Jimmathy" <webforumsuser@macromedia.com> wrote in message news:e6l8h8$onk$1@forums.macromedia.com...
          > what actionscript would i use to set it up so that after every 10 percent is loaded a movie clip called guy goes to and playsat a
          > frame called throw?????i would really appreciate help.
          > thanks

          This will work if your guy movieclip is loaded early in the process. (It has to be loaded before you can use it)
          This is AS1 coding.
          tralfaz

          stop();

          this.onEnterFrame = function()
          {
          var gbt = getBytesTotal();
          if(gbt < 100)
          return;
          var gbl = getBytesLoaded();
          if (gbl == gbt)
          {
          delete this.onEnterFrame;
          box._visible = false;
          }
          else
          {
          var p = Math.round((gbl / gbt) * 100);
          box.text = "Loaded " + p + " %";
          if( !(p % 10) ) // if devide by 10 has no remainder
          {
          guy.gotoAndPlay("throw");
          }
          }
          }