Issues with pausing the timeline and timing
I am making a pretty simple home page news/image scroller that you see on many sites now. A rectangle box that goes through the various important stories and it also has controls to go forward and backward if needed. I have it laid out and I found a line of code to make it pause on each story for however long I want. I then added the first button to go back to the first frame (the first news story) at any time. When I test the movie the pausing is right and the button works. The problem is, the more I press the button the more the timing of the movie changes. It no longer paused for 10 seconds per story and it just starts pausing for random amounts of time. I know it has to be a code issue and I assume the code is stacking commands on top of each other for some reason and screwing up the timing. The code I am currently using for each story is:
stop();
setTimeout(play, 10000)
Like I said if I play the movie the timing thing works great. It stays on each story for 10 seconds then animates to the next just like I want. The button is what seems to mess it up but I need buttons for the user to control the whole thing. The code I am using for the button is:
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);
function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
{
gotoAndPlay(1);
}
Is my button code screwing this up? Any help would be appreciated thanks.
