I am trying to access the Tiled object properties from a addObjectDrawListener. The object is passed to the event just fine and I can access it with exception of the Tiled properties. I have tried to use event.target.properties with no luck. I printed the top level of the event.target object and it looks like the properties table is not there. The documentation states:
“Dispatches an event to the specified listener function containing the object name, the display object, and the Tiled Object.”
so I am assuming that the Tiled Object is there somewhere.
What am I doing wrong?
Print of event.target:
2014-04-11 09:07:31.336 Corona Simulator[44621:507] sortSprite: false
2014-04-11 09:07:31.336 Corona Simulator[44621:507] lightingListeners:
2014-04-11 09:07:31.336 Corona Simulator[44621:507] constrainToMap:
2014-04-11 09:07:31.337 Corona Simulator[44621:507] color:
2014-04-11 09:07:31.337 Corona Simulator[44621:507] locY: 8
2014-04-11 09:07:31.337 Corona Simulator[44621:507] deltaX:
2014-04-11 09:07:31.337 Corona Simulator[44621:507] objType: 2
2014-04-11 09:07:31.337 Corona Simulator[44621:507] drawnObject: true
2014-04-11 09:07:31.338 Corona Simulator[44621:507] offsetX: 0
2014-04-11 09:07:31.338 Corona Simulator[44621:507] objectLayer: 6
2014-04-11 09:07:31.338 Corona Simulator[44621:507] deltaY:
2014-04-11 09:07:31.338 Corona Simulator[44621:507] level: 5
2014-04-11 09:07:31.338 Corona Simulator[44621:507] objectKey: 4
2014-04-11 09:07:31.339 Corona Simulator[44621:507] lighting: true
2014-04-11 09:07:31.339 Corona Simulator[44621:507] levelPosY: 1898
2014-04-11 09:07:31.339 Corona Simulator[44621:507] isMoving: false
2014-04-11 09:07:31.339 Corona Simulator[44621:507] _proxy: userdata
2014-04-11 09:07:31.340 Corona Simulator[44621:507] levelHeight: 20
2014-04-11 09:07:31.340 Corona Simulator[44621:507] layer: 6
2014-04-11 09:07:31.340 Corona Simulator[44621:507] addLightingListener: function
2014-04-11 09:07:31.340 Corona Simulator[44621:507] addLight: function
2014-04-11 09:07:31.340 Corona Simulator[44621:507] levelWidth: 20
2014-04-11 09:07:31.341 Corona Simulator[44621:507] _class:
2014-04-11 09:07:31.341 Corona Simulator[44621:507] name: coin31
2014-04-11 09:07:31.341 Corona Simulator[44621:507] park: false
2014-04-11 09:07:31.341 Corona Simulator[44621:507] removeLight: function
2014-04-11 09:07:31.341 Corona Simulator[44621:507] offsetY: 0
2014-04-11 09:07:31.342 Corona Simulator[44621:507] locX: 22
2014-04-11 09:07:31.342 Corona Simulator[44621:507] levelPosX: 5443