SSSIIIII: Gracias!, me ha servido muchisimo ::GRACIAS::
una consulta mas, ojala que puedas, le agregue una ayudita del flash(f1), para saber la distancia en pixeles del centro al mclip, pero no creo sea la distancia real o_0', ¿que me esta enviando?
Código PHP :
var centro:MovieClip = _root.createEmptyMovieClip('centromc',_root.getNextHighestDepth());
centro._x = Stage.width/2;
centro._y= Stage.height/2;
var lado_a:Number = 0;
var lado_b:Number = 0;
var radio:Number = 100;
// objs en la circunferencia
function circulo(num:Number) {
var num:Number= 360/num;
for (i=0; i<=360; i+=num) {
lado_a = (radio*Math.cos(Math.PI/180*i));
lado_b = (radio*Math.sin(Math.PI/180*i));
var clip:MovieClip = centro.attachMovie("clip","mc"+i,i);
new mx.transitions.Tween(clip, "_x", mx.transitions.easing.Elastic.easeOut, 0, lado_a, 3, true);
new mx.transitions.Tween(clip, "_y", mx.transitions.easing.Elastic.easeOut, 0, lado_b, 3, true);
//clip._x = lado_a;
//clip._y = lado_b;
clip.grado = i;
clip.onRelease = function () {
trace (this._name+': (var grado:'+this.grado+') -----------(en bucle:for)------------ /'+newline+
'180*i: '+180*this.grado + ' --> Math.PI/ --> ' + Math.PI/180*this.grado +newline+
'(X) lado_a : radio*Math.cos(Math.PI/180*i)) --> ' + radio*Math.cos(Math.PI/180*this.grado) +newline+
'(Y) lado_b : radio*Math.sin(Math.PI/180*i)) --> ' + radio*Math.sin(Math.PI/180*this.grado));
trazo_h (this);
}
}
}
// linea (hipotenusa)
function trazo_h (param1:MovieClip):Void {
var destino:MovieClip = param1;
var origX = 0; //centro._x;
var origY = 0; //centro._y;
var newX = param1._x;
var newY = param1._y;
var minY = Math.min(origY, newY);
var nextDepth:Number = canvas_mc.getNextHighestDepth();
var line_mc:MovieClip = centro;
line_mc.moveTo(origX, origY);
line_mc.lineStyle(2, 0x000000, 100);
line_mc.lineTo(newX, newY);
var hypLen:Number = Math.sqrt(Math.pow(line_mc._width, 2)+Math.pow(line_mc._height, 2));
line_mc.createTextField("length"+nextDepth+"_txt", canvas_mc.getNextHighestDepth(), newX, newY-22, 100, 22);
line_mc['length'+nextDepth+'_txt'].text = Math.round(hypLen) +" pixels";
}
//circulo(separacion de los mc en grados);
circulo(12);