# AS1 i use Prototype, AS2 i use?

**URL:** https://forum.kirupa.com/t/as1-i-use-prototype-as2-i-use/106026
**Category:** Uncategorized
**Created:** [April 1, 2004, 4:12am UTC](https://forum.kirupa.com/t/as1-i-use-prototype-as2-i-use/106026 "2004-04-01T04:12:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![simonboris](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@simonboris](https://forum.kirupa.com/u/simonboris)
#### Post date: [April 1, 2004, 4:12am UTC](https://forum.kirupa.com/t/as1-i-use-prototype-as2-i-use/106026/1 "2004-04-01T04:12:31Z")

</div>

Allright, i need a bit of help.

i want to do a simple function and incorpore it into every mc in my flash movie.

In mx, i use prototype, but in mx2004, you cannot use it.

how would you assign a function to selected mc’s on the stage.

here what i use in mx:

* * *

MovieClip.prototype.xTraceName= function(){  
trace(this);  
};

// on first frame of mc  
this.onRollOver=function(){  
this.xTraceName();  
};

* * *

how can i do the same in as2 using class or subclass ?
