Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flash clearInterval Function Not Working??

Posted on 2004-09-17
2
Medium Priority
?
552 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

926 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