Hi, I seem to have some troubles preloading some images.
The imagepaths come from a xml file (but that doesnt really matter here)
I already figured out that an MC looses its capability to onEnterFrame when you load a movie in it (loadMovie).
The problem is that he only preloads the last image. can’t figure out why.
traced my *** off…
numberOfFields = number of Links To Images in the xml file
for (var i=0; i<numberOfFields; i++)
{
thisField = formFields*;
thisFieldProperties = thisField.attributes;
thisFieldLink = thisFieldProperties.picLink;
depth = myForm_mc_global.photos_mc.getNextHighestDepth();
lomo_mc = photos_mc.createEmptyMovieClip(“lomo_”+i+"_mc",depth);
preload_mc = lomo_mc.createEmptyMovieClip(“preload_mc”,lomo_mc.getNextHighestDepth());
lomo_mc._alpha = 0;
preload_mc.loadMovie(thisFieldLink);
lomo_mc.onEnterFrame = function()
{
var totaal = lomo_mc.getBytesTotal();
var aantal = getBytesLoaded();
trace(totaal);
if(aantal >= totaal)
{
//images is ingeladen
lomo_mc._alpha = 30;
delete this.onEnterFrame;
}
}
}
thanx a lot!
ward.