AS1 i use Prototype, AS2 i use?

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 ?