Packagecom.greensock.plugins
Classpublic class MotionBlurPlugin
InheritanceMotionBlurPlugin Inheritance TweenPlugin

MotionBlurPlugin provides an easy way to apply a directional blur to a DisplayObject based on its velocity and angle of movement in 2D (x/y). This creates a much more realistic effect than a standard BlurFilter for several reasons:
  1. A regular BlurFilter is limited to blurring horizontally and/or vertically whereas the motionBlur gets applied at the angle at which the object is moving.
  2. A BlurFilter tween has static start/end values whereas a motionBlur tween dynamically adjusts the values on-the-fly during the tween based on the velocity of the object. So if you use a Strong.easeInOut for example, the strength of the blur will start out low, then increase as the object moves faster, and reduce again towards the end of the tween.
motionBlur even works on bezier/bezierThrough tweens!

To accomplish the effect, MotionBlurPlugin creates a Bitmap that it places over the original object, changing alpha of the original to [almost] zero during the course of the tween. The original DisplayObject still follows the course of the tween, so MouseEvents are properly dispatched. You shouldn't notice any loss of interactivity. The DisplayObject can also have animated contents - MotionBlurPlugin automatically updates on every frame. Be aware, however, that as with most filter effects, MotionBlurPlugin is somewhat CPU-intensive, so it is not recommended that you tween large quantities of objects simultaneously. You can activate fastMode to significantly speed up rendering if the object's contents and size/color doesn't need to change during the course of the tween.

motionBlur recognizes the following properties: You can optionally set motionBlur to the Boolean value of true in order to use the defaults. (see below for examples)

Also note that due to a bug in Flash, if you apply motionBlur to an object that was masked in the Flash IDE it won't work properly - you must apply the mask via ActionScript instead (and set both the mask's and the masked object's cacheAsBitmap property to true). And another bug in Flash prevents motionBlur from working on objects that have 3D properties applied, like z, rotationY, rotationX, or rotationZ.

USAGE:

import com.greensock.*;
import com.greensock.plugins.*;
TweenPlugin.activate([MotionBlurPlugin]); //only do this once in your SWF to activate the plugin

TweenMax.to(mc, 2, {x:400, y:300, motionBlur:{strength:1.5, fastMode:true, padding:15}});

//or to use the default values, you can simply pass in the Boolean "true" instead:
TweenMax.to(mc, 2, {x:400, y:300, motionBlur:true});

MotionBlurPlugin is a Club GreenSock membership benefit. You must have a valid membership to use this class without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.

Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.



Public Properties
 PropertyDefined by
 InheritedchangeFactor : Number
TweenPlugin
Public Constants
 ConstantDefined by
 InheritedVERSION : Number = 1.32
[static]
TweenPlugin