I've scoured the internet to find a way to pause the execution of ActionScript in a Flash movie. I've found two main ways, but they both have serious problems for my needs. First, the setInterval function is no good for me because I don't need to call a function every so often. Second, the getTimer function inside a while loop eats up all of my processor and then makes IE say that the script is running slowly (go figure).
So, my question is, does anyone know of a simple, non-resource-intensive way to pause my ActionScript? I'm using a Flash-based file upload control to post files to an ASP .NET HTTPHandler, which saves them and processes them. The problem is that the way the ActionScript works now, it uses a for loop to go through the list of select files and send all of them to the handler individually, but successively. So when I get to uplaoding like 50 files with the Flash movie, it sends 50 different file stream to my server in about 2 seconds.
As you can imagine, this destroys my server in disk, processor, and network. I want to be able to pause between the start of each file upload request for 5-10 seconds, which will give the previous file a chance to either finish uploading or get very close to being done, thereby taking the load off the server. Any thoughts (from those of you who read this far)? Thanks!
So, my question is, does anyone know of a simple, non-resource-intensive way to pause my ActionScript? I'm using a Flash-based file upload control to post files to an ASP .NET HTTPHandler, which saves them and processes them. The problem is that the way the ActionScript works now, it uses a for loop to go through the list of select files and send all of them to the handler individually, but successively. So when I get to uplaoding like 50 files with the Flash movie, it sends 50 different file stream to my server in about 2 seconds.
As you can imagine, this destroys my server in disk, processor, and network. I want to be able to pause between the start of each file upload request for 5-10 seconds, which will give the previous file a chance to either finish uploading or get very close to being done, thereby taking the load off the server. Any thoughts (from those of you who read this far)? Thanks!