How to set background color for a Flex actionscript 3 project
I am trying开发者_开发问答 to set the background color of a Flex actionscript 3 project. I have tried all sorts of things, including
this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FF0000">
</mx:Application>
this:
SWF(backgroundColor='0x000000', frameRate='30')
and this:
[SWF(backgroundColor='#000000', frameRate='30')]
What am I doing wrong? Is there something that is overriding my ability to set this? I am putting the above lines in my main default runner.
thanks
The first seems to work correctly for me.
Here's one way to do it:
- Right click on project -> Properties -> Flex Compiler
Add the following into "Additional compiler arguments:"
-default-background-color #FFFFFF
Set backgroundAlpha style property of your application to 0:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0"> </mx:Application>
精彩评论