是否可以创建“命令行"swf? [英] Is it possible to create a 'command line' swf?

查看:25
本文介绍了是否可以创建“命令行"swf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够编写一个可作为命令行应用程序运行的 .swf 文件.换句话说,我将能够创建可以与 stdin 和 stdout 交互的 actionscript 类,然后可以直接在命令行中执行该 .swf.

I'd like to be able to write a .swf file that is runnable as a command line app. In other words, I would be able to create actionscript classes which can interact with stdin and stdout, and could then execute that .swf directly in the command line.

我怀疑这真的不可能.谁能确认一下?

I suspect that this isn't really possible. Can anyone confirm that?

一些答案指出,使用 Flash 进行命令行工作可能不是最佳选择.在大多数情况下,我完全同意.我问这个的原因是因为我想做一些 AS3 代码生成,并且在运行时内反映 AS3 类比解析代码或遍历 asdoc 生成的中间 XML 更容易.我现在正在 Ruby 中使用 XML 方法,但希望有一个更简洁的解决方案!

A couple of the answers pointed out that using Flash for command line work probably isn't the best choice. I wholeheartedly agree in most situations. The reason I am asking about this is because I want to do some AS3 code generation, and reflecting on AS3 classes within the runtime would be easier than parsing the code or walking the intermediary XML that asdoc produces. I'm doing the XML approach now in Ruby, but would love to have a cleaner solution!

推荐答案

不——不可能.您能做的最好的事情是一个独立的应用程序(可以在 Flash 中制作,也可以使用 Flash 播放器的投影仪版本制作,可从 Adob​​e 网站获得).

Nope--not possible. The best you can do is a standalone app (which can be made in Flash or with a Projector version of flash player, available from the Adobe website).

您为什么想要--Flash 非常棒,因为它具有强大的 GUI 功能.还有很多其他编程语言更适合命令行(Python 或 Ruby,或者,上帝保佑,甚至 Perl)

And why would you want to--Flash is awesome because of the great GUI capabilities. There are plenty of other programming languages that are much better suited for the command line (Python or Ruby or, god forbid, even Perl)

这篇关于是否可以创建“命令行"swf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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