I’m trying to use prototypes to create a thumbnail class but I can’t seem to access my prototype methods…when I trace the methods I get “undefined”. Can anyone find any obvious, or even not so obvious, problems with the way I define my prototype. Shown below is my main function definition and two out of a group of functions I’ve defined.
function Thumbnail(filePath, name) {
this.filePath = filePath;
this.name = name;
}
Thumbnail.prototype.thumbContainer;
Thumbnail.prototype.filePath;
Thumbnail.prototype.name;
Thumbnail.prototype.getX = function() {
return this.thumbContainer._x;
};
Thumbnail.prototype.getY = function() {
return this.thumbContainer._y;
};