# AttachMovie and Space Limit

**URL:** https://forum.kirupa.com/t/attachmovie-and-space-limit/69249
**Category:** flash
**Created:** [November 2, 2004, 7:40pm UTC](https://forum.kirupa.com/t/attachmovie-and-space-limit/69249 "2004-11-02T19:40:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDKS](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@NeoDKS](https://forum.kirupa.com/u/NeoDKS)
#### Post date: [November 2, 2004, 7:40pm UTC](https://forum.kirupa.com/t/attachmovie-and-space-limit/69249/1 "2004-11-02T19:40:32Z")

</div>

hiiiiiiii,

I would like to create a grade where it contained 31 objects, however when one of these objects pass for the defined limit it was directed for the side and continued the grade. This is the code that I am using to distribute objects, but when it pass to the limit the \_y keep on the same value:

```php
this.onEnterFrame = function() {
  	for (i=0; i<32; i++) {
  		this.attachMovie("box", "box"+i, i);
  		box = this["box"+i];
  		box._y += 75*i;
  		if (box._y>=400) {
  			box._x = 400;
  			box._y = 70*i;
  		}
  	}
  };
  
    

```
