# How can I use multiple instances of the Loader Class with one URLRequest?

**URL:** <https://forum.kirupa.com/t/how-can-i-use-multiple-instances-of-the-loader-class-with-one-urlrequest/308391>\
**Category:** flash\
**Created:** [April 22, 2010, 3:38am UTC](https://forum.kirupa.com/t/how-can-i-use-multiple-instances-of-the-loader-class-with-one-urlrequest/308391 "2010-04-22T03:38:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caraticus](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/caraticus/32/4195_2.png) [@caraticus](https://forum.kirupa.com/u/caraticus)\
**Post date:** [April 22, 2010, 3:38am UTC](https://forum.kirupa.com/t/how-can-i-use-multiple-instances-of-the-loader-class-with-one-urlrequest/308391/1 "2010-04-22T03:38:31Z")

</div>

Here’s my situation. I’m creating an image loader with a specific effects that requires layering multiple masks over the same movieclip. in the timeline it looks like this:

![](http://forum.kirupa.com/uploads/kirupa/6207/85834858c3703635.jpg)

What I want to do is add an instance of the loaded image into each of these masked movieclips. I’m trying this:

create a new instance of the loader and store it in an Array

```auto
for (var j=0; j<allThumbs.length(); j++) {
		imgLoader = new Loader();
		img_arr.push(imgLoader);
	}

```

Then add each stored instance to the masked movieclip instances

```auto

function onClickImg(event:MouseEvent) {
curIndex=tNs_mc.indexOf(event.currentTarget);
	imgView.gal2_1.addChild(img_mc[curIndex][0]);
	imgView.gal2_2.addChild(img_mc[curIndex][1]);
	imgView.gal2_3.addChild(img_mc[curIndex][2]);
	imgView.gal2_4.addChild(img_mc[curIndex][3]);
imgView.gotoAndPlay(2);

```

The result is that only the last Loader instance is shown… so in this case I only see gal2\_4

The only way I’ve been able to get this to work is to create an entirely new Loader object for each movieclip instance. Doing it this way loads the same image 4 times… that’s not acceptable.

Anyone know how I can store the image that is loaded and reuse it in the different movieclip instances?

Thanks in advance
