# Simple issue: for-loop and buttons

**URL:** <https://forum.kirupa.com/t/simple-issue-for-loop-and-buttons/246503>\
**Category:** flash\
**Created:** [December 11, 2007, 6:58pm UTC](https://forum.kirupa.com/t/simple-issue-for-loop-and-buttons/246503 "2007-12-11T18:58:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tazboy](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tazboy](https://forum.kirupa.com/u/tazboy)\
**Post date:** [December 11, 2007, 6:58pm UTC](https://forum.kirupa.com/t/simple-issue-for-loop-and-buttons/246503/1 "2007-12-11T18:58:32Z")

</div>

Not sure what is up but I’m having problems with:

```auto
for (j=1; j<=7; j++){
    hour[j].pressed = false;
}

```

I want to set 7 buttons’ .pressed = false. I’m getting an ‘undefined’ trace.

The names of the mc’s are: hour1, hour2, etc…

Any ideas anyone? Thanks in advance.
