Thanks! It’s an excellent tutorial but doesn’t seem to answer my question. I wanted to know if there was some way to do type checking.
I wanted to distinguish my enemy display objects from my friendly display objects. That way, I could perform different actions depending on what the user taps on.
In Flash, I would do this by creating an Enemy class and linking it to a enemy symbol in my library. Likewise, I would create a Player class and link it to the player symbol. Then, if the user clicks on an enemy, I can check it’s type with the [as3]is[/as3] keyword:
[as3]
if (clickedObject is Enemy) {
…
}
[/as3]
Based on how events all have a [lua]name[/lua] attribute, I’m guessing that it might be easiest to simply set a similar attribute on my objects and check for that when they’re tapped. [import]uid: 52771 topic_id: 19274 reply_id: 74360[/import]