# Linked class constructor

**URL:** <https://forum.kirupa.com/t/linked-class-constructor/245920>\
**Category:** flash\
**Created:** [December 5, 2007, 2:55pm UTC](https://forum.kirupa.com/t/linked-class-constructor/245920 "2007-12-05T14:55:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoulz](https://avatars.discourse-cdn.com/v4/letter/z/dfb087/32.png) [@Zoulz](https://forum.kirupa.com/u/Zoulz)\
**Post date:** [December 5, 2007, 2:55pm UTC](https://forum.kirupa.com/t/linked-class-constructor/245920/1 "2007-12-05T14:55:07Z")

</div>

I have a movieclip in my library that I have linked to a class with a constructor that takes a parameter. But I can’t instantiate the library clip with the class constructor. It says the constructor should not take any parameters. Is it using the movieclip constructor instead of the linked class? Is it possible to get around this?

```auto

public class MessageBox extends Sprite
{
    public function MessageBox(txt : String)
    {
    }
}

```

```auto

// MsgBox is the library clip that has linked the above class (MessageBox).
var msg : MsgBox = new MsgBox("blablablabablab");

```
