# Changing alpha in a while/for loop

**URL:** https://forum.kirupa.com/t/changing-alpha-in-a-while-for-loop/109237
**Category:** Uncategorized
**Created:** [May 3, 2004, 5:38pm UTC](https://forum.kirupa.com/t/changing-alpha-in-a-while-for-loop/109237 "2004-05-03T17:38:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kristopher](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kristopher/32/501_2.png) [@Kristopher](https://forum.kirupa.com/u/Kristopher)
#### Post date: [May 3, 2004, 5:38pm UTC](https://forum.kirupa.com/t/changing-alpha-in-a-while-for-loop/109237/1 "2004-05-03T17:38:04Z")

</div>

i’m trying to get it so a MC1 on top of MC2 slowly fades in. It starts with alpha of 0 and i put it in a while loop (on MC1):

onClipEvent(load) {  
this.\_alpha = 0;  
var i = 0;  
do {  
this.\_alpha += 1;  
} while (i \< 100);  
}

it says that the script contains no erros, but when i try to test it, i get the error:

“A script in this movie is causing Flash player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?”

What do I do?
