hi
i want to get a type of an object in a function… but i’m having some problems
item = display.newImage( "gelo.png" )
item.x = math.random( 480 )
item.y = 100
item.type = "gelo"
item.id = "gelo"
-- I have tried 2 ways... type and id
teste = function(e)
if e.phase == "ended" then
print ( e.type )
print ( e.id )
end
end
item:addEventListener( "touch", teste )
in terminal I get this:
nil
userdata: 0xc7400
how can I acess the type of my object in this function?? [import]uid: 23063 topic_id: 12105 reply_id: 312105[/import]
[import]uid: 23063 topic_id: 12105 reply_id: 44129[/import]