Flash Builder AIR 项目背景图像
我对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己修复了,添加
<代码>
@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.
在 mxml 文件的设计视图中,
如果您有像这样的标准属性视图(图 1),
将其更改为 AZ(图 2)并向下滚动到背景图像
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