I have a movie clip that scrolls side to side when you rollover it but when the mouse is off it continues to scroll - I need the movieclip to slow to a stop when the mouse rolls of the movieclip. I’ve have been playing arounds with the hitest code (red) but this does not fix it…
Its prolly a simple problem - I am not much of a coder…
Can anyone help??
onClipEvent (load)
{
xcenter=Stage.width/2;
speed=3/100;
}
onClipEvent (enterFrame){
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-1640;
if (_x < -1640) _x=0;
[COLOR=Red] if(hitTest(this._xmouse, this._ymouse, false))
{
speed=1/100;
}
else if(hitTest(this._xmouse, this._ymouse, true))
{
speed=31/100;
}
[/COLOR]
}