Log in

View Full Version : Resolved TAKE02-Adding Hyperlink to text inputed by XML?



zeech26
06-03-2009, 07:11 PM
Hello, I am still battling with this issue:
Problem:
I have text being inputed into my flash document with this script via XML:
stop();
my_xml = new XML();
my_xml.load("xml/info_text_galleries.xml");
my_xml.onLoad = my_function;
my_xml.ignoreWhite = 1;

function my_function() {
raft_mc.raft.html = true;
raft_mc.raft.htmlText = my_xml.firstChild.childNodes[3].attributes.body_name;
}

Question:
How do I add a hyperlink to the text within the XML?
Here is an example of the XML text that I am using:

<texts>
<text body_name="Information and Reservations
XXXXX
Dive & Tours Club
MANADO - INDONESIA

resort@XXXXX.com
Tel. 431/828.335 –
Mobile 811.432.052
Fax /828.336
www.XXXXX.com" ></text>
</texts>

A written example would be great, such as <url>www.abcd.com</url>
or however you would do it, if it is even possible!

Finally, can I bold inputed text within the XML document with HTML code?
Change font size?
If so, how???

Sorry for the repeated question, just having a rough one...
Thanks for you help in advance!
zeech

zeech26
06-08-2009, 05:07 PM
I figured it out:
AS I used:

stop();
my_xml = new XML();
my_xml.load("xml/contact_text_galleries.xml");
my_xml.onLoad = my_function;
my_xml.ignoreWhite = 1;

function my_function() {
tours_mc.tours.html = true;
tours_mc.tours.htmlText = my_xml.firstChild.childNodes[0].firstChild.nodeValue;
}

XML I used:

<texts>
<text><![CDATA[Information and Reservations

Dive & Tours Club
MANADO - INDONESIA
<a href="mailto:blah@blah.com">your text</a>
resort@XXXXX.com
Tel. 431/828.335 –
Mobile 811.432.052
Fax /828.336
www.XXXXX.com]]></text>
</texts>