PDA

View Full Version : Transition Effect



V1SHAL
02-14-2007, 03:29 PM
Hey all...

I'm working on a transition effect between pages on my soon-to-be-updated website.

i know how to do it in theory but in practice its not working at all. the transition is very simple, a simple scroll from top to bottom.

here is what i want to happen:

on the stage i have 2 movie clips (mc_1, mc_2). when i click a button, i'd like the content linked to that button to load in mc_2 but for the content that was already in mc_1 to stay there. then i'll just animate/tween the mc's to get the scroll effect (the actual effect isn't tricky).

the real trick is that when mc_2 loads and the animation completes, mc_2 now has to become mc_1 so that if another button is clicked, it will again load in the lower of the two mc's and animate.

hope i explained that right.

any help will be appreciated.

BLiZZaRD
02-14-2007, 09:38 PM
Complicated :D

If I understood you correctly you can make new var's

Let's say something like:



var mc1:number = 1;
var mc2:Number = 2;


Now that this is set, you can add something similar to the code below to your button:



on(release){
if (mc1==1 && mc2 == 2){
//do your animation code you already have to mc_1;
mc1 = 2;
mc2 = 1;
}
else if (mc1 == 2 && mc2 ==1){
//do the code to mc_2;
mc1 = 1;
mc2 = 2;
}
}


I haven't tested this, but I think you can see the idea.

V1SHAL
02-15-2007, 06:41 PM
thanks, i'll give it a try