In my library I have a bunch of movieclips that are dynamically going to be placed on my stage. Is there a simple method of attaching ActionScript to these movieclips so that when they are used on the stage, they have the script applied to them already?
write the script in those movieclips so when they’re created, the script is created right there with them (as the script is a part of the movie attached) ready to work as needed, or
attach the clip and in referencing it, assign to it the functions needed to operate for whatever events are needed. For example, if you want an attached clip to move left ever frame, you would attach it and assign that attached clip to have an onEnterFrame function that would make it move left (every frame). To make it easier you can have these functions saved under other names prior to attaching the clips, and then just assign them after you do the actual attach. ex: