Click to See Complete Forum and Search --> : XML run flash not loading on all pages
Aravona
02-10-2010, 08:53 AM
I have some flash embedded into my header, which uses an xml file to run, using the following code:
<!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" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--<style type="text/css" media="screen">
<?php
// Checks to see whether it needs a sidebar or not
if ( empty($withcomments) && !is_single() ) {
?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
<?php } else { // No sidebar ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
<?php } ?>
</style>-->
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="header" role="banner">
<div id="headerimg">
<!--<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>-->
</div>
</div>
<div id="navig">
<ul id="nav">
<?php wp_list_categories('sort_column=menu_order&include=8,7,6,4,9,10,3,5&title_li='); ?>
</ul>
<div style="height:270px;background: url(<?php bloginfo('stylesheet_directory'); ?>/images/top_bg2.jpg) no-repeat top center;padding-left:20px;">
<div style="width:623px;float:left;padding-top:10px">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="623" height="244">
<param name="movie" value="http://www.evolution-photography.co.uk/slide_flash8.swf" />
<param name="quality" value="high" />
<embed src="http://http://www.evolution-photography.co.uk/slide_flash8.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="623" height="244"></embed>
</object>
</div>
<div style="width: 265px; float: right;">
<ul id="nav-pages" role="navigation">
<?php include ('sidebar2.php'); ?>
</ul>
</div>
</div>
</div>
<hr />
This works but only on the home page and should be shown on every page. The other pages just give a pink background rectangle (but it is recognising that there is flash as if you right click it shows the flash option usual flash options... loop, play, zoom etc etc.)
Any help would really be appriciated. Heres the site (http://www.evolution-photography.co.uk/)
Thanks in advance.
Eye for Video
02-10-2010, 10:08 AM
Most likely a pathing problem.
Use your Temp Internet Files folder to test. Delete all files, load home page. The slide.xml file is there.. looks like it's in the root folder, correct? Delete all files again and load another page... no .xml file loaded.
But the other pages are in different folders so the path from inside slide_flash8.swf to the .xml file has now changed from:
yourslideshow.load("slide.xml");
on the home page to
yourslideshow.load("../slide.xml");
on the other pages...go up one level and get the .xml. From an old post:
Almost always when it works on the local machine and not the server, it's a pathing problem.
You can put your Flash related files in whatever folders you want, they do not have to be in the root. But if sticking them in there worked, then you know that the issue was a pathing problem.
Just remember that paths become relative to the Web page on which those Flash files are used. So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, etc), the path used inside the .swf to the .xml file has to be relative to it's new location in root and back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
So just be sure that you use addresses relative to the final locations and you can put the files wherever you want.
Best wishes,
Eye for Video
www.cidigitalmedia.com
Aravona
02-10-2010, 10:32 AM
I have no idea where to find Vista's temp internet files so this could take a while.
I did move the slide.xml into the folder with the header but it didnt make a difference. I didnt code this site so I don't even know where that bit of code you posted came from. This is going to take a while I guess.
Thanks for the reply though - I'll see if I can find what you're on about. :)
I dont see why its changing it for one and not all. The flash is called up in one page, and its that page which is pulled up more than once so why is it changing only for one when its the exact same header every time?
Edit: *sigh* there is no temp folder where it should be... likely 'cos Ive wiped it earlier along with cookies... not remaking itself either.
Is there not another way for me to sort this? I only have a .swf no .fla to alter either...
Eye for Video
02-10-2010, 11:03 AM
Temp Internet files in Vista:
Tools, Internet Options, Browsing history, Settings, View files
Well yes, when the .xml is in the same folder as your flash file it works, that's because inside the flash it's expecting the xml file to be in the same folder as it is.
But when you use that same flash file in another folder, that path doesn't work. To prove that, put a copy of the .xml file in each of the folders. I'll bet it will work.
Review the post above and the explanation of relative pathing.
EfV
Aravona
02-10-2010, 11:10 AM
If I take the slide.xml and put it in the directory of the header:
/www/wp-content/themes/corelab
On my server it does nothing. This is where I put other flash (not using xml) in the equivilant folder on the other site and linked it and it works fine.
I've even put the pictures on there in the images folder so that everything that is in the other directory is in this one - still doesnt work. This is with an absolute path to the directory with the flash in (Ive noticed wordpress hates relative paths, and I can only use absolute paths for all images which are not utilised by CSS [eg.backgrounds] but still no go)
Eye for Video
02-10-2010, 11:49 AM
The path that is broke is relative to the html page, not any Flash file or folder. So when the "About Us" html page loads, it cannot find the .xml file because it is not in the same folder as the about us html page.
Same situation with each of the other html pages, they are all in separate folders.
So you can either fix the path in the Flash .swf file or put a COPY of the .xml file in each folder that has a html page in it. So for 5 pages, you need 5 copies of the same .xml file.
This is just to test for pathing issues. If this works then you have verified that it's a pathing issue.
The way to fix this is to edit the path in the .swf. Since you are using the Flash .swf in 5 different folders you need one for each location (5 separate folders, 5 different .swfs)locations). If you can't do that, just provide a copy of the .xml file in each folder that has a html page.
But working with Wordpress is a disadvantage and so is not being able to edit the Flash file directly. I'm just suggesting a work around.
But have a go at it. Put a COPY of the .xml file in every folder that has a html page. If that doesn't work, you may also have to place a COPY of the images folder inside each folder that has a separate html page in it since you are using separate folders for each html page.
Is that a WordPress thing that you have to use a separate folder for each html page? That really presents a lot of problems as far as pathing goes when you re-use elements from one page to another. If all your html pages were in your root folder, the path in the .swf to the .xml would be the same and they would all work. But because they are each in a separate folder, the path to the .xml and images is different.
Best of luck to ya!
EfV
Aravona
02-10-2010, 11:56 AM
They are ALL in the same folder - theres pages in the main directory, and theres pages in the Theme folder. The .php pages are not in their own seperate folders.
For example in the Theme folder:
about.php, home.php, index.php, search.php, sidebar.php etc etc are all in the same folder on ther server, and therefore the same folder as the .xml file and the .swf ... Every page is a .php as well no .html in wordpress themes, or on any of the pages used on the server in the www folder, just a readme and a beta file as html which aren't used.
The header is pulled dynamically and is the ONLY page to call up the flash file... I havent had to do this with any other flash I've worked with in wordpress - but they don't use xml (I personally wont use it - I always have everything graphically made in flash then published) I didn't get a choice this time.
I have a simple .swf pulled here (my other wordpress site (http://www.evolutionbusinessservices.co.uk/charlene/blog/)) And as you can see it is fine and the flash loads on every page, even though it is ONLY coded into the header and the files are in one simple place.
Eye for Video
02-10-2010, 01:00 PM
OK I think I see what you are getting at. But when the pages are put constructed by the PHP script, they are in different folders. From your code:
<li class="page_item page-item-2 current_page_item"><a href="http://www.evolution-photography.co.uk">Home</a></li>
<li class="page_item page-item-40"><a href="http://www.evolution-photography.co.uk/about-evolution/">About Evolution</a></li>
<li class="page_item page-item-6"><a href="http://www.evolution-photography.co.uk/wedding-photography-gallery/">Gallery</a></li>
<li class="page_item page-item-8"><a href="http://www.evolution-photography.co.uk/products/">Products</a></li>
<li class="page_item page-item-7"><a href="http://www.evolution-photography.co.uk/wedding-photography-packages/">Wedding Packages</a></li>
Only the home page is in the root. To test:
http://www.evolution-photography.co.uk/index.php
What opens? Checking Temp internet folder has xml and images loaded.
Then test for any of the other files in the root.
Then go one folder level deeper and test for an index file in each of the folders:
www.evolution-photography.co.uk/about-evolution/index.php
no .xml loads, no images load, because path from that location is incorrect.
As for the other site, none of the nav links worked in IE7, FF3.5, or Safari 4.0 so I could not see a working sample.
I realize that you are working with WordPress and that may be where the problems are. If you can't figure it out here you may need to go to a more WordPress oriented Forum.
Best wishes,
EfV
Aravona
02-11-2010, 04:02 AM
No you can test the other one, the links aren't placed yet but if you click throught the blog entries you can see it.
I have noticed it draws up those file paths but those folders do not exsist on the server. I'll have to ask about that and see why its doing this (I didn't code this one from scratch so it maybe an issue with those links)
Thank you for pointing me in the right direction. You've been very helpful.
Aravona
02-11-2010, 10:58 AM
You were absolutely on the mark, it was Wordpress
Wordpress has an option to alter the URL using permalinks. And you could do a custom one - which we were using.
The problem I think then was that the flash was being called without the php permalink coding.
We removed the custom permalink for now, but will be trying to fix the flash link to include the custom change. Thank you so much for your help :) (I'll probably be back soon looking for more help with this lol!)
ankitanks
10-19-2010, 12:57 AM
Now How to go about it. Were you able to find a solution to it?