Log in

View Full Version : XML text links



nate51
03-24-2009, 04:30 AM
I have code for an automatic scroll content and the XML looks like this

<?xml version="1.0" encoding="utf-8" ?>
- <events>
<photo scroller="Scrolling content Scrolling content Scrolling content Scrolling content Scrolling content" />
</events>

Does anyone have an idea how to drop a link in for a specific part of the text?

I tried something like this

<?xml version="1.0" encoding="utf-8" ?>
- <events>
<photo scroller="Scrolling <a href="http://www.site.com" target="_blank">content</a> Scrolling content" />
</events>

And that made my content in the flash site 'undefined' so I am drawing blanks here. Any help would be great.

bluewalrus
03-24-2009, 05:28 AM
maybe


<photo scroller="Scrolling <a href=\"http://www.site.com\" target=\"_blank\">content</a> Scrolling content" />
</events>


thats only part of it but make sense?

Medyman
03-24-2009, 01:26 PM
And that made my content in the flash site 'undefined' so I am drawing blanks here.

Yeah, the extra quotes and brackets confuses the XML parser. If you want to include the link directly in the XML node value, use <![CDATA[]]> (http://www.w3schools.com/XML/xml_cdata.asp). For this to work though, your text field should be set up to parse HTML and you should pass the value via the TextField.htmlText property.

More info: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808