两个flex应用程序之间的通信 [英] communication between two flex apps

查看:30
本文介绍了两个flex应用程序之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在同一页面上有 2 个 flex 应用程序.我希望他们能够调用彼此的公共函数.我正在考虑使用 externalInterface 调用或 FaBridge 来这样做.有没有更好的方法?

I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so. Is there a better way to do it?

推荐答案

最好的方法是使用 LocalConnection.它允许您从单独的 SWF 调用方法,而无需通过 Javascript 或服务器.

The best way to go is to use LocalConnection. It allows you to call methods from a separate SWF without having to go through Javascript or a server.

提示:如果您要发送大小超过 20KB 的参数,您需要将它们拆分为两个或多个调用.根据我的经验,LocalConnection 调用对数据的大小有一个限制.

Tip: if you're going to be sending arguments that are greater than about 20KB in size, you will want to split them up in two or more calls. In my experience LocalConnection calls have a limit of around that size for data.

这篇关于两个flex应用程序之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆