Share Posted September 8, 2013 Hello all... i had a couple questions about clear and kill methods: What is the difference between using clear(), versus one of the kill methods and/or clearProps? Is the clear() method faster, and just clears a timeline? ...versus using one of the kill methods, or clearProps on a individual basis? Also is clear() better than using killAll()? thanks ahead of time for any clarification? Link to comment Share on other sites More sharing options...
Share Posted September 9, 2013 clear() empties a timeline of all of its child tweens, timelines and delayedCalls. After a timeline is cleared, the timeline still exists and you can still add tweens to it. Once a timeline or tween is killed, it is immediately stopped and will be available for garbage collection after which point you will no longer be able to modify, control or access that tween. Individual tweens do not have a clear() method, only timelines. clearProps is just a flag that tells a specific tween to remove any or all inline styles that have been set on a DOM element by a tween. It doesn't really relate or compare to the clear() and kill() methods in any way. Hope this helps clear things up. 3 Link to comment Share on other sites More sharing options...
Author Share Posted September 9, 2013 Thanks for clarifying Carl.. much appreciated! 1 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