开发者

Can Flex wrap Java applets?

I'm just learning about Flex and I'm loving it. Unfortunatly I still have to make the decision on which RIA technology to use and its dependent on, among other things, from the following case:

How开发者_Python百科 can we wrap a java applet around a Flex application? More specifically, I would like to wrap/integrate NASA's World Wind applet in a Flex panel, similar to what Adrew Trice did with the Google Earth API.

An alternative would be id Flex would support direct access to the 3D hardware through OpenGL or DirectX. But I do not think that that is the case yet, not even through AIR.

Any information on the above items would be great. Thanks


If you're going to be running in a browser, you can definitely do something much like the example you cite, which essentially runs both the Flash player and the Google Earth plug-in alternatingly on top of one another (in that case, Google Earth situated atop Flash), using JavaScript as the glue responsible for hooking the two together.

As for wrapping Java applets, accessing the hardware, etc., though, no -- you're pretty much confined to the player in that sense. If you're hosting the Flash player in an installed application (as we often do here), or in a browser (e.g., as described above), you can reach out of the box using ExternalInterface, or if you're not, you can plug in to another app using AS3's Socket classes, but that's about it; Flash Player has no facilities for wrapping/embedding non-Flash binaries.

Hope that helps -- feel free to post back in comments and I'll try to help explain whatever additional questions you might have.


What you need to ask yourself is why on Google Earth would you want to do such a thing? Flex is Flex, not a Java wrapper. There's a reason Flex exists: Java Applet FAIL.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜