# If \_alpha \>= 100 do this, if \_alpha \<=0 do this

**URL:** <https://forum.kirupa.com/t/if--alpha-100-do-this-if--alpha-0-do-this/102607>\
**Category:** Uncategorized\
**Created:** [February 25, 2004, 11:33am UTC](https://forum.kirupa.com/t/if--alpha-100-do-this-if--alpha-0-do-this/102607 "2004-02-25T11:33:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@matej](https://forum.kirupa.com/u/matej)\
**Post date:** [February 25, 2004, 11:33am UTC](https://forum.kirupa.com/t/if--alpha-100-do-this-if--alpha-0-do-this/102607/1 "2004-02-25T11:33:16Z")

</div>

Hi,

having a bit of a problem with a thingie in Flash mx 2004 I am doing.  
I have a movie clip (dnk) 7 (not key!)frames long, with 7 different objects (mc’s) inside, named dnk0-dnk6.

Then, on the mc (dnk) I have:

onClipEvent (enterFrame) {  
strDnk = “dnk”+(\_currentframe-1);  
alpha = getProperty(strDnk, \_alpha);

if (\_root.dnk.dnk0.\_alpha\<0) {  
alpha1 = alpha+10;  
} else {  
alpha1 = alpha-10;  
}

setProperty(strDnk, \_alpha, alpha1);  
gotoAndStop(nextFrame);  
}

So, the idea is, to have this mc’s (dnk0-dnk6) fading one after the other in a sequence. Which happens as it is supposed to, but what I am trying to do now, is reverse it. With no luck, as you can see from the top script

I was thinking about a solution in a way of telling when \_alpha is below 0, than the \_alpha would start to rise, until it reaches a hundred, then it would start to fall again.

Help? Have I complicated this beyond reason?

Thanks, matej
