I think it’s not, but maybe I’m wrong. Anyone?
UPDATE:
It’s not.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i think you can, at least there is nothing in the docs that states otherwise. try adding a ProgressEvent on the FileReference object to read it’s data (ByteArray) property after calling
load().however, if you’re loading a file with URLLoader, a URLLoader’s data property is only populated once the load operation has completed.
[EDIT]
so it’s, after all, not possible to access live fileReference data while loading. the docs should explicitly state that it’s not possible since it’s a valid request.
however, after a some stumbling thru the docs i realized that you can do this by using the URLStream class, which provides methods to read data while it’s loading – it’s designed to do exactly what you are looking for.
the only catch, in this case, is that URLStream requires a full URL path (URLRequest object), which is not obtainable with FileReference for security reasons – it’s only possible to get the name of a selected file, not the complete path. obtaining a local file path in AIR is very easy, but since you want your application to be browser-resistant i’m not quite sure how you’ll be able to access file paths from the user’s computer – unless they type in the file path, but requiring your users to do so would seriously degrade UX.