I have a swf file loading over the top of a background graphic. The swf only covers part of the background... the part that I want to animate. My intention was that the background graphic would load quickly (it does) and that's what the visitor would see until the swf file completely loads and shows itself seamlessly over the top of the graphic. It would be seemless to the visitor because the swf image is identical to and matches to the background. So from the visitor's perspective, they would see a static image until the swf loads and then see part of that seeminingly same image begin to animate.
However, what happens is that the background image loads and then a big black box (where the swf is loading) appears over the background until the swf file is completely loaded.
I have tried setting my swf background to transparent, but that does not work.
Does anyone know a way to prevent the black box (of the loading swf) from showing over my background image while the swf file loads?
Any help is appreciated.
Well you have to remember that nothing can display until it's downloaded. So if the image or .swf is very large, it will take some time to download.
So if you image is downloading pretty fast, why don't you just use that as your preloader for the Flash .swf.
A preloader does not have to be a spinning 10%, 20% etc. it does not have to be animated in any way, it can simply be a static image that displays during the time that the rest of the .swf is downloading.
So use your background image as the graphic for the preloader. You may want to dial back the file size a little to speed up the downloading of that initial image. It will load (display in the very first frame of the .swf). That one single frame will keep displaying over and over until 100% of your content is downloaded, then Flash would move to the second frame and the rest of the timeline.
Review Flash preloaders here:
plus tons of other sample preloaders... just Google for more.