Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/05/2010, 17:06
Avatar de Lynxcraft
Lynxcraft
 
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 16 años, 5 meses
Puntos: 51
Respuesta: problemas con ProgressEvent.PROGRESS

Código PHP:
stop()
var 
porcentaje:Number;
var 
texto:TextField=new TextField  ;
var 
barra:Sprite=new Sprite();
var 
color:int=0xA1B3FB;
barra.x=stage.stageWidth/2-50;
barra.y=stage.stageHeight/2-10;
addChild(barra);
addChild(texto);
configureListeners(this.loaderInfo);
function 
configureListeners(dispatcher:IEventDispatcher) {
    
dispatcher.addEventListener(Event.COMPLETEcargado);
    
dispatcher.addEventListener(ProgressEvent.PROGRESScar);
}
function 
cargado(e:Event):void{
    
removeChild(texto);
    
removeChild(barra);
    
gotoAndStop(2);
    
}
function 
car(e:ProgressEvent):void{
    
porcentaje=(e.bytesLoaded/e.bytesTotal)*100;
    
barra.graphics.clear();
    
barra.graphics.beginFill(color);
    
barra.graphics.drawRect(0,0,porcentaje*(100/100),5);
    
texto.x=barra.x+barra.width;
    
texto.y=barra.y-7;
    
texto.text=String(Math.round(porcentaje))+"%";

__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft