private function addedListener Event preloaderWidth stage stageWidth P

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
private function addedListener(e:Event) {
preloaderWidth = (stage.stageWidth - (2*PRELOADERS_MARGIN) - PRELOADERS_GAP*(imagesQuantity-1))/(imagesQuantity);
loadImg(imageLinksArray[0]);
progressbar = new SquarePreloader(0, stage.stageHeight -200,100,10);
progressbar.width = 100;
preloadersArray.push(progressbar);
if (preloadersArray.length - 1 == 1) {
preloadersArray[1].x = PRELOADERS_MARGIN;
}
stage.addChildAt(preloadersArray[1], numChildren);
}