/ Published in: ActionScript 3
///////////////////////////////////////////////////////////////////////////////////////////
XML USED IN EXAMPLE:
This is the copy that goes in the description text
XML USED IN EXAMPLE:
This is the copy that goes in the description text
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var Loader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); Loader.load(new URLRequest("xml/start.xml")); Loader.addEventListener(Event.COMPLETE, LoadXML1); function LoadXML1(e:Event) { xmlData = new XML(e.target.data); }; function steveClick(evt:MouseEvent):void // Mouse click to get xml info { loadText("Steven Williams"); }; function loadText(textLoad) { var testimonialList:XMLList = xmlData.question.(@Title == textLoad).description; TestimonialsMain_mc.txtText.text = testimonialList; };