![]() |
Embedding Flash/XML using a div
Hey there, I am having some trouble embedding this flash document found here: http://p-treasures.com/banner on to the index page (http://p-treasures.com/) in that black box. When I designed the static html/css template, it worked fine. When I put the same code into X-Cart, it won't work! I don't understand, but I thought it *might* have something to do with smarty.class.php stopping embedding of xml/swf into divs.
Any help would be very much appreciated, and I will donate to the person who helps me. |
Re: Embedding Flash/XML using a div
The javascript code on your index page looks different than the code on the other link you posted.
Are you using {literal}{/literal} in your template so smarty will not try and compile the javascript? See this Also - you have this commented out - is that intended?: // flashvars.settingsXML = "../banner/settings.xml"; |
Re: Embedding Flash/XML using a div
Hey thanks for your reply. I am editing custom/service_head.tpl and this is the code:
Code:
{* |
Re: Embedding Flash/XML using a div
Assuming all your variables/parameters are set up correctly, that leaves your paths to the files.
I am not sure why you need the "../" in the paths - you have XCART installed at the top of your directory structure - not a sub-directory, correct? Then XCART is running at the top of your directory structure. Also - depending upon how the script/flash you are using is written - the path defined for your xml file may not be relative to home.php? The information for how to set the path should be in the script/flash or any documentation provided. |
Re: Embedding Flash/XML using a div
It says to add this line:
Code:
flashvars.folderPath = "PATH"; Just to clarify, this is where ALL the flash files are (xml, images, swf file, the js files required by the flash script) in www/banner/. X-Cart is on the root. The code as it stands now based off of what you said is this: Code:
{literal} |
Re: Embedding Flash/XML using a div
Not skin1 - it is true the templates are in skin1 - but what is executing (home.php, etc.) is at your top level.
Without going over the documentation about what exactly the parameters of your script are - I suspect this: flashvars.folderPath = "banner" flashvars.settingsXML = "banner/settings.xml" It that does not work - I would go back to what you were originally trying to do - get it to work outside of XCART first. But this time - put your experimental file at your top level directory. Once you get it to work there - do the same thing in XCART. I don't think there is anything in XCART that will prevent it from working. |
Re: Embedding Flash/XML using a div
I added that but man, it still won't work. It works fine at http://p-treasures.com/banner/ and that is at the root directory (obviously from the url). It has to be something x-cart is doing. Even if the xml was wrong, the SWF should still show up! It would just not work correctly. As long as I can get the swf to show up, I think I can figure out the rest. I just don't understand.
|
Re: Embedding Flash/XML using a div
Debug your file in your top level directory - http://p-treasures.com - not in the banner subdirectory. XCART runs in your top level directory. If you get it to run at your top level outside of XCART - then you know you have your parameters/paths set correctly.
|
Re: Embedding Flash/XML using a div
So I need to create a file like banner.php and run the js and html to make it work on p-treasures.com/banner.php? I can keep all the script files in www/banner/ right? Just the js and the html div should be on the top level, correct?
|
Re: Embedding Flash/XML using a div
Yes - I think that is the best way. Once you get the file at http://p-treasures.com/banner.php to work - then you know you have the parameters & paths set up correctly. Then - drop that code into the XCART templates - which you have already figured out.
Your other option - which would be messier - is to get rid of the banner subdirectory and move all the code inside to the top level. You might look for guidance in the documentation for the script/flash, or , if they gave you the flash source, you can see in the actionscript how they are referencing the xml file. Usually - they will try and give you information about properly setting up paths to the xml. This all has to be set up correctly for such scripts/flash to work properly. The flash has to be able to find the xml file. |
All times are GMT -8. The time now is 09:33 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.