Share Posted March 9, 2013 Hello, I have a problem with TweenMax.killAll(). I have 2 swf. swf_parent and swf_child. I load swf_child in swf_parent. I have a function in my swf_child killing all tweens (delayed, tweens, etc). It works great. But the problem is that kill also the tweens of the swf_parent. And I don't want to do that. Can I launch a function in my swf_child killing only his own tweens but not the tweens of his parent ? Thank you ! Link to comment Share on other sites More sharing options...
Share Posted March 10, 2013 Hi and welcome to the GreenSock forums. In your child swf you can use TweenMax.killChildTweensOf(this); Attached is a CS5 example You will see that killChildTweensOf.fla (child swf) has this code: import com.greensock.*; TweenMax.to(yellow.blue, 3, {rotation:360}); TweenMax.to(green, 3, {y:300, alpha:0}); //kill both tweens after 1 second TweenLite.delayedCall(1, killTweens); function killTweens(){ TweenMax.killChildTweensOf(this); } killChildTweensParent is an fla that contains a red symbol animating. It loads the child swf. After 1 second all tweens of the blue and green symbol in the child swf will get killed. The red symbol in the parent will continue animating. killChildTweensOf_CS5.zip Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now