fosFORO is a Text Formatter in Flash which allows you to use emoticons and other features in your textfields. It's simple to use, and with a few lines of code you can define the emoticons to use.
An example :
More information soon.
[b]Text[/b] : Display bold text
[u]Text[/u] : Display underlined text
[hl]Text[/hl] : Highlight text
[quote]Text[/quote] : Display quoted text (one level, what means you can't quote a quoted text)
[code]Text[/code] : Display Colored Text as Code (use a modification of FlashTextFormatter Classes)
[url=link]Text[/url] : Used to put links (the old [url] tag is now [erl])
[img=url] : Display an image or a SWF (buggy at SWFv8)
[youtube=code] : Display a YouTube's video, where “code” is the code of it.
Add new emoticons is really simple, just create a new MC, link it to use with ActionScript and then put this line at your code :
Fosforo.addEmo(code,linkName);
For Example :
Fosforo.addEmo(":beer:","beer");
Just really simple to use :
//Import the Class import Fosforo; class Test{ public static function main() { // Add some emoticons // Fosforo.addEmo(code,linkName); Fosforo.addEmo("xD","chino"); Fosforo.addEmo(":D","sonrisa"); Fosforo.addEmo(":beer:","beer"); Fosforo.addEmo(";)","guino"); Fosforo.addEmo(":p","lengua"); Fosforo.addEmo(":love:","love"); Fosforo.addEmo(":ninja:","ninja"); Fosforo.addEmo(":cc:","cristal_cannabis"); // Create a MC that contents all the stuff _root.createEmptyMovieClip("fos",300); // Create fosFORO Object (MovieClip,x,y,width,relation,height) _root.no = new Fosforo(_root.fos,30,30,490,4/3,400); // Add some text (and parse it) to the fosFORO Object _root.no.parseText('Lorem xD leifaerbfcaer uax reuixi rueauybae pede eu [b]rhoncus vestibulum[/b], eros pede hendrerit felis, eu commodo orci massa eget orci. ',"text"); } }
If you encounter any bugs while using fosforo, please send details including OS and player version to: nodani (a) gmail.com
Discussion