aqui dejo el AS:
Código ActionScript :
var Carga:LoadVars;
if (file == "512") {
//web = "http://cid-c7ad1709eb8f5a43.skydrive.live.com/download.aspx/dimax/test/test512.dimax";
web = "http://www.adsltest.com.uy/img/video-3072.mpg";
}
if (file == "1024") {
web = "http://cid-c7ad1709eb8f5a43.skydrive.live.com/download.aspx/dimax/test/test1024.dimax";
}
if (file == "1536") {
web = "http://cid-c7ad1709eb8f5a43.skydrive.live.com/download.aspx/dimax/test/test1536.dimax";
}
_global.Tiempo = new Date();
_global.Minutos = Tiempo.getMinutes();
_global.Segundos = Tiempo.getSeconds();
_global.Tiempo_Inicial = (Minutos*60)+Segundos;
var No_Cache:String;
No_Cache = "?nocaching="+random(65000);
Carga = new LoadVars();
Carga.load(web+No_Cache);
function Obtencion_Tiempo() {
_global.Tamaño_Archvio = Carga.getBytesTotal();
_global.Total_Cargado = Carga.getBytesLoaded();
_global.Porcentaje = Math.floor((Total_Cargado*100)/Tamaño_Archvio);
if (I != 100) {
_global.Tiempo2 = new Date();
_global.Minutos2 = Tiempo2.getMinutes();
_global.Segundos2 = Tiempo2.getSeconds();
var Tiempo_Medio:Number = ((Minutos2*60)+Segundos2)-Tiempo_Inicial;
var Velocidad_Media:Number = Math.round(((Total_Cargado/Tiempo_Medio)*9)/1024);
vel = Math.round(Velocidad_Media+((Velocidad_Media*15)/100));
Redondeo = (vel*100)/1500;
Redondeo = Math.round(Redondeo);
}
I = +1;
if (tester._currentframe<Redondeo) {
tester.nextFrame();
} else if (tester._currentframe>Redondeo) {
tester.prevFrame();
}
grafico.gotoAndStop(Porcentaje);
if (Total_Cargado == Tamaño_Archvio) {
clearInterval(Intervalo);
play();
}
}
var Intervalo = setInterval(Obtencion_Tiempo, 1);
stop();aqui el swf en el servidor.
http://www.dimax.net84.net/web/swf/speedtest.swf
el test lo hice en base al test de velocidad que hay aqui en cristalab.
