[Last Call] Learn how to a build a cloud-first strategyRegister Now


Why do my images suddenly scroll so much faster?

Posted on 2011-10-28
Medium Priority
Last Modified: 2012-05-12
Head out to http://www.countryshowdown.com/Chevron

Notice the pace of the rotating banner at the top of the page. Fine, right? Now, click on one of the buttons on the right hand side. The button is a simple command that advances the movie to a particular frame. Simple enough. But now watch the pace of the scrolling. It's now at least twice as fast and I don't know why.

I've got to fix it. How?

You can download the flash file and see my code etc by heading out to http://www.brucegust.com/carousel.zip
Question by:brucegust
  • 2
  • 2
LVL 39

Accepted Solution

blue-genie earned 2000 total points
ID: 37046646
you're calling a function which after 5 seconds must play and then you're clearing the interval. the problem is you should call the interval immediately, because say 3 seconds in you click a button, your interval is still running so after another 2 seconds it will progress.
also declare the variable outside the function so it's within scope to clear it.
var myInterval; 
function wait(howLong)
	 myInterval = setInterval(function ()
	}, howLong);
counter = 1;

Open in new window


Author Comment

ID: 37046918
And that, blue-genie, is why you get paid the large dollar amounts!

Thank you!

Author Closing Comment

ID: 37046923
Nailed it, as always!
LVL 39

Expert Comment

ID: 37049123
LOL dude we don't get paid for this :-)
but you're welcome.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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 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

830 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