Skip navigation
Currently Being Moderated

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

Apr 12, 2012 3:50 AM

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.

 
Replies
  • Currently Being Moderated
    Apr 12, 2012 4:39 AM   in reply to mdnavaz

    You should show an attempt to do this yourself so that your wishlist of what happens when makes better sense.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points