list Posted February 17, 2011 Share Posted February 17, 2011 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 More sharing options...
Carl Posted February 17, 2011 Share Posted February 17, 2011 //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 More sharing options...
list Posted February 18, 2011 Author Share Posted February 18, 2011 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 More sharing options...
Carl Posted February 18, 2011 Share Posted February 18, 2011 Tweens don't nest. you can nest multiple movieclips inside a parent movieclip and tween each child independently. TweenLite.to(parent_mc, 1, {y:200}); TweenLite.to(parent_mc.mc2, 1, {scaleX:2, scaleY:2, delay:1}); Link to comment Share on other sites More sharing options...
list Posted February 18, 2011 Author Share Posted February 18, 2011 I meant mc rather than tween. Ok, I'll try parenting. Thanks for the start. Link to comment Share on other sites More sharing options...
list Posted February 18, 2011 Author Share Posted February 18, 2011 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 More sharing options...
list Posted February 18, 2011 Author Share Posted February 18, 2011 Never mind, everything is working. Instance was not named. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now