Add Effects through coding in Adobe Flash Action Scrtip 3.0
Hi Friends,
This time I am going to tell you how we can add Eeffects in Adobe Flash Action Script 3.0. However, it’s a simple three or four
lines code but amazing for the beginners.
First of all we have to open flash and create a new file.
Use this reference Guide for your ready reference.
Go to File > New (Ctrl + N)
it opens a window which shows too many options, but you just select this “Flash File (ActionScript 3.0)” and press “OK” button.
See Image (first-screen.gif)
Now you have a newly created flash file having only one Layer names as “Layer 1″ double click on the “Layer 1″ and type the
name “ActionScript” and press enter. This is the time to add some code to your “ActionScript” Layer. Click on the Blank Frame
of “Action Script” Layer and press F9 it opens an Actions Panel, just copy the below mentioned code and paste to your Actions
Panel.
//—————————————————————-
import fl.transitions.*;
import fl.transitions.easing.*;
TransitionManager.start(img1_mc,
{type:Fade, direction:Transition.IN,
duration:9, easing:Strong.easeOut});
//—————————————————————-
Now you have to create a new layer by clicking on “Insert Layer” button. Then again double click on the newly created Layer and
rename it as “MovieClip” and press enter. Now add a Movie Clip to the “MovieClip” Layer. to create a Movie Clip selct the
“Rectangle Tool” or press O and click & drag to create a new shape (Create shape of your choice, no matter how it looks, but it
should be bigger in size). Ok now double click on the image, whatever you have created and press F8 to make it a Movie Clip.
Pressing F8 brings up a new screen “Convert to Symbol”. Now it’s time to give name to the Movie Clip, name it as “img”, slect
the Movie Clip radio buton and hit OK, you can see the new Symbol in Library also. Press Ctrl + L to open the Library Panel.
Now, you have to give an Instance Name to your Movie Clip. Select the object lying on the Stage, you can see the blue outline
when it’s selected. Press Ctrl + F3 to open a Property Panel, where you can find the place . Just add an
Instance Name “img1_mc” and hit enter.
Now Save the file wherever you want, and press Ctrl + Enter to test the effect.
Enjoy!!
Best Wishes
Avn.Rocky

