2 Replies Latest reply: Apr 12, 2012 4:57 AM by mdnavaz RSS

    How to modify the code to get started the timer on mentioned time?

    mdnavaz

      Hi,

       

      I have the following code from a source. I would like to make a few changes as mentioned below:

      First ....

      1) The as3 code should get the time form "startMeeting_txt.text"

      2) Compare it with current time from "currentTime_txt.text"

      3) The Timer should be activated as soon as the "startMeeting_txt.text" = "currentTime_txt.text" and starts counting

      4) When the "finishMeeting_txt.text" = "currentTime_txt.text" then

      5) "message_txt.text" = "Meeting time is over"

       

      How to modify the following code:

       

      var count:Number = 60;

      var myTimer:Timer = new Timer(1000,count);

      myTimer.addEventListener(TimerEvent.TIMER, countdown);

      myTimer.start();

       

      function countdown(event:TimerEvent):void {

      myText_txt.text = String((count)-myTimer.currentCount);

      }

       

      if(myText_txt.text == "0"){

            gotoAndStop(2)

      }

       

      Thanks.