change the font size of a sub-string in a TLF Text
I want to decrease the font size of all sub-strings located inside Parenthesis in my TLF Text.
As an example, let's say this is the text in my TLF Text (instance name "testTLF")
this is a (test) and I am test(ing) to find (out) how to resize (text).
I can find and replace all sub-strings inside Parenthesis with a Star (*) with this code:
var insideP:RegExp = /\(([^\)]+)\)/;
while (testTLF.text.search(insideP) != -1){
testTLF.text = testTLF.text.replace(insideP,"*");
}
Here is the result:
this is a * and I am test* to find * how to resize *.
Now, the question is how can I RESIZE instead of REPLACE?? to get a result like this:
this is a (test) and I am test(ing) to find (out) how to resize (text).
Thank you SO MUCH for your kind help in this case!
