Hola
Bueno, cambie el level por root, de nuevo comento los pasos
y además cai en cuenta de las hermosas rutas
0. nuevo fla as2, agrego boton y le pongo de nombre de identificador e instancia boton, agrego campo de texto y le pongo por nombre t_prueba
1. Selecciono el botón (que esta en el escenario junto con el text) y
voy al panel de acciones para agregarle este código
Código actionscript:
Ver originalon(release){
import flash.net.FileReference;
var fileRef:FileReference = new FileReference();
var session3:Object = new Object();
var url:String = "MP3/Song03.mp3";
session3.onProgress = function(fileRef:FileReference, bytesLoaded:Number, bytesTotal:Number):Void
{
var porcentaje:Number = (bytesLoaded/bytesTotal)*100;
trace(porcentaje);
_root.t_prueba.text = "Carga al " + porcentaje + " % ";
}
fileRef.addListener(session3);
fileRef.download(url);
}
Publico el swf Y el html
Pruebo desde el html y funciona
Me doy cuenta que desde el swf directamente no,
y hago esta modificación en url:String
Código actionscript:
Ver originalvar url:String = "http://localhost:8282/test/flash/upload_image/temp_foroweb/MP3/Song03.mp3";
Y ahora si funciona en ambos lados
bueno, ahora si espero que te funcione
saludos