开发者

Flash 10 - read file from a drag and drop action?

开发者_如何学编程

I'm looking at how to read a file in flash 10 here:

http://www.thedesilva.com/2008/11/flash-10-file-reference/

is there a way to initiate the file read from a drag and drop? For example, the user drags and drops a text file onto my flash element in the browser - can I initiate the file read from that?

Thanks


You cannot do this operation in the browser. However it works in Adobe AIR -see this link http://www.mikechambers.com/blog/2007/11/07/air-example-native-drag-and-drop/


If you want to do this on the web you can use the new HTML5 function: window.FileReader and trigger it from flash with an externalInterface call.

See http://code.google.com/p/html5uploader/ for an example of window.FileReader

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜