Jump to content
Search Community

hide mc

list test
Moderator Tag

Recommended Posts

I'm trying to hide mc_2 until the mc_1 completes its tween then make it

invisible and make mc_2 visible then tween it so it gives the illusion that

they're (mc_1 mc_2) the same mc. I'm trying to find a work around to nesting a mc tween within

a mc tween.

 

//mc_1
TweenMax.fromTo(mc, 3, {blurFilter:{blurX:30, blurY:30, quality:3}}, {blurFilter:{blurX:0, blurY:0, quality:3}, ease:Quad.easeInOut, yoyo:true})
TweenMax.to(mc, 2, {scaleX:2, scaleY:2})

//mc_2 ?

Link to comment
Share on other sites

//start with mc2 invisible
mc2.visible = false;

//tween mc1
TweenLite.to(mc1, 1, {x:100, onComplete:showMC2})

//when mc1 is done this function will run
function showMC2(){

    //hide mc1
    mc1.visible=false;

   //show mc2
    mc2.visible=true;



   //tween mc2
    TweenLite.to(mc2, 1, {x:200});

}

 

 

in order for mc2 to be in the same position as mc1, you can either:

Create a tween for it that is the same as the first tween and just leave its visible =false;

 

or when the showMC2 function runs you can programmatically have mc2 have the same properties as mc1 such as

 

mc2.x = mc1.x

mc2.y = mc1.y

Link to comment
Share on other sites

How would go about nesting a tween within a tween. For example something scales up then ONLY part of the mc moves again not the entire mc that scaled up? I'm getting a bit of a snapping motion using visible=true. sure there is nicer way to do this?

Link to comment
Share on other sites

I got msg

Error: Cannot tween a null object.

I placed mc2 inside parent_mc.

and wrote

 

TweenLite.to(parent_mc, 1, {y:200});

TweenLite.to(parent_mc.mc2, 1, {scaleX:2, scaleY:2, delay:1});

 

mc2 isn't responding?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...