In Flex 3/AS 3, what would be a good way to check if a remote file exists?
I’m thinking in PHP ways where you’d try to “fopen” a remote path (like “http://example.com/somefile.exe“), and see if it works or not. I’m not asking to just download all of the file, I just want to know if the file is there (and accessible).
In Flex 3/AS 3, what would be a good way to check if a
Share
You would probably need to attempt to load the file. If you get an IOError, the file doesn’t exist (or your path is wrong). If it starts loading, by triggering a progress event then it exists. You can then cancel the remainder of the loading.
Alternatively you could try calling a PHP script from Flash which does what you have described, this could return a simple true/false.