One, copy movie clips
1. Method: Duplicatemovieclip (film real name, new real name, depth level)
2. Explanation: The real name of the film is the object you want to copy , the new real name is the object you want to paste , the depth level is the pasted movie clip stacking order (top, bottom, etc.).
3. For example: We first draw a movie clip, its instance name is set to MC, and then draw a button to add an action on the button, the code is as follows.
// When the mouse button is pressed Duplicatemovieclip ("MC","NWEMC"/// the movie clip named MC is copied into a new movie clip, named Nwemc this// set new movie clip NWEMC the horizontal axis ofthis // Set a new movie clip Nwemc's ordinate is
Second, delete copy movie clip
1. Method: Removemovieclip (target path or movie depth level)
2. Explanation: Destination Path = location of the movie clip + instance name, depth level as stated above, it is no longer explained.
3. For example: On the basis of the previous piece (copy the movie clip), then draw a button, add the action, the code is as follows.
On (press) { // Delete movie clip named Nwemc }
Three, drag command and stop drag command
1. Method: StartDrag (Target,lock,left,top,right,bottom) and Stopdrag () (it does not have any parameters)
2. Explanation: Target is the destination path of the movie clip to be dragged, and lock is the location where the movie clip is selected to be locked in the center of the mouse or locked in the mouse click (The lock is a Boolean value),
There are left, top, right, and bottom these, which are the meanings of their English words (upper and lower bottom), which are used to specify the range of drag.
3. For example: Draw a movie clip and add an action to the movie clip with the following code.
// When the left mouse button is pressed StartDrag (Thisfalse// start dragging / / when the left mouse button is lifted / / stop dragging }
Four, the target path command
1. Method: TargetPath (Movieclipobject)
2. Explanation: Movieclipobject is a reference to the movie clip to get the target path (for example, _root or _parent).
3. For example: This command to match the other commands have practical significance, so do not write a case here, next to the appropriate place to speak.
Number of children · flash--other actions for movie clips