# Trying to understand updateAfterEvent()

**URL:** <https://forum.kirupa.com/t/trying-to-understand-updateafterevent/164377>\
**Category:** flash\
**Created:** [September 30, 2005, 5:12pm UTC](https://forum.kirupa.com/t/trying-to-understand-updateafterevent/164377 "2005-09-30T17:12:48Z")\
**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:** [September 30, 2005, 5:12pm UTC](https://forum.kirupa.com/t/trying-to-understand-updateafterevent/164377/1 "2005-09-30T17:12:48Z")

</div>

Hi Everybody,

I have the code below, with a function called by an Interval. I am trying to use the updateAfterEvent function, but I don’t know if I am doing it right. Could anyone please give some opinions about this.

Thanks a lot for your help.

```auto

volumeTimeReal_mc._alpha = 0;
//
function moving() {
	zoomedTable_mc._alpha = 0 - (0 - zoomedTable_mc._alpha) / 2;
	goodCurves_mc._alpha = 0 - (0 - goodCurves_mc._alpha) / 2;
	updateAfterEvent();
	if (zoomedTable_mc._alpha > 0 - 1 && zoomedTable_mc._alpha < 0 + 1 && goodCurves_mc._alpha > 0 - 1 && goodCurves_mc._alpha < 0 + 1) {
		zoomedTable_mc._alpha = 0;
		goodCurves_mc._alpha = 0;
		resultsTable_mc._y += (125 - resultsTable_mc._y) * 0.3;
		resultsTable_mc._xscale += (85 - resultsTable_mc._xscale) * 0.3;
		resultsTable_mc._yscale += (85 - resultsTable_mc._yscale) * 0.3;
		updateAfterEvent();
		if (resultsTable_mc._y > 125 - 1 && resultsTable_mc._y < 125 + 1) {
			resultsTable_mc.gotoAndStop("FET");
			volumeTimeReal_mc._alpha += 10;
			updateAfterEvent();
			if (volumeTimeReal_mc._alpha >= 100) {
				volumeTimeReal_mc._alpha = 100;
				clearInterval(intervalo);
			}
		}
	}
}
//
var intervalo = setInterval(moving, 50);

```
