# Need help please anyone trying to control MC with button

**URL:** https://forum.kirupa.com/t/need-help-please-anyone-trying-to-control-mc-with-button/271562
**Category:** flash
**Created:** [September 24, 2008, 5:41pm UTC](https://forum.kirupa.com/t/need-help-please-anyone-trying-to-control-mc-with-button/271562 "2008-09-24T17:41:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![soniczone](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@soniczone](https://forum.kirupa.com/u/soniczone)
#### Post date: [September 24, 2008, 5:41pm UTC](https://forum.kirupa.com/t/need-help-please-anyone-trying-to-control-mc-with-button/271562/1 "2008-09-24T17:41:05Z")

</div>

sdfsdfdsfsda I am new to AS but trying to control my MC to move up and down. it’s working but i want it to stop at a point so it doesn’t go to high and stop at a point where it doesn’t go too low  
I got this so far  
moveUp.onPress = function() {  
gtr\_MC.onEnterFrame = function() {  
this.\_y -= 1;  
};  
};  
moveUp.onRelease = function() {  
delete gtr\_MC.onEnterFrame;  
};

moveDown.onPress = function() {  
gtr\_MC.onEnterFrame = function() {  
this.\_y += 1;  
};  
};  
moveDown.onRelease = function() {  
delete gtr\_MC.onEnterFrame;  
}

* * *

i not too sure i was trying to search the forum  
I’m thinking something like this  
if (this.\_y = 0)  
then…??? delete gtr\_MC.onEnterFrame;

Can anyone please give me directions  
i’m using AS 1.0 -2.0

Thank you all you coders out there  
Anyone? Please
