Finding the position of an element within a TextFlow


/ Published in: ActionScript 3



Copy this code and paste it in your HTML
  1. var linkStart:int = link.getAbsoluteStart();
  2. var linkEnd:int = linkStart+link.textLength;
  3.  
  4. var textFlowLine:TextFlowLine = textFlow.flowComposer.findLineAtPosition(linkStart);
  5. var lineStart:int = textFlowLine.absoluteStart;
  6. var isStartOfLine:Boolean = linkStart==lineStart;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.