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). 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:˜
replace this function
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