Je travaille sur un projet Flash dans lequel je dois tourner un texte field.I am ROTATIVE le champ de texte en utilisant cette fonction ---rotation d'un champ de texte en AS3
**function rotateAroundCenter(ob:*, angleDegrees)
{
var m:Matrix = ob.transform.matrix;
m.tx -= point.x;
m.ty -= point.y;
m.rotate(angleDegrees*(Math.PI/180));
m.tx += point.x;
m.ty += point.y;
ob.transform.matrix = m;
}**
point var: point = nouveau point (mc.x + mc.width/2, mc.y + mc.height/2);
je suis le calcul du point de mc central contenant le champ de texte en utilisant le procédé ci-dessus.
J'ai également fourni la fonction de glissement de manière à pouvoir faire glisser le champ de texte. Le problème est quand je tourne le champ de texte disons 45 degrés et puis je le traîne à l'autre position maintenant si je tourne à nouveau le champ de texte il ne tourne pas autour de son centre ou origine, il tourne autour d'un autre point même méthode --- mc.x + mc.width/2, mc.y + mc.height/2 ---
Comment calculer l'origine parfaite d'un champ de texte à tout angle de rotation.