Image scroller isn't looping

Hi all,

I’m making a product image scroller. Basically it starts by showing about 7 products and then when the user’s mouse moves left or right it scrolls through the rest of the product images. I have no problem getting it to move from left to right, but then it just stops on the last product without looping. The looping code I was doing was awful, so I just removed and kept what works for the sake of this post. It’s a 3 frame movie, with a background and a mask around the rest of the products.

Here’s my ActionScript:

mouseX = _xmouse;
menuX = menu._x;

if (mouseX > 399) {
diff = (mouseX-399)/45;
}
if (mouseX < 379) {
diff = (379-mouseX)/45;
}
if (mouseX <= 389 && menuX <= 132) {
setProperty(“menu”, _x, menuX+diff);
}
if (mouseX >= 389 && menuX >= -250) {
setProperty(“menu”, _x, menuX-diff);
}
if (menu._x >= 132) {
menu._x = 132;
} else if (menu._x <= -257) {
menu._x = -257;
}
gotoAndPlay(1);