Este es el code:
Código :
var cargador:Loader = new Loader();
cargador.contentLoaderInfo.addEventListener(Event.OPEN, Abrir);
cargador.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, Progreso);
cargador.contentLoaderInfo.addEventListener(Event.COMPLETE, Completo);
addChild(cargador);
preloader.visible = false;
//\\Function que cargan el .swf//\\
function cargar(cual:String){
cargador.load(new URLRequest("1banner.swf"));
}
function cargar1(cual:String){
cargador.load(new URLRequest("inicio.swf"));
}
///////////////////////////////////////////////////
function Abrir (evt:Event):void
{
preloader.visible = true;
}
function Progreso (evt:ProgressEvent):void
{
var porcentaje:Number = Math.round((evt.bytesLoaded * 100)/evt.bytesTotal);
preloader.porcentaje.text = porcentaje + "%";
}
function Completo (evt:Event):void{
preloader.visible=false;
}
//Botones
boton.addEventListener(MouseEvent.CLICK, cargar);
boton1.addEventListener(MouseEvent.CLICK, cargar1);
///////////////////////////////////////////////////////Any idea?
