theMovie.onRollOver = function(){
this.onMouseMove = function(){
if(this.oldx < this._xmouse){
this.prevFrame();
}else{
this.nextFrame();
}
this.oldx = this._xmouse;
}
theMovie.onRollOut = function(){
this.onMouseMove = null;
}
i’ve inserted it into the code i wrote earlier, but the same strategy should work in any code.