Jump to content


Concurrent tweens

Recommended Posts

I am trying to create a carousel like motion. I have a MC which position moves through bezier points, then i am trying to scale it to give an idea of perspective, using a tween with a yoyo. As follow:

TweenPlugin.activate([BezierPlugin, BezierThroughPlugin]);
         {bezierThrough:[{x:mainCircle.circle.c2.x+ mainCircle.x,y:mainCircle.circle.c2.y+ mainCircle.y },
						 {x:mainCircle.circle.c3.x+ mainCircle.x,y:mainCircle.circle.c3.y+ mainCircle.y }, 
						 {x:mainCircle.circle.c4.x+ mainCircle.x,y:mainCircle.circle.c4.y+ mainCircle.y }, 
						 {x:mainCircle.circle.c1.x+ mainCircle.x,y:mainCircle.circle.c1.y+ mainCircle.y }], 

         roundTime/2, {scaleX: 2,scaleY: 2,
		repeat: 1, yoyo:true,

The second tween waits until the first one completes to repeat, how could i handle this?

Link to comment
Share on other sites

Are you saying you want things to play exactly like they do now except that the 2nd tween waits to repeat until the first tween is done? If so, you can simply add a repeatDelay, like repeatDelay:roundTime/2.


If, on the other hand, you're saying you want the 2nd tween to wait until the first one finishes, you can simply add a delay to the 2nd tween, like delay:roundTime. Or you could use a TimelineLite or TimelineMax to sequence things and control a bunch of tweens as a whole. 

Link to comment
Share on other sites

I meant to start a both tween at once, but the scaling tween being half the duration of the positioning tween, would repeat half way through the latter, scaling back to its original size - giving the illusion of perpective.


Both tweens initiatem but the repeat doesnt start until they both complete.

Link to comment
Share on other sites

Did you try the repeatDelay? Is that the effect you're after? 

Link to comment
Share on other sites

I am trying to create a carousel-like movement, with my MovieClip following a circle in space. i ll post a link later - i accoomplished this another way -



mc >> Tween.to(position, TimefortheRound, throught the bezier points); //circular movement

mc >>Tween.to(biggerScale, TimefortheRound/2, repeat and yoyo); //faking perspective "moving forward and back"


mc positioin is tweened and the scale increases, but when the the scaling tween is completed, it waits for the position tweens to end to repeat/reverse .. I may have missed something, or i am using the wronf poperties -the code is the above post.

Link to comment
Share on other sites

I read your post a few times and I'm still not sure what you're asking. If you still need help, would you mind providing a very simple FLA that we can publish to see exactly what you're talking about (zip it first)? The simpler the better. And maybe restate the question in a different way? I want to help, I'm just not sure how. 

Link to comment
Share on other sites

i have re created the file, I think it was the tweening that was giving an "effect" of delay, all fine  here is the code:

import com.greensock.TweenMax;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.BezierThroughPlugin;
import com.greensock.easing.*;
TweenPlugin.activate([BezierThroughPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.

TweenMax.to(mc, 4, {bezierThrough:[{x:250, y:80}, {x:100, y:150}, {x:250, y:200}, {x:400, y:150},{x:250, y:80} ], ease:Linear.easeNone});
TweenMax.to(mc, 2, { scaleX: 4, scaleY: 4, repeat:1, yoyo:true,  ease:Linear.easeNone });

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.