[F8] XML links
Hi,
Im wondering if anyone can help me.
I am loading xml into my flash using this method -
function loadXML(loaded) {
if (loaded) {
_root.web = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.logo1_txt.text = _root.web;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("myText.xml");
and the xml is -
<?xml version="1.0"?>
<sitetext>
<site>
<web>http://www.alanwallace.co.uk </web>
</site>
</sitetext>
So........i would like to make the "web" node into a link. Any ideas on how i can do that?
Thanks
Alan
FK'n_dog
use a CDATA section and an html enabled textfield
PHP Code:
function loadXML(loaded) {
if (loaded) {
_root.web = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.logo1_txt.html = true
_root.logo1_txt.htmlText = _root.web;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("web.xml");
/*
<?xml version="1.0"?>
<sitetext>
<site>
<web><![CDATA[<a href ='http://www.alanwallace.co.uk'>alanwallace.co.uk</a> ]]></web>
</site>
</sitetext>
*/
Hi,
Thanks for taking the time to help me with this.
Ive applied it to my project but i just get a "null" in the text field.
Any Ideas?
Thanks
Alan
FK'n_dog
i have attached my Flash 8 test file
hope it is of some help to you
Attached Files
Thanks you so much.
As my intended text fields were buried deep inside my fla it took me a long time and a bit of shifting around but eventually after about 5 hours i have finally succeeded in getting this to work.
Im in the process of making a template which is 100% xml and this has enabled me to get over the hump.
very much apreciated
Thanks
Alan
Last edited by magicplant; 02-07-2008 at 06:46 PM .
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width