A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Honestly. How is it done?

  1. #1
    Senior Member
    Join Date
    May 2001
    I've looked all over the place, boards, tutes, sites. Everywhere. And I can't find a method of programming a "Time Limit" for a game.
    SO MANY games on the net have time limits, why doesn't anyone tell how to do it?

    I need to have a 2 min. time limit. At the end of the 2 minutes I want it to activate a telltarget action.

    Please help.
    Or at least point me in the direction of a tutorial that deals with this specific issue.

  2. #2
    Join Date
    Aug 2000
    You can use a movie clip as a timer

    make a movie clip

    in the first frame of your movie clip have a stop action

    in the second frame

    x = getTimer();
    play ();

    3rd frame


    4th frame

    if ((getTimer())>(x)+120000) {
    } else {
    prevFrame ();

    this timer is for 2 minutes
    1sec = 100 milliseconds

    target the second frame of this movie clip in the main timeline whenever you want the timer to start

    Hope I am clear


  3. #3
    Senior Member
    Join Date
    May 2001


    Thank you so much

    I'll put that string of code to good use
    I really appreciate it. I've had this problem for quite some time, and it's awesome to have it cleared up

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center