Hi Brent,
Thanks for the response, here’s the code; to give you an idea: it’s an app to learn Arabic through clicking on words to see them translated, or double-clicking to see words derived from a root word, so in the below code the user is going between two lua files - home.lua with the root words and qaala.lua with derivations of qaala (to speak).
I’ve highlighted in red the two lines in each file that do the naviagtion using ‘require’. All works fine to go from home.lua to qaala.lua then back again, but upon going into qaala.lua again the screen is blank.
home.lua file:
[lua]
local function qaalaTapListener ( event )
if ( event.numTaps == 2 ) then
require(“verbs.qaala”) – calls word script
else
return true
end
display.remove( textGroup ) – clear text from screen
display.remove( buttonGroup ) – clears buttons from screen
buttonGroup = nil
textGroup = nil
end
[/lua]
qaala.lua:
[lua]
local function homeTouchListener( event )
if ( event.phase == “began” ) then
display.remove(directionsText)
directionsText = nil
display.remove(buttonGroup)
buttonGroup = nil
require(".home") – takes user back to screen with root words
end
return true --prevents touch propagation to underlying objects
end
[/lua]