# Class Instance Name property

**URL:** <https://forum.kirupa.com/t/class-instance-name-property/237213>\
**Category:** flash\
**Created:** [August 28, 2007, 7:23am UTC](https://forum.kirupa.com/t/class-instance-name-property/237213 "2007-08-28T07:23:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [August 28, 2007, 7:23am UTC](https://forum.kirupa.com/t/class-instance-name-property/237213/1 "2007-08-28T07:23:04Z")

</div>

is there any way, within a class definition, to access the instance name of the class?

as in, say you have a class “playerObject”, and you instantiate an instance of it like usual

player:playerObject = new playerObject();

is there an inbuilt property or variable i can access within the playerObject class code to return “player”?

if, in the constructor, i trace(this) it returns [object Object], i tried things like this.name, this.\_name etc, of course they didnt work…

any help would b appreciated :beam:
