Sub Activity_Touch(Action As Int, tx As Float, ty As Float)
If Not(Action = Activity.ACTION_DOWN) Then Return
If tx > x - boxSize AND tx < x + boxSize AND _
ty > y - boxSize AND ty < y + boxSize Then
vx = -vx 'change the smiley direction if the user pressed on it
vy = -vy
End If
CircleCanvas.DrawCircle(tx, ty, 5dip, Colors.Red, False, 2dip)
Activity.Invalidate3(tx - 7dip, ty - 7dip, tx + 7dip, ty + 7dip)
End Sub