hi i am a student of as and my teacher has tell me that prototype has been replaced with object but i wamnna change a prototype function with object and doesn´t work pleasew help me here is the code.


//prototype by kode
MovieClip.prototype.fadeColor = function(cto, ease) {
var myColor = new Color(this), cColor = myColor.getTransform();
this.onEnterFrame = function() {
for (var c in cColor) {
cColor[c] += (cto[c]-cColor[c])/ease;
}
myColor.setTransform(cColor);
};
};
//One way to do it is define the target colors and use them in different functions
var NEG_TRANS = {ra:-100, rb:255, ga:-100, gb:255, ba:-100, bb:255, aa:100, ab:0};
var NEUTRAL_TRANS = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
var BLACK_TRANS = {ra:100, rb:-255, ga:100, gb:-255, ba:100, bb:-255, aa:100, ab:0};
var WHITE_TRANS = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0};
function invert() {
pic.fadeColor(NEG_TRANS, 20);
}
function reset() {
pic.fadeColor(NEUTRAL_TRANS, 20);
}
function fadeToBlack() {
pic.fadeColor(BLACK_TRANS, 20);
}
function fadeToWhite() {
pic.fadeColor(WHITE_TRANS, 20);
}
btn1.onRelease = reset;
btn2.onRelease = invert;
btn3.onRelease = fadeToBlack;
btn4.onRelease = fadeToWhite;
//another way to do it is to define the target color in the onrelease
btn5.onRelease = function() {
pic.fadeColor({ra:100, rb:80, ga:100, gb:155, ba:100, bb:60, aa:100, ab:0}, 20);
};
btn6.onRelease = function() {
pic.fadeColor({ra:100, rb:180, ga:100, gb:45, ba:100, bb:90, aa:100, ab:0}, 20);
};
////////////////////////////////////////////////////THIS IS WITH OBJECT///////////////////////////////
var o:Object = new Object();
var t:MovieClip;
o.t = function(cto, ease) {
var myColor = new Color(this);
var cColor = myColor.getTransform();
this.onEnterFrame = function() {
for (var c in cColor) {
cColor[c] += (cto[c]-cColor[c])/ease;
}
myColor.setTransform(cColor);
};
};
var NEG_TRANS = {ra:-100, rb:255, ga:-100, gb:255, ba:-100, bb:255, aa:100, ab:0};
var NEUTRAL_TRANS = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
var BLACK_TRANS = {ra:100, rb:-255, ga:100, gb:-255, ba:100, bb:-255, aa:100, ab:0};
var WHITE_TRANS = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0};
o.rosadotop(WHITE_TRANS, 20);

//rosadotop is a MovieClip


thanks in advance