Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:27:40+00:00 2026-06-09T16:27:40+00:00

So, I have this timer in 2 scenes. The timer in the 1st scene

  • 0

So, I have this timer in 2 scenes. The timer in the 1st scene works perfectly. However, when I tried it to the 2nd scene the timer goes so fast.
I have 2 set of codes:

_root.timer = 10;
clearInterval(id);
id = setInterval (function ()
           { 
                _root.timer--;
                if(timer==0)
                {
                    gotoAndStop(65);
                }
           }, 1000); 

AND this:

timer = 10;
timer.text= timer;
countdown = function(){
            timer--;
            if(timer==0){
                         clearInterval(countdownInterval);
                         gotoAndStop(65);
                        }
                      }
countdownInterval = setInterval(countdown,1000);

I’m aware that 1000 milliseconds = 1 second. I just don’t know what causes the timer to decrease fast in the second scene. What do you think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:27:41+00:00Added an answer on June 9, 2026 at 4:27 pm

    In the second scene, timer decrase 2 times faster, because there is two setInterval running, _root.timer will equal timer in two stages. So there is two functions calling each second, and it each function decrases same variable.

    Solution: in second scene, rename timer variable to timer2 or timernew.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need a timer that works like this : imagine somebody have a limit
I have this timer function, it gives me following exception. Collection was modified; enumeration
i have a question , i have this timer code in java that when
I have this code: NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:temp/10.0f target:self selector:@selector(verify) userInfo:nil repeats:YES]; CCMoveTo
I have a timer class..This timer will be started from various portions of my
I have this code : void Main() { System.Timers.Timer t = new System.Timers.Timer (1000);
I have this code: package com.powergroupbd.timer; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.CountDownTimer;
I have this very straight forward question regarding Thread and Timer classes in Java
Basically i have a problem with this timer program I am trying to put
I have an iOS 5 application with a storyboard and two scenes. Scene 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.