A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: file reference.. decrementing time..

  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    44

    file reference.. decrementing time..

    Can anyone give idea or code that get time left before complete upload or download..?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    depends on what method you use. And which type of application (php, flash, etc.)

    gparis

  3. #3
    Member
    Join Date
    Sep 2006
    Posts
    44
    thank you for giving attention to my problem.. im using flash..

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    use the FileReference.onProgress event listener

    ActionScript 2.0 Language Reference
    ActionScript classes >
    FileReference (flash.net.FileReference) >
    onProgress

    example -
    PHP Code:
    var fileRef:FileReference = new FileReference();
    var 
    listener:Object = new Object ();

    listener.onProgress =
    function(
    file:FileReferencebytesLoaded:NumberbytesTotal:Number):Void
    var 
    PC:Number Math.round(bytesLoaded/bytesTotal*100);
    var 
    TL:Number Math.round((bytesTotal/1024));
    loadbar.txt.text "Transferring: " +PC+"% of  " +TL+" Kbs";
    loadbar.gotoAndStop(PC);
    };

    fileRef.addListener(listener); 

  5. #5
    Member
    Join Date
    Sep 2006
    Posts
    44
    thank for the help...i have another question..
    1.it is possible to sort the fileRefList to ascending and descending
    2.delete specific index in fileRefList
    Last edited by shendel101; 09-11-2007 at 08:58 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center