1

I am trying to implement the actionscript program described at this address. http://cookbooks.adobe.com/post_Create_a_P2P_file_sharing_application-16539.html. It lets two flash client connect to the cirrus service and share a file using the flash peer to peer facilities.

The problem is that I would like to display a progress bar to the downloading client for long files. There does not seem to be any progress-type event been triggered by data sent by NetStream.Send. This particular function appears to have been created by adobe to send tiny update and meta-data code.

Is there a way to display a progress bar of downloaded data when using a netstream object?

The alternative would be to break the data into small packets and send them individually; then increment the progress bar as they are received by the client. Unfortunately this creates a lot of overhead for the simple problem of displaying a progress bar.

Anon21
  • 2,961
  • 6
  • 37
  • 46

2 Answers2

1

if you still need this, check out the object replication feature of the Cocoon P2P project which gives you all you need including progress events:

http://code.google.com/p/cocoon-p2p/

http://code.google.com/p/cocoon-p2p/wiki/ObjectReplication

Günsche
  • 11
  • 1
  • Re you sure this is appropriate? It says 'P2P library for ActionScript/Flex/AIR focussed on local IP multicast'... 'easily set up device discovery and communication with devices on the local network.' Not the internet. – Tom Jun 22 '11 at 14:33
1

You are right, breaking the data into chunks is the way to go to create a progress bar.

Tom
  • 7,994
  • 8
  • 45
  • 62