lets say i have a bunch of buttons and all the code i need is in the onRelease functions and the exact effect i wanted would be clicking the buttons every 5 seconds.
Basically what i want to do is use those onRelease functions on the buttons, in the button order(button1, button2, etc.) every 5 seconds, without clicking though. Is there a way i can tell it to use the onRelease functions? How would i go about setting this up?
Everything works perfectly i just want it to “auto-click” or “auto-call the onRelease’s” every 5 seconds. It would also be nice to be able to click the buttons at any given time too. So say the timer is on button4 and i click button2 and the timer starts from there.
my mind is telling me i should somehow be able to have something like the code below with a simple array or something maybe? But Murphy is telling me it just won’t be this easy
myInterval = setInterval("button* onRelease function here", 5000);
Also, I anticipated some other common errors that might have occurred in your code somewhere, which is why I included the loop structure and renamed myInterval in the above code.
A few things though, is it possible to instead of createEmptyMovieClip use the existing buttons? meaning, i have different onRelease code in each btn. i tried goofing with it and can’t seem to make that happen
i am running into another issue however. Everything works perfect, but the setinterval starts at 5000 right, so the first buttons actions start at 5000. How would i modify this to make the first button start right away, and then every 5000 it does the actions with the above code. Other than that this is exactly what i was trying to do!