# Prototypes, when to use them?

**URL:** https://forum.kirupa.com/t/prototypes-when-to-use-them/114466
**Category:** Uncategorized
**Created:** [June 28, 2004, 9:26pm UTC](https://forum.kirupa.com/t/prototypes-when-to-use-them/114466 "2004-06-28T21:26:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nycbrian](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@nycbrian](https://forum.kirupa.com/u/nycbrian)
#### Post date: [June 28, 2004, 9:26pm UTC](https://forum.kirupa.com/t/prototypes-when-to-use-them/114466/1 "2004-06-28T21:26:46Z")

</div>

I am pretty new to AS, and I have been using flash mx 2004 and thus AS 2.0. I was under the impression that the use of prototype was no longer needed because of how inheritence is now handle in AS 2.0. Is this true? I see lots of people posting code with use of prototype in it. Like voetsjoeba who posted a cool easing function that uses prototype. Maybe someone could show me how it might work in AS 2.0 without the use of prototype.

> 

```auto
 MovieClip.prototype.easeX = function(to){
 this.onEnterFrame = function(){
 this._x = to-(to-this._x)/1.1;
 if(this._x > to-1 && this._x < to+1){
 this._x = to;
 delete this.onEnterFrame
 //do other stuff here, this is the point at which the object reaches its target
 }
 }
 }
 MC.easeX(100);

```

thanks,  
Brian
