Scripts to control mutiple clips

I am creating a Flash movie that has some PowerPoint-like pages in it. I’ve created an nice clipEvent script that make bullet points slide in and bounce to a stop. I want a whole bunch of clips to do the same thing, and I’d like simply to define a script globally at the beginning of the movie and apply it to all those different clips, that way if the client asks for changes I only have to change the one script, not dozens of them.

In Director I could do this easily, but for the life of me I can’t figure out how to do it in Flash. Help!

onClipEvent (load) {
originalH = this._x;
this._x += 500;
speed = 75;
pass = “right”;
}
onClipEvent (enterFrame) {
if (this._x > originalH) {
if (pass==“left”) {
speed /= 2;
pass = “right”;
}
this._x -= speed;
} else {
if (pass==“right”) {
speed /= 2;
pass = “left”;
}
this._x += speed;
}
}

Could you create one clip with the code you want, and then just use duplicateMovie clip for the others. The duplicates would retain the same code as the orginal, so if you change the code, the code in the duplicates should too. Unless somone knows another and/or better way.

I had a quick go at it - crashed the Flash player.

I’ll have another look when I get an opportunity.