Support » Themes and Templates » embedding a flash file in a homepage template file

  • Resolved Gary_Davison



    I have created a template file that i would like to use as a homepage for my wordpress website. I have created a page in WP using this template. However when I select to make this page the default home page for the WP site the embedded SWF file doesn’t correctly display.

    This is the code I’m using to embed the file:

    <?php bloginfo(‘template_directory’); ?>/index_flash.swf

    The flash file is located in the same located as the template file.

    Any help would be greatly appreciated.


Viewing 5 replies - 1 through 5 (of 5 total)
  • need the rest of the code … this doesn’t tell me anything.

    as Mores says might need more code…

    ..but perhaps you’re thinking Worpress will magically render the flash also? You above code references the path of the swf but you’ll need to place it inside some OBJECT/EMBED code to actually display it. is one way

    or just use the flash generated code


    Thanks for the responses, no I wasn’t under any illusion that WP would magically render anything.

    Here’s the code I has used to embed the flash ind=to the page:

    <!– this is the beginning of the flash div –>
    <div id=”index_flash_div”>
    <script type=”text/javascript”>
    AC_FL_RunContent( ‘codebase’,’,0,28,0′,’width’,’440′,’height’,’300′,’src’,’../wp-content/uploads/2008/index_flash’,’quality’,’high’,’pluginspage’,’’,’movie’,’../wp-content/uploads/2008/index_flash’ ); //end AC code
    </script><noscript><object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”,0,28,0″ width=”440″ height=”300″>
    <param name=”movie” value=”../wp-content/uploads/2008/index_flash.swf” />
    <param name=”quality” value=”high” />
    <embed src=”../wp-content/uploads/2008/index_flash.swf” quality=”high” pluginspage=”” type=”application/x-shockwave-flash” width=”440″ height=”300″></embed>

    <div id=”index_flash_text”>

    <p>Please click on the name of the work above to view it in more detail.</p>


    <!– this is the end of the flash div –>

    Any help would be appreciated, I have got Flash working on other pages of the site it’s just this index page! And I wasn’t sure whether Flash had to be embedded differently as this is a template that is being specified as the index page, therefore pulling data from a different location? Sorry my knowledge of WordPress isn’t that strong, hence the cry for help.


    It could be as simple as a non-working path … replace all calls to the SWF file with absolute paths.
    Then it seems like you’re using flash’s publish function, which requires a javascript file to work, since you’re calling a javascript file if you watch closely.

    My guess is you need to put the .js file in the theme directory and use absolute paths to call the swf file.

    It takes a little bit of fiddling, even for “pro’s” like me 😉

    Cheers it was the javascript file not being in the same location that caused the error.


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘embedding a flash file in a homepage template file’ is closed to new replies.