Assignment 3:

3rd assignment
Joan Soler Adillon

Same as last week with a change when the square gets to the mouse for the third time.

CURIOSITY
If the mouse moves, the square keeps looking at it, but stays still. If the mouse gets too close,
the square will jump away.
Once the mouse stays still (and only if the mouse keeps staying still)
the square waits for 1'5 seconds and then slowly approaches it.
When it gets to touch it, jumps back a couple times.
(NEW:) On the third time, the square will get attached to the mouse, and the mouse will only get rid of
it with a strong shake.

PROBLEMS: getting the square to slowly move to the point where it gets stuck to the mouse. I played with the delta variable but I couldn't get it to work smoothly.

Flash source file

back