Support » Fixing WordPress » How Replace image with Flash Animation

  • I have just installed a new template which has an image on the index page of a bridge at night (check it out: The thing is I want to replace this image with a flash animation I have but I am a complete novice with code, I can just about understand what I’m reading but editing is a big No No for me. I already have the WP-SWFObject installed on the blog as you can see I have managed to put the animation in a post. So can somebody tell me (in childlike simplicity) how I would change this image. This is the code I believe I need to put in somewhere but I don’t know where:
    <?php wp_swfobject_echo(“MY ANIMATION URL.swf”, “400”, “280”); ?>

    Also to help here is the code I have cut from the main index template (the file name for the image that I want to change is “mainimage”):
    <?php get_header(); ?>

    <div id=”content”>
    <div id=”contentleft”>

    <div class=”blogpostwrapper”>
    <div id=”mainimage”>
    <img src=”<?php bloginfo(‘template_directory’); ?>/images/mainimage.jpg” class=”mainimage” alt=”Main image” title=”Main image” />

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class=”blogpost”>
    <div class=”blogtitle”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <div class=”datetab”>
    <div class=”blogdate”>
    <?php the_time(‘jS F’) ?>
    <div class=”blogdateyear”>
    <?php the_time(‘Y’) ?>
    <div class=”blogauthor”>
    written by <? the_author(); ?>
    <div class=”blogcontent”>
    <?php the_content(); ?>
    <div class=”blogtags”>
    <?php the_tags( ‘Tags: ‘, ‘, ‘, ”); ?>
    <div class=”blogdivide”>
    <div class=”blogstrip”>
    <div class=”blogcomments”>
    <?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments’); ?>
    <div class=”blogcategory”>
    <?php the_category(‘, ‘) ?>
    <?php endwhile; ?>
    <div id=”paging”>
    <?php $previous = get_bloginfo(‘template_directory’); ?>
    <div id=”alignright”><?php next_posts_link(‘<img src=”‘ . $previous . ‘/images/previous.png” alt=”Previous” title=”Previous” />’) ?></div>
    <div id=”alignleft”><?php previous_posts_link(‘<img src=”‘ . $previous . ‘/images/next.png” alt=”Next” title=”Next” />’) ?></div>
    <?php else : ?>
    <h2 class=”center”>Not Found</h2>
    <p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>
    <?php endif; ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Sorry this is such a LOOOOONGG post Hope someone can help me.


  • The topic ‘How Replace image with Flash Animation’ is closed to new replies.