title: “zero placeholder” for working counter as3
body: <p><strong>How do make a zero placeholder for the counter?</strong></p>
  
  <p>My thought was an "if" condition with greater
  and lesser would work.<br></p>
  
  <pre><code>if count is more than .00 and less than 10.00, add "0000000" etc.
  </code></pre>
  
  <p><a href="http://www.ashcraftband.com/myspace/videodnd/icon_3.jpg" rel="nofollow noreferrer">alt text http://www.ashcraftband.com/myspace/videodnd/icon_3.jpg</a></p>
  
  <p><strong>CODE</strong> "from some of the best minds"<br></p>
  
  <pre><code>//counts
  var timer:Timer = new Timer(10);   
  var count:int = 0; //start at -1 if you want the first decimal to be 0   
  var fcount:int = 0;  
  
  timer.addEventListener(TimerEvent.TIMER, incrementCounter);   
  timer.start();   
  
  
  function incrementCounter(event:TimerEvent) {  
    count++;  
  
    var whole_value:int = int(count / 100); //change value 
    var tenths:int = int(count / 10) % 10;   
    var hundredths:int = int(count) % 10;   
  
    mytext.text = whole_value + " : " + tenths + hundredths;  
  } 
  
  ///////////////////////////////////////////////
  
  //counts and accelerates
  //CA, NC, LONDON "increments"
  var timer:Timer = new Timer(10);  
  var count:int = 0; //start at -1 if you want the first decimal to be 0  
  var fcount:int = 0; 
  
  timer.addEventListener(TimerEvent.TIMER, incrementCounter);  
  timer.start();  
  
  function incrementCounter(event:TimerEvent) {  
    count++;  
    //
    fcount=int(count*count/10000);//starts out slow... then speeds up 
    //
    var whole_value:int = int(fcount / 100); //change value 
    var tenths:int = int(fcount / 10) % 10;   
    var hundredths:int = int(fcount) % 10;   
  
    mytext.text = whole_value + " : " + tenths + hundredths;  
  }   
  </code></pre>
  
  <p><a href="http://www.ashcraftband.com/myspace/videodnd/icon-3.jpg" rel="nofollow noreferrer">alt text http://www.ashcraftband.com/myspace/videodnd/icon-3.jpg</a></p>
  
  <p><strong><em>I makes zeros...eeeeerrrrrrr...not animation, don't laugh!</em></strong>
  <strong><em>curses</em></strong><br></p>
  
  <pre><code>var timer:Timer = new Timer(10);  
  var count:int = 0; //start at -1 if you want the first decimal to be 0  
  var fcount:int = 0; 
  
  timer.addEventListener(TimerEvent.TIMER, incrementCounter);  
  timer.start();  
  
  function incrementCounter(event:TimerEvent) {  
    count++;  
    //
    fcount=int(count*count/10000);//starts out slow... then speeds up 
    //
    var whole_value:int = int(fcount / 100); //change value 
    var tenths:int = int(fcount / 10) % 10;   
    var hundredths:int = int(fcount) % 10;   
  ////////////// 
   function formatCount(i:int):String { 
  
      var fraction:int = i % 100; 
      var whole:int = i / 100; 
  
      return ("0000000" + whole).substr(-7, 7) + "." + (fraction &lt; 10 ? "0" : "") + fraction; 
  } 
  
  function test():void { 
      for (var i:int = 1; i&lt;100000; i += 3) { 
          trace(i + " -&gt; " + formatCount(i)); 
      } 
  } 
  //////////////
  mytext.text = formatCount(whole_value + " : " + tenths + hundredths); 
  
   // mytext.text = whole_value + " : " + tenths + hundredths;  
  }
  </code></pre>
  
  <p>"thanks for the help guys"</p>