WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] embedding a flash file in a homepage template file (6 posts)

  1. Gary_Davison
    Member
    Posted 5 years ago #

    Hi,

    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.

    Thanks
    Gary

  2. mores
    Member
    Posted 5 years ago #

    need the rest of the code ... this doesn't tell me anything.

  3. zeniph
    Member
    Posted 5 years ago #

    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.

    http://blog.deconcept.com/swfobject/ is one way

    or just use the flash generated code

  4. Gary_Davison
    Member
    Posted 5 years ago #

    Hi,

    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','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','440','height','300','src','../wp-content/uploads/2008/index_flash','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../wp-content/uploads/2008/index_flash' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,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="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="440" height="300"></embed>
    </object></noscript>

    <div id="index_flash_text">

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

    </div>

    <!-- this is the end of the flash div -->
    </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.

    Cheers
    Gary

  5. mores
    Member
    Posted 5 years ago #

    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 ;)

  6. Gary_Davison
    Member
    Posted 5 years ago #

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

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic