Hello, for the beginning I wanna say hello to everyone
I have problem with the event listener.
local function listener( event ) if event.isShake then if try ~= nil then native.showAlert( "Ass", "Shake this ass!", { "OK" } ) end end end
Runtime:addEventListener( “accelerometer”, listener )
scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )
 I have 4 scenes, 3 out of 4 has the try set to nil, only one out of 1 have a try = 1 so the shake event should work only with the 1/4 scenes example.
1,2,3 - empty
4 - listener
When I go to 1,2,3 and shake, it is not working which is good
When I go for 4 and shake, it shows the showAlert box which is good
When I go for 4 and shake, press ok and go back to different scene and shake the alert box is shoiwng which is incorrect…
I set up the try to nil on 1,2,3 scenes but it did not help.
Any ideas of this?
Regards,
P.