If(x=0 and y=0) { ... i dont get it

i still got a problem… ive adjusted my code:


function go(to){
	movies.onEnterFrame = function(){
		speed = 10;
		x = 400 - this._x;
		this._x += x/speed;
		y = 200 - this._y;
		this._y += y/speed;
		if(y<1 && y>-.5){
			neary = 0;
		}
		if(x<.5 && x>-.5){
			nearx = 0;
		}
		if(neary==0 && nearx==0) {
			trace("test");
				daarna(to);
				delete this.onEnterFrame;
			}
		
	}
}

but now it just deletes the this.onEnterFrame…