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.*;
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:
for(a=1;a<=number_of_clips;a++){
if(parent["clip"+a].alpha == 0){
do something here
}
else {
do something else here
}
}