Teleo Flash Class Reference Overview

This is a quick overview - please see the complete documentation for details.

For getting started details, please see the instructions on the download page. See especially the ReadMe files.

If you're curious and looking for a place to start - check out the TIntroAin class. This is the proxy for the Analog In device on the Teleo Introductory Module. A proxy is a piece of code that represents something else. In this case, the Teleo Proxies represent the devices on the TeleoModules. You'll see that they are just simple wrappers which allow type-safe communication with the Teleo hardware. Like all the proxies, TIntroAin derives from TeleoProxy, which handles a lot of the background datastructures. Other proxies for the Teleo Introductory Module include TIntroDin, TIntroDout, TIntroPwm. The general naming structure for the proxies is T[module][device] although we sometimes omit the device if there is only one.

If you want to communicate with a device, all you need to do is instantiate the proxy:

var lightSensor:TIntroAin = new TIntroAin( 0 );

After that, you can read the light sensor ( lightSensor.getValue( ) ), change it's resolution, etc.

TeleoProxy is interesting because it has the code to create and connect to the TeleoXMLConnector class which derives from XMLConnector. When a proxy is first created, if there is no TeleoXMLConnector running TeleoProxy starts one up which tries to connect to the server at "localhost" port 50000. This is how the single line above can get a connection all the way out of the flash player and into the Teleo XML Server. If you need to alter this default, you can call TeleoProxy.TeleoConnectorCreate (serverInit:String, portInit:Number) first.

TeleoXMLConnector handles all the communication with the TeleoXMLServer that you run on the machine that has the Teleo Hardware connected. You can run the TeleoXMLServer on a different machine than the one running the Flash movie, subject to the normal networking rules.

In addition to these main classes, every proxy has a Property Inspector - the Teleo Introductory Module's Analog In Inspector is called TIntroAinInspector. The Inspectors provide a simple means to read and write properties on the devices. They are very easily invoked - you simply construct one and pass in the movie clip that will serve as a parent.

var inspector:TIntroAinInspector = new TIntroAinInspector( _root, lightSensor );

The final category of class are the callback interfaces. If classes want to receive events from the proxies, they can implement the callback classes and add themselves to the list of listeners. See the TIntroAinCallback interface for an example.