You want surprise your girl friend or some good friend in Valentine Day? In this tutorial i show you how to create great Valentine Day animation e-card using some action scripts.
Example:
First of all download thees pictures bellow:


Step 1
Create a new flash document. Select Modify > Document (shortcut key: Ctrl+J ). Set the width of your document to 400 pixels and the height to 300 pixels. Select white as background color and set your Flash movie's frame rate to 15 fps. Then, click ok.

Step 2
Then insert picture to stage (heartback.jpg). (File – Imort – Import to stage) or just click Ctrl+R. And drag it center of stage, need looks like this:

Step 3
Create new layer above layer 1. Click on first frame on layer 2 and insert heart into stage (heart.png) like we do it in step 2. Drag heart on right bottom side on stage and now it’s need look like this:

Step 4
While heart is still selected press F8 key to convert it to symbol. And name it heart.

And then go to properties panel Ctrl+3 and type instant name as „heart” too.

Step 5
Select heart and press F9 key to open action script panel and paste into action panel code what is below:
onClipEvent (load) {
movieWidth = 400;
movieHeight = 300;
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
Step 6
Now we need cretae new layer above both layers and name it „action”.

Step 7
Click on first frame of action layer and press F9 key and paste code what is below into action panel:
for (k=0; k<20; k++) {
duplicateMovieClip(this.heart, "heart"+k, k);
}
Done!
Test your movie and enjoy!
Download carzyvalentine.fla 
















[...] original here: Crazy Valentine Day animation e-card » Click on post Share and [...]