title: How do you collect timer string data in object
body: <p>I have a simple count-up timer that displays milliseconds, seconds, and minutes in real time. When a certain condition is met the stop timer is triggered. I am confused on how to get that time stored in an object and then displayed by shortest time first. </p>
  
  <pre><code>var timer:Timer = new Timer(100);
  timer.start();
  timer.addEventListener(TimerEvent.TIMER, timerTickHandler);
  var timerCount:int = 0;
  
  function timerTickHandler(Event:TimerEvent):void
  {
      timerCount += 100;
      toTimeCode(timerCount);
  }
  
  function toTimeCode(milliseconds:int) : void 
  {
  //creating a date object using the elapsed milliseconds
  var time:Date = new Date(milliseconds);
  
  //define minutes/seconds/mseconds
  var minutes:String = String(time.minutes);
  var seconds:String = String(time.seconds);
  var miliseconds:String = String(Math.round(time.milliseconds)/100);
  
  //add zero if neccecary, for example: 2:3.5 becomes 02:03.5
  minutes = (minutes.length != 2) ? '0'+minutes : minutes;
  seconds = (seconds.length != 2) ? '0'+seconds : seconds;
  
  //display elapsed time on in a textfield on stage
  timer_txt.text = minutes + ":" + seconds+"." + miliseconds;
  }
  </code></pre>
  
  <p>I also have a button if the button is clicked it sets a boolean to true.</p>
  
  <pre><code>var btn1:Button;
  var buttonClckd:Boolean;
  
  if (buttonClckd == true) {
              timer.stop();
              timeTxt.type = myUsers.userTime;
              trace(myUsers.userTime);
              trace("Btn1 Click == true");
          }
  
  
  btn1.addEventListener(MouseEvent.CLICK, btn1Clicked);
  
  
  
  public function btn1Clickd(e: MouseEvent):void {
          trace("btn1 Clicked");
          buttonClckd = true;
  
  
      }
  </code></pre>
  
  <p>Unfortunately, I don't get the trace of "Btn1 Click == true"</p>