# Pause between scripts

**URL:** <https://forum.kirupa.com/t/pause-between-scripts/241678>\
**Category:** Uncategorized\
**Created:** [October 16, 2007, 11:12pm UTC](https://forum.kirupa.com/t/pause-between-scripts/241678 "2007-10-16T23:12:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![visualmonk](https://avatars.discourse-cdn.com/v4/letter/v/e495f1/32.png) [@visualmonk](https://forum.kirupa.com/u/visualmonk)\
**Post date:** [October 16, 2007, 11:12pm UTC](https://forum.kirupa.com/t/pause-between-scripts/241678/1 "2007-10-16T23:12:23Z")

</div>

Hey everyone,

I have 3 buttons and when each one is clicked, reveals a series of images in a collage type of look related to the button that is clicked. I’m using a class file (mc\_tween2) to animate the images in the collage and when one button has been clicked, the images are revealed. That all works. The collage effect works great but what im trying to do is when the images are revealed and another button is clicked, have the collage effect reverse, THEN have the new collage animate. Does that make sense. Both in and out transitions work but they happen at the same time. I want the outro animation to play then the intro animation. I’m doing all this with code and im not advanced so im stuck.

Here is the code for the transitions:  
function inno\_tiles\_fadein(){  
inno\_mc\_big.collage.alphaTo(100, 1, “easeOutExpo”, .25);  
inno\_mc\_big.inno\_copy.alphaTo(100, 2, “easeOutExpo”, 1);  
inno\_mc.inno\_txt.alphaTo(0, 1, “easeOutExpo”);  
inno\_mc.inno\_pic.alphaTo(0, 1, “easeOutExpo”);  
inno\_mc.inno\_mask.alphaTo(0, 1, “easeOutExpo”);  
inno\_tiles();  
inno\_mc.enabled = false;  
}  
function inno\_tiles(){  
for (i = 1; i \< 28; i++) {  
if(i \<= 5){  
inno\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(100, 4, “easeOutExpo”);  
inno\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(100, 4, “easeOutExpo”);  
}  
else if(i \>= 5){  
inno\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(100, 8, “easeOutExpo”);  
inno\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(100, 8, “easeOutExpo”);  
}  
else if(i \>= 10){  
inno\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(100, 12, “easeOutExpo”);  
inno\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(100, 12, “easeOutExpo”);  
}  
else if(i \>= 15){  
inno\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(100, 16, “easeOutExpo”);  
inno\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(100, 16, “easeOutExpo”);  
}  
else if(i \>= 20){  
inno\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(100, 20, “easeOutExpo”);  
inno\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(100, 20, “easeOutExpo”);  
}  
inno\_box\_big = false;  
};  
}

function inno\_expanded(){  
inno\_mc.slideTo(142, 272, .5, “easeOutExpo”);  
ent\_mc.slideTo(636, 260, .5, “easeOutExpo”);  
ent\_mc.enabled = true;  
prod\_serv\_mc.enabled = true;  
}

inno\_mc.onRelease = function(){  
inno\_tiles\_fadein();  
ent\_tiles\_fadeout();  
inno\_expanded();  
prod\_serv\_fadeout();  
}

This code returns the tiles back (outro)  
//return tiles to orignal state  
function ent\_tiles\_return(){  
for (i = 1; i \< 28; i++) {  
if(i \<= 5){  
ent\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(2, 2, “easeOutExpo”);  
ent\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(2, 2, “easeOutExpo”);  
}  
else if(i \>= 5){  
ent\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(2, 2, “easeOutExpo”);  
ent\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(2, 2, “easeOutExpo”);  
}  
else if(i \>= 10){  
ent\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(2, 2, “easeOutExpo”);  
ent\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(2, 2, “easeOutExpo”);  
}  
else if(i \>= 15){  
ent\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(2, 2, “easeOutExpo”);  
ent\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(2, 2, “easeOutExpo”);  
}  
else if(i \>= 20){  
ent\_mc\_big.collage[“clip” + i].clipMask.xScaleTo(2, 2, “easeOutExpo”);  
ent\_mc\_big.collage[“clip” + i].clipMask.yScaleTo(2, 2, “easeOutExpo”);  
}  
ent\_box\_big = false;  
};  
}

function ent\_tiles\_fadeout(){  
ent\_mc\_big.ent\_copy.alphaTo(0, 2, “easeOutExpo”);  
ent\_mc\_big.collage.alphaTo(0, 1, “easeOutExpo”);  
ent\_mc.ent\_txt.alphaTo(100, 1, “easeOutExpo”);  
ent\_mc.ent\_pic.alphaTo(100, 1, “easeOutExpo”);  
ent\_mc.ent\_mask.alphaTo(100, 1, “easeOutExpo”);  
ent\_mc.scaleTo(100, .5, “easeoutsine”);  
ent\_mc.ent\_txt.colorTo(0x000000);  
ent\_tiles\_return();  
}

Does any of this make sense?
