Random movement-attachmovie-pixelhittest

Hey you kirupians! long time no posting, but now currently into flashland again. I’ll try to explain the concept, hopefully you guys and girls could bring me more on the right track since I got stuck. I’ll attach my files below in a zip. My swf is located at http://panzafaust.com/fridge/pixelHittest.swf

I have a few spheres. They are randomly moving over the stage. All three spheres can be dragged and dropped. If one is overlapping with another, a menu appears. So, These menus are the result of combining sphere a and b and are unique.

Now, what I want to achieve is:

  • how can I let the spheres bounce off eachother when they are not pressed/dragged. If the spheres hit eachother now in the random mode, the menus also get displayed.
  • How can I make sure the menus dont pop up several times at eachother when displayed.

Where to start where to start? :angel: The code I’ve got so far is based on the hitPixelTest function and the random movement on the site.