Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flash clearInterval Function Not Working??

Posted on 2004-09-17
2
Medium Priority
?
543 Views
Last Modified: 2012-06-21
Hello,

I am trying to hide an image based on a rollover function.  Once rollover occurs, the setInterval function is set to time out at 4 seconds and display a movie clip.  This works great except after awhile Flash gets confused when rollover buttons many times.  Flash displays the mc too quickly if buttons are rolled over multiple times.  Any other ideas are appreciated.

Thank you,

Terry

Sample FLA:

http://www.myhealthtv.com/hideTest.fla
0
Comment
Question by:splendorx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 1000 total points
ID: 12085669
add clearInterval to your rollOver, before setInterval:

for (i=0; i<6; i++) {
      this["broadcastImage"+i+"_btn"].onRollOver = function() {
            //REMOVE SPLASH IMAGE
            clearInterval(timerInterval);
            _root.splashImage_mc._visible = false;
            timerInterval = setInterval(timesUp, 4000);
      };
}

It is probably better practice to check if timerInterval is undefined before clearing, but it does work, and without any errors.
0
 
LVL 1

Author Comment

by:splendorx
ID: 12086085
Thank you Muso!!! Works as expected!  
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question