Paul Steven wrote:
Is there a built in function that will provide me with the MD5 value for a file? I have seen some examples online that provide a MD5 value for a string but I need it for a file.
Nothing built in, though if you can read the file into a ByteArray, it's fairly simple to modify one of the existing MD5 hash routines to take in a ByteArray instead. For example, if you were using the open-source as3corelib project's MD5 class you can just change in the parameter type to a ByteArray, and then modify the createBlocks() method to do the same and read in the i'th byte rather than calling s.charCodeAt().
However, there's a big caveat--unless you're planning on doing this from an Adobe AIR (formerly Apollo) application or a third-party projector (e.g. Zinc, SWF Studio, SWHX and the like), you're probably out of luck.
As far as I know neither the standalone or plugin Flash Player, nor the standard web browsers allow programmatic access to client-side files scheduled for upload--typically, you'd need to have the user actually upload them and then round-trip the file back from the server to have access to the content. :(
You might be able to do it via an ActiveX control or a Java applet that has the appropriate permissions, though this may require an additional dialog requesting the user to grant escalated privileges.
Jim _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

