3 Replies Latest reply on Sep 22, 2006 8:12 PM by Newsgroup_User

    _width vs. _xscale

    product9 Level 1
      Why is this... when this progress bar moves while an mp3 is playing, if I set mcPlayProg to update using _xscale, the scrubby handle and the bar get out of sync - there is a gap as they move along that gets progressively larger. But if I use _width, there is no gap. ??

      // play progress
      function playProg()
      {
      mp3PlayInterval = setInterval(updatePlayProg, 100, sndMP3);
      function updatePlayProg(the_sound:Sound):Void
      {
      // duration
      var sndProg:Number = (the_sound.position / the_sound.duration * 100);
      // scale bar
      _root.mcPlayProg. _width = sndProg;
      // move scrubber
      _root.handle._x = sndProg;
      }
      }