I’m using Storyboard in my app and it works really nice, but I do have one problem though, I’m using display.newImage() as a button with an addEventListener to create buttons. I’m not using the ButtonWidget because I need to tween the buttons.
Problem is that I can’t seem to target a “local” function of the storyboard scene as a Listener.
For Example:
[lua]button:addEventListener( “touch”, scene:onButtonEvent )
function scene:onButtonEvent(event)
– do something
end
[lua]My workaround was to do this:
[lua]button:addEventListener( “touch”, function(event) scene:onButtonEvent(event) end )[/lua]
This situation is not ideal because in this case the removeEventListener doesn’t work
[lua]button:removeEventListener( “touch”, function(event) scene:onButtonEvent(event) end )[/lua]
Any ideas how to tackle this problem?
[import]uid: 143756 topic_id: 31444 reply_id: 331444[/import]