# \[FL5\] Error, loading images externally

**URL:** <https://forum.kirupa.com/t/fl5-error-loading-images-externally/323390>\
**Category:** Uncategorized\
**Created:** [June 28, 2011, 7:39pm UTC](https://forum.kirupa.com/t/fl5-error-loading-images-externally/323390 "2011-06-28T19:39:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davirus](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Davirus](https://forum.kirupa.com/u/Davirus)\
**Post date:** [June 28, 2011, 7:39pm UTC](https://forum.kirupa.com/t/fl5-error-loading-images-externally/323390/1 "2011-06-28T19:39:37Z")

</div>

Hi everybody on Kirupa.

I have been experiencing an odd problem with the programming of my website.

I decided to load externally all the pictures on all my galleries since embedding the images into the .swf will (obviously) increase the size of the file.

Now, I was able to make them to load, but the percentage indicator is not working, the pictures take a while to load but… ahmm… I better suggest to see by yourself the error:  
[http://davirus.mx/gui/arcada.html](http://davirus.mx/gui/arcada.html)

(in case you wan`t to see, open any of the first buttons “diseño grafico” or “ilustracion”).

this is the code I am using:

```auto
onEnterFrame = function ()
{
	startLoading("graphics/design/poster_kinta.jpg");
	_root.grupo1.poster_01.infoField.gotoAndStop(1);
	_root.grupo1.poster_01.box1.gotoAndStop(1);
};

function startLoading(whichImage)
{
	loadMovie(whichImage, _root.grupo1.poster_01.imageLoader);
	onEnterFrame = function ()
	{
		infoLoaded = Math.round(imageLoader.getBytesLoaded());
		infoTotal = Math.round(imageLoader.getBytesTotal());
		percentage = infoLoaded / infoTotal;
		_root.grupo1.poster_01.box1.box2.infoField.text = Math.round(percentage * 100) + "%";
		if (infoLoaded == infoTotal)
		{
			delete onEnterFrame;
			this.imageLoader.forceSmoothing = true;
			_root.grupo1.poster_01.box1.gotoAndPlay("fadeout");
			_root.grupo1.poster_01.mypreview._visible = false;
			_root.grupo1.poster_01.box1.box2.infoField.text = "listo";
		}
	};
}

```

Here is a screenshot of the structure of each button:

![](http://forum.kirupa.com/uploads/kirupa/6555/18d70f03540ff220.gif)
