Jump to content
Search Community

Can a killed tween still trigger onComplete?

Rabies test
Moderator Tag

Recommended Posts

I've got a tween that looks like this:

 

TweenLite.to(this, 0.4, {_x:dx, _y:dy, ease:Expo.easeOut, onComplete:completeTileReturn, onCompleteParams:[this.sourceTile]});

 

I had an issue where if this tween wasnt completed yet, and a StartDrag was attempted on the clip, the position of it would be way off. So the solution was to do this first:

 

TweenLite.killTweensOf(_parent._parent.PLAYTILE);

 

Works great except that the onComplete does not get triggered, so I have essentially traded one bug for another.

 

Is there any way to force the onComplete and params?

Link to comment
Share on other sites

PS: I KNOW we had this discussion already, but when I search for all my past posts, NOTHING shows up. Therefore, I was forced to waste your time again...

 

(Why did you hide your old forum? You could have simply locked it, but leave it searchable for legacy support).

Link to comment
Share on other sites

I'm confused on several fronts:

 

1) I tested the AS2 code and it worked perfectly. Here's an example:

 

TweenLite.to(mc, 2, {_y:0, onComplete:onFinishTween});
TweenLite.delayedCall(1, kill);
function kill():Void {
TweenLite.killTweensOf(mc1, true);
}
function onFinishTween():Void {
trace("Tween Finished!");
}

 

2) I didn't "hide" any old forum - this is the same forum it has always been.

 

I'm not sure why it's not working for you, but I suspect your code was incorrect (maybe the _parent._parent.PLAYTILE was the wrong path?) If you're still having trouble, please post an example FLA that demonstrates the issue.

Link to comment
Share on other sites

I'm confused on several fronts:

2) I didn't "hide" any old forum - this is the same forum it has always been.

Re Forum:

I thought you archived or deleted older forum posts, because when I search for posts under my user name, only these two 2010 threads come up. There is something wrong with your forum Search. Under my user profile it says I have 33 posts:

 

Total posts: 33 | Search user’s posts

 

However when I click Search User's Posts or I click "view your posts", nothing older than 2010 shows up in the results.

 

 

Re Tween kill completion:

I will go explore your examples above now. Note that the _parent._parent. targetting was working fine. The tween DOES get killed. However the function and parameters do not trigger. I will do a test, as I suspect the tween is "looking" for the functions to complete in the wrong place.

Link to comment
Share on other sites

I'm sorry to be a pain, but your example above does not work. It kills the tween and does not trigger the complete function.

I have attached my FLA. The version in TweenLite.as says:

 

VERSION: 10.092

DATE: 3/31/2009

 

I guess I'll just try to upgrade to 11.

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