2
votes

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

2

2 Answers

1
votes

The first seems to work correctly for me.

1
votes

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>