I have to add that I have already solved the multiple download of sound files in the cloud. this is the code i used and works fine !:
import flash.net.URLLoader;
import flash.display.Loader;
import flash.events.ProgressEvent;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import fl.controls.ProgressBar;
import flash.media.Sound;
import flash.events.StatusEvent;
var img0:String = "https://www.googleapis.com/drive/v3/files/1P28gWUaVleErTfeXIdG6Iwwnag6ckJel?alt=media&key=AIzaSyA8luNvCKx9bnn4tCdtUoOp6jJ1OliH29Y";
var img1:String = "https://www.googleapis.com/drive/v3/files/1elacmaqcQ7toteOIvIVtHu1tbeR5x7pN?alt=media&key=AIzaSyA8luNvCKx9bnn4tCdtUoOp6jJ1OliH29Y";
var sound1:Sound;
var sound2:Sound;
var sound:Array = ["sound1","sound2"];
var controlCarga_1: ProgressBar = new ProgressBar();
controlCarga_1.width = 320;
controlCarga_1.move(50, 40);
addChild(controlCarga_1);
for (var i:uint=0; i<2; i++) {
this[sound[i]] = new Sound();
controlCarga_1.source = this[sound[i]];
this[sound[i]].load (new URLRequest(this["img"+i]));
this[sound[i]].addEventListener(Event.COMPLETE, imagenCargada);
this[sound[i]].addEventListener(ProgressEvent.PROGRESS, imagenProgreso);
this[sound[i]].addEventListener(IOErrorEvent.IO_ERROR, onError);
}
function imagenProgreso(event:ProgressEvent):void {
formato_1.text = "Load..." + Math.floor(event.bytesLoaded / 1024) + "/" + Math.floor(event.bytesTotal / 1024) + "KB";
//trace("progressHandler: bytesLoaded=" + e.bytesLoaded + " bytesTotal=" + e.bytesTotal);
}
function imagenCargada(event:Event):void {
formato_1.text = "archivo cargado con éxito";
//removeChild(controlCarga_1);
}
function onError(event:IOErrorEvent):void {
trace("ioErrorHandler");
}
function play_music (e:MouseEvent):void{
sound1.play(0, 1000);
sound2.play(0, 1000);
}
play_button.addEventListener(MouseEvent.CLICK, play_music);
The only thing this code does not allow me is removechild the loading bar when the load is finished (I don't know where to put removeChild (controCarga_1);
the point is that it would be interesting to resolve the issue of the bulkloader class for future use by users on the network. It seems like a very flexible and useful class, but it has the flaw of not working with files in the cloud, but solving that is very difficult for me.
Thanks for the help