Drag and Drop inside a shape

Hello there!
I’m facing another problem, this time I wan’t to move a object around inside a shape.

The red/orange rectangle is the supposed to be dragged around inside the gray shape,
the rectangle shouldn’t ever be outside the shape.

I hope you understand my problem,
Thanks!

Tompa