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;
}
}