zeech26
07-08-2009, 08:52 PM
Hello!
I have a question about XML in flash.
I have a photo gallery that utilizes XML to call out the photo as well as the caption.
See XML data below:
<image thumb="thumb/FACILITY_TMB_BATH-02.jpg" big="big/FACILITY_LG_BATH-02.jpg" title="Ogni cottage è dotato di un bagno elegante" />
This is the AS that calls for the photos and captions (The whole script is very long, so I am only going to annote the part that calls for the XML): It goes like this:
xml.load("xml/io/io_resort_gallery01.xml");
for (var i = 0; i<numOfItems; i++) {
var t = this.attachMovie("item", "item"+i, i+1);
}
My problem is that the data won’t display special characters like “è or é or ñ”
I am worried because I am using multiple languages, and as it is I am having to remove important characters from translations...
I also have a second AS that calls for XML data for body copy which which works great, displays all characters in multiple languages, and allows HTML code to be used:
XML Data:
<texts>
<text><![CDATA[<b><font size="14">Il lusso fa parte dell'alloggio...</font></b>
Con 15 lussuosi cottage, siamo in grado....]]></text>
ActionScript:
stop();
my_xml = new XML();
my_xml.load("xml/io/io_resort_text_galleries.xml");
my_xml.onLoad = my_function;
my_xml.ignoreWhite = 1;
function my_function() {
acc_mc.accomodations.html = true;
acc_mc.accomodations.htmlText = my_xml.firstChild.childNodes[0].firstChild.nodeValue;
}
Any idea on how to get the XML for the photo gallery to display all characters?
This is also going to have to accomodate russian and Japanese so I am bit nervous...
Thanks for your help in Advance!
From Santa Cruz, CA
Zeech26
I have a question about XML in flash.
I have a photo gallery that utilizes XML to call out the photo as well as the caption.
See XML data below:
<image thumb="thumb/FACILITY_TMB_BATH-02.jpg" big="big/FACILITY_LG_BATH-02.jpg" title="Ogni cottage è dotato di un bagno elegante" />
This is the AS that calls for the photos and captions (The whole script is very long, so I am only going to annote the part that calls for the XML): It goes like this:
xml.load("xml/io/io_resort_gallery01.xml");
for (var i = 0; i<numOfItems; i++) {
var t = this.attachMovie("item", "item"+i, i+1);
}
My problem is that the data won’t display special characters like “è or é or ñ”
I am worried because I am using multiple languages, and as it is I am having to remove important characters from translations...
I also have a second AS that calls for XML data for body copy which which works great, displays all characters in multiple languages, and allows HTML code to be used:
XML Data:
<texts>
<text><![CDATA[<b><font size="14">Il lusso fa parte dell'alloggio...</font></b>
Con 15 lussuosi cottage, siamo in grado....]]></text>
ActionScript:
stop();
my_xml = new XML();
my_xml.load("xml/io/io_resort_text_galleries.xml");
my_xml.onLoad = my_function;
my_xml.ignoreWhite = 1;
function my_function() {
acc_mc.accomodations.html = true;
acc_mc.accomodations.htmlText = my_xml.firstChild.childNodes[0].firstChild.nodeValue;
}
Any idea on how to get the XML for the photo gallery to display all characters?
This is also going to have to accomodate russian and Japanese so I am bit nervous...
Thanks for your help in Advance!
From Santa Cruz, CA
Zeech26