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.