Icon animation

Added on: 2010-06-18

Added by: Radu Brega

Hi…..friends today i will show how create an icon animation with flash.

Example:

Step 1: First,choose an icon that we will use for this lesson.

Step 2: Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the width of your document to 400 pixels and the height to 300 pixels. Select #CCCCCC color as background color. Set your Flash movie's frame rate to 34 and click ok.


 

Step 3: Call the current layer icon. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step4: Choose now File > Import > Import to stage (Ctrl+R) and import the icon that you just downloaded in step 1 into a flash stage.

Step 5: While the icon is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.

Step 6: While the new made movie clip is still selected, hit delete key on the keyboard to delete it from the flash stage.

Step 7: Go now to to flash library (Ctrl+L), right click on the SaleIcon_mc and choose Linkage.

Step 8: After that, make the adjustments as follows:

Step 9: Select the first frame of layer sale icon and go to the AS panel (F9). Then, and enter this code inside the actions panel:
var icons = 14;
var maxSpeed = 14;
var minSpeed = 7
for (var i = 0; i var icon = this.attachMovie("icon", "icon"+i, i);
icon._x = random(Stage.width);
icon._y = random(Stage.height);
var size = random(2)+0.6*(random(5));
icon._width = 90;
icon._height = 90;
}
this.onEnterFrame = function() {
for (var j = 0; j var s = this["icon"+j];
if (s._y>0) {
s._y -= random(maxSpeed-minSpeed)+minSpeed; } else {
s._y = Stage.height;
}
}
};

Now you are done!!

© Brega Radu | 2010