How do you load and unload screens correctly with Sprite Deck?

Hi!

I’m just having problems with changing screens/levels, I can add screens but the old ones are still there just hidden by the new one.
I don’t know how to end functions inside a level when the level is completed.
I have been using Sprite Deck in my project and I can load new screens but don’t know how to unload them.
I’m not very familiar with Sprite Deck in general. So the question is how do you do it with or without Sprite Deck?

Thanks in advance!
[import]uid: 70979 topic_id: 11817 reply_id: 311817[/import]

I know that Sprite Deck uses Director Class but I don’t really know how to make my code work with the code Sprite Deck generates. [import]uid: 70979 topic_id: 11817 reply_id: 43048[/import]