ActionScript 项目到 AIR 应用程序?

发布于 2024-07-23 06:04:47 字数 130 浏览 2 评论 0原文

我没有使用 Flex 库或 Flash 中的任何内容。 我正在 Flexbuilder 中开发一个纯 AS3 项目,我想将其部署为 AIR 应用程序。

我有什么选择? 什么是最简单的? 我在这里很难找到直接的答案。

I'm not using the Flex libraries or anything from Flash. I'm developing a pure AS3 project in Flexbuilder which I would like to deploy as an AIR application.

What are my options? What's easiest? I'm having trouble finding a straight answer here.

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

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

发布评论

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

评论(4

酒解孤独 2024-07-30 06:04:47

运行,但没有显示任何内容...
由于某种原因这不会自动
实例化一个本机窗口。

无需创建不代表主应用程序的新窗口,只需在主应用程序类中调用 stage.nativeWindow.activate(); 即可。

That runs, but shows nothing... for
some reason this doesn't automatically
instantiate a native window.

rather than creating a new window that doesn't represent your main application, simply call stage.nativeWindow.activate(); in your main application class.

苯莒 2024-07-30 06:04:47

您可以使用 Flash 或 Flex 来创建 AIR 应用程序。 哪个更容易取决于您的应用程序的性质。 如果您的应用程序已经相当完整,并且今后不会发生太大变化,并且您只关心将其转换为 AIR 应用程序,那么您可以使用其中任何一个。

我确实喜欢命令行编译器(即来自 Flex 的 mxmlc)的可用性,因为我可以更轻松地自动化构建过程。 使用 Flash,您将需要 IDE 来编译应用程序。 此外,一旦您开始将其制作为 AIR 应用程序,由于您可以利用框架代码,您很可能会遇到在 Flex 中比在 Flash 中更快完成的事情。 因此,从总体上看,Flex 是一种更好的方法。

You can use either Flash or Flex to create your AIR app. Which is easier depends on the nature of your app. If your app is fairly complete as it is and won't change much going forward and you are just concerned with turning it into an AIR app, you can use either.

I do like the availability of a command-line compiler (i.e. mxmlc from Flex) as I can use automate the build process more easily. With Flash, you will need the IDE to compile the app. Also, once you get into making it an AIR app, it's highly likely that you might run into things that can be done much faster in Flex than in Flash due to the framework code that you can leverage. So Flex is a better way to go overall.

凉城 2024-07-30 06:04:47

这是一个更完整的答案...

如上所述未知:

“要在 FlexBuilder 中执行此操作,您只需
创建 Flex Project AIR 应用程序
像你一样在 Flexbuilder 中
通常,然后在第 3 步中
您定义额外的源和库
路径,更改 .mxml 的后缀
文件为 .as,即 Main.mxml 变为
主要.as."

运行,但没有显示任何内容...由于某种原因,这不会自动实例化本机窗口。来自 Laurentie Adobe Bug 系统

“当然在项目完成之后
创建我添加代码来创建
窗户之类的东西,但那不是
问题,所以我不由自主地忽略了
那。 :)

尝试这样的事情:

var options:NativeWindowInitOptions = new NativeWindowInitOptions(); 
  //options.systemChrome = "无"; 
  //选项.透明 = true; 
  var mainWindow:NativeWindow = new NativeWindow(选项); 
  mainWindow.activate(); 
  

然后您将内容添加到该窗口
通过 mainWindow.stage。 :) 希望
这有帮助”

尽管如此,这并不是一个真正理想的解决方案。但对于那些想要尝试的人来说,它是可行的。

Here is a more complete answer...

As unknown stated above:

"To do this in FlexBuilder you simply
create a Flex Project AIR application
in Flexbuilder like you would
normally, then in the 3rd step where
you define extra source and library
paths, change the suffix your .mxml
file to .as, ie so Main.mxml becomes
Main.as."

That runs, but shows nothing... for some reason this doesn't automatically instantiate a native window. From Laurentie Adobe Bug Systems:

"Of course after the project is
created i add code to create the
windows and stuff, but that wasn't the
issue, so i involuntarily ommited
that. :)

try something like:

var options:NativeWindowInitOptions = new NativeWindowInitOptions();
//options.systemChrome = "none";
//options.transparent = true;
var mainWindow:NativeWindow = new NativeWindow(options);
mainWindow.activate();

and you add content to that window
throught mainWindow.stage. :) hope
that helps"

All of that being said this isn't really an ideal solution. But there it is for those of you who want to experiment.

老子叫无熙 2024-07-30 06:04:47

要在 FlexBuilder 中执行此操作,您只需像平常一样在 Flexbuilder 中创建一个 Flex Project AIR 应用程序,然后在定义额外源和库路径的第三步中,将 .mxml 文件后缀更改为 .as,即 Main.mxml变为 Main.as。

Mac 开发的另一个明显问题是关闭 Air 应用程序时讨厌的 ADL 文件不会退出...我在关闭 Air 应用程序后使用 OSX 活动监视器手动强制退出 adl 文件。

To do this in FlexBuilder you simply create a Flex Project AIR application in Flexbuilder like you would normally, then in the 3rd step where you define extra source and library paths, change the suffix your .mxml file to .as, ie so Main.mxml becomes Main.as.

Another obvious gotcha for Mac development is the pesky ADL files not quitting when you close the air app...I use the OSX Activity Monitor to manual force quit the adl file after closing my air app.

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