Here is an example of how to set up a touch event listener:
[blockcode]
local onTouch = function( self, event )
if event.phase == “began” then
– This block called:
– When a touch begins
elseif event.phase == “moved” then
– This block called:
– When the finger is dragged
elseif event.phase == “cancelled” then
– This block called:
– When the finger is no longer touching object
– but was not lifted from the object (dragged away from?)
elseif event.phase == “ended” then
– This block called:
– When the finger is lifted from the object
end
end
local myObject = … --> set up from spritesheet, etc.
– Assign the listener function above to “touch” events on myObject
myObject.touch = onTouch
myObject:addEventListener( “touch”, myObject )
[/blockcode]
As for getting spritesheet objects to play, etc. here is the reference page for spritesheets:
http://developer.anscamobile.com/reference/sprite-sheets
You can take the touch listener code I gave you, and put in the proper spritesheet code (play(), etc.) in the proper block depending on the requirements of your app.
Hope that helps! [import]uid: 52430 topic_id: 8933 reply_id: 32673[/import]