Adobe Air - 全屏打开应用程序

发布于 2024-12-31 22:11:57 字数 157 浏览 3 评论 0原文

我使用 Flash CS 5 创建了一个 Air 桌面应用程序。通常 Windows (XP) 会使用最新设置的大小和位置打开应用程序(如 Firefox)。 对于我安装的 Air 应用程序,它始终只是默认应用程序。

如何以最新使用的尺寸和位置启动它?

谢谢。 乌里

I created an Air desktop app with Flash CS 5. Usually Windows (XP) is opening an application (like Firefox) with the latest set size and position.
For my installed Air app it's always just the default one.

How to start it with the latest used size and position?

Thanks.
Uli

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

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

发布评论

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

评论(3

浅语花开 2025-01-07 22:11:57

您需要在某个地方保存一条记录,以记住窗口的大小以及可能的位置。如果您的应用程序有首选项文件,那么这将是存储该信息的理想位置。然后,每当您的应用程序启动时,它都会检查此信息并在找到任何值时调整窗口大小。

大多数流行的程序都包含此功能(甚至不要提及它,因为它是非常基本的 UI),但它是有意完成的,而不是作为每个应用程序的默认设置。因此,如果你想要它,你必须将它编程进去。

You need to save a record somewhere that remembers the window's size, and possibly position. If your app has a preferences file, this would be an ideal place to store that information. Then, whenever your app starts, it checks for this information and resizes the window if any values are found.

Most popular programs include this feature (and don't even mention it, since it's pretty basic UI), but it's done intentionally and not as a default for every application. Thus if you want it, you have to program it in.

掐死时间 2025-01-07 22:11:57

您可以读取和写入 application.xml。你会发现那里和节点。

file = new File( File.applicationDirectory.nativePath + "/META-INF/AIR/application.xml" );

Adobe 限制对应用程序目录的写入访问,但如果您不想在 app-storage:/ 文件夹中创建单独的配置文件(当然这是首选),则此技巧很有用。

You can read and write to application.xml. You'll find there and nodes.

file = new File( File.applicationDirectory.nativePath + "/META-INF/AIR/application.xml" );

Adobe restrict writing access to application diractory but this trick is useful if you don't want to create a separate config file in app-storage:/ folder, which is of course prefered.

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