# Pathing of objects

**URL:** <https://forum.kirupa.com/t/pathing-of-objects/114522>\
**Category:** Uncategorized\
**Created:** [June 29, 2004, 12:41pm UTC](https://forum.kirupa.com/t/pathing-of-objects/114522 "2004-06-29T12:41:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bergheim](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@bergheim](https://forum.kirupa.com/u/bergheim)\
**Post date:** [June 29, 2004, 12:41pm UTC](https://forum.kirupa.com/t/pathing-of-objects/114522/1 "2004-06-29T12:41:22Z")

</div>

Hello!

When creating custom-objects, is there any way to set it’s pathing? The problem is that it seems without a defined targetPath the object’s callbacks are ignored.

Here’s an example:

class someClass extends MovieClip {  
public function someClas() {  
this.onEnterFrame = function() {  
trace( this ); // never called  
}  
trace( this ); // outputs object object  
}

So, is there any way to set the targetpath? They all seem like read-only to me. One way to fix it perhaps is to place an object on the stage and use the as2 field to define it’s class, but I prefer coding everything 🙂

If i make a movieclip using createEmptyMovieClip, it’ll work (trace(this) shows say \_level0.some\_mc) ), but I want my custom classes…
