Hi everyone,
I’m trying to incorporate the list view 2 project from the sample code. I used director to pretty transition to that scrolling list view. On that list view I added a button and I want it to transition back to my original screen (individual.lua). I’m having trouble figuring out how to implement this. Here is the code so far, Yes I was fooling around with it so much it is a hot mess right now:
function resetBtnRelease( event )
-- Create back button in top bar
--[[ local bt01 = display.newImage("images/backButton.png")
local function bt01t ( event )
if event.phase == "ended" then]]--
director:changeScene("individual","moveFromLeft")
--[[end
end
bt01:addEventListener("touch",bt01t)
bt01.x = 35
bt01.y = 21]]--
localGroup:insert(bt01)
return localGroup
end
I create the button using this code:
resetBtn = ui.newButton{
default = "Default.png",
over = "Default.png",
onRelease = resetBtnRelease
}
My question is, how do I use the button from the list view 2 project to return back to my original screen called individual.lua? I know director needs to return a value but I’m not sure where to situate this. Can anyone help? Again excuse the code and the commenting but I’m pretty lost on how to do this. Thanks. [import]uid: 31262 topic_id: 6781 reply_id: 306781[/import]