home page icon Flash Bestiary / Circles / Yin Yang Kaleidoscope
   

Yin Yang Kaleidoscope

This, the first kaleidoscope in this series, demonstrates how to achieve a basic kaleidoscope effect.

Kaleidscopes use two or three mirrors to create reflections on an original image, called an object cell.

There are 5 pairs of movieclips making up this movie, representing the mirror reflections from a single image. Each movieclip calls the same function to draw the same set of objects. The information for drawing these objects (or "sprites") is stored in an array, and modified using random numbers.

One of the movies in each pair is scaled by -100% to flip it horizontally, creating a mirror-image. Each pair of movie clips is rotated around the circle by 360/5 = 72 degrees.

Finally, all the movies are masked by a circle, representing the outer boundary of the kaleidoscope.

 

sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: Bubble Kaleidoscope

Having trouble opening the project? You may need to Upgrade to Flash MX 2004



Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback