To duplicate a movie clip first
we need need an orignal movie clip whic we will duplicate.
Here i have used a rectengle as movie clip with name mymc
with an instance name mc1.
We need a button which will be used to create duplicate
of rectengle movie clip. Select your button, open script
window (F9), and write this script.
on (release) {
duplicateMovieClip ("mc1", "mc2", 1);
}
|
Now if you test your movie and press button,
you will notice that nothing is happening.
Actually it's happening but uplicate movie clip
is coming at the same place where the original one is,
because of this, you can't see the new movie clip.
Set the alpha of original movie clip at 50% or less than that
and again test your movie and you will now able to see something.
If you want to create your new movie clip at some new position,
you can do this with movie clip properties as you must have read
in previous by Ritesh.
Anyways i am giving you the script here for positioning your new movie clip.
on (release) {
duplicateMovieClip ("mc1", "mc2", 1);
mc2._x = 20;
mc2._y = 150;
} |
You can place your new movie clip at the position you want.
In the same way you can also set other properties of your new movie clip.