I am using pure AS3 to build my project. I was wondering if there are anyways to change the stage background color through AS3...Thanks for the help....
相关问题
- garbage collection best practices
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- How to change default background color for TChromi
- FlashDevelop Haxe (Flash) debugger
相关文章
- Set color of 'empty' area of ListView in A
- Are there any benefits when using final in AS3?
- Changing background color for a text annotation to
- Trace on Chrome/Browser console
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- Libraries for text animation in Flex / Actionscrip
- About Collision detection alghorithms in AS3
This creates a shape and add it to the stage behind everything. To change the color anytime call:
changeBGColor(0xFF0000)
(to red)It also maintains the size of the background (covering all area) when the windows is resized.
like this:
I suggest making a sprite and then making it in the back. This is the way I would do it.
Make sure to
import flash.display.Sprite;
a plus about this is that you can draw a background (if you want) either manually or with the code and then put it in through the code.
You should be able to use the following line of Actionscript 3.0 to set the background color. 0x000000 for black, 0xFFFFFF for white and anything in between.
this.stage.color = 0x00000;
Try setting the backgroundColor of the application object.