# For() code with multiple symbols

**URL:** <https://forum.kirupa.com/t/for-code-with-multiple-symbols/279370>\
**Category:** Uncategorized\
**Created:** [January 14, 2009, 12:20am UTC](https://forum.kirupa.com/t/for-code-with-multiple-symbols/279370 "2009-01-14T00:20:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hausnfranz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hausnfranz/32/2427_2.png) [@Hausnfranz](https://forum.kirupa.com/u/Hausnfranz)\
**Post date:** [January 14, 2009, 12:20am UTC](https://forum.kirupa.com/t/for-code-with-multiple-symbols/279370/1 "2009-01-14T00:20:14Z")

</div>

I am trying to shorten the code needed to be written for mcs on the stage. I followed the Help article about for() but i get an error saying “Access of undefined property nav.”

Any thoughts?

```auto

var i = 1

for (i=1; i<5; ++i) {
     nav+*.addEventListener(
          MouseEvent.MOUSE_UP,
          function(evt:MouseEvent):void {
        trace("I've been clicked!");
  }
);

}

```
