To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Display Modes
Old 02-16-2010, 08:03 AM   #1
niklasinla
Senior Member
 
Join Date: Jul 2005
Posts: 114
AS2 / xml-gallery problem with html-text....

HI!
I have an AS2 gallery that loads a xml-file with URL:s to images and text for each image. The problem I have is to display the text as html-text. The reason is that I would like be able to have links in the text to other websites and using bold tags etc..
Below is some of the code & I think that this is where something needs to be changed?

Code:
function caricaGallery () {
	xmlFolder = "xml/";
	path = xmlFolder + "gallery.xml"; 
	
	var my_xml:XML = new XML ();
	my_xml.ignoreWhite = true;
	theImages = new Array ();
	my_xml.onLoad = function (success:Boolean) {
		if (success) {
			base = my_xml.firstChild.childNodes;
			for (m = 0; m < base.length; m++) {
				theImage = new Object ();
				theImage.url = base[m].childNodes[0].childNodes[0].nodeValue;
				theImage.descrizione = base[m].childNodes[1].childNodes[0].nodeValue;
				theImages.push (theImage);
			}
			creaImmagini ();
		}
	};
	my_xml.load (path);
}
The xml-file has this structure (in this case only one image):
Code:
<immagini>
	<immagine>
		<path>away.jpg</path>
		<descrizione>description two</a></descrizione>		
	</immagine>
</immagini>
I've tried setting the textfiled to display text as html text in the properties-panel and I 've tried to wrap the text within cdata-tags but nothing worked...

Anyone has an idea how this can be solved...?

All the best, Niklas
niklasinla is offline   Reply With Quote
Reply

Tags
gallery, html-text, xml

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:24 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.