# Moving Movieclip With mouse in stage

**URL:** <https://forum.kirupa.com/t/moving-movieclip-with-mouse-in-stage/298845>\
**Category:** flash\
**Created:** [October 26, 2009, 11:24am UTC](https://forum.kirupa.com/t/moving-movieclip-with-mouse-in-stage/298845 "2009-10-26T11:24:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nimaro](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@Nimaro](https://forum.kirupa.com/u/Nimaro)\
**Post date:** [October 26, 2009, 11:24am UTC](https://forum.kirupa.com/t/moving-movieclip-with-mouse-in-stage/298845/1 "2009-10-26T11:24:24Z")

</div>

Hy everyone,

Im trying to move a movieclip only in X, deacourding with my mouse movement…

i use this code… for when i enter frame…

* * *

addEventListener(Event.ENTER\_FRAME, animFlor);

## function animFlor():void{ speed = ( 400 + mouseX - this.x) \* 0.004; flashmo\_plant.x += speed; }

flashmo\_plant is the movieclip im trying to move…

But im getting always the some error when im executing the project…

## ArgumentError: Error #1063: Incompatibilidade de contagem do argumento index\_fla::MainTimeline/animFlor(). Esperado 0, obtido 1. **English:** ArgumentError: Error #1063: Incompatibity of count of the argument index\_fla::MainTimeline/animFlor(). Expected 0, getting 1.

Hope u guys can help me… im not seing what is the problem…
