robster2 Posted May 31, 2011 Share Posted May 31, 2011 Hi Has anyone managed to use an swf as a page background? Ive tried to implement this example without any luck but im sure its possible somehow.. http://bdsarwar.wordpress.com/2010/10/31/use-swf-flash-as-html-php-page-background/ Rob Link to comment Share on other sites More sharing options...
MrPhil Posted June 1, 2011 Share Posted June 1, 2011 They're not really putting the Shockwave into the background. It's still a foreground object, just at a lower z-index (1) than all the "foreground" content (at z-index 2). So, the text and stuff appears over the SWF "background". My guess is that you didn't have the elements at the proper z-index values, as given in the linked code. By the way, the same trick can be used to use a scaled image or a dynamically-generated image as a "background" to other content. Link to comment Share on other sites More sharing options...
robster2 Posted June 1, 2011 Author Share Posted June 1, 2011 Hi Phil.. First of all Im not sure on whicth page/pages I should put the <div class="content"> to make all content z-index 2.. I also want the swf to behave like a background: url pic in css. Link to comment Share on other sites More sharing options...
MrPhil Posted June 2, 2011 Share Posted June 2, 2011 Well, you know which pages you want you SWF to appear on... you just have to make sure that the HTML element(s) that contain that content have CSS styling that sets z-index to 1, while anything else that you want over the SWF has to have CSS styling that sets z-index to 2 (anything higher than the SWF's). They don't have to be divs... any existing HTML element can be given CSS, either through a .css file or with a style="z-index: 2;" attribute. As for making it behave like CSS's background-image, it won't quite do that. No tiling or repeating, but presumably you don't want that anyway. It will behave like any other SWF object, except that other HTML content will be visible over it. Link to comment Share on other sites More sharing options...
robster2 Posted June 2, 2011 Author Share Posted June 2, 2011 Ok thanks.. After some thought I realised that i do not need the swf to be over the content, so I try a different approach.. Is it possible to auto stretch column_right? my idea is to put the swf in a box and strech it horizontaly/verticaly over the remaining screen.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.