Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Stop for setInterval

Explorer ,
Dec 27, 2015 Dec 27, 2015

Hi,

How can I be stopping the counter of a setInterval, which currently is being used as a stopwatch?

setInterval (stopwatch, 1000);

Thanks in advance.

TOPICS
ActionScript
476
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2015 Dec 27, 2015

assign it a variable:

var stopI:int=setInveral(stopwatch,1000);

and use clearInterval to stop it:

clearInterval(stopI);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 29, 2015 Dec 29, 2015

But using this way and putting the clearInterval function is assigning an error when running the test could help me?

Justamente na linha na qual foi empregada a variável.

var stopI:int = setInveral (avancar, 1000);

Error:

1180: Call to a possibly undefined method setinveral

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 29, 2015 Dec 29, 2015
LATEST

are you publishing for html5?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines