Is there any way to do this?.The green dots are linked to the blue and red squares all the time ,But when the green dots collide with a wall they must go around the wall but keeping there link to the other square.
It works like the illustration i made below.
<img src="http://dl.dropbox.com/u/7658043/picproblem.jpg" border="0" />