View Full Version : dynamic movies
defmars
03-18-2005, 11:39 PM
I need to create a series of dynamic movies within a movie, and to have them aligned. so far I've tried :
for (n=1; n < 12; ++n) {
_root.mainmovie.submovie.duplicateMovieClip(_root. mainmovie["submovie"+n], n);
_root.mainmovie["submovie"+n]._y = n*18.0 + 170;
}
I'm still getting around using duplicateMovieClip(), and I don't understand why it's not working.
add this line as the first line in your for loop and tell us what it says:
trace(_root.mainmovie["submovie"+n]);
//rest of for loop
defmars
03-19-2005, 07:45 AM
>> all I get is many lines of "undefined"...I don't know if it helps.
I've used duplicateMovieClip(newname, depth ) before but not within a movie. I thought the problem was wether the newname should be the instance path or just the name...either way I've tried both and it still doesn't work. what's the deal ?
defmars
03-20-2005, 07:10 AM
Don't give up on me just yet.
sorry... i'm on vacation. ripping out my bathroom and putting in a new one.... thought i would swing by tonight to see whats up.
so. the movie your targeting doesn't exist. its undefined. so you need to understand where your actually creating the mc.
this is where you are creating the movie:
_root.mainmovie.submovie.
its inside submovie.
so try:
trace(_root.mainmovie.submovie["submovie"+n];
put the trace in right after you have duplicated your movie.
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.