setTimeout or setInterval problems

Okay so I have my site setup with temp nav with 4 buttons that you click for each section … for the most part it works fine but I’m having some trouble with loading the sections(swf’s) I want to a empty movie clip at the right time and the site not going crazy! … right now I’m using a setInterval to get the timing right …

function sectionMain() {
    theWidth = 700;
    theHeight = 375;
    frame.title.text = "Main";
    frameSize();
    frame.slideTo(Stage.width/2-theWidth/2, Stage.height/theHeight*10, slidevel, frameTweenType, .005);
    myinterval = setInterval(function () {
        frame.container.loadMovie("mainsection.swf");
        clearInterval(myinterval);
    }, 2500);
}

The problem is that if a user clicks to fast it messes up the clearing of the interval … atleast I thinka that’s what’s happening … because my sections load over and over even if I click on a different one.

so I was wondering if I should use setTimeout instead but I don’t think it works for me … is setTimeout a js fucntion or a Flash 8 function? I see all kinds of people using setTimeout but there isn’t any documentation on it in the Flash 8 help. So if you guys can help I’d apreciate it greatly :slight_smile: Thanks!