Demo:
Usage:
// Import the BlurFilter class
Import flash. filters. BlurFilter;
// Define a BlurFilter. The numbers in the BlurFilter represent the number of _ x, _ y, and the number of fuzzy operations.
Var my_BlurFilter: BlurFilter = new BlurFilter (10, 10, 2)
// Add a filter using an array
Var my_Array = new Array ();
My_Array.push (my_BlurFilter );
// Assign the filter BlurFilter to MC.
My_mc.filters = my_Array;
Here, you need to remove the BlurFilter class method:
My_mc.filters = null;
The code is as follows:
/* ---------------- Http://www.taoshaw.com ------------------*/
// Fixed the size of the Flash content, so it remains unchanged even when the player window is changed. If the player window is smaller than the Flash content, some cropping may be performed...
Stage. scaleMode = 'noscal ';
// Import the BlurFilter class
Import flash. filters. BlurFilter;
// Define the amount of horizontal blur
Var blurX: Number = 10;
// Define the vertical blur volume
Var blurY: Number = 10;
// Define the number of fuzzy attempts
Var quality: Number = 2;
// Define a BlurFilter class
Var myBlurfilter: BlurFilter = new BlurFilter (blurX, blurY, quality );
Var filterArray: Array = new Array ();
// Add the blur effect
FilterArray. push (myBlurfilter );
// Define the blur effect of myPic_mc
MyPic_mc.filters = filterArray;
// When the mouse moves up, clear the filter.
OK. Onrolover = function (): Void {
// Clear the filter
MyPic_mc.filters = null;
};
// Continue to blur when the mouse is removed
OK. Onrolout = function (): Void {
MyPic_mc.filters = filterArray;
};