So I’m using a listener to pass either a display object or a sprite object to a function that will handle it and I need a way for the function to determine exactly what the object is that it’s acting on.
In other words, say I have a bunch of enemies, all newImageRect objects, and each is a unique type of enemy with it’s own corresponding *.png. I had though that I could determine the enemy type by simply using something like “object.imageFile” but that doesn’t seem to exist.
This feels like an easy question but I haven’t been able to find the answer. Could someone help me out?
I guess I could just add a name attribute to all of my objects… [import]uid: 106115 topic_id: 31744 reply_id: 331744[/import]