Need help with this - I want to dynamically load images in an mc. When you press the button for image 1, image 1 should start to preload, but not show untill fully loaded. When fully loaded, the image should show and another animation mc should start playing.
When pressing button2, image 1 should disappear from the container mc, and image 2 should appear after being fully loaded, the animation mc starts playing again, etc.
I fumbled about with this preloader tutorial, but the mc that holds the images is created dynamically, while I just want it to be an mc on stage. Heres the code:
var empty = this.createEmptyMovieClip(“container”, “100”);
empty._x = 325;
empty._y = 125;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
};
preload.onLoadComplete = function(targetMC) {
trace(targetMC+" finished");
fadein_mc.gotoAndPlay (2);
};
my_mc.loadClip(“models/001.jpg”, “container”);
button1.onPress = function() {
my_mc.loadClip(“models/002.jpg”, “container”);
};
button2.onPress = function() {
my_mc.loadClip(“models/003.jpg”, “container”);
};
button3.onPress = function() {
my_mc.loadClip(“models/004.jpg”, “container”);
};
Any help much appreciated! Thanks