You could try something like
local object=display.newCircle(10,100,100) local myX=330;local myY=250; local function removeObject(event) if object.x==myX and object.y==myY then object:removeSelf();object=nil; Runtime:removeEventListener("enterFrame",removeObject) end end Runtime:addEventListener("enterFrame",removeObject)
Remember that runtime listeners keep running even after the function executes because they are global. So assuming you are done after a single execution of the function, you should remove the runtime listener once it’s no longer needed.
Also note, if your object is moving too fast,this might cause problems because Runtime events fire once every frame and the quickest it can fire is 16.66ms (assuming 60 FPS). In that case you might wanna try physics bodies and preCollision.
Btw, is your object just randomly moving around on the screen or it reacts to user input (like the user moving it to certain position?). If it is user input, you could check it once the user has made a move, instead of checking it every frame.