Archive for June, 2007

Colorful polygon mouse trail effect

I am going to show you how to draw regular polygons using the Flash Drawing API. We’ll use these polygons to create a mouse trail effect by playing around with their scale, opacity and rotation.

In the example below, moving the mouse over the Stage creates a trail of polygons that grow in size and fade away. Their color, number of sides and rotation are all random.

(Move your mouse over the movie to see the effect.)

Continue reading ‘Colorful polygon mouse trail effect’

Create heat-seeking missiles with ActionScript

This tutorial will show you how you can create heat-seeking missiles using ActionScript. We will be using the explosion code from the previous tutorial, which I recommend you read. In the example below, clicking the mouse creates a missile which seeks the target. The target is dragged by the mouse. Upon reaching the target, the missile explodes. No matter where the target is moved, the missile will seek it out relentlessly.

You don’t have to understand how the explosion code works in this tutorial, although a good knowledge of trigonometry will help.

(Click with the mouse anywhere inside the movie to create a new missile.)

Continue reading ‘Create heat-seeking missiles with ActionScript’

Create arcade-style explosions in Flash

In this tutorial I am going to show you how to create relatively simple arcade-style explosions using ActionScript. To get started I would like you to take a look at the complete code, to get an idea of what you’ll be doing. Don’t worry if any part confuses you, I’ll explain each part step-by-step.

(Click with the mouse anywhere inside the movie to see an explosion.)

Continue reading ‘Create arcade-style explosions in Flash’