Macromedia Flash - Apply Glow effects to images with AS code
In this article we will look at how to apply Glow filter to any image using the AS code. You can use this effect for some flash buttons or banners . Through this lesson, you will learn how to convert any image into a Movie Clip Symbol, how to give permission to execute a code on it and many other tricks.
Step 1
Create a new flash document. Press Ctrl + J key on the keyboard ( Document Properties ) and set your Frame rate to 30 and click OK .
Step 2
Now select File > Import > Import to Stage ( Ctrl + R ) and import any image into the flash stage.
Step 3
While the image is still selected, press F8 key ( Convert to Symbol ) to convert it into a Movie Clip Symbol
Step 4
While the newly created movie clip is still selected, go to the Properties Panel below the stage. In the left pane, you will see the Instance name field, name this Movie Clip image as shown below:
Step 5
Call the current layer image. Double-click on its default name ( Layer 1 ) to rename it. Press Enter when you have finished typing the new name.
Step 6
Create a new layer above the layer image and name it action
Step 7
Select the first frame of layer action and go to the Action Script Panel ( F9 ). Then, enter this code in the actions section:
import flash.filters. *;
var gf: GlowFilter = new GlowFilter (0x70A146, 15, 18, 14, 3, 3, true, false);
var ds: DropShadowFilter = new DropShadowFilter (2, 35, 0x70a146, 5, 5, 5, .8, 3, false, false, false);
image.filters = [gf, ds];
image.onRollOver = function () {
this.onEnterFrame = function () {
gf.blurX + = (80-gf.blurX) / 5;
gf.blurY = gf.blurX;
image.filters = [gf, ds];
};
};
image.onRollOut = function () {
this.onEnterFrame = function () {
gf.blurX + = (20-gf.blurX) / 5;
gf.blurY = gf.blurX;
image.filters = [gf, ds];
if (gf.blurX <21) {
delete this.onEnterFrame;
}
};
};
Check your movie now ( Ctrl + Enter )
Good luck!
You should read it
- Macromedia Flash - Create banner text effect
- Macromedia Flash - Text display effect
- Macromedia Flash - Vivid photo effects
- Macromedia Flash - Create menu effects
- Macromedia Flash - Product image advertising effects
- Macromedia Flash - Advanced masking with action script
- How to use Photoshop CS5 - Part 12: Create Light and Glow effects
- Macromedia Flash - Effects with the cube
May be interested
- Macromedia Flash - Visual effects using mouse clickin this article we will step by step learn how to create visual effects using mouse clicks. you can use these effects for flash banners, for some presentations
- Macromedia Flash - Effects of lighting on photosin this article, we will step by step learn how to create a lighting effect on the photo with some special flash tips and macromedia flash filters.
- Macromedia Flash - Text presentation in Flashin this article, we will learn how to create a text presentation in flash using some special flash tips.
- 10 indispensable Office applications of Linuxlinux integrates many tools to help you overcome any difficulties at work. here are 10 office applications of linux that can please everyone.
- Macromedia Flash - Program flash download designin this article, tipsmake.com would like to guide you how to design an interface that is loading the program using actions script. you can use to create a template like in a lesson or create any image you want.
- World fashion modeling softwareprograms such as accumark, kaledo 3d trend ... will help professional or amateur designers easily create new fads with reasonable calculations to save fabrics when sewing.