Hello all, I've been browsing every time of forum possible and I have yet to
come across a solution to my problem. Here it is.
I have an swf.
Within the swf's library, I have a movie clip.
Within the main swf I use a FOR loop to attach the movie clip that is in the
library, and then I use MovieClipLoader() to load in the appropriate jpeg.
Everything loads just fine, except that I have no way of figuring out how to
monitor the downloads of all of the instances of the moviecliploader
class...Here's the FOR loop I was talking about.
// Let's say _global.sectionTotal was equal to 6...that would mean that this
FOR loop would run 6 times in an instant and then exit.
_global.sectionTotal = sectionTotal;
for (_global.count=1; _global.count<=_global.sectionTotal; _global.count++) {
// The next line is a variable declaration used for the purposed of being able
to use the . syntax reference to the appropriate attached movie clip.
s_loader = "small_loader"+_global.count;
// image_select_mc is a movie clip that is inside the main swf. It is the
movie clip where I am attaching all instances of the movie clip from within the
library. The movie clip from within the library is a small clip that will
house the dynamically loaded image.
image_select_mc.attachMovie("Small_Loader", "small_loader"+_global.count,
_global.count+5);
// image_select is basically what I talked about a few lines of code
above...it means that i'm currently referencing
image_select_mc.small_loader1...or image_select_mc.small_loader2...etc based on
the current iteration of this FOR loop.
image_select_mc.invis_text.text = _global.count;
// This if statement is simply for placement of the attached movie
clips...don't bother reading it.
if (_global.count>1) {
image_select_mc._x = ((_global.count-1)*58)+5;
} else {
image_select_mc._x = 5;
}
image_select_mc._y = -20;
// This is where the problem is! The objects being created actually work as
expected...like my_mcl is a moviecliploader object that gets created 6 times
and is named accordingly...my_mcl1...my_mcl2...etc. Everything loads just
fine, but I have no way of monitoring the download of all instances of my_mcl!
Any help would be appreciated!
var my_mcl = "my_mcl"+_global.count;
//trace(my_mcl);
my_mcl = new MovieClipLoader();
var myListener = "myListener"+_global.count;
//trace(myListener);
myListener = new Object();
my_mcl.addListener(myListener);
// This line of code loads the appropriate image for the appropriate attached
movie clip...ex) digital2small.jpg loads into the attached movie
small_loader2....digital3small.jpg loads into small_loader3...so on and so
forth.
my_mcl.loadClip("../fscommand/Images/small/"+_global.portsection+""+_global.c
ount+"small.jpg", "image_select_mc."+s_loader);
// Help!
myListener.onLoadComplete = function(my_mcl) {
trace("Completed");
};
}
Currently I have a static version (the images aren't loaded dynamically) on
the web. Click on Portfolio>sublink. to see what I am striving for.
http://dca.durhamc.on.ca/~mitchell/Portfolio
any comments about the site will be appreciated!