You can try this: store x and y position, check x y position every 1second if it changes, update X Y position and set "active" to true.
If active false every 1 second add 1 to "seconds inactive", after seconds inactive is greater than 2 or 3 (your choice) destroy the object <img src="smileys/smiley1.gif" border="0" align="middle" />