Copy link to clipboard
Copied
When I set flow behaviour on "multiline no wrap" then I can't change height
for example put 2 TLF text field on scene - one with behaviour on "multiline" - second "multiline now wrap"
try this code
stage.addEventListener(MouseEvent.CLICK, resizeField);
var _height:int = 200;
txt1.wordWrap = true;
txt1.multiline = true;
txt1.border = true;
txt1.autoSize = TextFieldAutoSize.LEFT;
txt2.wordWrap = true;
txt2.multiline = true;
txt2.border = true;
txt2.autoSize = TextFieldAutoSize.LEFT;
function resizeField(e:MouseEvent):void
{
_height = _height+100;
txt1.height = _height;
txt2.height = _height;
}
field with behaviour on "multiline" is resizing down
field with behaviour on "multiline now wrap" is not working - still have this same height - how can I change this dynamic in as code?
Copy link to clipboard
Copied
instead of using script have you tried setting it in the properties box?
Copy link to clipboard
Copied
yes change from "multiline now wrap" to "multiline" is fixing problem, but this is not solution for dynamicly changing properties in AS, I have many templates in my application with this problem (upgrade from classic text) and this is some bug in TLF - solution is changing by code this - but how?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now