# Confused with OOP

**URL:** <https://forum.kirupa.com/t/confused-with-oop/100233>\
**Category:** Uncategorized\
**Created:** [January 27, 2004, 4:22am UTC](https://forum.kirupa.com/t/confused-with-oop/100233 "2004-01-27T04:22:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Bicho](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@El\_Bicho](https://forum.kirupa.com/u/El_Bicho)\
**Post date:** [January 27, 2004, 4:22am UTC](https://forum.kirupa.com/t/confused-with-oop/100233/1 "2004-01-27T04:22:58Z")

</div>

I´m making my first steps with OOP so I´m still in the darkness.

I placed a MC instance called “clip” at coordinates 0,0.

then I wrote this code

```auto

function Square(x, y) {
	this._x = x;
	this._y = y;
}
clip = new Square(200, 200);
trace(clip._x);
trace(clip._y);
Square.prototype.moveTheClip = move;
function move() {
	this._x += 20;
}
button.onPress = function() {
	clip.moveTheClip();
};

```

Nothing is working here (especially my brain, I know).  
Although the trace command returns 200,200 the clip is still in 0,0 and moveTheClip just moves nothing…

:puzzle:
