Solved

Flash clearInterval Function Not Working??

Posted on 2004-09-17
2
479 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

757 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

22 Experts available now in Live!

Get 1:1 Help Now