View comments | RSS feed

BlurFilter (flash.filters.BlurFilter)


Object
    |
    +-flash.filters.BitmapFilter
        |
        +-flash.filters.BlurFilter

public class BlurFilter
extends BitmapFilter

The BlurFilter class lets you apply a blur visual effect to a variety of objects in Flash. A blur effect softens the details of an image. You can produce blurs that range from a softly unfocused look to a Gaussian blur, a hazy appearance like viewing an image through semi-opaque glass. When the quality property of this filter is set to 1, the result is a softly unfocused look. When the quality property is set to 3, it approximates a Gaussian blur filter.

The use of filters depends on the object to which you apply the filter:

You can also apply filter effects to images and video at authoring time. For more information, see your authoring documentation.

If you apply a filter to a movie clip or button, the cacheAsBitmap property of the movie clip or button is set to true. If you clear all filters, the original value of cacheAsBitmap is restored.

This filter supports stage scaling. However, it does not support general scaling, rotation, and skewing. If the object itself is scaled (_xscale and _yscale are not 100%), the filter effect is not scaled. It is scaled only when you zoom in on the Stage.

A filter is not applied if the resulting image exceeds 2880 pixels in width or height. If, for example, you zoom in on a large movie clip with a filter applied, the filter is turned off if the resulting image exceeds the limit of 2880 pixels.

Availability: ActionScript 1.0; Flash Player 8

See also

filters (MovieClip.filters property), cacheAsBitmap (MovieClip.cacheAsBitmap property), filters (Button.filters property), cacheAsBitmap (Button.cacheAsBitmap property), filters (TextField.filters property), applyFilter (BitmapData.applyFilter method)

Property summary

Modifiers

Property

Description

 

blurX:Number

The amount of horizontal blur.

 

blurY:Number

The amount of vertical blur.

 

quality:Number

The number of times to perform the blur.

Properties inherited from class Object

constructor, __proto__, prototype, __resolve


Constructor summary

Signature

Description

BlurFilter([blurX:Number], [blurY:Number], [quality:Number])

Initializes the filter with the specified parameters.

Method summary

Modifiers

Signature

Description

 

clone() : BlurFilter

Returns a copy of this filter object.

Methods inherited from class BitmapFilter

clone


Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

Comments


No screen name said on Dec 12, 2005 at 1:37 AM :
The documentation states that this class is available to AS1 Flash Player 8

The import command however is AS2 only. How do I enable this effect for AS1 if the import statement does not work?
sdean@lastminute.com said on May 21, 2007 at 2:12 AM :
Use the fully qualified name of the object.

i.e. Use flash.filters.BlurFilter instead of just BlurFilter

myMovie.filters=new Array(new flash.filters.BlurFilter(2,2,5))

Sam

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001974.html