# Queue Loading multiple swf's help pls

**URL:** <https://forum.kirupa.com/t/queue-loading-multiple-swfs-help-pls/250572>\
**Category:** flash\
**Created:** [January 30, 2008, 5:15pm UTC](https://forum.kirupa.com/t/queue-loading-multiple-swfs-help-pls/250572 "2008-01-30T17:15:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dax1](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dax1](https://forum.kirupa.com/u/dax1)\
**Post date:** [January 30, 2008, 5:15pm UTC](https://forum.kirupa.com/t/queue-loading-multiple-swfs-help-pls/250572/1 "2008-01-30T17:15:24Z")

</div>

My main mc contains 2 empty mc’s in which i’m loading 2 seperate swf’s into using this fine queue tut. The preloader currently displays a loading bar and description for each swf as it loads… BUT, is there an easy way to modify the preloader bar/code so you only see a single bar/percentage for both loads?

See attached code below:

[COLOR=Blue] /////// code on main timeline////////

stop();

#include “Queue.as”

//first we put all the items in a queue ready to be loaded  
aQueue.push({source: ‘images/man.jpg’, level: “mcContainer2”, text: ‘Loading Man Image’}); //this will load man.jpg in level 1  
aQueue.push({source: ‘images/fire.jpg’, level: “mcContainer”, text: ‘Loading Fire Image’}); //this will load fire.jpg into movieclip mcContainer

//now we actually load everything in the queue  
startQueue();

/// Linked Queue.as ///////////////

var count:Number = 0;  
loadText\_txt.autoSize = “left”;  
preloader\_mc.bar\_mc.\_visible = false;  
preloader\_mc.bar\_mc.\_xscale = 0;

var my\_mcl:MovieClipLoader = new MovieClipLoader();  
var loadListener:Object = new Object();  
my\_mcl.addListener(loadListener);

\_global.aQueue = new Array();

\_global.startQueue = function():Void {  
preloader\_mc.bar\_mc.\_visible = true;  
my\_mcl.loadClip(aQueue[0].source, aQueue[0].level);  
}

loadListener.onLoadStart = function() {  
showLoader(true);  
};

loadListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes) {  
loadText\_txt.text = aQueue[count].text;  
preloader\_mc.bar\_mc.\_xscale = loadedBytes/totalBytes\*100;  
};

loadListener.onLoadInit = function() {  
count++;  
if (count\<aQueue.length) {  
my\_mcl.loadClip(aQueue[count].source, aQueue[count].level);  
}  
if (count == aQueue.length) {  
showLoader(false);  
count = 0;  
aQueue.length = 0; //everything has loaded so now empty array

```
    _root.gotoAndStop("play");

}

```

};

function showLoader(visibility:Boolean):Void{  
preloader\_mc.\_visible = visibility;  
loadText\_txt.\_visible = visibility;

}[/COLOR]
