Hello again Kirupians…
I’ve got this huge site which i just finished making… it has loads of code, external xml, external as files, infact, almost everything expect the graphics are external… thing is, if i make a preloader for the site… the basic one, which you put in the first frame… then will it take the external as files, xmls, everything into consideration???
if it doesnt… then how does one go about this??? making sure that all the external files are loaded before opening the site?
thanks you very very mucho…
Unfortunately preloaders in a frame of a swf will only load the content thats actually embedded in the swf itself…
external .as files get embedded in the swf when you compile it, so they get preloaded. the xml doesnt.
if you have lots of external files you will need to preload the swf. then once thats done, show another preloader for the external files.
you can use the MovieClipLoader class to load swfs etc in, and the XML and LoadVars classes to load in variables… they have access to things like “getBytesLoaded” and such
so that means that the as files will load along with the swf right? i think that should be ok… cuz the script to ad the xmls are in the as files… so all should load… and if they dont, the xmls are smaller in size than the site itself so they should all load before the site loads… I HOPE!!!
thanks a lot mate! cheers!
sequenial loading of elements helps, ie images, more than 1 xml etc
if you are loading in external XML files - you need to at least make sure you only start executing code onLoad - otherwise there will be no XML data loaded…
but you may not really need a preloader if you XML is only a few KB…