PDA

View Full Version : [MX] duplicating MCs plz help...



zylum
February 18th, 2003, 04:53 PM
hi,

i'm trying to duplicate a movie clip when a variable reaches a certain number.. this is the code i used...


code:
__________________________________________________ __

if (numBlts<300) {
_root.power = 1;
_root.p += 1;
duplicateMovieClip(_root.plus, "plus"+p, p);
}
__________________________________________________ __

the problem is that i just want to duplicate it once everytime numBlts gets below 300. after numBlts increases above 300 and then goes below 300 i want the clip to duplicate. All its doing now is duplicating infinite times...

Is there any way around this problem?

-mike

h88
February 18th, 2003, 04:56 PM
try a for loop instead.

for(x=0; x<300; x++){
duplicateMovieClip(_root.plus, "plus"+x, x);
}