AS3: URLStream saving files to desktop?

后端 未结 2 1532
太阳男子
太阳男子 2021-01-21 17:21

i found a few scripts online and combined them to this. I want to download files from the web to my local harddrive. Any idea what i\'m doing wrong?

var fs:FileS         


        
2条回答
  •  温柔的废话
    2021-01-21 18:02

    This is a long shot, since I've never worked with FileStream (and since the error message you pasted says 'this URLStream object etc'). But, It seems you FileStream object (fs) is not open and you are trying to 1) write to it and then 2) close it. My understanding is that any of those operations should throw an error if the file is not open. So, maybe it's worth cheking that. Other than that, can you paste a stack trace of the error, so it's more clear where it originates? (Tip: if you are compiling with the Flash IDE, check permit debugging in the actionscript settings; this will give you more verbose error messages and line numbers; this is of great help when debugging / troubleshooting).

提交回复
热议问题