Hi,
I have an analogue joystick working great moving a craft around the screen, I have another object which is acting as a fire button.
The joystick is the mathew pringle one in the code exchange, this works fine using 2 sticks etc so the issue isnt there.
I have placed a tap event on the fire button, it is working fine.
However when I try to use the fire button and stick togethor, one or the other works.
Ok, so I think I have to give my tap event ID ? Iam a little confused as the best way to approach this.
I have read the below which I thought would throw me a lifeline, but It didnt help.
http://developer.coronalabs.com/forum/2012/03/31/multitouch-how-move-analog-joystick-and-press-button-same-time
So, what I am asking is how do I get both the touch and tap event working together?
here is my basic tap event code:
local fireButton = display.newCircle(410,260,24)
fireButton:setFillColor (0,0,0,50)
function fireButton:tap(event)
local bullet = display.newImage('images/bullet.png')
bullet.x = ship.x -10
bullet.y = ship.y -10
bullet.name = 'bullet'
physics.addBody(bullet)
bullets.insert(bullets, bullet)
end
fireButton:addEventListener('tap',fireButton)
Thanks for looking
[import]uid: 127675 topic_id: 32006 reply_id: 332006[/import]