# Load jpeg from a loop pb

**URL:** <https://forum.kirupa.com/t/load-jpeg-from-a-loop-pb/53766>\
**Category:** flash\
**Created:** [June 7, 2004, 7:05pm UTC](https://forum.kirupa.com/t/load-jpeg-from-a-loop-pb/53766 "2004-06-07T19:05:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [June 7, 2004, 7:05pm UTC](https://forum.kirupa.com/t/load-jpeg-from-a-loop-pb/53766/1 "2004-06-07T19:05:28Z")

</div>

Hello,

Here’s what i’m trying to do: I load a variable (image url) from PHP/SQL and i’m trying to resize the images on the fly:

```php

myLoadvars = new LoadVars();
myLoadvars.load("http://localhost:8080/Tests/music.php");
myLoadvars.onLoad = function(succes) {
	if (succes) {
		_global.songtotal = parseInt(this.musictotal);
		for (i=0; i<_global.songtotal; i++) {
			_root["mycover"+i] = this["Cover"+i];
			_root.createEmptyMovieClip(["container"+i], 400+i);
			loadMovie(_root["mycover"+i], _root["container"+i]);
			_root["container"+i]._x = 50*(i+1); //only to check result
		}
	}
};

```

well i’m stuck here cause only the 1st pic get stored in the 1st container … Any idea why??
