Jump to content

Setting background before Flash element loads


Recommended Posts

Hi, guys. Got another little issue/challenge...


I have a page consisting of a single cell table that has a Flash animation in it. The background of the animation is white, and the page background is also a matching white.


However, when the page first loads, the background seems to be a light grey (or just slightly darker than full white), and as a result, you see the block of the Flash animation against it, rather than the white of the animation blending in with the (intended) white of the background.


After a half-second, the page background goes to full white, and everything's fine.


So, it seems that the browser has the page background color set to a darker white by default, and then changes once it hits my css, and the Flash animation loads before that background color change happens.


Is there any way for me to make the background color change before the Flash movie is loaded (or, more importantly, displayed)?


I tried a number of combinations of background color declarations... both CSS and HTML... in the body tag, in the div tags, etc... but, I still can't seem to get the color to change before the Flash movie is displayed.



Not a big deal, as it's just a 1/2 second of 'white square against light grey background'... but, it would be great to be able to have it seamless.


Any ideas?

Link to comment
Share on other sites

That was the next thing I was going to check, but if it was the Flash background, then it would be the white square that would be affected, not the HTML page background surrounding the Flash movie element. The canvas/bg colour of the Flash movie is white, to match the (intended) white of the HTML page. But, I'll be checking if there's some other 'canvas' colour in the Flash scene file that might be interfering. I'm not outputting an HTML page when I publish the Flash, so it can't be that either.


Imagine you have a white cube that is supposed to be against a white background. In my case, the white cube (Flash movie) first appears, and the background (of the HTML page) appears, but is momentarily light grey, and then changes to white (making the cube visibly disappear (as intended).


Since the movie is in a table, I assumed that there would be a bit of a delay before the table appeared, as it has to load the contents first before displaying. So, I set the body tag background color at the start, with the assumption that the blacnk HTML page itself would be the first thing to be displayed (before the table). But, no go on that.

Link to comment
Share on other sites

Ya, it already is...


Again, the Flash movie element part of it is fine. It comes in, background of it is white.


It's the surrounding rest of the browser page that initially appears as a darker white, then snaps to the proper white to match that of the Flash movie.


So, I'm assuming, the browser has the HTML page as an off-white by default, until it encounters some css or HTML bg color declaration... and I'm trying to figure out if there's a f'aster' way to set that colour than the ways I'm currently doing.

Link to comment
Share on other sites

What's the first thing that gets processed and displayed? It's the <body> background, right? A table has to wait for all the content to be loaded before displaying, so the <body> background is usually first, right?


I'm setting the body background color with both traditional HTML and css, but it still seems to be set to some default light grey before doing that change.


Is there any way to set the background color even earlier than the <body> does?

Link to comment
Share on other sites

Yikes, that's territory I'm not familiar with. The only thing I know of wmode is that I've read some cautions about using it for some things... Can't remember exactly what they were cautioning about, though. Most likely, yet another quirk in IE that either disregards it, or does something funky as the result of using it.


The Flash file is basically a little (something like 100x200) that consists of a white background, and then there is this little character that appears at random times. But, most of the time, it's just the white 'background'


That goes (opaquely) over the white of the rest of the browser window... essentially invisible when the character isn't there.


I'm really not sure what that innitial 'non-matching white' color of the HTML page is, so I'm assuming the browser defaults to that.


I had been previously reading about having Flash movies with transparent backgrounds, but it seemed like that was a hassle, filled with coding and scripts and whathaveyou... Just not worth it. Besides, theoretically, if my Flash movie background is white, and the HTML screen is white, it should be fine...


....It's just that initial non-white moment that reveals the white Flash movie block (against the darker white of the HTML).


I got EVERYTHING defining the white background now... <body> (both CSS and HTML methods), all the <div> elements (global wrapper, group wrapper, individual element wrapper)... Still getting that initial colour.


I'll look into the wmode thing, just for completeness... but it sounds like that addresses the Flash element/block, not the HTML screen around it. Again, the Flash movie is working perfect (the color switch is not in that, but the HTML screen outside of it).


Really minor... but kind of annoying. I might be able to remedy it if I could delay the appearance of the Flash movie... but I'm not sure how to do that, and suspect that'll be more work than it's worth.

Edited by L.Adlon
Link to comment
Share on other sites

  • 3 weeks later...

It's strange... The blank browser window is (by default) white (...I assume a full white)... my HTML page is also full white (and therefore, it should be seamless).


However, when my page loads, there's a brief moment where the page goes to a light grey, and in doing that, the small white embedded Flash movie block (that is set as white as well, to make it invisible against the white HTML background) is briefly revealed.


I wonder what that brief moment of grey is? I can't seem to control that. Everything (that I'm aware of) is set to white.

Link to comment
Share on other sites

[ Shrugs ]


Don't know... I still have to check the Flash file itself, and see if the canvas itself isn't white. I'm assuming it is, since I'm sure I'm not using a white rectangle as the background. But, I do have the check that to be sure.


Ya, maybe the Flash plugin itself has a grey background.

Link to comment
Share on other sites

adobe kill flash!!!!!!!!!


do action script still support e4x?


I'm asking since you choose a flash file, you most also know actionscript.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...