-
1. Re: Dynamic data Integration trouble
dmeN May 23, 2010 5:21 AM (in response to Kristtee)Hmm, are you sure your text field is dynamic, font is embedded, and you have given it an instance name of ta? I copy pasted your code directly, put a list box and a text field on stage with instance names of lb and ta and it worked just fine. Put a trace in your change handler to help debug... but I think it's got to be something with your field as the code does work.
As for opening in a browser... just use a navigateToURL in your change handler.
-
2. Re: Dynamic data Integration trouble
Ned Murphy May 23, 2010 5:28 AM (in response to Kristtee)You don't do anything to store the data for the link, nor to update the textfield with it when a selection is made, nor do you add a hyperlink for it to the textfield.
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
var uriLinks:Array = new Array();xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("http://rssfeeds.tv.adobe.com/learn-flash-professional-cs4.xml"));
//lb is ListBox component in stage
lb.addEventListener(Event.CHANGE, itemChange);function itemChange(e:Event):void
{
ta.text = lb.selectedItem.data;//ta is TextArea in stage
uri.htmlText = "<a href='"+uriLinks[lb.selectedIndex]+"' target='_blank'>"+uriLinks[lb.selectedIndex]+"</a>";
}function LoadXML(e:Event):void {
xmlData=new XML(e.target.data);
parseData(xmlData);
}
function parseData(loadedData:XML):void {
//trace(loadedData.channel.item);
//trace(loadedData.channel.item.length());
var titleList:XMLList=loadedData.channel.item;
for (var i:uint = 0; i<titleList.length(); i++) {
lb.addItem({label:titleList.title.text()[i], data:titleList.description.text()[i]});
uriLinks.push(titleList.link.text()[i]);//uri.text = titleList.link.text()[i];
//uri is dynamic TextField on stage
}
} -
3. Re: Dynamic data Integration trouble
Kristtee May 23, 2010 8:35 PM (in response to Ned Murphy)Hello NedMurphy
Many many thanks. You rock. Appreciate your time and help.
Krish
-
4. Re: Dynamic data Integration trouble
Ned Murphy May 24, 2010 7:20 AM (in response to Kristtee)You're welcome Krish



