Hi all!
I have this functions which attaches movieclips on the Stage and makes them move clockwise. The problem is i cant pass the radius* variable to the new movieclips.
the code
function placeItems(itemName:String, num:Number) {
var angle:Number = 0;
var radius:Array = new Array();
for (var i:Number = 0; i<num; i++) {
radius* = Math.floor(Math.random()*100);
this.attachMovie(itemName,"item"+i+"_mc",this.getNextHighestDepth());
this["item"+i+"_mc"].onEnterFrame = function() {
this._x = Stage.width/2+(radius**(Math.cos(angle*(Math.PI/180))));
this._y = Stage.height/2+(radius**(Math.sin(angle*(Math.PI/180))));
angle++;
};
}
}
placeItems("test",5);
Thank you in advance!