Welcome to WebmasterWorld Guest from 54.145.235.72

Forum Moderators: httpwebwitch

Importing XML with Actionscript, I need to add a URL

   
5:29 pm on Nov 11, 2008 (gmt 0)

5+ Year Member



I am using Lee Brimelow's Carousel Tutorial to create an image carousel on my site. When the image is clicked, it pulls in data from the <item> field of my XML file. That <item> field is all text wrapped in quotes. How would I add a URL to that text as a link that is pulled in with the text? I have been searching online for about a week now with no success. I even tried to bypass the XML reserved characters of < > and use &lt; and &gt; respectively. Any suggestions?
9:57 am on Nov 12, 2008 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The carousel is done with Fash, right? Then I think the answer might involve opening the FLA file to see how the XML content is being shown. I know a Flash text area will render simple HTML like <b>, <i>, and <a>. Are you able to use a <b> in your text? What happens?

Try this:

<item><![CDATA[<a>your link here</a>]]></item>

putting your HTML inside a CDATA entity allows you to include any characters, including < and > and &, without encoding them. Read more about CDATA [w3schools.com].

does that make a difference?

2:37 pm on Nov 12, 2008 (gmt 0)

5+ Year Member



yes it is done with flash. I have created a movie clip to import the xml feed into. I will try to use the CDATA entry later today when i get back in the office. Thanks for the advice.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month