non funziona...prova a scrivere dentro al testo input e a dare degli a capo...vedrai che si allinea a sx....
č un bug di flash...
http://chattyfig.figleaf.com/flashco...index.php?Bugs
DESCRIPTION:
if textfield.autoSize is set to either "right", "left" or "center", and the TextFormat.align property is set to "right" the textfield "grows" on a enterFrame basis(, although there is no such event triggered by any code in my example). e.g.: if autoSize is set to "right" it grows to left.
STEPS TO REPRODUCE:
i made a little example that shows this pretty well. just copy paste the code below into a new fla file and test the movie.
// CODE //
_root.createTextField("test_txt", ++depth, 300, 20, 0, 0);
test_txt.border = true;
test_txt.variable = "testVal";
test_txt.embedFonts = false;
test_txt.type = "input";
test_txt.selectable = true;
test_txt.multiline = false;
test_txt.text = "JUST CLICK INTO ME.";
test_txt.textColor = 0xFF160B;
test_txt.autoSize = "right"; /// <<<<
test_fmt = new TextFormat();
test_fmt.font = "_sans";
test_fmt.size = 12;
test_fmt.color = 0xFF160B;
test_fmt.align = "right"; /// <<<<<
test_txt.setTextFormat(test_fmt);
// CODE //
/*
These value pairs work fine:
-----------------
test_txt.autoSize = "left"
test_fmt.align = "left";
-----------------
test_txt.autoSize = "right"
test_fmt.align = "left";
-----------------
test_txt.autoSize = "center";
test_fmt.align = "left";
-----------------
test_txt.autoSize = "right";
test_fmt.align = "center";
-----------------
test_txt.autoSize = "center";
test_fmt.align = "center";
-----------------
test_txt.autoSize = "left";
test_fmt.align = "center";
these don't:
-----------------
test_txt.autoSize = "left";
test_fmt.align = "right";
-----------------
test_txt.autoSize = "right";
test_fmt.align = "right";
-----------------
test_txt.autoSize = "center";
test_fmt.align = "right";
*/
cheers, cmyk

Rispondi quotando