How to Embed XML FLash

Permalink 1 user found helpful
Hello: I embeded a XML FLash in a Website. Put the XML file and external images folder in the same path of index.php file. Worked for index/home file.

But, as C5 creates virtual pages, I need to find out which is the relative path of inner pages.

Please can someone give orientations on this, or suggest an alternative process. Thanks.

PS: Below the url. Works for the home page, not the others.

http://www.virtualintegral.co.cc/semaica/...

Dinamicore
 
jgarcia replied on at Permalink Reply
jgarcia
I'm not 100% sure what you mean but you can get the relative path to the site using the DIR_REL static variable, as in:
echo DIR_REL . '/my-page';
Dinamicore replied on at Permalink Reply
Dinamicore
Thanks J; I better explain myself:

1. XML and Images Folder are in the same path (root of C5) of the index page:http://www.virtualintegral.co.cc/semaica/... So, embeded Flash is able to call both the XML and the Images Folder.
2. When I go to the other page, Español, the url changes tohttp://www.virtualintegral.co.cc/semaica/index.php/espa-ol/... (what I call "virtual page as it does not appear in the C5 file structure) and the Flash can´t call images anymore.

I don´t know as much of php as you do, so please explain, if that is the solution, where to put you suggested "echo" code.

Thanks
Mnkras replied on at Permalink Reply
Mnkras
im assuming here that the flash file is in the theme,

in the place where it calls the images xml or what ever put that above code, so

{code}/something.xml
elyon replied on at Permalink Reply
elyon
If this is custom Flash that's built into your theme or a custom block, it would be best to pass the correct path to your Flash content using embed parameters.

However, you ultimately are experiencing this problem because relative paths in Flash are relative to the current web document, not the location of the SWF. As the URL continues to change throughout the site, the SWF will continue to look in different places.

The best would be to either use a root-relative or absolute path, or you can also try to use the "base" parameter when embedding your Flash content.

The magic base value of "." ... a single period ... will tell Flash to look relative to the SWF's location, not the page's location. Or, you can specify your own root-relative or absolute path which should make up the beginning of the URL you want to use.

You can also try using the Flash Embed add-on if this is too complicated or doesn't work out real well (or just for fun!)
Dinamicore replied on at Permalink Reply
Dinamicore
Elyon:

I created a custom BLOCK called XmlFlash in which I am figuring out how to include the absolute path of the XmlFlash files:http://www.virtualintegral.co.cc/semaica/files/4512/6789/2386/galle...

Or the other solution will be using the magic value "." which I never used before.

Advice on this structure will be of great help.

I believe I have to use the PHP - Echo commnand in the edit.php file.

Thanks.
Dinamicore replied on at Permalink Reply
Dinamicore
There is no problem for inner pages locating the flash file, as block function defines the absolute path of the swf file.

Problem is with the Xml file and images folder, which need to be located in the same domain as current page.

So, the custom code needed refers to this files.

Please suggestions on this.

Thanks.
elyon replied on at Permalink Reply
elyon
I'm not sure if I really understand what you are asking.

So you are not having trouble embedding the SWF. Is the SWF having trouble accessing the XML file? Are you having difficulties with the image paths inside the XML?

If this is a custom SWF, you can pass in the path to your XML file, and the path to your images, or at least a "base path" which you can append before all of the images.

If this is not a custom SWF, and it does not let you pass in the path to its XML file, you will likely need to use the base parameter to trick it into finding the XML file correctly. Once it finds the XML file, it will be a matter of using absolute, root-relative or relative URLs as necessary to link it up properly.

Does this make sense?
Dinamicore replied on at Permalink Reply
Dinamicore
Elyon:

Isolated this problem to this point; BLOCK function asigns folder for flash file (so flash file is detected fine in any page):

<object width="960" height="160" type="application/x-shockwave-flash" data="/semaica/files/4512/6789/2386/gallery.swf" id="swfcontent8" ....

But XML file is related to current page URL, not to swf path. Is this the file which is not detected in inner pages, only in index.

The need is for the the path to include also the Xml file (named "images.xml), something like this:

<object width="960" height="160" type="application/x-shockwave-flash" data="/semaica/files/4512/6789/2386/gallery.swf?xml_path=images.xml" id="swfcontent8" ....

Tested this added piece of code "?xml_path=images.xml" but does not work.

Please help on figuring out th var needed for the embeeded flash code to work.

Thanks
elyon replied on at Permalink Reply
elyon
Right ... the path is relative to the PAGE url, not the SWF url. If you set the "base" parameter to "." it will make it relative to the SWF url, or you can set it to something else ... whatever you need.

Maybe you should look into using swfobject to embed the Flash rather than using an OBJECT tag. The OBJECT tag isn't supported by all browsers, and won't check for the minimum required Flash version.
Dinamicore replied on at Permalink Reply
Dinamicore
Thanks for your help, Elyon.

I decided to use the default image slide of C5, which works righ on, and later try to cusomize it adding more effects.

Believe this will be a simpler aproach.
Dinamicore replied on at Permalink Reply
Dinamicore
Thanks you all.

I am using the built in "add block" function of C5.

When I embed the Flash in the default template file, works for the index, but when using inline editor, flash stays in front of inline editor, not allowing the function to work.

So, the need is to embed Flash using the built in function.

Thanks.
elyon replied on at Permalink Reply
elyon
You need to change the wmode parameter to make Flash fall behind other content, or hide the Flash content while editing the page