A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Insert my flash swf html code into css?

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    13

    Insert my flash swf html code into css?

    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

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    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 Code:
    <?php include("flash.html"?>
    And that should do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center