Skip to main content
Participating Frequently
February 16, 2009
Answered

Lines Atom data

  • February 16, 2009
  • 2 replies
  • 655 views
Hi,

In cases when lines are visible but have their validity as "invalid", we can't get the atom data. Is there anyway to force the lines' validity to be "valid" so that atom data can be extracted from these?

Regards,
Ahmed
This topic has been closed for replies.
Correct answer robin_briggs
TextFlowLine.getTextLine() takes an argument which is whether you need a valid line or not. By default, it will give you whatever line it has, because that is most efficient. If you need to look at the atoms, then you need a valid line, and you pass (I think, this is from memory) true:

var textLine:TextLine = textFlowLine.getTextLine(true);

Then textLine should be valid when you get it.

Hope this helps!

2 replies

robin_briggsCorrect answer
Adobe Employee
February 18, 2009
TextFlowLine.getTextLine() takes an argument which is whether you need a valid line or not. By default, it will give you whatever line it has, because that is most efficient. If you need to look at the atoms, then you need a valid line, and you pass (I think, this is from memory) true:

var textLine:TextLine = textFlowLine.getTextLine(true);

Then textLine should be valid when you get it.

Hope this helps!
Participating Frequently
February 18, 2009
Thanks Robin, thanks Richard.
The textLine I get through textFlowLine.getTextLine(true) although is not added to the display-list but gives the required information about the atom data.
Thanks,
Ahmed
Adobe Employee
February 16, 2009
No. Once they are invalid it means the referenced TextBlock has been modified and atom data is no longer available.