I have an image that I insert into a container.
Then I add a “tap” listener to the image.
Here is my code:
_group = display.newGroup();
_container = display.newContainer( 800, 400 )
_container:translate( 0, 0 );
cyborg = display.newImage( “cyborg.jpg” );
_container:insert( cyborg, true );
cyborg.x = -500;
cyborg:addEventListener( “tap”, onCyborgTap );
_container.y = -250;
_group:insert( _container );
The “onCyborgTap” function is never executed.
If I don’t add the image to the container, the function is executed as expected.
Please help