How do i take this sliding pages tutorial a step further?

ok, the tutorial found here on sliding pages
http://www.aevision.com/tutorials/f...iding_pages.htm

i got it to work just fine but what i want is to have this happen in two places on the page, so one button would make two different sliding movies change, if i use the same code in both movies right now, only one will work, what can i change to make this happen?

here is the code that goes on the sliding movie in the tutorial:

onClipEvent (load) {
_x = 0;
_y = 0;
spd = 8;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/spd;
_y += (endY-_y)/spd;

_root.page1.onRelease = function() {
endX = 0;
endY = 0;
};
_root.page2.onRelease = function() {
endX = -220;
endY = 0;
};
_root.page3.onRelease = function() {
endX = -440;
endY = 0;
};
_root.page4.onRelease = function() {
endX = -660;
endY = 0;
};

}