I got this ActionScript 2 code:
fuseModel = [{mx:0, my:-5.5, x:0, y:-4, pen:.5, clr:0x000033, alpha:50}];
MovieClip.prototype.setModel = function(m)
{
this.drawModel(m);
}
MovieClip.prototype.drawModel = function(m)
{
var pt = m[0];
beginFill(pt.bf, pt.bfa);
lineStyle(pt.pen,pt.clr,pt.alpha);
lineTo(100,100);
endFill();
}
_root.createEmptyMovieClip("ship_mc", 2);
ship_mc.setModel(fuseModel);
This code is just drawing a line (I deleted the other 600 lines of code for simplicity).
I'm trying to understand where the MovieClip.prototype.setModel method is called. Looks like nowehere, but, if I delete it, the line is not drawn.
So, who is calling MovieClip.prototype.setModel()?
--update
looks like the ship_mc.setModel(fuseModel)
is calling it, so for every instance of MovieClip the setModel will exist? It doesn't make sense as it is not in MovieClip, but in MovieClip.prototype.