# Geometric Clones Mini Tutorial

Geometric Clones Mini Tutorial:

[swf=“http://www.macromotive.com/ebay/geometric_clones.swf height=200 width=200”][/swf]
<a href=http://www.macromotive.com/ebay/geometric_clones.fla>(Here is the source file for the lazy people)</a>

Step 1:
Set up your stage to 200 x 200, white background, and the FPS to somewhere around 50. Make a new movie clip symbol and place 2 very small circles on the stage, one orange and the other blue. Select one of the circles and align it to the exact center of the clip and then use the arrow keys and press up 5 times and the right arrow key 5 times. Now select the second circle and align to the exact center of the clip and hit the down arrow key 5 times and the left arrow key 5 times. Make a small black diagonal line going from top left to bottom right like shown below and with the line select align to exact center of the clip and then hit the up arrow 20 times and the right arrow 20 times. Look so that your stage looks like mine below:

Go back to the _root timeline and place the movie clip we just made in the gray area off the stage and give it an instance name of ‘original’. Now we are completely done with adding content now we just need the code.

Step 2:
Now open up the actions window and select the movie clip and place this code inside of the actions window:

``````**onClipEvent(load) {**
//Makes the variable used to increase clones, size and location
**i = 0;
}**

**onClipEvent(enterFrame) {**
//The number '150' represents how many clones to
//make, how large they will get and the location
**if(i <= 150) {**
//Makes variable to rename the clones as they duplicate
**clone = "clone_" + i;**
//Duplicates 'this' movie clip and renames according to the var 'clone'
**duplicateMovieClip(this, clone, i);**
//Variable to se the path to the current clone
**path = _root[clone];**
//Used to make the clone larger/smaller by 'width' according to 'i'
**path._xscale = i;**
//Used to make the clone larger/smaller by 'height'according to 'i'
**path._yscale = i;**
//Used to increase the location of clone on the '_x' plane according to 'i'
**path._x = i;**
//I set this to 100 because I wanted the animation to start 100 pixils on '_y' axis
**path._y = 100;**
//Sets the '_rotation' of the clone, the higher the number the more complex of a '_rotation'
**path._rotation = i * 10;**
//Increases the variable 'i' by 1
**i++;
}**
//Makes the 'original' clip invisible
**original._visible = 0;
}**

``````

Step 3:
You can change anything to your likings, just have some fun changing numbers or adding loops and what not. Below is the Final Source File for the tutorial:

<a href=http://www.macromotive.com/ebay/geometric_clones.fla>Final Source File</a>

Wow Dan, this is amazing. Who woulda thought such simple code could produce such a great effect. Thanks for sharing this!

EDIT: I followed the tutorial, I didn’t download the file, so your tutorial is obviously good, because I got it to work fine.

Here is a result I got.

[swf=“http://www.8ballcreations.com/lostinbeta/banner/3dlooper.swf height=200 width=200”][/swf]

I call it Photon Cannon…haha.

Thanks again Dan, I will be messing with this for a long time.

Glad you liked…I’ll remember to put you on my list for when it comes to emailing early open source and tutorials!

I would definitely like that!