Welcome To Snipplr


Everyone's Recent ActionScript 3 Snippets Tagged text



« Prev 1 2
Hi; Sometimes you need to "trim" textifield for specific height... This solves just this, perfect for news, news-readers, rss etc
1 914 posted 12 years ago by burnandbass
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 821 posted 12 years ago by adrianparr
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 1134 posted 12 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 1308 posted 12 years ago by adrianparr
embeded multiple fonts
0 715 posted 12 years ago by Praimen
Create a textfield and add a format
0 588 posted 13 years ago by marzsman
This is useful if you are loading html-text via XML and want to remove additional line-breaks, newlines, formfeeds and tabs. It just leaves the clean html.
0 490 posted 13 years ago by konrad_ha
Very simple and basic TextHandle class, extends TextField... You can extend to fit your needs. Basic usage: var a:TextHandle = new TextHandle("some text"); addChild(a) Optional params: _size: uint ( default 22 ) - size of the textfiled...
1 676 posted 13 years ago by burnandbass
Returns a circle filled with textfields with your text. fully customizable. See the actionscript comments for usage
2 562 posted 13 years ago by withinmedianl
If you ever wanted to add padding to a Text Input instance, use the \"textPadding\" Style under the Text Input Class like so.
2 704 posted 13 years ago by jafar
To style the text in a TextArea component, create a TextFormat object and pass it to the TextArea's setStyle method.
0 941 posted 13 years ago by adrianparr
This snippet shows how you can detect when a FlowElement that has been added to a TextFlow object (Text Layout Framework) has run to the end of the container that is flowing into. You may have linked containers that you are flowing a load of lorem ip...
0 936 posted 14 years ago by LeeProbert
This snippet shows how you can detect when a FlowElement that has been added to a TextFlow object (Text Layout Framework) has run to the end of the container that is flowing into. You may have linked containers that you are flowing a load of lorem ip...
0 957 posted 14 years ago by LeeProbert
0 357 posted 14 years ago by edsonpavoni
The FontsManager class has embedded fonts in it. This is not a TLF class.
0 725 posted 14 years ago by LeeProbert
Grant Skinner's RegExr: Online Regular Expression Testing Tool is very handy for checking your regular expressions. http://www.gskinner.com/RegExr/
0 1442 posted 14 years ago by adrianparr
A dynamic text field doesn't like to be set to bold (or italic, whatever). You can get around this issue by creating a text format in actionscript and setting that field's format to this newly-created one. This is only good for having a text field...
1 986 posted 14 years ago by Winkyboy
1 654 posted 14 years ago by pfeisinger
« Prev 1 2