So you want to drag an object with mouse button released?
Simply set object position on every tick to Mouse.x, Mouse.y
If you need to detect if the mouse cursor is moving or holding still, you need to save its position on every tick in a pair of variables, and compare if Mouse.x=prevPositionX, Mouse.y=prevPositionY. (compare first, then save)