PDA

View Full Version : duplicateMovieClip problem


teamhonda22
12-21-2005, 10:13 PM
I have a total of 3 movies. The 1st movie is the main movie and it loads movie number 2 which will load movie 3 through XML. The the third movie is a simple movie that creates a snowfall effect. I have no problem with loading in the movies. However, in Movie 3 I create a snowfall effect by using duplicateMovieClip and thats where I run in to problems. Flash is not creating the duplicates. The third movie loads just fine, but no duplicates. Here is the code for movie 3 that duplicates the snowflakes. If I run the movie by itself without loading the movie into movies 1 and 2, then it works fine. It just doesn't want to work when I load it into movie 2.



for (i=1; i<=flakes; i++)
{
x1[i] = random(xp);
x2[i] = random(xp);
x3[i] = random(xp);
y1[i] = random(yp);
y2[i] = random(yp);
y3[i] = random(yp);
duplicateMovieClip ("snowflakes", "snowflakesA"+f, f+5);
duplicateMovieClip ("snowflakes", "snowflakesB"+f, f+5+flakes+5);
}

Is there a problem with my target path? I tried using this.duplicateMovieClip but Flash crashes on me.

Any ideas anyone?

Thanks,
teamhonda22

yker22
12-21-2005, 10:39 PM
try attachMovie instead of duplicateMovie...

duplicate is to "copy" instances already on stage...
attachMovie method if for programatic created instances