# \[mx6.0\]

**URL:** <https://forum.kirupa.com/t/mx6-0/275758>\
**Category:** Uncategorized\
**Created:** [November 18, 2008, 1:01pm UTC](https://forum.kirupa.com/t/mx6-0/275758 "2008-11-18T13:01:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattiasA](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@MattiasA](https://forum.kirupa.com/u/MattiasA)\
**Post date:** [November 18, 2008, 1:01pm UTC](https://forum.kirupa.com/t/mx6-0/275758/1 "2008-11-18T13:01:30Z")

</div>

I need some code that does not handle movieclips dynamically despite being good coding praxis. I am a rookie at actionscript 2 and my mission is to make a product simulation. I need to do the following:

After a mousepushdown on mcA I want the currentframe in mcB to be changed depending of the mouseposition.

I am thinking something like the following would work but it does not!

//This is but in mc A:

onClipEvent (mouseDown)

{  
var onMouseMoveListener:Object = new Object();

//for

onMouseMoveListener.onMouseMove = function()  
{  
if (this.\_ymouse \> 20)  
{  
\_root.mcB.gotoAndStop (\_root.mcB.currentframe + 1);  
}  
else (this.\_ymouse \< 20)  
{  
\_root.mcB.gotoAndStop(\_root.mcB.currentframe - 1);  
}  
updateAfterEvent();  
}  
//I need something this to be done over and over again until I release the mousebutton. //Therefore I tried to ad something like this:  
intervalID = setinterval(onMouseMoveListener.onMouseMove, infinity);  
}

In mcB I but this code:

onClipEvent (mouseMove)  
{  
this.addListener(onMouseMove);  
}

Any tips? A would very much appreciate any comments. I am new to actionscripting. I am using Macromedia Flash MX 6.0.
