Welcome to WebmasterWorld Guest from 54.162.12.134

Forum Moderators: open

Message Too Old, No Replies

Embed swf behind gif

     
2:51 pm on Feb 5, 2009 (gmt 0)

5+ Year Member



I have a large swf file that until some of this loads all the user sees is a blank box on the page. What I would like to do is show a gif or jpg there that is small enough to show the control bars of the swf file so the user can see something is going on and then when enough loads they can push play and see the video not the gif.

I wanted to use preloaders but my client says no they want a static gif above the player controls. I have seen this done on other sites but I cannot figure this out. I code in the image with a div tag above the swf embed code using transparent in the embed code and all I see is a blank screen until the movie has downloaded and my controls are gone when it loads.

So I am wondering do I need a transparent title page in the swf so it will show the image or what?

Code where image will go:
(<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
)

Here is my embed code:

(<script type="text/javascript">
var so = new SWFObject("capture3.swf", "mymovie", "640", "480", "8", "#336699");
so.addParam("quality", "low");
so.addParam("wmode", "transparent");
so.addParam("salign", "t");
so.write("flashcontent");
</script>)

Thanks!

[edited by: eelixduppy at 3:11 pm (utc) on Feb. 5, 2009]
[edit reason] no URLs, please [/edit]

4:07 pm on Feb 5, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome aboard lindaw65, I've never tried this, but it should work . . .

<div id="flashcontainer">
<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
</div>

#flashcontainer { url(some-background-image.gif) top left no-repeat;}

The background image of the parent container would not get replaced, so you'd have to position it so that when the Flash does load it completely covers it.

4:30 pm on Feb 5, 2009 (gmt 0)

5+ Year Member



Thanks for the code. It's still not working. I am about to pull my hair out. I've seen this done and the client provided a URL as to what they want but I can't post the URL here. I will keep at it. Thanks again.
5:16 pm on Feb 5, 2009 (gmt 0)

5+ Year Member



Basically what you should see going to a site would be the control bar and a gif right above it. You see the file loading in the control bar. Once it's finished you push Play on the control bar and the movie starts. I can get either the picture or the movie to show but I have not been able to get the movie under the picture or get the control bar to show up. The files were created in Camtasia but saved as swf files. I am not so concerned over the control bar right now if I could just get the picture then the video I can deal with the rest. This should not be this hard yet here I am several hours wanting to stab my computer. :)

They are also using SWFObject 2.0 to drive this thing.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month