WordPress.org

Forums

[resolved] Trouble embedding a flash xml banner rotatorin a theme (1 post)

  1. kpm54799
    Member
    Posted 5 years ago #

    I have been trying for the last couple of days to embed a flash xml banner rotator into a theme I am working on.

    You can view the template at http://beta.amethystmueller.com/wordpress The code is as follows:

    <?php
    /*
    Template Name: Snarfer
    */
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    
        <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>" href="<?php echo get_option('home'); ?>/feed" />
    
        <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/styleblack.css" />
    
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/menu.js"></script>
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.js"></script>
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/comment.js"></script>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/swfobject.js"></script>
    	<?php wp_head(); ?>
    </head>
    <body style="margin-top:0;">
    <!--main container-->
    <div id="main">
    	<!--header-->
    	<div id="header" style="background-color:black;">
    
            <div id="logo" style="background-color:black;">
            	<a href="<?php echo get_option('home'); ?>/">
                	<img alt="logo" class="center2" src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" />
                </a>
            </div>
    
            <ul id="menu" style="background-color:black;">
    
    			<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    		</ul>
    
            <div id="banner">
    <script type="text/javascript">
    
    		    /** EMBED THE SWF**/
                swfobject.embedSWF("/banner/SlideShow.swf", "Slide", 1000, 440, "9");
    
            </script>
    
            <div id="Slide" style="width:100%;height:100%;">
                <p>In order to view this page you need Flash Player 9+ support!</p>
                <p>
                    <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                    </a>
                </p>
            </div>
    		</div>
    	</div>
    </div>
    		<?php wp_footer(); ?>
    </body>
    </html>

    It doesn't work, but when I just create an html file and place it it in the template directory, it renders the .swf fine. You can view this one at http://beta.amethystmueller.com/wordpress/wp-content/themes/tofurious-21/slidetest.html That code is here:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <script type="text/javascript" src="js/swfobject.js"></script> 
    
    </head>
    <body style="margin-top:0;">
    <!--main container-->
    <div id="main">
    	<!--header-->
    	<div id="header" style="background-color:black;">
            <div id="banner">
    <script type="text/javascript">
    
    		    /** EMBED THE SWF**/
                swfobject.embedSWF('/banner/slideshow.swf', 'Slide', 1000, 440, '9.0.0');
    
            </script>
            <div id="Slide" style="width:100%;height:100%;">
                <p>In order to view this page you need Flash Player 9+ support!</p>
                <p>
                    <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                    </a>
                </p>
            </div>
    	</div>

    Please any help would be really appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic