Problem with runtime-created TextArea and setFormatOfRange
I've got an application which, as it gets results back from a query, adds textarea's to a vgroup and displays them.
The vgroup vg exists at compilation, the summary textarea's do not.
I'm trying to add some kind of highlighting for the keywords that were used, and I'm having some trouble. I've boiled it down to this:
var summary:TextArea = new TextArea();
summary.text = "something"
var tlf:TextLayoutFormat = new TextLayoutFormat();
tlf.fontSize = 18;
tlf.fontWeight = "bold";
tlf.color = 0xFF0000;
summary.setFormatOfRange(tlf, 0, 2);
vg.addElement(summary);For some reason, even this won't work in the context of what I'm trying to do. (this is a simplified version, I can get the code for the whole function this is running in if it'll help anyone).
Any ideas? Is what I'm trying to do even possible?
