Joshua Davis like buttons

Hey there,

I’ve been having trouble with this all afternoon. I’m trying to create this little button effect using setInterval and the laco tween class ( http://laco.wz.cz/tween/?page=docs/tween ). I’m trying to get an effect similar to the little portfolio buttons on the right third of Joshua Davis’ site http://joshuadavis.com/ I’ve attached the fla, and here is the code.

Frame1:
#include “lmc_tween.as”

blue.setMask(mask);

blue.tween("_x", 29, .8, “easeOutSine”);

function wait() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 2*1000); // stop for 2 seconds
}

wait();

two.onRollOver=function(){
gotoAndPlay(“two”);

}

Frame2:

blue.tween("_x", 49, .8, “easeOutSine”);

function wait2() {
stop();
var myInterval2 = setInterval(function () {
gotoAndPlay(“one”);

clearInterval(myInterval2);
}, 2*1000); // stop for 2 seconds
}

wait2();

one.onRollOver=function(){
gotoAndPlay(“two”);
}

You’ll notice that the masking back-and-forth effect works perfectly, but as soon as I try to advance the animation with the button rollovers, the timing of the animation gets all off. I imagine it has something to do with the intervals looping???

Any help is greatly appriciated!