Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mebens/sosconnection
A class that makes using SOS max more straight forward.
https://github.com/mebens/sosconnection
Last synced: about 1 month ago
JSON representation
A class that makes using SOS max more straight forward.
- Host: GitHub
- URL: https://github.com/mebens/sosconnection
- Owner: mebens
- License: zlib
- Created: 2011-02-22T00:04:45.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-06-03T02:59:52.000Z (over 13 years ago)
- Last Synced: 2023-03-11T15:06:04.839Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://www.nova-fusion.com/projects/flash/sosconnection
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[SOS max](http://www.sos.powerflasher.com/) is a socket server, that provides a graphical interface for outputting debugging messages from Flash. It's sort of a much more advanced trace() function, that helps when you don't have access to the data trace() outputs. However, since SOS max is connected to through XMLSocket, it's a bit more work to set up than trace(). SOSConnection helps with that. It handles the set up of the connection, and provides many helper functions so you can just plainly trace out your data, and not worry about mixing different XML nodes. Let's have a look at a quick example:
# Quick Example
**Normal Code**
``` actionscript3
var sos:XMLSocket = new XMLSocket("localhost", 4444);
sos.addEventListener(Event.CONNECT, onConnect);function onConnect(event:Event):void
{
sos.send("!SOSThis is my trace styled message!\n");
sos.send("!SOScustom" + 0xff00ff + "\n");
sos.send("!SOS" +
"Folded Message" +
"This is my multi-line\nmessage\n..." +
"\n");
sos.send("!SOS\n");
}
```**Code with SOSConnection**
``` actionscript3
var sos:SOSConnection = new SOSConnection();
sos.addEventListener(Event.CONNECT, onConnect);function onConnect(event:Event):void
{
sos.trace("This is my trace styled message!");
sos.setKey("custom", 0xff00ff);
sos.sendFoldMessage("Folded Message", "This is my multi-line\nmessage\n...", "custom");
sos.clear();
}
```As you can see, SOSConnection deals with all the XML nodes for you, allowing you to focus on what you want to send. And if you really want to send something custom, you can use the send() function.
# Main Features
* Handles setup of connection for you
* Handles XML nodes for you, allowing to focus on what you actually want to send
* Many helpful functions in the class, one for every standard key that comes with SOS max# Change Log
**Version 1.0.1 - October 22, 2010**
Fixed a rather large design flaw. It was very possible to try and send messages to SOS max before the connection had been made in version 1.0. This is now how you setup your SOSConnection:
``` actionscript3
var sos:SOSConnection = new SOSConnection();
sos.addEventListener(Event.CONNECT, yourConnectListener);
```**Version 1.0 - August 8, 2010**
Initial release.