Inserting .SWF file has Main Logo on Theme

Discussion in 'Blogging' started by activebiz, Aug 12, 2008.

  1. #1
    Alright guys I am having some problems with doing this correctly on Word Press.
    I have a header in my theme file which is being added to the theme with this code.

    <img id="frontphoto" src="<?php bloginfo('template_directory'); ?>/img/front.jpg" width="760" height="250" alt="" />
    Code (markup):
    Now I need to change this .jpg to a premade .swf but I can not seem to get the right code combination. I have uploaded to the same folder and relinked to it using this code.

    <img id="frontphoto" src="<?php bloginfo('template_directory'); ?>/img/home.swf" width="760" height="250" alt="" />
    Code (markup):
    But it will not show up. What can I do to make this .swf file show up as the header?
     
    activebiz, Aug 12, 2008 IP
  2. lukemeister

    lukemeister Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, unfortunately you won't be able to link to an swf file in your code the same way you'd link to an image. You'll need to embed the flash file instead.

    Here's the most basic of code for embedding an swf file:

    <object width="550" height="400">
    <param name="movie" value="somefilename.swf">
    <embed src="somefilename.swf" width="550" height="400">
    </embed>
    </object>
    Code (markup):
    This may not be the best way to embed swf files, however. If you do a Google search for "SWFObject" you'll find that to be the most standards compliant method to currently embed swf files into your web site.
     
    lukemeister, Aug 12, 2008 IP
  3. activebiz

    activebiz Banned

    Messages:
    1,683
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks likemeister :)
     
    activebiz, Aug 12, 2008 IP