ActionScript 3 Motion Blur / Blur Trail with custom background

AS3, Motion Graphics, Physics 5 Comments

Ever wondered how to make those smooth looking blur trails with AS3? Well if you did and still don't know, you have just found it. I's done using BitmapDatas drawing a Bitmap with a given BlurFilter in a given Sprite or MovieClip which contains all the contents we want to have the motion blur. Some examples in the internet don't handle this properly because they flood the backgound with a colour, but in this one we are using a custom background to demonstrate how it is implemented. The trick is that the BitmapData must apply the "draw()" method only in a given Sprite or MovieClip where all the contents-to-be-blurred are nested.


The background pattern is a great technique developed by the guys at Bumpslide.


Get the SOURCE


5 Responses to “ActionScript 3 Motion Blur / Blur Trail with custom background”

  1. promag Says:
    May 3rd, 2009 at 08:55

    Pretty cool!

    Is the performance dependent of canvas size or number of objects? How does it scales?

  2. julls Says:
    May 21st, 2009 at 06:46

    fantastic! the file doesn’t seem to open in CS3 however? i’m assuming it’s becuase the file is a CS4 format…

    any chance of posting a version for cs3? many thanks!

  3. ab Says:
    May 24th, 2009 at 19:31

    @ promag:
    One must have in mind that this consists in a BitmapData being constantly redrawn, with a BlurFilter applied to it. The performance depends on the number of objects to which the effect is being applied, and on the SIZE of the BitmapData being used. Do note that a BitmapData’s width and height are defined at instantiation time. This properties must be updated if one wishes to scale the affected area at runtime. I guess in most cases these implementations are done with fixed sizes. And in the end of the line, performance obviously depends on the computer’s processing power.

    @ julls:
    Thanks for pointing that out. I’m changing it to CS3, try again. Later I’ll post on how to use the MotionBlur class with the FLA file. Cheers !

  4. David Knape Says:
    August 6th, 2009 at 19:16

    Thanks for the nod regarding the pixel background trick. Nice work here.

  5. Jack Says:
    July 13th, 2010 at 15:19

    Wow … this is great ! Just what I needed to complete my project :) … Bookmarking your blog ! Thanks

leave a reply

data recovery software