# How to use tweenManager

**URL:** <https://phaser.discourse.group/t/how-to-use-tweenmanager/1040>\
**Category:** Phaser 3\
**Created:** [February 1, 2019, 5:38pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040 "2019-02-01T17:38:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jef](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jef](https://phaser.discourse.group/u/jef)\
**Post date:** [February 1, 2019, 5:38pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040/1 "2019-02-01T17:38:02Z")

</div>

Hi phaser’s guys,  
I need to delete a timeline and all its tweens but can’t find the way.  
I use javascript delete function to suppress my timeline, which is effectively deleted.  
`  
But it’s not the case for the tweens composing the timeline which are not deleted (which is logical I believe).  
Is there an easy way in phaser to recuperate these tweens in an array to delete them ?

I have given a look to the TweenManager class’s getAllTweens() function, but can’t find the way to use it.  
Thanks fo any help!

---

<div class="post-metadata">

**Author:** ![prob](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/prob/32/628_2.png) [@prob](https://phaser.discourse.group/u/prob)\
**Post date:** [February 1, 2019, 6:47pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040/2 "2019-02-01T18:47:54Z")

</div>

[this.yourTimeline.destroy();](https://github.com/photonstorm/phaser/tree/v3.14.0/src/tweens/Timeline.js#L846)

---

<div class="post-metadata">

**Author:** ![jef](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jef](https://phaser.discourse.group/u/jef)\
**Post date:** [February 1, 2019, 6:55pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040/3 "2019-02-01T18:55:58Z")

</div>

That doesn’t work. the tweens are still there. if I do a  
console.log(myscene.tweens.\_active)  
the tweens are listed

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [February 1, 2019, 9:57pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040/4 "2019-02-01T21:57:31Z")

</div>

It can take an update or two before all the removals are finished.

I doubt you need to do any of this yourself. If you stop a timeline or if the timeline completes on its own, the manager will eventually remove all of it.

---

<div class="post-metadata">

**Author:** ![jef](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jef](https://phaser.discourse.group/u/jef)\
**Post date:** [February 2, 2019, 3:03pm UTC](https://phaser.discourse.group/t/how-to-use-tweenmanager/1040/5 "2019-02-02T15:03:55Z")

</div>

Thanks for your answer. I am really sorry it was a stupid mistake : I had forgotten some other tweens. By the way I have a question. It seems that tweenManager class is an internal class : it means I suppose it is not desirable that one use those classes for an ordinary use. Do you know if it exists a list of those internal classes just to know where to look and for what in phaser’s API?
