Click to See Complete Forum and Search --> : Using XML for SWF Web Template


v3x
10-08-2010, 11:15 AM
Hi

Im new to xml so please bear with me

Ive picked up a web template online and seems to be having difficulty editing it.

It comes as an .swf with an .xml to edit text, links etc

I have done some partial edits and have encountered a few problems;

1. Links on the main page have flash images as a background. When running locally these images sit immediately behind the text however when hosted 4 out of 5 of the links become out of sync from the images.

I have attached a screenshot to give a better idea

http://img177.imageshack.us/img177/8853/65639040.gif

2. CDATA does not appear to be displaying at all when hosted. Again everything works fine locally.

Here is a sample of the code that displays correctly when run locally but vanishes when hosted.


<page name="services">
<image imageUrl="_pic2.png" link="asfunction:link"/>
<image imageUrl="_pic3.png" link="asfunction:link"/>

<texts>

<pageText><![CDATA[
Services
]]></pageText>

<pageText><![CDATA[
About our services
]]></pageText>

<pageText><![CDATA[
<font color="#ffffff">LOREM IPSUM DOLOR SIT AMET</font><br/>
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci .tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
]]></pageText>

<pageText><![CDATA[
Unique service
]]></pageText>


The text, Services, About our services and Unique Service does not display when hosted.

The dummy text displays correctly both locally and hosted.

I am running firefox although this is confirmed to be displaying the same in IE. I use firefox when viewing locally.

Any help would be greatly appreciated

v3x
10-28-2010, 06:01 AM
bump!

Eye for Video
10-28-2010, 07:54 AM
Well I only taking a guess here but almost always, when Flash/xml works on a local machine but not on the server, it's a pathing issue. Since you are using a template a path may be more or less hardwired to require assets to be in a certain folder relationship. Altering that folder relationship in any way can result in the Flash not finding the xml, or the the xml not finding the images, etc. Double check the documentation that came with the template and double check that the paths used in the .swf and the .xml are in the exact same relationship as the dummy content.
As for the misaligned text, there is almost no way that simple editing would change the location of a dynamic text box in Flash. But one possibility is that there is blank space or a carrige return in the xml file sending the data to Flash. That could result in the word "Services" being pushed to the second line of the text box while that first line is just blank or has a carriage return in it. So double check that the new data completely removes any possibility of that happening. Put your <pageText> all in one line, no carrige returns or line breaks. Compare closely the text that is not out of sync with the 4 that are. Perhaps take the line that's working and paste it in the lines that are not working and see what happens.
Best of luck to ya!
Eye for Video
www.cidigitalmedia.com