PHP:如何创建SWF(Ming或其他解决方案)?
我希望使用 PHP 创建 SWF (Flash) 文件,但现在最好的选择是什么?当我使用 Google 时,我找到了有关该主题的各种旧页面,但最近该领域发生的事情并不多,看来......
Ming 不再是 PHP 5.3 的一部分,我不知道如何安装与 PECL 一起使用。 (“pecl install ming”不起作用...但我尝试的任何 pecl 包也不起作用,所以我想我都做错了...)
在 http://pecl.php.net/package/ming 它表示该包已被取代。我蹩脚的英语告诉我,这意味着另一个包现在是更好的解决方案?但是哪个包呢?
确实有人使用 PHP 来创建 SWF,还是这是一个坏主意?
I wish to create SWF (Flash) files with PHP but what is the best option for that nowadays? When I use Google I find all kinds of old pages about this subject, but not much is happening in this field lately, it seems....
Ming is no longer part of PHP 5.3, and I can't figure out how to install it with PECL.
('pecl install ming' doesn't work... but neither does any pecl package I try, so I guess I do it all wrong...)
On http://pecl.php.net/package/ming it says the package has been superseded. My broken english tells me that means another package is now a better solution? But which package then?
Is anybody actually using PHP to create SWF's or is this a bad idea anyway?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据最终 swf 应包含的内容,有几个选项:
Depending on what what the final swf should contain there are a few options:
有许多实用程序可以从各种源格式创建 SWF:flex、haxe、laszlo 等。您可以在 php 中动态生成这样的源(例如 xml),并通过 exec 调用编译器来生成 swf。
There are number of utilities that can create SWFs from various source formats: flex, haxe, laszlo etc. You could generate such a source (e.g. xml) in php on the fly and invoke a compiler via exec to produce an swf.
您只想调用服务器上的 mxmlc 编译器,有一个命令行。我们最近在一个项目中这样做了,每次用户上传字体时,我们都会动态创建一个 .swf 文件,.swf 嵌入该字体,然后 Web 服务返回生成的 .swf 的路径,然后我们的父 .swf 加载到该文件中。
You just want to invoke the mxmlc compiler on the server, there's a command line for it. We did this recently for a project where we dynamically create a .swf file every time a user uploads a font, the .swf embeds that font and then the web service returns a path to the generated .swf which our parent .swf then loads in.