We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now



koblongata asked
Medium Priority
Last Modified: 2008-02-01
setInterval(this, "reFresh",1000);
function reFresh():Void{

i have this code on the 30th frame of the movie, and i want it to go back to frame one every 1 second, but this code only works for the begining of the movie, after awhile it's all messed up, just wondering what is the proper way to implement it using AS, please help
Watch Question

Dushan De SilvaTechnology Architect

Is there any extra actions available between frame1 and frame30?
And what is your frames per second(fps) rate. Because if your using it more than 30... then it will more than one second to go to 30th frame.. please explain more.

BR Dushan
Dushan De SilvaTechnology Architect

"Because if your using it more than 30... " 
should corrected as
"Because if your using it less than 30... " 

BR Dushan
Top Expert 2009
hi, your problem is because you're not clearing your interval.
what you need

var bob = setInterval(this, "reFresh", 1000);
function reFresh():Void {

reason being, it goes to frame 30, calls the method, goes to frame 1, then keeps calling that method, so it never returns to frame 30 - it doesn't get a chance to.


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


thank ya
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.