Profile
Achievement
adrianparr's Recent SnippetsTagged text
- All /
« Prev 1 Next »
TimedText (TT) XML captions files can have namespaces that cause problems when parsing them in AS3. To get around this you can use this code to remove the namespace from the root XML node using Regex. This example uses
0
4211
posted 14 years ago by adrianparr
ActionScript 3
AS3 Convert TextField LineBreaks to CRLF for Display as Plain Text (Notepad) on Windows
Linebreaks differ between Flash TextField and a plain text file like Notepad. In this example we convert the html linebreaks in Flash to \r\n
0
4609
posted 14 years ago by adrianparr
This code gets the current caretIndex in the textfield and then inserts the specified string at that point. The caretIndex position is then updated using setSelection, ready for the next insertion. This was developed to be used with an on-screen keyb...
0
2989
posted 14 years ago by adrianparr
To style the text in a TextArea component, create a TextFormat object and pass it to the TextArea's setStyle method.
0
2464
posted 16 years ago by adrianparr
Grant Skinner's RegExr: Online Regular Expression Testing Tool is very handy for checking your regular expressions.
http://www.gskinner.com/RegExr/
0
3006
posted 16 years ago by adrianparr