Passing data from a composer scene to another

Hi everyone,

I want to pass data acquired from a map scene to another scene, and I was wondering what was the best way to do it. I thought of a few ways of doing this, but I would prefer to do it in a more efficient way. I would resort to these methods only if there’s no other function native to the composer library.

  1. Saving the variables to the app in a JSON table using a saveTable (thanks Rob Miracle).

  2. Saving the data using a local database with sqlite, and then using a query to retrieve information in a different scene (probably the least efficient way)

Any suggestions/help would be appreciated!

This is a regularly answered question you can find the answer to like this:

Google this: site:coronalabs.com pass data composer

This will bring up a number of useful links:

The last link is the way I do it, but set/get variable is good too.

See this link for an example of ‘params’ data passing:

https://docs.coronalabs.com/api/library/composer/gotoScene.html#going-to-another-scene

Please note, if you don’t already have these links, all of the libraries and functions can be found documented here: 

Thanks @roaminggamer! I was actually just watching one of the coronageek talks that you’re in regarding composer and memory management. I believe you mentioned in an excerpt of that video of some sort of module you use to pass data when using composer? I’ll take a look at those links though, thanks again.

I probably mentioned my collection of composer examples and answers to common question:

http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/composer_scene_manager.zip

PS - Here is the rest of my free stuff:

This is a regularly answered question you can find the answer to like this:

Google this: site:coronalabs.com pass data composer

This will bring up a number of useful links:

The last link is the way I do it, but set/get variable is good too.

See this link for an example of ‘params’ data passing:

https://docs.coronalabs.com/api/library/composer/gotoScene.html#going-to-another-scene

Please note, if you don’t already have these links, all of the libraries and functions can be found documented here: 

Thanks @roaminggamer! I was actually just watching one of the coronageek talks that you’re in regarding composer and memory management. I believe you mentioned in an excerpt of that video of some sort of module you use to pass data when using composer? I’ll take a look at those links though, thanks again.

I probably mentioned my collection of composer examples and answers to common question:

http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/composer_scene_manager.zip

PS - Here is the rest of my free stuff: