robertmacedonia 0 Junior Poster in Training

Hello to all,

I am building an application in AS3 that loads swf files using UILoader. Each swf file has its own sounds included and the problem is that when I load the files - I load them all at once, and I need to show one at a time, then one would navigate to the following swf using a Next button etc..

Now, as I said - since each file has its own sounds, when I show the first swf to the user, all of the swf's sounds are loaded and the user gets a complete mess of sounds, all of them mixed up.

So now I've been told that I should store all of the swfs in an array, converted to MovieClips so that I would be able to use its "soundTransform" property to set the volume to 0 etc...

Now, my question is - how do I possibly store the swfs in an array as MovieClips...

Something like - "swf_array[0] = MovieClip(loader.content);", but I haven't got a clue about looping through the loader to store each external file in its own element of the array. I have got this code for loading only, it works fine, so can someone help me a little about getting each of the files and storing them in an array?

this.zadaca = new ContainerZadaca();
				this.zadaca.name = "zad_" + zadaci_array[j];
				this.zadaca.x = 22;
				this.zadaca.y = 113;
				//this.zadaca.zadaca_loader.scaleX = 0.8;
				//this.zadaca.zadaca_loader.scaleY = 0.8;
				
				this.zadaca.zadaca_loader.addEventListener( Event.COMPLETE, onCompleteLoadZadacaTest );
				
				this.url_request_zadaca = new URLRequest("../../db/zadaci/" + zadaci_array[j] + ".swf");
				
				this.zadaca.zadaca_loader.load(this.url_request_zadaca);

Now how to include something like this:

this.niza_swf[j] = MovieClip(this.zadaca.zadaca_loader.content[j]);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.