Code not working need help

[AS]
for (i=1; i<30; i++) {
duplicateMovieClip(“word”, ‘word’+i, i);
trace(i)
}
[/AS]

It spits out the right numbers, but I don’t get 30 MC on my screen.

any ideas??

[AS]for (i=1; i<=30; i++) {
word.duplicateMovieClip(“word”+i, i);
trace(i)
}[/AS]

Try that.

This might be a dumb question, but does this code need to be on the MC that it is dupping, or in an onload or something

It needs to be on a frame. The mc that is being duplicated needs to be on the stage and have the instance name “word” (no quotes)

[edit]Also keep in mind your current script as is just duplicates each clip and puts it in the original location, so that will just end up giving you a stack of duplicated clips and you won’t be able to visually see all 30 clips[/edit]

good point lost =)

do this

for (i=1; i<=30; i++) {
var clip = word.duplicateMovieClip("word"+i, i);
clip._x = Math.random(Stage.width)
clip._y = Math.random(Stage.height)
}

:slight_smile:

Thanks for the great help.

Ahmed, I ahd to remove the math. to get it to work, but thanks.