Communication between c++ and actionscript 3

前端 未结 6 1308
暗喜
暗喜 2021-01-02 16:24

Is it possible to use any IPC mechanism for calling a c++ api from Adobe Flash actionscript? Are there any good examples?

Update: I primarily want it for desktop ap

6条回答
  •  情书的邮戳
    2021-01-02 16:44

    If you target the Adobe AIR runtime, you can leverage the NativeProcess API that was introduced in AIR 2.0. This API allows you to spawn external processes and communicate with them via stdin and stdout.

    If you're feeling adventurous and want to do something undocumented and completely unsupported, you can tap into the LocalConnection internals by interacting with the memory mapped file of the Flash Player. There's more detail on the osflash.org/localconnection site. This approach has some limitations and isn't supported. I don't recommend it.

    As mentioned in some other answers, you can also use a socket connection to send/receive data.

提交回复
热议问题