I am creating a photo gallery using Loader.load() to load pictures into Flash Player 9. I plan to make them preloaded in advance so when the users turn the page they can see the pic on the new page right away without waiting. So the pics are loaded one after another automatically on backend. When users request a new page, the bitmap object are simply added onto the page’s display list.
I publish the code and test on IE 6 and Firefox 1.5. Only about 50 pics can be preloaded on FF and about 70 pics on IE. I read some articles talking about memory problem of Loader in Flash 8.5 alpha. So is it still a problem for “Flash 9 Actionscript 3 Preview Alpha” ? Check the article - http://www.jessewarden.com/archives/2006/01/diesel_battlefi.html
Following is my code for preloading job -
*function loadImage(page:int):void
{
loader = new Loader();
loader.load(new URLRequest(filePathArray[page-1])); // page = 1 initially
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadComplete);
}
private function loadComplete(e:Event):void
{
image = Bitmap(loader.content);
imageArray[page-1] = image;*
-
if (page <= totalPages)*
-
{
loadImage(++page);* -
}
}
Please advise. Thank you very much.