开发者

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:

  1. Right click on project -> Properties -> Flex Compiler
  2. Add the following into "Additional compiler arguments:"

    -default-background-color #FFFFFF

  3. 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜