I am trying to create somenthing like this, I have mine MC with my dynamic text, I want that it only goes duplicating when I will be moving in the .xml file, looks at what I have so far, it it duplicates the MC and only it shows only 1 text from my .xml file.
AS
var meuXML:XML = new XML ();
meuXML.ignoreWhite = true;
var mostrarTexto = 0;
nomeProduto = [];
meuXML.onLoad = function (okay) {
if (okay) {
var rootConteudo:XMLNode = this.firstChild;
for (var i = 0; i < rootConteudo.childNodes.length; i++) {
nomeProduto* = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
}
mostrarTudo ();
}
};
meuXML.load ("produtos2.xml");
//
function mostrarTudo () {
duplicateMovieClip ("nomeProduto_mc", "nomeProdutos_mc", this.getNextHighestDepth ());
nomeProdutos_mc._x = 0;
nomeProdutos_mc._y = 0;
nomeProduto_mc.nomeProduto_txt.text = nomeProduto[mostrarTexto];
}
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<conteudo>
<dados>
<nomeProduto>Produto nº 1</nomeProduto>
</dados>
<dados>
<nomeProduto>Produto nº 2</nomeProduto>
</dados>
</conteudo>
Thanks, and sorry about my English.