all of the MCs are not the same size for one so they will
more than likely
call the init out of order.
So what you would want to do, if you plan on waiting for all
of them to
load, is add a var to increment and set that against your
array total, if
they match then call the next function.
not sure if that answers your question though.
B.
On 7/25/07, ilteris kaplan <ilteriskaplan gmail.com> wrote:
>
> Hello List,
>
> I am wondering something regarding movieClipLoader.
Basically first I
> am creating holder mc's to load my images into. The
number of mcs are
> according to imageArray.length. This is an array which
holds the
> images to be loaded.
>
> var theLoader:MovieClipLoader = new MovieClipLoader();
> var theListener:Object = new Object();
> theLoader.addListener(theListener);
> //above is the typical MovieClipLoader listener object
instantiation.
>
>
> for (var i:Number = 0; i<imageArray.length; i++) {
> var tempMc =
_root.createEmptyMovieClip("tempMC"+i,
> this.getNextHighestDepth(), {_alpha:0});
> imageMcArray.push(tempMc);
>
> }
>
>
> then I am calling the loadClip method. Tracing the
imageMcArray gives
> me this result:
>
>
> for (var i:Number = 0; i<imageArray.length; i++) {
>
theLoader.loadClip(imageArray[i],imageMcArray[i]);
> trace(imageMcArray[i]);
> // traces _level0.tempMC0, _level0.tempMC1
>
> }
>
> Everything looks fine until here. I am assuming above
method loads
> images sequentially. I do have a onLoadInit method
which I call to
> trigger some more methods. This is where the problem
occurs. Please
> see below:
>
>
> theListener.onLoadInit = function(mc:MovieClip) {
> var bitmapPic = new BitmapData(mc._width,
mc._height);
> bitmapPic.draw(mc,new Matrix());
> imageBmpArray.push(bitmapPic);
> trace(mc); // trace gives me // traces
_level0.tempMC1,
> _level0.tempMC0
> mc.removeMovieClip();
> };
>
> As you can see, second trace gives me my list in the
reverse order. I
> am confused why I am getting the reversed order in this
second trace.
> Does this mean images are not loading sequentially at
all? Can
> someone clarify this for me?
>
> best,
> ilteris
>
>
>
>
>
> _______________________________________________
> Flashnewbie chattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om
>
_______________________________________________
Flashnewbie chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
|