# \[Flash 8\] DuplicateMovieClip positioning

**URL:** <https://forum.kirupa.com/t/flash-8-duplicatemovieclip-positioning/214659>\
**Category:** flash\
**Created:** [January 30, 2007, 9:54pm UTC](https://forum.kirupa.com/t/flash-8-duplicatemovieclip-positioning/214659 "2007-01-30T21:54:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oracle](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@oracle](https://forum.kirupa.com/u/oracle)\
**Post date:** [January 30, 2007, 9:54pm UTC](https://forum.kirupa.com/t/flash-8-duplicatemovieclip-positioning/214659/1 "2007-01-30T21:54:46Z")

</div>

I am having a problem that seems similar to the one shown here: [http://www.kirupa.com/forum/showthread.php?t=215026](http://www.kirupa.com/forum/showthread.php?t=215026)

\*\*The Scenario: \*\*I started trying to learn Flash last week, and I feel like I’ve covered most of the basics. Pushing forward, I’ve been giving myself little tasks that I’ll eventually combine into a larger project. Right now, I want to mouseover an object, and have a number of movie clips appear in a circle around it. So far, I have a test object to hover over, and a test clip to duplicate.

**The Code:** I only want this to happen once, so I’m using a global variable to determine if it’s already happened, which is set to 0 when the swf loads. The Actionscript is on the icon clip.

```auto

this.onRollOver= function(){
    if (circleMade == 0) {
// Number of clips to duplicate
        var nItems = 5;
// Radius of circle
        var circleRad = 45;
        for (i=0;i<5;i++){
           var currentMenuButton = "roundMenuButton" + i;
           duplicateMovieClip (_root.roundMenuButton, currentMenuButton, _root.getNextHighestDepth());
// Determine angle of rotation for current clip
           var nAngle = ( 360 / nItems ) * (1 + i);
// Set X and Y based on rotation and radius
           var nX = circleRad * Math.cos(nAngle);
           var nY = circleRad * Math.sin(nAngle);
           currentMenuButton._x = nX;
           currentMenuButton._y = nY;
        }
    }
    else {}
    _global.circleMade = 1;
}
}

```

**The Problem:** As you can see here ([http://www.fishspeaker.com/motion/flashtest/index3.html](http://www.fishspeaker.com/motion/flashtest/index3.html)), hovering over the center icon seems to do nothing . . . but wait! The small silver ball is indeed being duplicated, just in place. Checking the debug Object List confirms this - what am I doing wrong with the positioning?

Feel free to ignore the window that pops up when the icon is clicked - that’s another project entirely.
