I am currently working on a site that uses an xml video gallery. The swf file points to an xml document, which lists thumbnails and their respective flv files, all
referencing a folder called video gallery. I'm using swfobject to embed the flash file in my html doc. In an attempt to cleanup my files, I've been moving files about,
so the directory structure has changed. For reasons beyond me, the gallery swf file now refuses to display in my html doc. It is invisible, but I know it's there, as I
can right click that area and the flash menu will pop up.
This is driving me crazy. I'm certain it's not a security issue, as I've included my local swf folder as trusted, in the global security settings. I've repeatedly checked that
my relative paths are correct, which they are. What confirms this, is when I publish the swf file in flash, it loads the gallery, which works 100%. However, when that swf
file is placed in my html doc, it becomes invisible. The truely strange thing, is if I move these files to the ftp, they work perfectly. I've heard many instances where flash
files work locally but not online. I have the opposite problem. The original dir structure, had the swf, html, swfobject in the root dir, the xml docs in the scripts dir, and
all the content in the video gallery folder. It seems to me that this particular xml video gallery does not like me dicking around with the folders. The new directory
structure does work online, but not offline, so I am at a complete loss as to why this is. Let me reiterate - I've added the swf folder to the trusted locations in my security
settings. Does anyone have a clue what the hell is going on??
It sounds like your moving the files around could be the source of the problem, though I can't be sure since I am not sure where the locations changed to relative to each other. If things were originally all in the root folder, how has that relationship changed with things relocated?
When you place an swf in an html page, anything that swf loads has to be targeted as if that swf is living in the same folder as the html file. It does not have to live there, but it has to target files it loads as if it does.
I initially thought so as well, but what throws me is that if I then transfer these files to the ftp, which mirrors my local directory structure, the swf file displays. Locally, it doesn't. The main hiccup seems to be when I take MainConent.swf from the root folder (this is where our work.html sits, which embeds the swf file) and place it in the swf folder, which currently contains menu link swf files that all work. No matter what I do, it refuses to work. Attached is a screenshot of the current dir tree.
Based on the structure you just showed, you need to change how the swf targets the xml file. As I said, it needs to act as if it is in the html folder when it targets the xml file.
If the swf is also loading images or other files specified by the xml, then that targeting might need to be adjusted as well.
Thanks for helping Ned,
The flash movie now appears, with all the thumbnails showing:
However, none of the actual flv files will load into the player. This is bizzare, as all jpgs and flvs are in the Video Gallery folder. Here is a snippet of the xml code:
|<item Thumb="Video Gallery/CWF1418FR30_NoVO.jpg" VideoClip="Video Gallery/CWF1418FR30_NoVO.flv" Width="512" Height="288" Title="FIRE NSW">|
If I change the path of the flv file to this:
|<item Thumb="Video Gallery/CWF1418FR30_NoVO.jpg" ../VideoClip="Video Gallery/CWF1418FR30_NoVO.flv" Width="512" Height="288" Title="FIRE NSW">|
The clip loads. Unless I've missed something obvious, how can this be?? Why do the jpgs load but not the flvs? All content is in the one folder.
sorry that last snippet was meant to be:
|<item Thumb="Video Gallery/CWF1418FR30_NoVO.jpg" VideoClip="../Video Gallery/CWF1418FR30_NoVO.flv" Width="512" Height="288" Title="FIRE NSW">|
This loads the clip, but it shouldn't, as the thumbnails are in the same dir as the clips, yet the path to the clip is different. What the?? There is another swf called video_player.swf that is referenced in MainContent.swf. This is what all the flv's are all loaded into. I'm at a loss. It seems that I cannot get everything working unless the html and all related swf files, are in the root dir. So much for wanting to cleanup my ftp site. Thanks again for taking the time to help Ned. I will just have to retain the original dir structure.