# Flash 8 XML Gallery Problem

**URL:** <https://forum.kirupa.com/t/flash-8-xml-gallery-problem/262118>\
**Category:** flash\
**Created:** [June 3, 2008, 2:50pm UTC](https://forum.kirupa.com/t/flash-8-xml-gallery-problem/262118 "2008-06-03T14:50:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vc\_david](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@vc\_david](https://forum.kirupa.com/u/vc_david)\
**Post date:** [June 3, 2008, 2:50pm UTC](https://forum.kirupa.com/t/flash-8-xml-gallery-problem/262118/1 "2008-06-03T14:50:47Z")

</div>

Hello all!  
Thanks for looking at my post. I wanted to know if anybody could help me figure out my Flash XML Gallery. I’m having two problems. First of all, the gallery loads all pictures at once. The more pictures in the XML file, the slower they all load. Secondly, I wanted the pictures to scroll in its \_y coordinate, similar to Sugar Rhyme’s website portfolio (see [www.sugarrhyme.com](http://www.sugarrhyme.com)). Can anyone please help me? I’m new at this, so I would appreciate any help. The flash file, xml file, and picture are attached here. Thanks again!!  
˜David:kir:˜

---

<div class="post-metadata">

**Author:** ![druva](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@druva](https://forum.kirupa.com/u/druva)\
**Post date:** [June 9, 2008, 6:55am UTC](https://forum.kirupa.com/t/flash-8-xml-gallery-problem/262118/2 "2008-06-09T06:55:01Z")

</div>

replace this function

```auto

function loadThumbs(_Array, j)
{
    /// when u call for this first time j will be undefined and so declare it 0
    //from next time when this is called this if condition will be automatically skipped
    // or when u call this funtion from parseGalleries
    // change like this loadThumbs(image, 0) and 
    // remove this bottom line "var j = (j == undefined) ? 0 : j;"
    var j = (j == undefined) ? 0 : j;
    //-- 
    thumbnails.attachMovie("thumbnail_mc","thumb" + j,++cDepth);
    thumbnails["thumb" + j].filters = thumbsFilter;
    //thumbnails["thumb" + j].thumb.loadMovie(_Array[j]);
    thumbnails["thumb" + j]._y = thumbnails["thumb" + j]._height + thumbnails["thumb" + j]._height * j * 1.2;

    //--
    //-- create a object which will be listening to code / or u can say 
    //--- observing what is happening 
    //--- using this listner u load images one after another 
    //--- basically what this function do is loads images one after one
    //--- if u use for loop to load images all the reqests 
    //---- will hit the server atonce and communication between 
    //---- ur system and server will get slow down
    //--
    //--
    var mclListener:Object = new Object();
    //--
    mclListener.onLoadInit = function(target_mc:MovieClip)
    {
        loadThumbs(_Array,j++);
    };
    //--
    var image_mcl:MovieClipLoader = new MovieClipLoader();
    //--
    image_mcl.addListener(mclListener);
    //--
    image_mcl.loadClip(thumbnails["thumb" + j].thumb,_Array[j]);
}

```

finally what i say is when want to load too many images  
use loadClip instead of loadMovie  
using of loadClip is not just replacing Movie with Clip  
it needs some more piece of code !!  
enjoy !!  
all the best
