{MX} simple movement question

have a question about flash of i have ok maybe you might be able to help ok ionClipEvent(enterFrame) {
speed = -1; t
his._y += speed

and i want it to stop after it goes up a bit but when i add a stop it dont go all together how would i do that???

would it be like this???

onClipEvent(load){
this.onEnterFrame = function(){
if(condition){
delete this.onEnterFrame;
} else { // do something; }


onLoad=function(){
startY = _root.McInstance._y;
stopY = startY-50;
speed = 1;
}
_root.McInstance.onEnterFrame = function() {
 if (this._y>=stopY) {
  this._y -= speed;
 } else {
  delete _root.McInstance.onEnterFrame;
 }
};

where your movie clip’s instance name is McInstance.

Adam