Can I make a FileReference.upload () block (in ActionScript 3.0)?

I am working on Flash file download widgets and I want it to download one file at a time. In my load function I currently have FileReferenceList

it and I loop through it naming upload

on each one. However, since it FileReference.upload

does not block, all downloads are simultaneously.

Can you create a function block uplaod

? Or do I need to chain the load together by registering an event to load the next one when the first Event.COMPLETE is fired?

0


a source to share


1 answer


No, you cannot do this at all with AS3, you need to chain-manage "asynchronous" requests.



I usually have a list of files and download one, catching the full event and then doing another. The same principle applies to download or extract files using URLLoader.

+4


a source







All Articles