In the ImagePickTestModel class the createModel method is where you construct your animation. |
Create an uninitialized ColorBvr (clr). |
Create cropped square, and apply clr's color behavior to it. |
Make blockImg draggable by creating a DraggableImage class object (grabImg). |
Initialize clr. Let it start out as red, change it to blue, when the square is grabbed, and return to red when the square is released. The grab and release events are obtained from the getGrabEvent() and getReleaseEvent() methods of the DraggableImage class respectively. |
Get the ImageBvr part of grabImg, by calling the getImageBvr() method of DraggableImage. |
overlay pickableBlockImg on a black background. |
That's all there is to it. Happy animating... |