3 Replies Latest reply on Jul 18, 2008 7:18 AM by nrutter

    Progress Bar to show smaller percentage

      I am trying to use a <mx:ProgressBar /> to show how much space is being used out of 2 gigs of space. The current user is using 0.26% of the 2 gigs. How do I show the 0.26%? Right now it just doesn't register anything in my label or progressbar. I know its getting the total because if I change my math a little bit to equal at least 1 full percent its fine. This is what I am doing.

      private function progressBar_creationComplete():void {
      var kbTotal:Number = new Number();
      var percentageTotal:Number = new Number();
      kbTotal = model.currentCustomer.fileSizeBytes/1024
      //to divide by number of gigs times by 100 to get percentage
      percentageTotal = kbTotal/2097152*100

      progressBar.setProgress(percentageTotal, 100);

      <mx:ProgressBar id="progressBar" mode="manual" maximum="100" minimum="0"
      label="%1 of %2 (%3%%)" width="100%"
      creationComplete="progressBar_creationComplete();" />