As a rule, in 99.9% of situations I agree.
I'm going to be the opposite, though, and I say that there is at least one valid use case for this, since you can specify a set of ways to behave on an arbitrary frame in many different library symbols without these symbols, you must definitely define their own class. I would say that the restriction on this would be something like:
import complete.as // inside complete.as this.dispatchEvent(new Event(Event.COMPLETE, true)); this.stop(); // Note : dispatchEvent and stop are // the only function calls I'd feel // comfortable putting on a keyframe script.
This is especially convenient if the clips in question should not (or cannot) share relationships in the inheritance tree, but all of them require the execution of a certain specific set of code in a given frame. If you save this code in a separate .as file, and then you need to change it later (perhaps to add or remove this dispatch call), you do not need to track each symbol of the library and change them manually. Just change the attached .as file.
source share