Flash Builder AIR 项目背景图像

发布于 2024-08-26 08:34:17 字数 98 浏览 2 评论 0原文

我对 Flash Builder 非常陌生,正在尝试创建具有自定义背景的 AIR 应用程序。如何在我的项目中添加背景图像?我尝试过将图像放置在设计视图中,但当我运行项目时它从未显示。

I'm very new to Flash Builder and am trying to create an AIR app with a custom background. How can I put a background image in my project? I've tried just placing the image in the design view but it never shows up when I run the project.

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

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

发布评论

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

评论(2

等待我真够勒 2024-09-02 08:34:17

我自己修复了,添加
<代码>
@Embed(source='/path/to/file.jpg')

而不是浏览功能放置的内容:
<代码>
/路径/到/文件.jpg

我通过查看按钮(显示的)上的图标是如何编写的得到了这个想法。

编辑:经过更多修补后,只要文件位于 src 目录下,并且在项目属性中选中“将非嵌入文件复制到输出文件夹”,似乎 /path/to/file 也可以正常工作在 Flex 编译器下。

Fixed it myself, by adding

@Embed(source='/path/to/file.jpg')

instead of what the browse function put:

/path/to/file.jpg

I got the idea from seeing how the icon on a button (which showed up) was written.

Edit: After some more tinkering, it seems that /path/to/file works just as well, as long as the file is under the src directory, and that "Copy non-embedded files to output folder" is checked in the Project properties under Flex Compiler.

梦魇绽荼蘼 2024-09-02 08:34:17

在 mxml 文件的设计视图中,
如果您有像这样的标准属性视图(图 1),
将其更改为 AZ(图 2)并向下滚动到背景图像

Standard Properties view

在此处输入图像描述

In the Design view of your mxml file,
if you have the standard properties view like this (figure 1),
change it to the A-Z (figure 2) and scroll down to background image

Standard Properties view

enter image description here

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