1552 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
dSKY says
Hi everybody , fellow Envato author here ;)
I’ve jumped here from ActiveDen for a quick question.
This will probably be very easy for all WP wizards out here.
I want to put an .swf file as a background for a wordpress site.
I’ve tried something on a 3.1 installation of WP with the default theme.
Here is the code in the header.php file (I’m assuming that that’s the place where I should make the changes)
<body <?php body_class(); ?>>
<!-- START MY CUSTOM CODE -->
<div id="myContent">
            <div id="myAlternativeContent">
                <h1>Alternative content</h1>
                <p>Full screen video background ActionScript 3 version</p>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
            </div>
        </div>
<!-- END MY CUSTOM CODE -->
<div class="hfeed" id="wrapper">
    <div id="header">
</div></div>
Note the div with the id of “myContent” , it gets written (I’m using swfObject.js for that ) and the swf start’s playing ( I can hear the sound)
But I can’t see the swf file as the background.

Can someone give me a push in the right direction ? :)

1660 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 more
ZoomIt says
write in style.css
#myContent
{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
}
?
1552 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
dSKY says

Hey ZoomIt, thanks for jumping in on this.
That doesn’t really help , it puts the swf file in front of the whole WP site :(

294 posts
  • Had an item featured on Envato Market
  • Contributed a free file of the month
  • Has referred 200+ members
  • Has sold $10,000+ on Envato Market
+4 more
amatyr4n says
That doesn’t really help , it puts the swf file in front of the whole WP site :(

z-index: -1; ?

1552 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
dSKY says

Thanks for all the answers .
I’ve used the combination from ZoomIt and amatyr4n.
Now it works perfectly :)

1552 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
dSKY says

update:
It only works in FF :(

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

Put wrapper also on position absolute with z-index positive…. i guess.

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

ah, and i think the swf object must have background transparent.

1552 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
dSKY says

forgot about wmode :)
Case closed.
Thanks everybody for support. :)

by
by
by
by
by
by