# Accessing values from dynamic objects problem

**URL:** <https://forum.kirupa.com/t/accessing-values-from-dynamic-objects-problem/241114>\
**Category:** Uncategorized\
**Created:** [October 10, 2007, 4:35am UTC](https://forum.kirupa.com/t/accessing-values-from-dynamic-objects-problem/241114 "2007-10-10T04:35:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zubin101](https://avatars.discourse-cdn.com/v4/letter/z/51bf81/32.png) [@zubin101](https://forum.kirupa.com/u/zubin101)\
**Post date:** [October 10, 2007, 4:35am UTC](https://forum.kirupa.com/t/accessing-values-from-dynamic-objects-problem/241114/1 "2007-10-10T04:35:31Z")

</div>

I have a loop which creates dynamic objects from a class (MenuBulletClass) and adds it into my container (menu\_select\_list\_container:MovieClip). I’m having problems getting properties/variables back from a specific object for example below.

```php

   for (i=0; i < 8; i++) {
    var menuBulletObject:MenuBulletClass = new MenuBulletClass();
    menuBulletObject.name = "bullet" + i;
    menuBulletObject.xml_selection = i;
    menu_select_list_container.addChild(menuBulletObject);
   }
 
   trace(menu_select_list_container.getChildByName("bullet1").xml_selection);   

```

It throws a “1119: Access of possibly undefined property xml\_selection through a reference with static type flash.display:DisplayObject.” error. I’m really stumped on this and the answer will probably be laughable. Anyone? Thanks!
