Very quick question (I hope!). If you have a function in the main.lua file is that then accessible from any of the composer scenes within the app? As an example could I set up an ad listener function which can be accessed from my gameover scene?
Sounds like you’re referring to so-called “global” references. You can create functions that can be called from other “scenes” by creating modules and requiring the module within your scene file. See below for guides:
http://coronalabs.com/blog/2013/05/28/tutorial-goodbye-globals/
http://coronalabs.com/blog/2012/08/28/how-external-modules-work-in-corona/
Sounds like you’re referring to so-called “global” references. You can create functions that can be called from other “scenes” by creating modules and requiring the module within your scene file. See below for guides:
http://coronalabs.com/blog/2013/05/28/tutorial-goodbye-globals/
http://coronalabs.com/blog/2012/08/28/how-external-modules-work-in-corona/