# Is there an "is instance of" property or function?

**URL:** <https://forum.kirupa.com/t/is-there-an-is-instance-of-property-or-function/271813>\
**Category:** Uncategorized\
**Created:** [September 29, 2008, 3:16am UTC](https://forum.kirupa.com/t/is-there-an-is-instance-of-property-or-function/271813 "2008-09-29T03:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoink](https://avatars.discourse-cdn.com/v4/letter/z/9d8465/32.png) [@zoink](https://forum.kirupa.com/u/zoink)\
**Post date:** [September 29, 2008, 3:16am UTC](https://forum.kirupa.com/t/is-there-an-is-instance-of-property-or-function/271813/1 "2008-09-29T03:16:25Z")

</div>

is there an “is instance of” property or function?

for example, i added a mouse\_down event listener on the stage. On the stage, there are instances of an apple class and instances of orange class, both of which extends the Sprite class.

is there some sort of property for:

if (evt.target.“is instance of” == apple)  
{  
trace (“you clicked an apple”)  
}

i tried  
if evt.target == apple, but it doesnt work.

Thanks for any help =)
