Flash Galleries XML Files
Permalink 1 user found helpful
Hi, I've just playing with C5 for a little while and think it's very cool. I'm having a problem with some Flash galleries I would like to use.
I installed a flash gallery SWF file using the Flash Block, but it looks for the galleries XML file in the root directory of my C5 installation. That wouldn't be a huge problem, except I have several flash elements I want to use and some of them have the same XML file name (images.xml).
So, I decided to try an HTML block instead with SWFobject. But, I get the same problem, If I put the XML in the root directory it works fine, but I still have that name conflict.
How do I get around this? Normally I have the XML in the same directory as the SWF file and just point SWFobject at that SWF file and it all works. Is there some place to set a directory path?
Thanks for any help!
Peter
I installed a flash gallery SWF file using the Flash Block, but it looks for the galleries XML file in the root directory of my C5 installation. That wouldn't be a huge problem, except I have several flash elements I want to use and some of them have the same XML file name (images.xml).
So, I decided to try an HTML block instead with SWFobject. But, I get the same problem, If I put the XML in the root directory it works fine, but I still have that name conflict.
How do I get around this? Normally I have the XML in the same directory as the SWF file and just point SWFobject at that SWF file and it all works. Is there some place to set a directory path?
Thanks for any help!
Peter
Thanks so much elyon. I had spent several hours today trying to figure this one out. I was tempted to get the Embed add-on, but I wasn't sure where my problem was and did not know if that would fix it. Then I ran across this post, applied the base param, and bam! I am back in business.
Oh, good! I'm glad you have it working
Yeah, it's a little known parameter but it definitely comes in handy when you're using a CMS like Concrete.
Let me know, too, if there's anything you can think of that I might be able to do to make the Flash Embed add-on even more attractive :)
Yeah, it's a little known parameter but it definitely comes in handy when you're using a CMS like Concrete.
Let me know, too, if there's anything you can think of that I might be able to do to make the Flash Embed add-on even more attractive :)
I looked into base parameter and below is how I altered my code. I think all I really had to do was add <?=$this->getThemePath()?>/ everywhere, but I also added two base parameter and base embed snippets with values simply "<?=$this->getThemePath()?>/".
I hard-coded this into my template file.
ORIGINAL CODE (DID NOT WORK IN C5):
------------------------------------
ALTERED CODE (WORKS IN C5):
-----------------------------
I thought this in particular was kind of funny:
It's saying to get the "us.swf" file and the "walrich.xml" file which the swf file uses, so I need a <?=$this->getThemePath()?>/ before both files. It didn't work otherwise.
I hard-coded this into my template file.
ORIGINAL CODE (DID NOT WORK IN C5):
------------------------------------
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="790" height="469" id="zoom_map" align="top"> <param name="movie" value="us.swf?data_file=walrich.xml" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <embed src="us.swf?data_file=walrich.xml" quality="high" bgcolor="#FFFFFF" width="790" height="469" name="Clickable U.S. Map" align="top" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed> </object>
ALTERED CODE (WORKS IN C5):
-----------------------------
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="790" height="469" id="zoom_map" align="top"> <param name="movie" value="<?=$this->getThemePath()?>/us.swf?data_file=<?=$this->getThemePath()?>/walrich.xml" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="base" value="<?=$this->getThemePath()?>/"><embed base="<?=$this->getThemePath()?>/" <embed src="<?=$this->getThemePath()?>/us.swf?data_file=<?=$this->getThemePath()?>/walrich.xml" quality="high" bgcolor="#FFFFFF" width="790" height="469" name="Clickable U.S. Map" align="top" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed> </object>
I thought this in particular was kind of funny:
<param name="movie" value="<?=$this->getThemePath()?>/us.swf?data_file=<?=$this->getThemePath()?>/walrich.xml" />
It's saying to get the "us.swf" file and the "walrich.xml" file which the swf file uses, so I need a <?=$this->getThemePath()?>/ before both files. It didn't work otherwise.
The next version (after Concrete 5.4 releases) will rely more on the file manager, so you will be able to upload XML files to the file manager, edit them right there if necessary, then link them to a Flash Embed block as easily as you can add images to an image block.
So that's one solution to this problem, but the other is that you can use the little known (but useful) "base" parameter when embedding Flash. Changing the base parameter will change the directory Flash looks for when it interprets relative paths. You can set the base value to the correct URL of the folder with your XML (root relative is usually best) and it should look there.
The Flash Embed add-on has the base parameter in there but you can also edit the template for the standard Flash block to include your own parameters.