Is it possible to drag and drop from/to outside a Flash applet with JavaScript?

前端 未结 6 1397
无人共我
无人共我 2021-01-05 17:09

Let\'s say I want a web page that contains a Flash applet and I\'d like to drag and drop some objects from or to the rest of the web page, is this at all possible?

B

6条回答
  •  甜味超标
    2021-01-05 17:51

    I would say it is possible to drop to Flash if you detect that the item is dragged on to the that contains the flash stuff, and you set your dragged objects to have a z-index higher than the flash. Then when it is dropped you can talk to Flash using javascript to tell it where and what was dropped.

    However the other way around is probably much harder, because you'd have to detect when the object hits the border of the flash movie and "pass" it to the javascript handler (create it in the html, hide it in flash).

    The question is probably to know whether it's worth the trouble, or if you can maybe achieve everything in JS or in Flash ?

提交回复
热议问题