Storyboard. Persitent State of Image Visibility.

Hi all.

I’ve decided to get rid of a few bad habits and drop the way I use globals, in fact, I’m not going to use them at all anymore.

I’ve been having a play around with the ‘storyboard.state = {}’ tables, which seems like a really elegant way of handling low volume data.

I’ve managed to get it working really well for passing integers between scenes, even whilst using an ‘interim’ scene (between levels) for removing / reloading.

I would like to use this method for ‘recording’ the isVisible = true/false state of images, or even widgets.

I tried using a little guesswork and set this parameter in the ‘state table’ to; storyboard.state.nextButton.isVisible = true

Although the button displays fine within my scene, if I trigger an event to set it’s visibility to ‘false’, the variable is not passed to the next scene, ie; The button is still there, even though it is still called ‘storyboard.state.nextButton’.

It was my first ‘uneducated guess’ at resolving this problem, but I’ve probably gone about it all the wrong way.

Any help gratefully received.

Thanks