Jump to content
Search Community

Finish a tweening with an equivalent for startAt

waza test
Moderator Tag

Recommended Posts

Hello,

is there an equivalent of startAt for endAt ?

For example :

TweenMax(instance,1,{x=300,onComplete:deleteFilter,onCompleteParams:[instance]});
function deleteFilter(p){
p.filters=[];
}

I would like the same result without using a function, something like :

TweenMax(instance,1,{x=300,endAt{filters:[]});

Thanks for help!

Link to comment
Share on other sites

endAt is already implied by the tween itself - you define all of the ending values anyway in the vars object. See what I mean? If you want to remove a filter that you're tweening, remember that all the filter tweens have a "remove" special property, so you can do this:

 

TweenMax.to(mc, 1, {blurFilter:{blurX:10, blurY:0, remove:true}});

 

And it will remove the BlurFilter at the end of the tween. Pretty useful. However, if you want to remove all filters after the tween (even ones you're not tweening), you would indeed need to use an onComplete like your example.

Link to comment
Share on other sites

Ok, I see, I didn't know this useful "remove" property but In my case I need remove the filter not when I tween the filter itself but from another action (like when x=300), so I will use the onComplete function.

Thanks for the fast answer !

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