draw wrote a very nice article / tutorial with source code about uploading files with flash. He also notice a about a nice AJAX based script that uses ExternalInterface in AS3 to pass the javascript presentation to the flash uploader, SWFupload.
Check the article here.