1

I'm going to create a "news ticker" using adobe flash. I have a single line and dynamic TLFTextField with html content. The problem I have is fitting the width of the TLFTextField to the html text length. There is a "autoSize" property that I set to left. when I set the content with text property it works but when I use htmlText property it does not fit the width. my action scpript looks like this:

var ticker:TLFTextField = TLFTextField(f0);
var text:String = 'title_1    07:45     <font color="#27ae60">***</font>      title_2     08:50     <font color="#27ae60">***</font>      title_3     09:00     <font color="#27ae60">***</font>      title_4    10:00     <font color="#27ae60">***</font>      title_5    11:00     <font color="#27ae60">***</font>      title_6     12:00     <font color="#27ae60">***</font>      title_7   13:55';
//the text would be dynamic
ticker.autoSize = TextFieldAutoSize.LEFT;
ticker.htmlText = text;
//ticker.text = text;  //when I use this the width of ticker fits the text lenght but the text is raw and html tags are not rendered

any ideas?

mohammad fatemi
  • 327
  • 2
  • 15
  • The TLF is deprecated and the functionality will be unavailable with Flash Professional CC and later. If a FLA file containing TLF Text, previously saved with an older version of Flash Professional, is opened with Adobe Animate, then TLF is converted to Classic Text – Yoones Mashayekhi Dec 21 '20 at 06:31
  • if you want for Persian or Arabic language try other methods like https://github.com/SaffronCode/SaffronCode – Yoones Mashayekhi Dec 21 '20 at 06:36

0 Answers0