How to pass

Hi!

I have a tiny problem.

I dont have a clue at all how to get this done, so I might as well ask :slight_smile:

Example:

On scene1  the picture  _IMAGE1 _is IMAGE1.alpha=0

Then if you go to scene2 and press _Button1 _then _IMAGE1 _is IMAGE1.alpha=1

And now when i go back to scene1 I want IMAGE1 to be alpha=1 because I pressed the Button1 on scene2.

Hope you know what i mean. Thanks!

I guess you are using storyboard?

Between your scenes you can pass parameters that you can access in the create- or enterscene events on the new scene. 

This can be set up like this in scene2

local options = { effect = "zoomOutInFade", time = 400, params = {alphaParam = 1} } storyboard.showOverlay("scene1", options)

And then accessed in scene1 like this in the enterScene

IMAGE1.alpha = event.params.alphaParam

You have to make sure that scene1 is not purged when scene2 is active.

Yes, I am using storyboard.

Thank you very much!
 

I will try it tomorow.

I guess you are using storyboard?

Between your scenes you can pass parameters that you can access in the create- or enterscene events on the new scene. 

This can be set up like this in scene2

local options = { effect = "zoomOutInFade", time = 400, params = {alphaParam = 1} } storyboard.showOverlay("scene1", options)

And then accessed in scene1 like this in the enterScene

IMAGE1.alpha = event.params.alphaParam

You have to make sure that scene1 is not purged when scene2 is active.

Yes, I am using storyboard.

Thank you very much!
 

I will try it tomorow.