在纯 Actionscript 3 项目中,是否有任何理由在ExternalInterface 类上使用 Adob​​e 的 Ajax Bridge?

发布于 2024-07-24 12:14:27 字数 244 浏览 3 评论 0原文

我正在 Adob​​e Flex 中编写一个纯 ActionScript 3 应用程序。 我希望我的应用程序能够在浏览器中编写脚本。 似乎有两个选择:Adobe 的 Ajax Bridge(通常与使用 mxml 的 Flex 应用程序一起使用?)和 Adob​​e 的外部接口类(flash.external.ExternalInterface)。 有什么理由在ExternalInterface 类上使用Ajax Bridge 吗?

谢谢。

I am writing a pure actionscript 3 application in Adobe Flex. I want my application to be exposed to scripting in a browser. It seems that there are two options: Adobe's Ajax Bridge (typically used with a Flex application that uses mxml?) and Adobe's External Interface class (flash.external.ExternalInterface). Is there any reason to use the Ajax Bridge over the ExternalInterface class?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

熟人话多 2024-07-31 12:14:27

好问题。 绝对有理由使用其中之一。

如果您的应用程序是需要能够与 JavaScript 通信的 ActionScript 应用程序,那么ExternalInterface 对象可能是正确的工具。 但是,如果您的应用程序是需要控制 Flex 组件的 JavaScript 应用程序,则可以使用 Ajax Bridge。

Adobe 关于 FABridge 的文档中的一些快速要点:

  • 您希望在 Ajax 应用程序中使用丰富的 Flex 组件,但不想编写大量 Flex 代码。 如果将组件包装在启用 FABridge 的存根应用程序中,则可以完全通过 JavaScript 编写脚本,包括使用服务器远程生成的 JavaScript。
  • 您的团队中只有一两个人了解 Flex。 FABridge 库让团队中的每个人都可以使用一到两名 Flex 专家制作的作品。
  • 您正在构建一个包含 Flex 和 Ajax 部分的集成富 Internet 应用程序 (RIA)。虽然您可以使用ExternalInterface 自己构建集成,但您可能会发现使用 FABridge 启动速度更快。

您可以通过 http://livedocs 获得更广泛的视角.adobe.com/flex/3/html/help.html?content=ajaxbridge_1.html

Good question. There is definitely reason to use one or the other.

If your application is an ActionScript application that needs to be able to communicate with JavaScript, the ExternalInterface object is probably the right tool. But, if your application is a JavaScript application that needs to control Flex components, the Ajax Bridge is the thing to use.

Some quick bullets from Adobe's documentation on FABridge:

  • You want to use a rich Flex component in an Ajax application but do not want to write a lot of Flex code. If you wrap the component in a FABridge-enabled stub application, you can script it entirely from JavaScript, including using JavaScript generated remotely by the server.
  • You have only one or two people on your team who know Flex. The FABridge library lets everyone on your team use the work produced by one or two Flex specialists.
  • You are building an integrated rich Internet application (RIA) with Flex and Ajax portions.Although you could build the integration yourself using ExternalInterface, you might find it faster to start with the FABridge.

You can get a broader perspective at http://livedocs.adobe.com/flex/3/html/help.html?content=ajaxbridge_1.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文