# Blur based on object speed

**URL:** <https://forum.kirupa.com/t/blur-based-on-object-speed/193657>\
**Category:** Uncategorized\
**Created:** [July 14, 2006, 8:16pm UTC](https://forum.kirupa.com/t/blur-based-on-object-speed/193657 "2006-07-14T20:16:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [July 14, 2006, 8:16pm UTC](https://forum.kirupa.com/t/blur-based-on-object-speed/193657/1 "2006-07-14T20:16:44Z")

</div>

**[SIZE=3][http://ragonadesign.com/blur\_xy.html](http://ragonadesign.com/blur_xy.html)  
[/SIZE]**  
Alrighty, here is an updated version (full browser :thumb:) that follows your mouse around, blurring merrily away.

```auto

import flash.filters.BlurFilter;
this.onEnterFrame = function() {
    var blur:BlurFilter = new BlurFilter(z, i, 5);
    target_mc.filters = [blur];
    i = .75*Math.abs(difY) + difX/5;
    z = .75*Math.abs(difX) + difY/5;
    difY = (yPos-target_mc._y)/5;
    difX = (xPos-target_mc._x)/5;
    target_mc._y += difY;
    target_mc._x += difX;
    yPos = _ymouse;
    xPos = _xmouse;
};

```

To try this out, just make any movie clip called target\_mc (or just change the linkage) and put this script on the same timeline.
