3 Replies Latest reply on Sep 24, 2009 11:18 AM by Ned Murphy

    Preloader

    AESS1981 Level 1

      Hi guys,

       

      For my preloader I have the following actionscript:

       

      this.onEnterFrame = function() {

      var bl = getBytesLoaded();

      var bt = getBytesTotal();

      if (bl && bt && bl == bt) {

      delete this.onEnterFrame;

      nextFrame();

      } else {

      if (loading_mc && loading_mc.bar_mc) {

      loading_mc.bar_mc._xscale = bl/bt*100;

      }

      }

      }

       

      stop();

       

       

      This works great - 'bar_mc' starts at 1 pixel wide then ends up at 100 pixels wide.

      Is there any way I can reverse this action? ie:

      'bar_mc' starts at 100 pixels wide then ends up at 1 pixel wide when fully loaded (more of a countdown effect).

       

       

      Thanks