Reprint please contact: http://www.webstudio.com.cn/
1. Open Photoshop. Select a picture, as shown below. Name it blurnormal.jpg.
2. In Photoshop, use the filter Gaussian blur in Photoshop, which is a filter-blur-Gaussian blur with a radius of 15. Of course you can use other values, then save as a Web picture, named Blured.jpg
The effect is as follows:
3. Open Flash, create a new document, save named Blur.fla. Import Blurnomal.jpg and blured.jpg into the library.
Placing pictures on different layers. As shown in the following illustration:
Place the blured.jpg on the blurred layer. Place the blurnormal.jpg on the normal layer. The top-level is the as write code layer. Select the picture on the blurred layer. Press F8 to convert it to MovieClip and name the instance name blurred on the property panel.
4. Add the code to the as layer as follows:
Code:
Define a color instance object
var mycolor:color = new Color (blurred);
Initialize Color objects
var white:object = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:255};
Set color
Mycolor.settransform (white);
Execution function
SetC ();
Defining functions
function SetC () {
Onenterframe = function () {
The color offset value is decremented.
white.rb-=5;
white.gb-=5;
white.bb-=5;
white.ab-=5;
Mycolor.settransform (white);
If the ab<-255 in the offset, revert to the initial value.
if (white.ab<-255) {
white.rb=255;
white.gb=255;
white.bb=255;
white.ab=255;
Here is to demonstrate the convenience, if you want to only achieve a playback effect of the following line to remove the annotations.
Delete This.onenterframe;
}
}
}
5. Test your film, the effect is as follows:
6. If you want to make some other special color effects. You can make some changes to your code. To illustrate the problem. I added the input text to the three color offset values. You can change the value of it. To achieve a different effect.
The code is as follows:
Code:
var mycolor:color = new Color (blurred);
var white:object = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:255};
Mycolor.settransform (white);
SetC ();
function SetC () {
Onenterframe = function () {
The variable settings for the three text boxes are x,y,z.
X=mytext1.text;
Y=mytext2.text;
Z=mytext.text;
white.rb-=5;
white.gb-=5;
white.bb-=5;
white.ab-=5;
Mycolor.settransform (white);
if (white.ab<-255) {
White.rb=z;
White.gb=x;
White.bb=y;
white.ab=255;
Delete This.onenterframe;
}
}
}
7. Test your film, the effect is as follows:
Click here to download the source file