# Magnetic Action?

**URL:** <https://forum.kirupa.com/t/magnetic-action/32281>\
**Category:** flash\
**Created:** [October 4, 2003, 5:30am UTC](https://forum.kirupa.com/t/magnetic-action/32281 "2003-10-04T05:30:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratbaggy](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ratbaggy](https://forum.kirupa.com/u/ratbaggy)\
**Post date:** [October 4, 2003, 5:30am UTC](https://forum.kirupa.com/t/magnetic-action/32281/1 "2003-10-04T05:30:00Z")

</div>

Anyone got any hints, example code or suggestions for making magnetic buttons/mc? i.e. buttons/mc’s float randomly around stage. When the mouse is within a certain range/distance the buttons speed up towards the mouse’s position. When the user moves the mouse off the button again, it carries on it’s random motion again.
