This content has been marked as final. Show 5 replies
The way you have it set up, the Timer will fire forever, which is probably what you want anyways based on your description. So what you need to do is increment the value of the gotoAndPlay(#) frame number each time the handler is called
var frameNum = 2;
gotoAndPlay( frameNum );
frameNum += 5;
That is a very good idea except the way I have my site done is not that smart in terms of increments of frame numbers.
I actually figured out how to do it on the next frame where it stops I can do timer.stop(); and then just copypaste everything to timer1 and timer 2 so on for every next time I want the timer to take place.
I have a super messy system for how I did this website I was wondering if there was a way I could upload the fla so you could see how I did it. Thanks a lot.
Well, you could place the frame numbers into an array and increment the index of which is selected for each Timer handling event.1 person found this helpful
I'm not sure how you have it all going at the moment, or plan to go from here, but also realize you can tell the Timer how many times to operate. The way you have it now it would keep going infinitely if you didn't tell it to stop, but you can also code it as...
var timer:Timer = new Timer(10000, 1);
and it will only fire the once each time you start it.
That was exactly what I was looking for! Thanks a lot Ned sometimes the most complicated things can be done the simplest ways.
By the way I feel like you have helped me in the past like a year ago. Thank you for helping.
The way I have the buttons working is it just tells the fla to go to a certain frame and play this is creating problems for me because i have to give it a new function name on every page of my website so i have things like theoryyyyy111 just to make it different there has to be an easier way to call a button to do the same function on different frames with otu getting dubplicate function errors. here is a snippit of code:
the reason why there are two "yy" after the function is because if i just had y it would be duplicate from like 100 frames back....