开发者

Uploading image with Javascript, then having it appear in embedded SWF

I need to upload an image to a SWF, however I can't use ActionScript for it because the client wan开发者_StackOverflow中文版ts drag-and-drop capability. I figure that I can make the upload button cause a popup, where there is JavaScript for drag-and-drop. The SWF allows for some photo manipulation, so the image needs to be uploaded, and be in the SWF for that use. My question is, how can I make that image accessible to the SWF file?

Thank You!


You can do it with mostly with ActionScript plus a little bit of JavaScript. Redirect all HTML DOM events to Flash via ExternalInterface.

The following example no more work on lastest Firefox or Chrome, due to lack of seting up window mode (wmode = opaque or transparent in our case): http://code.google.com/p/quasimondolibs/wiki/FFDragAndDroptoFlash

Understanding HTML5 drag and drop API

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜