Hi
I want to display some rectangle’s on a imaginaire circle.
But it doesn’t appear as I want to.
This is my code:
var items = 8;
for(var i=0; i<items; i++){
//make a random rect.
var myRect:MovieClip = attachMovie("processMoveBall","processMoveBall"+i,i);
var radius:Number = 100;
// calculate the rotaion bases on the items
var calcRot = ((360/items)*i);
var calcY = (radius*Math.cos(calcRot)*-1);
var calcX = radius*Math.sin(calcRot);
trace(i+": "+calcRot);
trace("x: "+calcY+" y: "+calcX);
//use those values
myRect._x = calcX;
myRect._y = calcY;
myRect._rotation = calcRot;
myRect._alpha = i+20;
}
You can download the fla here: http://users.pandora.be/heyninck/circleTest.fla.zip
Somebody has any hint/idea?
Thx