Jump to content

PHP Include Background?


MediaMonkey

Recommended Posts

Hello...

 

I've got an issue that I could really do with help on: 

 

I would like a flash (.swf) background; to be W:100% / H:100%... However, would like to put HTML content on top of this (using Dreamweaver).

 

Therefore, I would like some help with scripting an include sort of file... So that the background is generated and brought in; with HTML content loaded on top.

 

So far, I've put together:

 

Pager.php (The page to have HTML content on it):

 

<?php session_start(); ?><?php include("background.php"); ?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body background="<?=$_SESSION['background']?>">

</body>
</html>

 

And then the script for background:

 

<?php
session_start();

if(!$_SESSION['background'])
$_SESSION['background'] = 'BACKGROUND.swf';

?>

 

A seperate script I've been using to get the background re-sizing to monitors at 100% is:

 

<script type="text/javascript" src="swfobject_source.js"></script>
</head>
<body>
<div align="center">



<div class="style1" id="flashcontent">	  <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW" class="style2">You need to upgrade your Flash Player</a>
</div>

<script type="text/javascript">
	// <![CDATA[

	var so = new SWFObject("BACKGROUND.swf", "Preview", "100%", "100%", "8", "#14191C", true);
	so.addParam("scale", "noscale");
	so.addParam("salign", "lt");
	so.write("flashcontent");

	// ]]>
</script>


</div>

 

Now I need some help putting it all together, so that the flash background is loaded in through an include file, to 100% x 100%; and I can put content ontop (and the background won't scroll).

 

Any ideas??  ???  Thank you for your help!

 

MediaMonkey

Link to comment
https://forums.phpfreaks.com/topic/116385-php-include-background/
Share on other sites

You could use javascript onLoad for that. However, now that I think of it, I am not sure if you could even place a div that is positioned over the flash piece. I mean you could, but I think that the flash object will always be on top due to browser rendering.

 

(I could be wrong)

That's what I thought too...

 

Thats why I wondered about the prospect of loading the background in from an include function; that way I could setup the background with 100% params in one file and then include it on the page which is going to have the content?

 

Thanks, MM

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.