Moving a shape by mouseClicked function

Same remark as in your other post: Simple Circle and rectangle code doubt [Solved]