Title: XML Flash banner problems
Last modified: August 19, 2016

---

# XML Flash banner problems

 *  [jonriley72](https://wordpress.org/support/users/jonriley72/)
 * (@jonriley72)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/xml-flash-banner-problems/)
 * Hi There
 * Need some help if possible.
 * I want a flash banner that reads an xml file as the header for my website.
 * I have inserted the code as follows into header.php:
 *     ```
       <div id="topBar" class="container_12" >
       <script type="text/javascript" src="<?php echo get_option('home'); ?>/swfobject.js"></script>
       <script type="text/javascript">
       var so = new SWFObject("<?php echo get_option('home'); ?>/banner.swf", "mymovie", "960", "300", "9");
       so.addParam("menu", "false");
       so.addVariable("dataPath", "<?php echo get_option('home'); ?>/data.xml");
       so.write("topBar");
       </script>
   
       <h1 id="logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
       <p><?php bloginfo('description'); ?></p>
   
       </div><!--end topBar tag -->
       ```
   
 * Currently the files banner.swf, data.xml are in the root folder of the site, 
   I have tried all sorts of different locations for them and it has made no difference.
 * The paths to the images I want to load in the xml file are all absolute, seems
   to make no difference.
 * I know the banner.swf file is there because I can see the controller and the 
   loader graphic, it appears to load the xml file but still nothing.
 * The paths that are generated by the header.php page all seem to be working fine,
   in other words if I view the source for my wordpress site cut and paste the paths
   to the banner.sf and data.xml file then I can see the contents, the same for 
   the paths to the images in the xml file …
 * Anyone got any ideas? Pulling my hair out and I haven’t got much to start with!
 * Thanks

Viewing 1 replies (of 1 total)

 *  [Supplybrary](https://wordpress.org/support/users/reelvisits/)
 * (@reelvisits)
 * [16 years ago](https://wordpress.org/support/topic/xml-flash-banner-problems/#post-1422341)
 * This works to get the path to a video file. It might work for the XML.
 *     ```
       function getCustomField()
       {
       	global $post;
   
       	$video = js_escape(get_post_meta($post->ID, 'video', true));
       	$vid_place = js_escape(wp_get_attachment_url($video));
   
       		if($video) : ?>
   
       <script type='text/javascript' src='http://actual/path/to/swfobject.js'></script>
       <p><div id='<?php echo $video;?>'>This text will be replaced</div></p>
       <script type='text/javascript'>
         var so = new SWFObject('http://actual/path/to/player.swf','ply','470','320','9','#ffffff');
         so.addParam('allowfullscreen','true');
         so.addParam('allowscriptaccess','always');
         so.addParam('wmode','transparent');
         so.addVariable('file','<?php echo $vid_place;?>');
         so.write('<?php echo $video;?>');
       </script>
       <?php
   
       endif;
   
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘XML Flash banner problems’ is closed to new replies.

## Tags

 * [banner](https://wordpress.org/support/topic-tag/banner/)
 * [flash](https://wordpress.org/support/topic-tag/flash/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 1 reply
 * 2 participants
 * Last reply from: [Supplybrary](https://wordpress.org/support/users/reelvisits/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/xml-flash-banner-problems/#post-1422341)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
