Jump to content
Search Community

eware3000

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by eware3000

  1. Hi, I just started using TweenMax today. I have a question about tweening multiple objects, not sure if I'm going about this the best way. Objects A, B, C are on the stage in order and scaled accordingly (100%, 60% and 40%) eg. 1st place =A at 100%, 2nd place= B at 60%, 3rd place =C at 40% When you click B. The order need to change in a tween to this --> B, C, A. When you click C. The order need to change in a tween to this --> C, A, B. You can click A, B, or C at any time and change the order/focus. Here's my code: 3 if statements that check to see where the object is positioned (in 1st plae, 2nd or 3rd.) // ActionScript Document if(productC._x > 250){ trace ("hello"); //TweenMax.to(productA, 1, {_x:140, _y:75, _xscale:60, _yscale:60}); //to 2 TweenMax.to(productB, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productA, 1, { _alpha:0}); //to invisible TweenMax.to(productA, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100}); //to 3 TweenMax.to(productB, 1, { _alpha:0}); //to invisible\ TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 //TweenMax.to(productB, 1, {_x:-116, _y:154, _xscale:40, _yscale:40, _alpha:0 ,delay:2, overwrite:1}); //to down and out } //TweenMax.to(productB, 1, { _alpha:0}); //to invisible //TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 if(productC._x = 140){ trace ("yo_140"); TweenMax.to(productC, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productB, 1, { _alpha:0}); //to invisible productB._x = 350; productB._y = 90; productB._xscale = 40; productB._yscale = 40; productB._alpha=100; TweenMax.to(productA, 1, {_x:140, _y:75, _xscale:60, _yscale:60, _alpha:100}); //to 2 TweenMax.to(productB, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100, timeScale : 0.5 }); //to 3 } if(productC._x < 0){ trace ("yo_0"); TweenMax.to(productC, 1, { _alpha:0}); //to invisible TweenMax.to(productA, 1, {_x:-13, _y:40, _xscale:100, _yscale:100}); //to 1 TweenMax.to(productB, 1, {_x:140, _y:75, _xscale:40, _yscale:40, _alpha:100}); //to 2 TweenMax.to(productC, 1, {_x:268, _y:90, _xscale:40, _yscale:40, _alpha:100}); //to 3 } Any help/direction would be greatly appreciated.
×
×
  • Create New...