Shake Effect

28.2.2006, 13:50
Submited in: Flash | Total Views: 78330
This tutorial will help you to learn how to apply shake effect on any object using the Action Script. You will also learn how to use instance name, how to apply action script code on text and more.








Example:




Step 1

Start Flash., and draw something or type any text. For this example I will type and draw this:



Step 2

Select one part of  object. I'm select this part:



After you have selected one part of object, press F8 key(Convert to Symbol), to convert that part into a Movie Clip Symbol. See the picture below.




Step 3

Double-click on the movie clip on stage with the Selection tool (V). You should now be inside the movie clip. While the part of object is still selected, press again F8 (Convert to symbol), to convert it again into a Movie Clip Symbol.



After that, go to the Properties Panel (Ctrl+F3), below the stage and for <instance name> type tremble. See the picture below.



Step 4

Create a new layer above layer 1, and name it Action.



Step 5

Select the first frame of layer Action, open the Action Script Panel (F9) and paste this script:

a = 3;
b = 6;
c = 9;
duplicateMovieClip(tremble, "tremble" add c, c);
tremble._x = random(a);
tremble._y = random(b);
tremble._alpha = random(45);
tremble._rotation = random(a);

Step 6

Click on frame 2 of layer picture and press F6. After open go to the Action Panel again, and paste this script:

gotoAndPlay(1);




Step 7

Go back to the main scene (Scene1) and Test the movie (Ctrl+Enter). You'll need to get something like this:



Step 8

Now, the shake effect for first part of our object is over. Repeat steps 2-7 in an equivalent way for all other parts.

Have a nice day!

Download example (71 KB)
Share this tutorial:
Category


Random tutorial
Slide Show
Added: 2.4.2006, 16:19
Total views: 101164
GsmKing.com
GsmKing offers free mobile phones specifications, news and reviews.

 Submit site
Vogon.hr Midnightformula.com

Depiction.net Biorust.com
Pixel2Life.com
Link us back
Link us back