# Dynamic onRelease not registering

**URL:** <https://forum.kirupa.com/t/dynamic-onrelease-not-registering/202229>\
**Category:** Uncategorized\
**Created:** [September 28, 2006, 9:36pm UTC](https://forum.kirupa.com/t/dynamic-onrelease-not-registering/202229 "2006-09-28T21:36:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![celestial](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@celestial](https://forum.kirupa.com/u/celestial)\
**Post date:** [September 28, 2006, 9:36pm UTC](https://forum.kirupa.com/t/dynamic-onrelease-not-registering/202229/1 "2006-09-28T21:36:44Z")

</div>

so i’m making a dynamic menu that reads off an xml for thumbnails, etc.  
so far i haven’t had any problems building this interface.

so far the movieclips get created and load the jpgs all correctly but i [COLOR=Red]cannot get them to recognize their onrelease function.[/COLOR]

this method is called from its parent timeline.

```auto
function buildNav(secSize:Number, boxes:Array) {
    sep = 10;
    //back = secSize -1;
    trace(secSize+" and "+boxes);
    
    for (i=0; i<secSize; i++) {
        this.createEmptyMovieClip("box"+i, this.getNextHighestDepth());
        eval("box"+i).loadMovie(boxes*);
        eval("box"+i)._x = sep;
        temp = 109;
        //trace(temp);
        sep = sep+temp+10;
        //trace(sep);
        //back = back-1
        this["box"+i].cur = i;
        trace("box curs are : "+this["box"+i].cur);
        this["box"+i].onRelease = function() {
            t = this.cur;
            //_parent.display(t, 0);
            trace("clicked "+t);
        }
    }
}

```

:block:
