type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/waterfall.swf'
width = '400'
height = '400'
bgcolor = 'black'
>

Download the sample files here.

1. Import an image of a waterfall into Flash.

2. Set this picture as your background, name it, and lock the layer.

3. Create a new layer, and name it "waterfall".

4. Next, create a small circle with a gradient fill. Convert this to a graphic object, and name it "drop".

5. Convert your "drop" graphic object to a movie clip, and name it "dropmov".

6. In the "dropmov" time line create three key frames. Insert the following action into the first key frame:

pos = _y;

7. In the second key frame, insert this action:

_y = _y+2; 
if (_y >300)
{
_y = pos;
}

8. Then, in the third key frame, insert:

gotoAndPlay (2);

9. Now, return to the main time line, and reduce the alpha of the "dropmov" movieclip to 30%. Duplicate the "dropmov" movieclip such that it covers the whole water fall.

Run the movie and you should see the above effect. Well done!

Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

Get your free chapter of Level Up Your Web Apps with Go

Get a free chapter of Level Up Your Web Apps with Go, plus updates and exclusive offers from SitePoint.


No Reader comments

Related books & courses
Available now on SitePoint Premium

Preview for $1