I wonder if there’s a way to duplicate a MovieClip created dynamicaly and its content.
For example:
this.createEmptyMovieClip(“Photo”, 1);
Photo.loadMovie(“image.jpg”);
Photo.duplicateMovieClip(“Photo2”, 2);
This code does not duplicate the content but only an empty MovieClip.
But it works if instead of creating the empty MovieClip Photo, i create it by the hand in Flash and put the image in it.
Can someone tell me if it’s possible to do that in actionscript?
Do u want several MCs with the same image on them?
Because if that’s the case u could do the duplications and
load (or attach) the imaage onto all of them with a ‘for’ loop.
MaxOfPhotos = 2;
this.createEmptyMovieClip("Photo1", 1);
Photo1.duplicateMovieClip("Photo2", 2);
for (var i = 0; i < MaxOfPhotos; i++) {
theMovieClip = eval("Photo"+i);
theMovieClip.loadMovie("image.jpg");
}
What i try to do is a “simple” cross-fading transition between two image in two MovieClip.
So what i think at first was to duplicate the original MovieClip and put the new one behind it. And then i can change the _alpha to make the cross-fading from the old image to the new one.
Now i’m trying to make the effects in a different way:
I have two MovieClips. I swap their _Level of Depth before
loading the new image in the MovieClip at the top of the other.