;

PDA

Click to See Complete Forum and Search --> : Insert my flash swf html code into css?


blue_vision
04-03-2009, 07:08 PM
I would like to put my flash logo (acts like a banner at the top of the webpage) into my CSS page if thats possible so that I don't have to insert it in every html page. Here is what the code looks like that I would put in the normal html pages if I did it that route:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="280" height="162" align="middle"><param name="wmode" value="transparent"> <param name="movie" value="http://websiteblablalogo.swf"> <param name="allowScriptAccess" value="always"> <embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="280" height="162" wmode="transparent" align="middle"
src="http://websiteblablalogo.swf" allowScriptAccess="always"></embed>
</object>

Can you put an <object> in a CSS file or what is the best way to accomplish what I'm trying to do? Is this impossible and I have to do it in every html page?

Thanks for your prompt attention :)

rdoyle720
04-13-2009, 06:16 PM
I'm afraid you can't put it in a CSS file, but what you can do is put it in a server side include. What that means is you create a separate file with your flash code, and then on each page you just call that file.

In order to use a server side include, you'll have to use a bit of server side code (ASP, PHP, etc). You'll want to find out which type your server supports. PHP is probably a safe bet.

So say you had a file called home.php, and a file with your Flash code called flash.html. In home.php you would add a line:


<?php include("flash.html") ?>


And that should do it.