johnnyboy
01-11-2006, 03:19 PM
Hi there,
I've been trying to convert script with the movieClipLoader() to the more simple loadMovie(), so I can export my SWF for flash player 6, but I have a small problem with my preloading...
Heres my MCL:
/// MOVIECLIPLOADER ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
my_mcl = new MovieClipLoader();
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
preload = new Object();
preload.onLoadInit = function(mcTarget) {
//trace(mcTarget);
my_mcl.removeListener(preload);
xSetAllIMGs();
}
my_mcl.addListener(preload);
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
}
}
xLoadAllIMGs();
Instead I tried this:
/// LOADMOVIE ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
loadMovie(IMG, _root.CONTAINER_mc[my_mc]);
if (i == SWFs_num - 1) {
xSetAllIMGs();
}
}
}
xLoadAllIMGs();
But my xSetAllIMGs() function is on before the images are loaded...?
Should I use some kind of extra preloader in my loadMovie script???
I've been trying to convert script with the movieClipLoader() to the more simple loadMovie(), so I can export my SWF for flash player 6, but I have a small problem with my preloading...
Heres my MCL:
/// MOVIECLIPLOADER ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
my_mcl = new MovieClipLoader();
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
preload = new Object();
preload.onLoadInit = function(mcTarget) {
//trace(mcTarget);
my_mcl.removeListener(preload);
xSetAllIMGs();
}
my_mcl.addListener(preload);
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
}
}
xLoadAllIMGs();
Instead I tried this:
/// LOADMOVIE ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
loadMovie(IMG, _root.CONTAINER_mc[my_mc]);
if (i == SWFs_num - 1) {
xSetAllIMGs();
}
}
}
xLoadAllIMGs();
But my xSetAllIMGs() function is on before the images are loaded...?
Should I use some kind of extra preloader in my loadMovie script???