Jump to content
Search Community

Tweens with operlapping properties [SOLVED]

Martin test
Moderator Tag

Recommended Posts

Thanks for TweenLite/Max. Easy of use and very useful.

 

I just test it for a little project and having now the problem with operlapping tweens, what you described in the examples: "...., but you need to be careful not to create any tweens with overlapping properties, otherwise they'll conflict with each other."

My question: Is there a way to handle this?

I have little textboxes, which are moving down each time a new one appears. (Similar to the Twittertimeline.)

The movement is made by TweenLite. Sometimes the appearance of the boxes is quicker than the duration of the tween.

I don´t like to change the duration, and I cannot influence the appearance of the boxes.

 

Thanks and

Ciao Martin

Link to comment
Share on other sites

Thanks for quick answer.

I think I should have said, that I don´t want to overwrite tweens, because they all need to be done.

The tween repeats everytime, when a new box appears.

 

TweenLite.to(box, 0.5, { y:box.y + 100} );

 

Sometimes the next tween starts within the duration of 0.5. So I´d like to set NONE with the OverwriteManager, but having the problem that it seems not possible with overlapping properties.

 

Ciao Martin

Link to comment
Share on other sites

I'm confused - you want to allow multiple tweens to control the same property of the same object?

 

Maybe you're wanting to use a variable to track the destination y value and always append amounts to that variable on the new tweens. In other words, if every time I click a button, it should tween down 10 pixels, and I click 5 times really fast, you want the last tween to make it move down 50 pixels total (from where it was at the beginning). If that's the case, use a variable. Kinda like this:

 

var destinationY:Number = mc.y; //current position.
function clickHandler(e:MouseEvent):void {
   destinationY += 10;
   TweenLite.to(mc, 1, {y:destinationY, overwrite:true});
}

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...