Solved

Flash clearInterval Function Not Working??

Posted on 2004-09-17
2
490 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
2 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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 how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now