# Blur filter according to mouse speed \[F8\]

**URL:** <https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669>\
**Category:** Uncategorized\
**Created:** [March 29, 2006, 3:33am UTC](https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669 "2006-03-29T03:33:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [March 29, 2006, 3:33am UTC](https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669/1 "2006-03-29T03:33:11Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![serkios](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/serkios/32/608_2.png) [@serkios](https://forum.kirupa.com/u/serkios)\
**Post date:** [March 29, 2006, 3:43am UTC](https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669/2 "2006-03-29T03:43:24Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [March 29, 2006, 12:36pm UTC](https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669/3 "2006-03-29T12:36:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [March 29, 2006, 3:33pm UTC](https://forum.kirupa.com/t/blur-filter-according-to-mouse-speed-f8/183669/4 "2006-03-29T15:33:12Z")

</div>

get it working. thanks
