Hi everybody,
I’m trying to make my first prototype, but I can’t put it to work, I wanted to atribute a property to a variable, so I could call the prototype on to the movie clip, asking for any property, without having to change the prototype code.
Is it possible?
Here is my code so far:
MovieClip.prototype.multProp = function (proper,targetv, smooth) {
this.proper -= (this.proper-targetv)/smooth;
};
my_mc.onEnterFrame = function() {
my_mc.multProp("_x",20, 10);
};
In this case I used the _x property, as I could use the _alpha property like this:
my_mc.onEnterFrame = function() {
my_mc.multProp("_alpha",20, 10);
};
but it doesn’t seem to work.
Anybody got a clue?
Thank You.