ImageMenu Enlarge & Move

Ok that title probably coulve been better, but couldent think of any better way of explaining what i want to do.

ive made two images two give the basic idea, with wordly descriptions:
ok first, how menu looks when there is no mouse anywere near it or on top of it:

just plain images placed in a grid.

how the menu interacts with the mouse:

As the mouse gets closer to an image, the image gets larger, as well as it tries to slightly move away from cursor…
the effekt im after is that the image which the user seems interested in swells and pushes nearby images away to kinda give space for it.

The paramaters which i want to work under are…
There is one mc which i duplicate for as many images which i have.
basically i load in a list of images which i want to display and loop out with a duplicate scipt the proper ammount of MC’s with the correct pictures, this is all done and ready.

I now want to place the code on the button/mc (mc with button inside) being looped out so it does the thing i tried to explain above. :wink:
no code in timeline just on(enterFrame){ on the mcclip itself

hope theres some good gemetry nerds out there :wink: i tried doing this for a while but i got no were… i eventually managed to even screw up distance formula haha (seriously no joke i suck =P) (math.sqrt was being dumb)

thanks

//VoS