# Using Prototypes

**URL:** https://forum.kirupa.com/t/using-prototypes/222515
**Category:** flash
**Created:** [April 14, 2007, 3:34am UTC](https://forum.kirupa.com/t/using-prototypes/222515 "2007-04-14T03:34:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![riveroaks](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@riveroaks](https://forum.kirupa.com/u/riveroaks)
#### Post date: [April 14, 2007, 3:34am UTC](https://forum.kirupa.com/t/using-prototypes/222515/1 "2007-04-14T03:34:39Z")

</div>

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.

```auto

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;
};

```
