• .swf As a Background to a Div?
    11 replies, posted
A friend of mine is working on a project for school, and for reasons beyond me he's used Flash with it 'cause it's leet, and now he wants to set the .swf output as a background to a div. Is this possible at all, even using 2-3 divs? I tried a whole[CODE]<div id="wrapper"> <embed shit> <div id="content>CONTENT</div> </div>[/CODE] but it didn't work out. Any ideas, FPWD?
You could probably use z-index.
Flash doesn't respect the browser's z-index stuff and always puts itself to the front.
[QUOTE=turb_;25084610]Flash doesn't respect the browser's z-index stuff and always puts itself to the front.[/QUOTE] Yeah, we tried this. =\ It is possible, while Googling I found this site: [url]http://radioextrem.net/index1.html[/url] but their implementation of it is odd, and he can't figure it out.
[url]http://capcai.indorelation.com/blog/index.php/2006/02/22/flash-behind-html/[/url] [php] <div style="position:relative; font-size:30px; z-index:5;">LAYER 5</div> <div style="position:relative; font-size:30px; z-index:2">LAYER 2 before flash</div> <div style="position:absolute; top:0; left:0; font-size:120px; z-index:2;"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="200" height="150" id="recursion_tree_branch" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="wmode" value="opaque" /> <param name="movie" value="yourmovie.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#e7e7e7" /> <embed src="yourmovie.swf" mce_src="yourmovie.swf" wmode="opaque" quality="high" bgcolor="#e7e7e7" width="200" height="150" name="yourmovie" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> </div> <div style="position:relative; font-size:30px; z-index:4">LAYER 4</div> <div style="position:relative; font-size:30px; z-index:2">LAYER 2 after flash</div> <div style="font-size:30px; z-index:1">LAYER 1</div> [/php]
[QUOTE=turb_;25084610]Flash doesn't respect the browser's z-index stuff and always puts itself to the front.[/QUOTE] That's what wmode is for.
If it is just a loop, you may want to consider making it a Gif or APNG. Flash is a major resource hog on non-windows platforms and slower windows machines (like netbooks for example). Having a flash background could make the site unviewable.
[QUOTE=Jamza;25220523]If it is just a loop, you may want to consider making it a Gif or [B]APNG[/B]. Flash is a major resource hog on non-windows platforms and slower windows machines (like netbooks for example). Having a flash background could make the site unviewable.[/QUOTE] No, no and no. APNG is not an official standard, it's not supported by every browser and it makes unbelievably large filesizes
Why bother with an animated background anyway
[QUOTE=turb__;25238884]Why bother with an animated background anyway[/QUOTE] It can look really good if you do it right.
[QUOTE=KmartSqrl;25248743]It can look really good if you do it right.[/QUOTE] Chances anyone having to ask how to do it will do it right?
Never mind, he gave up and stuck to a static background because he couldn't be bothered. [QUOTE=turb__;25263135]Chances anyone having to ask how to do it will do it right?[/QUOTE] [QUOTE=Qombat;25084506]A friend of mine[/QUOTE] :downs:
Sorry, you need to Log In to post a reply to this thread.