• I would love to be able to put a different flash file instead of a static image as the featured header on each page of my site. Does anyone know if this is possible?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter asplash

    (@asplash)

    Sorry should have said – I am using TwentyTen theme

    I decided having a flash image on every page could be distracting. I just have a swf on the Home page. The swf is 940×300 as I am displaying a 360degree photo panorama and it needed to be larger to show the detail. The size was a compromise; the swf file download is only about 300kb. The static header on other pages is the standard 940×198.

    The code I have in header.php in the child theme directory to display the flash file (and a greyscale bar so users can adjust their displays) just on the Home page in given below. It would be easy to modify to put a flash file on every page.

    /// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( is_singular() &&
    							has_post_thumbnail( $post->ID ) &&
    							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					elseif ( is_home() ): ?>
    						<div id="hm_swf">
    						<embed src="http://www.mywebsite/myblog/wp-content/uploads/header-940x300.swf" quality="high" bgcolor="#ffffff" width="940" height="300" name="banner" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
    						<img src="http:///www.mywebsite/myblog/wp-content/uploads/greyscalebar.gif" width=940" height="15" align="middle">
    						</div>
    					<?php else : ?>
    						<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    					<?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Featured Image as Flash [swf]’ is closed to new replies.