# Loop problem

**URL:** <https://forum.kirupa.com/t/loop-problem/81162>\
**Category:** flash\
**Created:** [February 28, 2005, 1:22pm UTC](https://forum.kirupa.com/t/loop-problem/81162 "2005-02-28T13:22:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmyo](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jimmyo](https://forum.kirupa.com/u/jimmyo)\
**Post date:** [February 28, 2005, 1:22pm UTC](https://forum.kirupa.com/t/loop-problem/81162/1 "2005-02-28T13:22:01Z")

</div>

Hi all.

This is my first post on this forum although I have found the site handy many a time. I apologise for the amateurish problem. I’m trying to make a loop that will, upon a mouse click reduce the alpha of a movie clip by a small amount on each enterFrame. Because of the large amount of movie clips all with differing target names, this script has to be attached to each of these.

onClipEvent (mouseUp) {  
var i = 5;  
while (i++\<10) {  
this.onEnterFrame = function() {  
this.\_alpha -= 3;

```
                       };

           }

```

}

```
 Please help guys, I’ve been on this for a long time now and it’s quite frustrating because I know it’s so simple. AAARRRGGG

     Thanks very much

```

Jim
