# As3 Array

**URL:** <https://forum.kirupa.com/t/as3-array/296717>\
**Category:** Uncategorized\
**Created:** [September 18, 2009, 8:58pm UTC](https://forum.kirupa.com/t/as3-array/296717 "2009-09-18T20:58:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surf](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@surf](https://forum.kirupa.com/u/surf)\
**Post date:** [September 18, 2009, 8:58pm UTC](https://forum.kirupa.com/t/as3-array/296717/1 "2009-09-18T20:58:06Z")

</div>

Hi… i m bit stuck…

i have this code

```auto

    private function complete (e : Event) : void
        {
            var xml : XML = new XML(e.target.data);
            XML.ignoreWhitespace = true;
            obArray = new Array()

            var list : XMLList = xml.menu;
            
            
            ob = new Object();
            for(var i : int = 0;i < list.length(); i++)
            {    
                ob.name = list*.name;
                ob.contents = list*.contents;
                obArray.push(ob);
                trace("1: ",obArray*.name);
            }
        }

```

the above contents traces  
1: Home  
1: About  
1: Our Services  
1: How We Work  
1: portfolio  
1: news  
1: Contact

and then i try to call it by

```auto

private function clickHome (e : MouseEvent) : void
        {

            for (var i : int = 0;i < obArray.length; i++) {
                trace(obArray*.name);
                
            }
        
        }

```

and the following happens

Contact  
Contact  
Contact  
Contact  
Contact  
Contact  
Contact

but im refering to the same array…
