# Mouse Movement to play animation

**URL:** <https://forum.kirupa.com/t/mouse-movement-to-play-animation/293866>\
**Category:** flash\
**Created:** [August 5, 2009, 4:16am UTC](https://forum.kirupa.com/t/mouse-movement-to-play-animation/293866 "2009-08-05T04:16:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surajitkarmokar](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@surajitkarmokar](https://forum.kirupa.com/u/surajitkarmokar)\
**Post date:** [August 5, 2009, 4:16am UTC](https://forum.kirupa.com/t/mouse-movement-to-play-animation/293866/1 "2009-08-05T04:16:23Z")

</div>

Hi all,

I am new to advanced actionscript.

I have created a animation of a rectangle which moves from left to right.

With the use of the mouse the rectangle animation should play. When i move the mouse to left rectangle animation should play left & movement of right side should play the right rectangle animation. I have also attached the flash file.

Thanks
