-
duplicate movieClip i times
Hi foreros
For most of you this is as easy as ABC, but not for me.
The thing is I need to duplicate my movieclip 10 times, and I don't know where or how to add the for sentence.
The code is the following:
Code:
var timeline: MovieClip = this;
var counter: Number = 0;
timeline.inicial.onRelease = function( )
{
var newClip: MovieClip = this.duplicateMovieClip("copia" + timeline.counter, timeline.getNextHighestDepth() );
timeline.counter++;
newClip._rotation = inicial._rotation+180;
newClip._x = 90 + timeline.counter*40;
newClip._y = 110 + timeline.counter; //lo giro y lo posiciono
}
Thank you in advance.
-
Senior Member
Code:
var timeline:MovieClip = this;
timeline.inicial.onRelease = function() {
for (var i:Number = 0; i<10; i++) {
var newClip:MovieClip = this.duplicateMovieClip("copia"+i, timeline.getNextHighestDepth());
newClip._rotation = inicial._rotation+180;
newClip._x = 90+(i*40);
newClip._y = 110+i;//lo giro y lo posiciono
}
};
moo
-
-
Senior Member
moo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|