-
I have a script that duplicates movie clips, but I want to have the user specify how many clips are duplicated, how do I do this?
there will be an input text box for the variable of how many clips to duplicate...
HELP ME!!!!!
-
for(i=0; i<userinputvariable; i++){
myMC.duplicateMovieClip(name+i, depth+i);
}
-
iNumber is the number from your input box
put this in an event (button press or something)
Code:
for (i = 0; i < iNumber; i++) {
// duplicate movie here
trace ("Movie Duplicated " + iNumber + " Times");
}
-
thanks all, I will give it a try...
-
hmmm... When I use this script, it only displays how many times the movie will be duplicated that many times, but only duplicates the MC once per button push...
bubble is the MC, and bubblez is the duplicated MC
on (release) {
for (i=0; i<iNumber; i++) {
bubble.duplicateMovieClip(bubblez+i, z++, i);
trace("Movie Duplicated "+iNumber+" Times");
}
}
what is wrong?
[Edited by happymoonboy on 07-09-2002 at 04:43 PM]
-
your supposed to replace my // comments with the duplicate movieclip code
Code:
for (i = 0; i < iNumber; i++) {
bubble.duplicateMovieClip(bubble+i, i++);
trace ("Movie Duplicated " + i++ + " Times");
}
-
don't worry happymoonboy I encountered the same thing you did with typing out the for statement on the board.
flashkit doesn't like the < symbol
everything got duplicated right, they're just placing themselves over each other. try adding something like:
_root[myMC +i]._x = 20 * i;
inside the conditional loop
-
still no dice, gSolo...
i did it exactly as you did, but it wont duplicate the clip. I think it is maybe a layer problem.
-
Originally posted by DanCarrey
don't worry happymoonboy I encountered the same thing you did with typing out the for statement on the board.
flashkit doesn't like the < symbol
everything got duplicated right, they're just placing themselves over each other. try adding something like:
_root[myMC +i]._x = 20 * i;
inside the conditional loop
I already have a script in the duplicated MC to move to random coordinates.
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
|