# Creating linkable objects on runtime

**URL:** https://forum.kirupa.com/t/creating-linkable-objects-on-runtime/114674
**Category:** Uncategorized
**Created:** [June 30, 2004, 4:21pm UTC](https://forum.kirupa.com/t/creating-linkable-objects-on-runtime/114674 "2004-06-30T16:21:07Z")
**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 30, 2004, 4:21pm UTC](https://forum.kirupa.com/t/creating-linkable-objects-on-runtime/114674/1 "2004-06-30T16:21:07Z")

</div>

Creating classes and specifying linkage in the library, everything works fine.  
But, I want to do this without using the library.  
I’m pretty sure registerClass is the way to do this, but all I get as a return is “undefined” when I call it.

Here’s an example:

```auto

// bleh.as
class bleh extends MovieClip {
  public function bleh() {
    this.onRelease = function() { trace('boo'); }
  }

  public var some_mc:MovieClip;
}

// test.fla
var okok = new bleh();
okok.some_mc.registerClass( 'some_mc', MovieClip )

// and then something like...
while i < 1000
 _root.attachMovie( "some_mc", 'tile_inst'+i+j, layer++ );

```

This doesn’t work, and I’m 99.99% sure I’m using registerClass the wrong way 🙂
