Kay, I’ve searched, and I’ve skimmed through sen’s OOP tutorial, but not found the answer. I’m sure it’s here somewhere, I just can’t find it…
What I am trying to do is to make a prototype apply to only certain movieclips. For example…
I have one apple movieclip and one orange movieclip. For these I have two prototypes:
MovieClip.prototype.onLoad = function () {
this.fruitType = "Apple";
};
and
MovieClip.prototype.onLoad = function () {
this.fruitType = "Orange";
};
But I don’t want the apple prototype to apple to the orange movieclips and the orange prototype shouldn’t apply to the apple movieclips (they will overrun eachother).
How can I accomplish this, without adding code to the specific movieclips, and WITHOUT doing like this:
MovieClip.prototype.onLoad = function () {
n = this._name.substr(0, 1);
if (n = "a") this.fruitType = "Apple";
if (n = "o") this.fruitType = "Orange";
};
Thank you in advance!