views:

35

answers:

1

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 "-default-background-color #000000" but I still get a white preloader background. I am using Flex 4. Here is my Pre.as file: `

`

thx!

A: 

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!?

Eugene
ginius
i don't see custom bg sprite in your preloader above. and post the code you tried, please. thanks.
Eugene
I updated the code by adding "bgSprite.graphics.beginFill(0x000000); bgSprite.graphics.drawRect(0,0,200,200) bgSprite.graphics.endFill();"
ginius
lol, but would you mind to make some addChild to the stage? :)
Eugene
ginius
did you asked how to setup color of preloader from application which use it?
Eugene
and don't forget to accept/rate answer/comments. good luck
Eugene
so, if I am using a gradient color background in my main application, how do I set that in my preloader? Is there a better way to fill the entire background than just making a large rectangle like I have?
ginius
ginius
maybe its time to share piece of your code? don't you? :)
Eugene
The code hasn't changed .... the part I am talking about is cp.graphics.beginFill(0x000000);cp.graphics.drawRect(-1000,-1000,2000,2000)cp.graphics.endFill(); ... is there a better way to set the background color?
ginius
just updated...
Eugene
you are welcome)
Eugene