# \[FLEX\] Adding images to the stage through a loop

**URL:** <https://forum.kirupa.com/t/flex-adding-images-to-the-stage-through-a-loop/255035>\
**Category:** flash\
**Created:** [March 18, 2008, 1:40pm UTC](https://forum.kirupa.com/t/flex-adding-images-to-the-stage-through-a-loop/255035 "2008-03-18T13:40:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raziel](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@Raziel](https://forum.kirupa.com/u/Raziel)\
**Post date:** [March 18, 2008, 1:40pm UTC](https://forum.kirupa.com/t/flex-adding-images-to-the-stage-through-a-loop/255035/1 "2008-03-18T13:40:21Z")

</div>

Hi,

I import this flickr feed, magic around some strings through an array here and there to get the img url i need for a flickr image. So now i got a loop that takes the 1st 5 images from someones photo feed and parses and constructs the url needed for the 5 images.

But i can’t for the life of me remember how to add the images to the stage, let alone in Flex.

I got a SWFLoader in there with an id set to “holder”.

How do i go about loading the images in there and off setting them somewhat?  
(it’s so stupid that i can’t remember).

```auto
			for (var i:int=0; i<5; i++)
			{
				var farm_id:String = setData.photos.photo*.@farm;
				var server_id:String = setData.photos.photo*.@server;
				var picture_id:String = setData.photos.photo*.@id;
				var secret:String = setData.photos.photo*.@secret;
				
				var URL:String = "http://farm"+farm_id+".static.flickr.com/"+server_id+"/"+picture_id+"_"+secret+".jpg";
				trace(URL);
			}

```
