# Check to see if all funtions have completed

**URL:** <https://forum.kirupa.com/t/check-to-see-if-all-funtions-have-completed/277661>\
**Category:** Uncategorized\
**Created:** [December 15, 2008, 4:10pm UTC](https://forum.kirupa.com/t/check-to-see-if-all-funtions-have-completed/277661 "2008-12-15T16:10:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)\
**Post date:** [December 15, 2008, 4:10pm UTC](https://forum.kirupa.com/t/check-to-see-if-all-funtions-have-completed/277661/1 "2008-12-15T16:10:02Z")

</div>

I need to check and see if all functions in a movie have been completed, so that I can jump to another function, but only when all of the previous functions have fired. The functions are all the same just on different movieClips. I have posted my code below, and if there is an easier way to accomplish this I would appreciate the insight… Any thoughts?

Thanks again…

import fl.transitions.Tween;  
import fl.transitions.easing.\*;

```auto
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkClips);
stage.addEventListener(MouseEvent.MOUSE_UP, removeCheckClips);

function checkClips(e:MouseEvent) {
	clip1.addEventListener(MouseEvent.MOUSE_OVER, doSomething);
}

function doSomething(e:Event) {
	clip1.alpha = 0;
}

function removeCheckClips(e:Event) {
	clip1.removeEventListener(MouseEvent.MOUSE_OVER, doSomething);
}

stage.addEventListener(MouseEvent.MOUSE_DOWN, checkClips2);
stage.addEventListener(MouseEvent.MOUSE_UP, removeCheckClips2);

function checkClips2(e:MouseEvent) {
	clip2.addEventListener(MouseEvent.MOUSE_OVER, doSomething2);
}

function doSomething2(e:Event) {
	clip2.alpha = 0;
}

function removeCheckClips2(e:Event) {
	clip2.removeEventListener(MouseEvent.MOUSE_OVER, doSomething2);
}

```

I have this function with different variables set for about 15 movie clips, and I need to run a different function once all of this has completed…

I have this snippet of code but not sure how to implement it all:

```auto
for(a=1;a<=number_of_clips;a++){
if(parent["clip"+a].alpha == 0){
   do something here
}
else {
   do something else here
}
}

```
