ActionScript Java
Switch branches/tags
Nothing to show
Latest commit 74633ad Jun 12, 2013 @hrfm hrfm no message
Failed to load latest commit information.
app create .air file Jan 17, 2013
as/org/sgmnt/lib/osc no message Jun 11, 2013
java/UDPBoadcaster update UDPBroadcaster Jan 25, 2013
test no message Jun 11, 2013
Readme.md Update Readme.md Nov 13, 2012



Be able to use OSC protocol in your AIR Application.

OSC message receive, send, and use #Bundle available.


##Adobe AIR


// import OSCSocket classes.
import org.sgmnt.lib.osc.*;

// Create OSCSocket instance.
var socket:OSCSocket = new OSCSocket();

// Use bind( port, address ) if need receiving messages.
socket.bind( 10000, "" );

###Receive messages.

You can use addEventListener method for receive OSC messages as usual.

// ex) receive /message/1
socket.addEventListener("/message/1", _onMessage);

// You can get address and arguments from OSCSocketEvent.
function _onMessage(e:OSCSocketEvent):void{
    trace( e.address, e.args );

// and, you can use * syntax in message address.
// In the following syntax, it is possible to receive /message/1, /message/hoge, etc...
socket.addEventListener("/message/*", _onMessage);

###Send messages.

You can send a message using OSCMessage.

var message:OSCMessage = new OSCMessage();
message.address = '/message/1';

// add String arguments.

// add int32 arguments.

// add float arguments.

// add double arguments.

// add blob arguments.

// Sending message to
socket.send( message, '', 10001 );

If You want to use bundle. Try to use OSCBundle.

var bundle:OSCBundle = new OSCBundle();

// Set timetag by elapsed time(milliseconds) from now timestamp;

// add OSCMassage to bundle.
bundle.addPacket( message );

// Sending bundle message to
socket.send( bundle, '', 10001 );


Released under the MIT, and GPL Licenses.