# Adding to an array

**URL:** <https://forum.kirupa.com/t/adding-to-an-array/242128>\
**Category:** Uncategorized\
**Created:** [October 22, 2007, 8:29pm UTC](https://forum.kirupa.com/t/adding-to-an-array/242128 "2007-10-22T20:29:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fathed](https://avatars.discourse-cdn.com/v4/letter/f/b5ac83/32.png) [@fathed](https://forum.kirupa.com/u/fathed)\
**Post date:** [October 22, 2007, 8:29pm UTC](https://forum.kirupa.com/t/adding-to-an-array/242128/1 "2007-10-22T20:29:38Z")

</div>

[FONT=Times New Roman][SIZE=3]I can’t figure this out. I have an XML document that I want to use to add a changeable list. When you click on the button I want the first list to disappear and the new one to be put in its place.[/SIZE][/FONT]  
[FONT=Times New Roman][/FONT]  
[FONT=Times New Roman][SIZE=3]This is the XML:[/SIZE][/FONT]

```php

<?xml version="1.0" ?>
<presentation skin="skin2.png">
<modules>
 
<module type="Introduction">
<title>This is experimental and I am so getting it!</title>
<bullets >
<bullet>bullet 1</bullet>
<bullet>bullet 2</bullet>
<bullet>bullet 3</bullet>
<bullet>bullet 4</bullet>
<bullet>bullet 5</bullet>
<bullet>bullet 6</bullet>
</bullets>
</module>
<module type="Introduction">
<title>text 2 in da hizzy</title>
<bullets >
<bullet>second tier</bullet>
<bullet>second tier</bullet>
<bullet>second tier</bullet>
<bullet>second tier</bullet>
<bullet>second tier</bullet>
<bullet>second tier</bullet>
</bullets>
</module>
 
<module type="Introduction">
<title>text 2 in da hizzy</title>
<bullets >
<bullet>third tier</bullet>
<bullet>third tier</bullet>
<bullet>third tier</bullet>
<bullet>third tier</bullet>
<bullet>third tier</bullet>
<bullet>third tier</bullet>
<bullet>third tier</bullet>
</bullets>
</module>
 
</modules>
</presentation>

```

[FONT=Times New Roman][/FONT]  
[FONT=Times New Roman][SIZE=3]This is the as:[/SIZE][/FONT]  
[FONT=Times New Roman][/FONT]

```php

var nodes:Array = new Array();
var bulletPlace:Array = new Array();
var pound:Array = new Array();
var j:Number = 0;
/////////
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function() {
 ///parent node
 nodes = this.firstChild;
 bulletPlace = nodes.firstChild.firstChild.childNodes[1].childNodes;
 for (j=0; j<bulletPlace.length; j++) {
  pound[j] = attachMovie("bulletedText", "clip"+j+"_mc", j, {_y:(j*30), _x:20});
  pound[j].listerTxt.text = bulletPlace[j].childNodes;
  pound[j].listerTxt.autoSize = "left";
 }
};
my_xml.load("lesson2.xml");
////////////////////
rv.onRelease = function() {
 //what am I missing?
};
///////////////////  
fw.onRelease = function() {
 //what am I missing?
};

```

[FONT=Times New Roman][SIZE=3]As you can see I have one node called “bullets” in each of the three nodes called “module”. I want to have the first set of bullets placed in dynamically created clips on the stage and when I press the next button I want that list to be replaced with the next one. [/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]I have attached the fla and xml.[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3]I have been banging my head against the wall with this for a while now. Any help at all would be greatly appreciated! [/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]Thank you.[/SIZE][/FONT]
