# Loading XML into popup

**URL:** <https://forum.kirupa.com/t/loading-xml-into-popup/297635>\
**Category:** flash\
**Created:** [October 6, 2009, 9:59am UTC](https://forum.kirupa.com/t/loading-xml-into-popup/297635 "2009-10-06T09:59:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donlimpio](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@donlimpio](https://forum.kirupa.com/u/donlimpio)\
**Post date:** [October 6, 2009, 9:59am UTC](https://forum.kirupa.com/t/loading-xml-into-popup/297635/1 "2009-10-06T09:59:41Z")

</div>

Hi guys!  
I’m new in this forum e above all I’m new in Flash, Actionscript and XML… ☹  
I have a “very” need of your help!!!  
This is my problem: I realized a layout with flash cs4, actionscript 2.0. This layout load external SWFs. In this layout I created a movie clip called btnTesto which opens a popup and this popup load a file XML containing the text of the different SWFs.  
The problem is that when I “navigate” the SWFs, the content of the popup is always the same…practically, it doesn’t read the whole XML…

This is the file XML:

\*\<?xml version=“1.0”?\>  
\<audio\>  
\<testo\_wbt\> \*  
_\<wbt1 testo = “Benvenuti nel corso Modello di Organizzazione e Gestione.” /\>_  
_\<wbt2 testo = “In tabella vengono presentate le caratteristiche del corso: titolo, durata, struttura e target al quale viene rivolto.” /\>  
\</testo\_wbt\>  
\</audio\>_

This is the code Actionscript I wrote (from a Kirupa document!!):

_function loadXML(loaded) {  
if (loaded) {  
\_root.audio = this.firstChild.firstChild.childNodes[0].firstChild.nodeValue;  
testo\_txt.text = \_root.audio;  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“testo\_audio.xml”);_

Thank you very much for help!!! 🙂
