Stop Target Manipulater rotation by reaching a defined Properties Value

Hey guys,

i got the following thing to do.

I have a cube that i can rotate with a Target Manipulator.
Every 90 Degree of rotation is should “snap” and a Animation should be played.
After the animation is over the cube could be rotated again.

My idea was to have a script with something like a “Listener” that checks the Preference.Transform. rotation[2] value of the Cube or the target Manipulator Object. If it reaches 90 the CubeGroup will be disabled and a animation is played. After animation complete i will enable the Group again so the cube can be rotated again.

Thats the idea. But I got stuck with two things:

  1. How can i implement such a listener? Is there any event Handler for that.
  2. How is the Syntax for acces a propertie Value of any Object.

I hope you understand what my Problem is.
Thank you in advance