Flash Builder AIR Project Background Image

三世轮回 提交于 2019-12-24 05:45:25

问题


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.


回答1:


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.




回答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



来源:https://stackoverflow.com/questions/2508405/flash-builder-air-project-background-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!