Horizontal movement with AS

I’m trying to get a few movie clips to move horizontaly, with actionscript, while they respect a certain sequence. For an example of what I want to achieve with actionscript you can go to www.ruisoaresesteves.com and look at the animation there. That’s what I am trying to achieve but instead of a single strip animated with flash animation, I have that same strip cutted in 6 parts and want to get that effect with actionscript. I just don’t seem to get the code right:

Here’s what I currently have:
[COLOR=blue]
function initObject(myObject){

speed = 1;

_root[myObject].onLoad = function () {

_root[myObject]._x += speed;

if (PCT6._x <= -1353.0) {
    speed = -2
}
else if (PCT1._x <= -1379.0) {
    speed = 0
    PCT1._x = 798
    }
if (PCT1._x <= -578) {
    speed = -2
    PCT2._x = 798
}
else if (PCT2._x <= -1402.0) {
    speed = 0
}
if (PCT2._x <= -578.0) {
    speed = -2
    PCT3._x = 798
}
else if (PCT3._x <= -1303.0) {
    speed = 0
}
if (PCT3._x <= -503.0) {
    speed = -2
    PCT4._x = 798
}
else if (PCT4._x == -1407.0) {
    speed = 0
}
if (PCT4._x <= -607.0) {
    speed = -2
    PCT5._x = 798
}
else if (PCT5._x <= -1928.0) {
    speed = 0
}
if (PCT5._x <= -1128.0) {
    speed = -2
    PCT6._x = 798
}
else if (PCT6._x <= -2153.0) {
    speed = 0
};
};

}

initObject(“PCT1”);
initObject(“PCT2”);
initObject(“PCT3”);
initObject(“PCT4”);
initObject(“PCT5”);
initObject(“PCT6”);[/COLOR]

But it doesn’t work. Can someone give a couple of hints on how to do this?