Galleri - XML...no solvable

hi all,

someone helped me developing a gallery, loading images trough XML, problem is the images are blinking and not showing properly while loading. apparently it is suppose to be a loading problem, means all the images should be loaded fully before appearing…i asked him how to fix it and sent me some “instructions” unfortunately he is no more available for a couple of weekd and i would need some help implementing… Ideally i would like to have a basic preloading (percentage) while loading the images but have no idea how to do that as i’m more on animation that actionscript…

these are his comments and the code he is refering to…
"1. Goto “mc.galleryContainer” -> Layer “buttonactions” -> function
fillProducts()
var lastProductX:Number = 0;
var allowedProductWidth:Number = 150;
function fillProducts( category )
Quote:
{
productLoading()
if( category == “women” )
{
list = category_women_xml.firstChild.childNodes;
women_icon_btn._visible = false;
kids_icon_btn._visible = true;
}
else
{
list = category_kids_xml.firstChild.childNodes;
women_icon_btn._visible = true;
kids_icon_btn._visible = false;
}

clearProductsList()
lastProductX = 0;
for(i=1; i<= list.length; i ++)
{
var src:Object = new Object();
for(j=0;j<list[i-1].childNodes.length;j++)
{
src[list[i-1].childNodes[j].nodeName] = list[i-1].childNodes[j].firstChild;
}
var product:MovieClip = products_list_mc.attachMovie(“PRODUCT”,“product”+i ,i,{a:“demo”});

random_val = Math.random() * 40;
currentProductX = lastProductX + ( random_val ) + allowedProductWidth;
//trace(lastProductX+" / “+random_val+” / "+allowedProductWidth);

if( !(i-1))
currentProductX = 75;

product._x = currentProductX;
lastProductX = currentProductX;
product.src = src;
product.category = category
}
products_list_mc._x = 0;
}
2. Hide "“products_list_mc” within this function…means ?

  1. Goto “PRODUCT” movieclip. I track the product loading within this movieclip. In “Layer2” there is a function called “trackImage” which will check whether the image is completely loaded or not.
    Quote:
    function trackImage()
    {

per = int ( ( image.getBytesLoaded() / image.getBytesTotal() ) * 100 )
//ExternalInterface.call(“console.debug”,_l1.image+" - “+_l1.image.getBytesLoaded() +” == “+ _l1.image.getBytesTotal() +” - "+per );
if(per >= 100 )
{
clearInterval( track_interval );
resize_interval = setInterval(resizeImage, 1000);
}
}
4. Within that IF statement, call a new parent function. This function should keep incrementing a variable and check whether the count is equal to the total products of that category.
5. If the count is equal, make the “products_list_mc” visible.

voila… if anyone can explain me how to do that ???

thanks in advance