如何将 SWF 内容加载到 Linux 上的 Python 应用程序中?

发布于 2024-11-26 15:32:22 字数 437 浏览 4 评论 0原文

我有一个应用程序,它使用 Flash 作为 GUI,使用 Python 作为核心逻辑。这个组合太棒了。不幸的是,我当前的方法仅适用于 Windows,因为它使用 wxPython comtypes 库来嵌入 Flash ActiveX 播放器。该应用程序的所有其他方面都是与平台无关的,因此我认为 Linux 上必须有某种方式让 Python 与 Flash 对话。

SWF 不需要 AVM2/AS3,但理想情况下我可以使用最新的 Flash 播放器。我正在使用 wxPython (wxWidgets) 并且更愿意继续使用它。最坏的情况是,我可以临时搭建一些东西,在单独的进程中加载​​ SWF,并通过套接字连接与 Python 进行对话,但我发现没有简单的方法可以让 Flash 显示在我的应用程序窗口中,而不是带有自己的菜单的播放器窗口中和装饰品。

任何建议表示赞赏。如果有理由相信它会起作用,我非常愿意破解解决方案:)

I have an application that uses Flash for the GUI and Python for the core logic. This combination is awesome. Unfortunately my current approach only works on Windows, as it uses the wxPython comtypes library to embed the Flash ActiveX player. Every other aspect of the app is platform-agnostic, so I'm thinking there must be some way on Linux to have Python talk to Flash.

The SWF need not require AVM2/AS3, though ideally I could use the most current Flash player available. I am using wxPython (wxWidgets) and would prefer to keep using it. Worst case I could jerry-rig something that loads the SWF in a separate process and talks over a socket connection to the Python, but I see no simple way to have the Flash display inside my application's window rather than a player window with its own menus and decorations.

Any suggestions appreciated. I'm very open to hacking at a solution if there's reason to believe it will work :)

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

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

发布评论

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

评论(1

美人迟暮 2024-12-03 15:32:22

Flash Professional支持Adobe Air,因此您可以将其用作前端,通常Flash项目可以作为AIR应用程序发布,而无需对其代码进行重大更改。可以使用 Native Process Api 来完成通信(请参阅下面的链接)。然后就可以在Mac、Win e Lin上运行了。

http://www.kirupa.com/forum /showthread.php?349728-Air2-NativeProcess-launching-Python-scripts
http://mykola.bilokonsky.net/2010/ 11/adobe-air-nativeprocess-and-python-简介/

Flash Professional has support to Adobe Air, so you could use it as front-end, usually a flash project can be released as an AIR application without major changes to its code. The communication could be done using Native Process Api (see links bellow). Then you can run it on Mac, Win e Lin.

http://www.kirupa.com/forum/showthread.php?349728-Air2-NativeProcess-launching-Python-scripts.
http://mykola.bilokonsky.net/2010/11/adobe-air-nativeprocess-and-python-introduction/

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