Error from my part, it works well :
-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.
box1:= ((RTBox new color: Color lightGreen; extent: 40 @ 20) elementOn:1).
box2:= ((RTBox new color: Color lightBlue; extent: 40 @ 20) elementOn:2) translateTo: (0@80).
button:= ((RTEllipse new color: Color red; size: 20) elementOn:3) translateTo: (0@40).
v add: box2; add: button; add: box1.
button when: TRMouseEnter do: [ :evt |
v addAnimation: (RTLinearMove to: (box2 position) during: 1 on: box1)].
box1 when: TRMouseClick do: [ :evt |
box2 remove].
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The problem came from the event himself, as i reinitialized the position of the moving element in the event, so the mouse leave and enter again the element just under as exemple follow:
-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.
box1:= ((RTBox new color: Color lightGreen; extent: 40 @ 20) elementOn:1).
box2:= ((RTBox new color: Color lightBlue; extent: 40 @ 20) elementOn:2) translateTo: (0@80).
button:= ((RTEllipse new color: Color red; size: 20) elementOn:3) translateTo: (0@40).
v add: box2; add: button; add: box1.
button when: TRMouseEnter do: [ :evt |
box1 translateTo: 0@0.
v addAnimation: (RTLinearMove to: (box2 position) during: 1 on: box1)].
box1 when: TRMouseClick do: [ :evt |
box2 remove].
v
-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-