1549 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 100 and 199 users
  • Sold between 50 000 and 100 000 dollars
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 ? :)

1603 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 more
ZoomIt says
write in style.css
#myContent
{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
}
?
1549 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 100 and 199 users
  • Sold between 50 000 and 100 000 dollars
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 :(

293 posts
  • Author had a Free File of the Month
  • Sold between 10 000 and 50 000 dollars
  • Indonesia
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Exclusive Author
amatyr4n says
That doesn’t really help , it puts the swf file in front of the whole WP site :(

z-index: -1; ?

1549 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 100 and 199 users
  • Sold between 50 000 and 100 000 dollars
dSKY says

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

1549 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 100 and 199 users
  • Sold between 50 000 and 100 000 dollars
dSKY says

update:
It only works in FF :(

688 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_rg_ says

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

688 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_rg_ says

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

1549 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 100 and 199 users
  • Sold between 50 000 and 100 000 dollars
dSKY says

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

by
by
by
by
by
by