Just blogging a small experiment with motion blur using the new BlurFilter in Flash 8. Click anywhere on the SWF to make the ball move with a blur on it. Flash 8 player required.
The actionscript for the above movie is as follows:
[as]ball.cacheAsBitmap = true;
var bl = new flash.filters.BlurFilter();
bl.quality = 3;
var dx:Number;
var dy:Number;
this.onMouseDown = function() {
dx = _root._xmouse;
dy = _root._ymouse;
ball.onEnterFrame = mover;
}
function mover() {
this._x += (dx-this._x)/3;
this._y += (dy-this._y)/3;
bl.blurX = Math.sqrt(((dx-this._x)*(dx-this._x))+((dy-this._y)*(dy-this._y)))/5;
bl.blurY = bl.blurX;
this.filters = [bl];
if(this._x == dx) delete this.onEnterFrame;
}[/as]
Let me know if I could be doing something better 

No comments:
Post a Comment