是否可以使用任何 IPC 机制从 Adobe Flash 动作脚本调用 c++ api?有什么好的例子吗?
Is it possible to use any IPC mechanism for calling a c++ api from Adobe Flash actionscript? Are there any good examples?
更新:我现在主要希望它用于桌面应用程序,即 Adobe 的/或任何其他人的桌面运行时
Update: I primarily want it for desktop apps now i.e Adobe's/or anyuone else's desktop runtimes
不是来自 Flash Player,因为它很可能会违反其安全模型.您可以从 Tamarin VM 调用 C++,例如 mod-actionscript 正在执行.一种选择是将您的调用传递到 AS3 服务器,在那里调用一些 C++ 函数并将结果发回.另一种选择是使用 alchemy 将 C++ 代码交叉编译到 AVM2.但是,如果您想调用 C++ 来访问客户端计算机上 Flash Player 无法提供的功能(文件系统访问、UDP 或其他),那就没有办法了.
Not from the flash player, as it would very likely violate its security model. You can call C++ from the Tamarin VM, which for example mod-actionscript is doing. An option would be to pass your calls to an AS3-server, call some C++ functions there and send back the result. Another option is to cross-compile the C++ code to AVM2 using alchemy. But if you want to call C++ to access features on the client machine not available from the flash player (file system access, UDP or whatever), then there's no way.
好的,我想有以下选项:
edit:
Ok, I suppose there are the following options:
flash.accessibility
打包并仅使用 AS3 解决LocalConnection
.从 AS3 的角度来看,这看起来好一点,但需要在 C++ 方面进行一些黑客攻击,因为您需要掌握连接并实现协议(指针 这里)flash.accessibility
package and solve it with AS3 onlyLocalConnection
. This looks a little better from the AS3 perspective, but requires a little hacking on the C++ side, since you need to get hold of the connection and implement the protocol (pointers here)这篇关于c++ 和 actionscript 3 之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!