I am having a problem that seems similar to the one shown here: 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.
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), 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.