# \[MX2004\] Prototype on specific movieclips only

**URL:** https://forum.kirupa.com/t/mx2004-prototype-on-specific-movieclips-only/114133
**Category:** Uncategorized
**Created:** [June 25, 2004, 12:36am UTC](https://forum.kirupa.com/t/mx2004-prototype-on-specific-movieclips-only/114133 "2004-06-25T00:36:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ScriptFlipper](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@ScriptFlipper](https://forum.kirupa.com/u/ScriptFlipper)
#### Post date: [June 25, 2004, 12:36am UTC](https://forum.kirupa.com/t/mx2004-prototype-on-specific-movieclips-only/114133/1 "2004-06-25T00:36:58Z")

</div>

Kay, I’ve searched, and I’ve skimmed through sen’s OOP tutorial, but not found the answer. I’m sure it’s here somewhere, I just can’t find it…

What I am trying to do is to make a prototype apply to only certain movieclips. For example…

I have one apple movieclip and one orange movieclip. For these I have two prototypes:

```auto
MovieClip.prototype.onLoad = function () {
    this.fruitType = "Apple";
};

```

and

```auto
MovieClip.prototype.onLoad = function () {
    this.fruitType = "Orange";
};

```

But I don’t want the apple prototype to apple to the orange movieclips and the orange prototype shouldn’t apply to the apple movieclips (they will overrun eachother).

How can I accomplish this, without adding code to the specific movieclips, and WITHOUT doing like this:

```auto
MovieClip.prototype.onLoad = function () {
    n = this._name.substr(0, 1);
    if (n = "a") this.fruitType = "Apple";
    if (n = "o") this.fruitType = "Orange";
};

```

Thank you in advance!
