TextFlow onChanged event?
Is there any sort of event to track when text in a TextFlow has changed?
Is there any sort of event to track when text in a TextFlow has changed?
You could listen for the DamageEvent. That gets sent whenever something happens that causes the text to require a redraw:
textFlow.addEventListener(DamageEvent.DAMAGE, damageHandler);
If you want to find out after the fact if the text or formatting of the TextFlow has changed, you can check its generation number. This is not quite the same thing, as changes to the controller, such as resizing, are not reflected in the TextFlow's generation number.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.