Oppisite of delete onEnterFrame?

onEnterFrame = function(){
if(such and such){
delete this.onEnterFrame;
}else if(such and such){
start this.onEnterFrame;
}

}

whats the proper syntax for this one? thanks so much!

var follow:Boolean = true;

onEnterFrame = function(){

if(follow){
do something;
if(such and such){
follow = false;
}
}
else{
do other stuff;

}
};

basically you had the idea already you just didn’t understand how to use your if statements properly there is no need to change your onEnterFrame at all just put the big if statement in front to decide what to do