How do I pause SpriteHelper Animations when using storyboard?

Hell all.

I am working on a game using Storyboard. I have two scenes. A menu( start the game scene ) and one level.

In level one I have an exit button that does the following:

 

function exitButton:tap(e) storyboard.gotoScene("menu",{ effect = "slideDown", -- transition effect to implement time = 250,-- duration of the transition effect in milliseconds audio.fade(), }); storyboard.purgeScene("level"); end exitButton:addEventListener("tap",exitButton);

This works fine but in my terminal I am getting the error:
 

hermit_v1.8/SpriteHelper/Nodes/LHAnimationNode.lua:236: attempt to call method ‘setFrame’ (a nil value)

stack traceback:

I think what is happening is the animation is still running? I have tried various things and can not get the error figured out.

Does anyone have any idea on what I am not doing correctly? Thanks.

-Will

try to move the purgeScene into exitScene instead
guess that will do the trick :slight_smile:
you can´t purge it in the middle of a function before you have left the scene

Thanks Hendrix. I ended up using storyboard.removeAll() on the scene:enterScene of my menu and it worked like a charm. Thanks for the help and support!

try to move the purgeScene into exitScene instead
guess that will do the trick :slight_smile:
you can´t purge it in the middle of a function before you have left the scene

Thanks Hendrix. I ended up using storyboard.removeAll() on the scene:enterScene of my menu and it worked like a charm. Thanks for the help and support!