# 2 Different ways to fade in a MC with AS (1 of them is not working...)

**URL:** <https://forum.kirupa.com/t/2-different-ways-to-fade-in-a-mc-with-as-1-of-them-is-not-working/150594>\
**Category:** flash\
**Created:** [June 9, 2005, 1:41am UTC](https://forum.kirupa.com/t/2-different-ways-to-fade-in-a-mc-with-as-1-of-them-is-not-working/150594 "2005-06-09T01:41:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manare](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Manare](https://forum.kirupa.com/u/Manare)\
**Post date:** [June 9, 2005, 1:41am UTC](https://forum.kirupa.com/t/2-different-ways-to-fade-in-a-mc-with-as-1-of-them-is-not-working/150594/1 "2005-06-09T01:41:46Z")

</div>

Hi!  
This should be very simple: I want to fade-in a Movieclip (called MC1) using Actionscript.  
I normally use this (and it works just fine):

[AS]  
this.MC1.\_alpha = 0;  
this.MC1.onEnterFrame = function()  
{  
if (MC1.\_alpha \<100) {  
trace(MC1.\_alpha);  
MC1.\_alpha +=5;  
}  
};  
[/AS]

However, this time I need to do it without using a function, so I’ve tried the following:  
[AS]  
this.MC1.\_alpha = 0;  
while (MC1.\_alpha \<100) {  
trace(MC1.\_alpha);  
MC1.\_alpha +=5;  
}  
[/AS]  
Well, even though I can see the alpha values decreasing step by step (throughout the “trace” instruction), the fact is that the MC does not fade-in at all, it’s just starts at a 100% alpha value.  
How comes this illogical behaviour? The instruction “trace” shows what it should do, but Flash does not fade it in.  
How can I do then what I want?

…this AScript is killing me…!

Thanks for reading,  
Manare
