# My script is making my movie clip to run slow

**URL:** <https://forum.kirupa.com/t/my-script-is-making-my-movie-clip-to-run-slow/208458>\
**Category:** Uncategorized\
**Created:** [November 28, 2006, 11:30pm UTC](https://forum.kirupa.com/t/my-script-is-making-my-movie-clip-to-run-slow/208458 "2006-11-28T23:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [November 28, 2006, 11:30pm UTC](https://forum.kirupa.com/t/my-script-is-making-my-movie-clip-to-run-slow/208458/1 "2006-11-28T23:30:08Z")

</div>

Hi there.  
While trying a new way to do things. I got a message -quite ugly- saying that “my script was making my movie clip to run slow and that might affect my computer and bla bla bla”

I have to create 19000 little squares. I tried first by creating one by one but at number mc\_b\_3000 i got more then tired and decided to look for a better way.  
I know that i have a quite “small” loop, but how could i avoid the ugly message when my users see the movie?

here is the code:

```auto

for (i = 1; i < 19001; i++) 
   {
   duplicateMovieClip(mc_b_e, "mc_b_g_" + i, _root.getNextHighestDepth());
   }
   
   p=1;
   i=0;
   j =0;
   p_x = 31;
   p_y = 99;
   while ( j < 201) 
   {
    if(i == 95) 
    {
     i=0;
     j++;
     p_y= p_y+10;
     p_x =31;
    }
    p_x = p_x+10;
    _root["mc_b_g_" + p]._x = p_x;
    _root["mc_b_g_" + p]._y = p_y;
    i++;
    p++;
}

```
