flash 8 file upload, tracking up/down rate?

January 7th, 2009
  • Is it possible with the new upload feature in flash it to measure and display the transfer rate just like the OS window?

    Thanks
    Paul


  • um......I will post within tomorrow(<----time zone may not the same)....


    If you are not minding your ftp username/password will be stolen because of some "decomplier" user....sure it can.....
    admin penal.....Flash cannot do anything alone,you should trying to make it with other scripting(php,asp,cgi etc.)

    Nice one :>


  • Hi is there any chance of this fla being posted ?
    http://ag0609.ecpocket.com/test/main.html
    Thanks


  • I haven't tried the new upload stuff yet, but I there is a getBytesLoaded actionscript method. If the same kind of thing is available in the upload classes, you could use some math to find the average rate of down/up:

    average rate (kbyes/second) = kbytes downloaded so far / time (seconds)

    To find the time you could use the _root.getTimer() method (which returns milliseconds btw), set a variable to keep a start time when you start downloading/uploading the file and then use this to find the current time elapsed:

    time elapsed (seconds) = (start time - getTimer())/1000

    Hope this helps, repost if you are still having trouble.


  • ']Hi is there any chance of this fla being posted ?
    http://ag0609.ecpocket.com/test/main.html
    Thanks
    um......I will post within tomorrow(<----time zone may not the same)....

    Is it possible to make ftp: contact with this function? so I could make a flash admin panel?
    If you are not minding your ftp username/password will be stolen because of some "decomplier" user....sure it can.....
    admin penal.....Flash cannot do anything alone,you should trying to make it with other scripting(php,asp,cgi etc.)


  • Like this?

    http://ag0609.ecpocket.com/test/main.html (<---chinese)

    Just select the item in the list of left-hand-side and select "test.part6.rar" in the list of right-hand-side,then ticked all check boxes.at final click "Download" of the botton-right.

    FF work perfectly,but IE got bug with cache.umm.. the zip's dont seem to be downloading... can you upload it here for me, please?


  • 你是中國? hehe;)
    anyway, i'll give this a try. 謝thanks!


  • Like this?

    http://ag0609.ecpocket.com/test/main.html (<---chinese)

    Just select the item in the list of left-hand-side and select "test.part6.rar" in the list of right-hand-side,then ticked all check boxes.at final click "Download" of the botton-right.

    FF work perfectly,but IE got bug with cache.


  • Yeh am a bit lost :S

    Math is not my strongest quality


  • has anybody had any success?


  • oh ... I got my free time faster than I think
    OK,here you are(<----not translate to English yet...but I add some instruction in English with it)

    Not for Download now


  • 恩~我是中國-香港.haha
    Can't download it? Strange....I got test with 5 computers(with win2000, winServer2003, winXP SP1/SP2).They didn't install special software(FP8 and nod32 installed)....

    It works:
    http://ag0609.ecpocket.com/work.jpg

    umm....just ignored this.Try to take look of my transfer speed code:
    listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
    //trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal);
    bL = bytesLoaded;
    bT = bytesTotal;
    per = bytesLoaded/bytesTotal*100;
    if (old == undefined) {
    speed = 0;
    old = 0;
    markspeed = setInterval(function () {
    speed = bL/1024-old;
    old = bL/1024;
    }, 1000);
    }
    if(speed.toString() == "NaN" speed == undefined speed < 0) {
    speed == 0;
    }
    loadbar.label = "Uploading..."+Math.floor(per)+"% "+Math.floor(speed)+"Kb/sec";
    };
    I am using "new loaded" -" old loaded".Becuz I think using average speed will got wrong speed when some part of file have been cached.


  • Nice one thanks :):)


  • Is it possible to make ftp: contact with this function? so I could make a flash admin panel?







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about flash 8 file upload, tracking up/down rate? , Please add it free.