Extending class of a movie clip

I extended the class of a movie clip so it would simply be drag and drop and it would trace its x and y position. That works great.

Here’s the situation. It will only work if I already have an instance of the mc on the stage. It will not work if I attach an instance directly from the library.

Any thoughts on that? Is there a way to make it work directly from the library?