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?