Blur filter according to mouse speed [F8]

Hello,

I´ve done a 3d object to rotate according to the position of the mouse while holding.
I´d like to add a blur effect to the MC while moving the mouse. So when the mouse is moving fast, the blur on the MC would 10, and if the mouse stoped, the blur would be 0.

is it possible?
thanks :hangover:

Sure its possible! Basically you would need write some code for an onMouseMove event. Something like…

var prevX = _root._xmouse;
var prevY = _root._ymouse;

_root.onMouseMove = function () {
   curX = _root._xmouse;
   curY = _root._ymouse;

   if (curX != prevX || curY != prevY) {
      blurSpeed = 10;
      prevX = curX;
      prevY = curY;
   } else {
      blurSpeed = 0;
   }
}

You could then add an onEnterFrame function that modifies the blur filter using blurSpeed on whatever movieclip.

thanks for the replay.

The blur is working but I´d like to make the MC blur when the mouse is down and moving. As faster the mouse goes, more higher the blur?

i´m not an expert on AS, so could would please give me a hand? Again? Thx

get it working. thanks