# getBytesTotal returns 0

**URL:** https://forum.kirupa.com/t/getbytestotal-returns-0/81515
**Category:** flash
**Created:** [March 3, 2005, 1:08am UTC](https://forum.kirupa.com/t/getbytestotal-returns-0/81515 "2005-03-03T01:08:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xmac](https://avatars.discourse-cdn.com/v4/letter/x/dec6dc/32.png) [@xmac](https://forum.kirupa.com/u/xmac)
#### Post date: [March 3, 2005, 1:08am UTC](https://forum.kirupa.com/t/getbytestotal-returns-0/81515/1 "2005-03-03T01:08:37Z")

</div>

This is really doing my nut, i’m preloading an external jpg into a movie on my stage, with a preloader on the main stage rather than the loaded movie, but it always return 0 to getBytesTotal(). Here’s the code:

```auto
_root.createEmptyMovieClip('holder', 2);
holder.loadMovie("img1.jpg");
holder._x = 50;
holder._y = 50;
	var l = holder.getBytesLoaded();
	var t = holder.getBytesTotal();
	if (l<t) {
		this.texttotal.text = Math.round(t/1000)+'kb total';
		gotoAndPlay (1);
	} else {
		// fully loaded
		this.texttotal.text = "loaded";
		//this._visible = false;
	}

```
