change Preloader background color
I have a custom preloader that I designed in flash. When I load it in flex, it loads with a white background. When I try to change the background to black in my flash file & load it in Flex, the background color remains white. I've also tried to update the compiler settings in Flex, adding "-defaul开发者_Go百科t-background-color #000000" but I still get a white preloader background. I am using Flex 4. Here is my Pre.as file: `
`
thx!
I encountered the same problem. solved it using opaqueBackground :
loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, init);
private function init(e:Event):void{
loader.opaqueBackground = 0x000000;
}
Worked great for me.
This man solved it by adding background sprite and filling it with custom color you want.
And here http://iamjosh.wordpress.com/2007/12/18/flex-custom-preloader/ author also told that he added the compiler option like this:
Finally, let’s change the background color of the application to match our logo a little better. Just add the following Flex compiler argument:
-default-background-color #FFFFFF
So, you might added this option to another one application you need instead.
UPDATE 1
Also look at this
http://cookbooks.adobe.com/post_Change_Background_Color_of_the_Preloader_Phase-1421.html
And please, explain once again your goals, are you want to set color or something another, from preloader or parent application or whatever you want, just let me know.
UPDATE 2
And listen, if you really want some cool bg, you might do next thing.
1)Forget about preloader mechanism.
2)Write Your BG application
3)Add swfLoader overlay to your bg application
4)Draw progressbar for this container
5)Enjoy with 2 application architecture instead of standard way.
Questions!?
精彩评论