# Interval problem

**URL:** <https://forum.kirupa.com/t/interval-problem/168800>\
**Category:** flash\
**Created:** [November 10, 2005, 3:52am UTC](https://forum.kirupa.com/t/interval-problem/168800 "2005-11-10T03:52:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CayoHueso](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CayoHueso](https://forum.kirupa.com/u/CayoHueso)\
**Post date:** [November 10, 2005, 3:52am UTC](https://forum.kirupa.com/t/interval-problem/168800/1 "2005-11-10T03:52:31Z")

</div>

Hi everybody, I have the code below, to create a fading in of a movieclip.  
I used a trace action, to check the value of the alpha property. The problem is that the traced number never gets to 100, so the Interval is never cleared.

Can anyone help me figure out how to solve this?  
Thanks a lot

```auto

dada_mc._alpha=0;
function action () {
	dada_mc._alpha = 100 - (100 - dada_mc._alpha) / 1.1;
	trace(dada_mc._alpha)
	if (dada_mc._alpha > 100 - 1 && dada_mc._alpha < 100 + 1){
		dada_mc._alpha = 100;
		clearInterval (actionInt);
	}
	updateAfterEvent ();
}
_root.onMouseUp = function () {
	actionInt = setInterval (action, 5);
};

```
