homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Embed swf behind gif
lindaw65




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

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]

 

rocknbil




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

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.

lindaw65




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

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.

lindaw65




msg:3843124
 5:16 pm on Feb 5, 2009 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved