Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

TLF multiline no wrap and text height problem

New Here ,
Mar 14, 2013 Mar 14, 2013

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?

TOPICS
ActionScript
975
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013

instead of using script have you tried setting it in the properties box?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013
LATEST

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines