Hi guys,
I am building a flash site and currently I’m not using an timeline or any images in the library. I’m using the image loader class to load in all images for each page. The trouble is that images load one by one. I want them to wait until they are all loaded before appearing together on the stage.
First: Is this best practice? What do professionals do when it comes to loading images / pages.
Second: Even if I add a preloader they still load individually.
Here’s some example code which loads the contents to my map.swf
[COLOR=“Blue”]public function Map()
{
img = “PageBack.png”;
page = new LoadImage(file, img);
addChild(page);
page.x = 85;
page.y = 209;
file = "Images/MapImages/";
img = "MapOfTheWorld.png";
title = new LoadImage(file, img);
addChild(title);
title.x = 310;
title.y = 240;
[COLOR="Black"][/COLOR]
file = "Images/MapImages/";
img = "MapSubhead.png";
subTitle = new LoadImage(file, img);
addChild(subTitle);
subTitle.x = 310;
subTitle.y = 297;
file = "Images/MapImages/";
img = "MapBack.png";
map = new LoadImage(file, img);
addChild(map);
map.x = 105;
map.y = 1200;
var mapPageIn = new SubPageIn(map);
file = "Images/MapImages/";
img = "CoordinatesCard.png";
coordinates = new LoadImage(file, img);
addChild(coordinates);
coordinates.x = 30;
coordinates.rotation = -5;
coordinates.y = 200;
var coordPageIn = new PageIn(coordinates);
}[/COLOR]
Thanks in advance!