# MovieClipLoader -- totalBytes question

**URL:** <https://forum.kirupa.com/t/moviecliploader-totalbytes-question/150311>\
**Category:** flash\
**Created:** [June 6, 2005, 6:29pm UTC](https://forum.kirupa.com/t/moviecliploader-totalbytes-question/150311 "2005-06-06T18:29:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![piratesage](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@piratesage](https://forum.kirupa.com/u/piratesage)\
**Post date:** [June 6, 2005, 6:29pm UTC](https://forum.kirupa.com/t/moviecliploader-totalbytes-question/150311/1 "2005-06-06T18:29:13Z")

</div>

Ok, this is bugging the hell out of me.

What I’m trying to do -seems- quite simple, but I can’t get it to work.

I’m looping through & loading a set of thumbnails using the MovieClipLoader class.

I want to have one progress bar, for the whole set of images.

The first way I thought of doing it, was onLoadStart of each image, add all the totalBytes together in a variable. ie.

```auto

myMCL.onLoadStart = function(target_mc) {
	 var loadProgress = myMCL.getProgress(target_mc);
	 myTotalBytes + bytesTotal;
}

```

and then do the same thing onLoadProgress for bytesLoaded, then do something like:

```auto

myBytesLoaded / myBytesTotal * 100;

```

as the percentage…

Which would seemingly work. BUT, even when I upload the swf, if I do a dump of bytesTotal and bytesLoaded in onLoadStart, both variables are returned as 0. As soon as onLoadProgress starts, it seems those variables become available. But not onLoadStart.

I am exporting the actionscript as v2.0 w/ flashplayer 7. The file I am loading as a test is a ~450kb jpeg.

Any ideas? I’m stumped. The MovieClipLoader class rules, but this is bugging the hell out of me.
