# Changing y location on button press

**URL:** <https://forum.kirupa.com/t/changing-y-location-on-button-press/88929>\
**Category:** Uncategorized\
**Created:** [May 3, 2005, 5:28pm UTC](https://forum.kirupa.com/t/changing-y-location-on-button-press/88929 "2005-05-03T17:28:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bleach20xx](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bleach20xx](https://forum.kirupa.com/u/bleach20xx)\
**Post date:** [May 3, 2005, 5:28pm UTC](https://forum.kirupa.com/t/changing-y-location-on-button-press/88929/1 "2005-05-03T17:28:28Z")

</div>

I’m trying to get the y position of a movie clip to change upon a button press.

i thought, that by using the code below i could get it to move from y position 400 to y position 168.

Any ideas on where I went wrong?

```auto

changepos = function (display:String) {
	  movieclip._y = 400;
	  this[display]._y = 168;
}

button1.onRelease = function() {
	  changepos("movieclip");
}

```
