Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes, that is easy.
    Find your h1 tag in your main template. It should look something like:
    <pre><h1 id="header">" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1></pre>
    Change that to this:
    <pre><div id="header">
    <object type="application/x-shockwave-flash
    data="movie.swf"
    width="400" height="300">
    <param name="movie"
    value="movie.swf" />
    <h1>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1>
    </object>
    </pre>
    Just change movie.swf to your swf file, and you should be good to go. And I think this SHOULD validate…

    “Better way”?!? Those browsers you’re talking about are legacy browsers, version 3 and under. Every modern browser understands the object, and the ones that don’t probably shouldn’t be served flash content anyway. The method I posted is actually from A List Apart, so it’s a proven way to go. Also the “worse” way, as can be implied, includes simple XHTML for browsers to fall back on if they choke on the <object> (in this case, a <h1> with page header content). Your method doesn’t even come close to validating.
    And would you trust someone who can’t even read the directions on how to post code as to what’s “better”? 😉

    Thread Starter cmonney

    (@cmonney)

    is there any way I can have the swf code in my .css, then call it in my index.php page???

    calling a swf through a css file…
    i would like to know that as i have not yet seen anything like this…

    It worked best when I hosted the SWF file on another one of my websites and called it to this header.php file one. http://newberrys.us to see it work. heres the code:
    from the header.php file
    look for this line
    ———————————-
    <?php wp_head(); ?>
    </head>
    <body>
    <div id=”page”>
    <p align=”center”>
    <object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0&#8243; width=”744″ height=”198″ align=”middle”>
    <param name=”movie” value=”http://bizservices4u.com/blog/911Introv2.swf&#8221; />
    <param name=quality value=high /><param name=”SCALE” value=”exactfit” />
    <embed src=”http://bizservices4u.com/blog/911Introv2.swf&#8221; width=”744″ height=”198″ align=”middle” scale=”exactfit” quality=high pluginspage=”http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&#8221; type=”application/x-shockwave-flash”></embed>
    </object>
    </p align>
    ————————————–
    note that I also changed below further up the same page
    —————————-
    #header { margin: 0 !important; margin: 0 0 0 0px; padding: 0px; height:198px; width: 735px; }
    #headerimg { margin: 0px 0px 0; height: 198px; width: 735px; }
    by god it works great! I am using 1.5.2 default template

    “is there any way I can have the swf code in my .css, then call it in my index.php page???”

    The answer is no. You can’t use an object (i.e. the SWF file) as a background using CSS as only image files are accepted. Unfortunately, what you’ll need to do is mark it up specifically by using the object tag.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘using a .swf file for the header’ is closed to new replies.