Voriki
Voriki

Reputation: 1647

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 wants 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!

Upvotes: 0

Views: 453

Answers (1)

mems
mems

Reputation: 1264

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

Upvotes: 1

Related Questions