You are on page 1of 7

SNOW FALLS AIM:

To create a snow falls effect using flash documents.

ALGORITHM:
Step 1: First create a new Flash document and find an image to use as your background, I use this one (300x224 pixels). Resize your document to fit with your background and set the frame rate to 20 and click OK. Step 2: Drag and drop your photo onto your document, make sure it lies inside your document Step 3: Create a new layer, use the Oval Tool with empty border color and white fill color to draw a small circle.

Step 4: Use the Selection Tool to select it and press F8 to convert it to a movie clip type and name it mc_snow.

Step 5: Press Ctrl-F3 to bring up the Properties box if it is not showed up and name it snow in the Instance name input

Step 6: Select the Selection Tool (V) and click once on the Movie Clip (circle) to select it. Then, go to the Action Script Panel (F9) and enter this code inside the actions panel: onClipEvent (load) { this._xscale = this._yscale = Math.random() * 40 + 20; this._x = Math.random() * Stage.width; this._y = Math.random() * 200 - 200; this._alpha = Math.random() * 20 + 80; speed = Math.random()*3 + 2; } onClipEvent (enterFrame) { this._y += speed; if (this._y>=Stage.height) { this._y = -5; } }

Step 7: Create a new layer and name it action, click on its first frame and press F9 to bring up the Action panel then type in: for(k=0;k<100;k++) { duplicateMovieClip("snow","snow"+k,k); } OUTPUT: Below is the result when pressing Ctrl-Enter to test:

RESULT: Thus the above program was successfully executed and verified .

Ex.no. :11 Date :

CAR MOVING AIM:


To create a flash document for moving a car .

ALGORITHM:
Step 1: Create a new document and press Ctrl-J to open Document Properties dialog, set your document to 450px widthand 192px height to fit with the road image

Next you will need to find two images car and road or use the images below Car:

Road:

Step 2: Go to File>Import>Import to Library and select these images from the dialog. Press Ctrl-L to open up the Librarypanel if you don't see it

Step 3: Place the road image on Layer 1 (the image has the same dimensions as your document), rename this layer Road. Create a new layer and place your car on the right hand side of the road image

Step 4: Use the Free Transform Tool(Q) to rotate our car to fit with the road

Step 5: Create a new Motion Guide layer and use the Pen Tool(P) to draw a path like this (its color is not important)

Step 6: Click on frame 45 and press F6 to place a keyframe there, repeat this step with car and road layers

Step 7: Click on the frame 45 of the Car layer and move our car to the left hand side of the road. Use the Free Transform Tool to rotate our car a bit

Step 8: Right click on any frame between 0 and 45 of the car layer and select Create Motion Tween. Now you can pressCtrl-Enter to test your result. Notice that you will see our car moving along the path but its direction is not correct Click on frame 4 of Car layer and press F6 to place a keyframe here, then select the Free Transform Tool to rotate it a bitRepeat this step with some other frames. You can see my process below

OUTPUT: Now press Ctrl-Enter to see your result!

You might also like