Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-28-2009, 12:59 PM
Junior Member
 
Join Date: Dec 2009
Posts: 1
Smile File.copy progress bar

Hi! I'm working on a file transfer program.

I can use the file class, but I have no idea how I may be able to make a progress bar in the copying process. So basically my solution was making a new file and then using FileStream for copying in order to make a progress bar.

Does anyone have a better solution?
Thanks a lot!
Reply With Quote
  #2 (permalink)  
Old 01-02-2010, 09:32 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Yes, this way should work. In the copying loop, you may call the processMsg method to update the progress bar:
Code:
import SWFKit.*;
var fs = new FileStream(...);
...
while (...) {
    if (!Global.processMsg())  break;
    ...
    fs.write(...);
    ...
}
Reply With Quote
  #3 (permalink)  
Old 01-02-2010, 09:38 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

An alternative is to call the SHFileOperation function of Windows Shell. It will display a progress bar as you copy files in the Windows Explorer.
Reply With Quote
Reply

Was this information helpful?    Yes No



Tags
copy, file, progress

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.