Dec 5, 2008
Telnet functionality added to AS3 ANSI

Adding telnet functionality was a logical and relatively simple step to take with AS3 ANSI. Connecting to various BBS's also served as a great testing environment for the viewer. Consequently, many display bugs were fixed. Most notably, I managed to nail down several bugs that involved cursor positioning.
One major change that I had to implement to the viewer was moving over entirely to Bitmap drawing routines. The Sprite drawing method was just proving to be inflexible with operations like scrolling and transformations. One drawback from the switch is being limited to the 2,880 (double in F10) pixel size restriction.
A few new parameters were added to the viewer:
-
AnsiViewer( columnWidth:Number=80, lineHeight:Number=24, scroll:Boolean=true )
The height and width parameters are meant to lock a screen resolution size, like a regular terminal window. Scrolling pushes the 'screen' content higher depending on your locked height.
So where's the online demo? Well, there isn't one. Since I don't run a BBS of my own, I can't write the necessary policy files required to establish a socket connection to a port. If you run your own telnet site, this library could be useful for providing users access through a browser. To be honest, I just built it for fun, but if you're a Sysop and want your BBS running in your website drop me a line and I can help you out.
Here's how you use it:
-
import net.peternitsch.ansi.telnet.TelnetSession;
-
import net.peternitsch.ansi.viewer.AnsiViewer;
-
-
var viewer:AnsiViewer = new AnsiViewer(80, 25);
-
addChild( viewer.getBitmap() );
-
-
var session:TelnetSession = new TelnetSession(viewer, "site.com", 23);
-
session.start();
The library is still beta, but feel free to comment with any requests, suggestions, or rants. I'm still planning on adding 80x50 support, JPG export, and baud speed control.



Awesome to the awesomest.
Maybe you could convince TMO over at http://lord.nuklear.org to host a crossdomain policy file – they’re pretty popular (hosting 4 maxed out LORD games) and a Flash client would probably be a great alternative to their java-based separate window (which doesn’t even parse ANSI that well, I had to use a separate Putty client to properly use it).
Funny you should mention that. I’ve been playing around with connecting directly to Trade Wars 2002 game servers, and discovered that I need to add telnet command codes (described here: http://www.pcmicro.com/netfoss/telnet.html). I’ve changed the parser around a bit and added a more agnostic command interpreter to allow this. Yesterday I got TW running from http://www.oregonsouth.com/ice9/.
I’ll send some emails around and hopefully get demos posted soon.
Hey!!! nice blog!
Well I dont understand too much of all these things but It looks like very interesting. But It´s a little bit complicated too. I´ve found many doubts in the net about how can they add telnet functionality for example on servers or things like these. Maybe I can recomend your site
I’d like to try to get this working on my site? What would I need to do so?
Thanks for stopping by the Realm of Serion BBS! I’m very excited about this tool! I’d like to help any way I can to help in the testing process.