package { import flash.display.Sprite; import flash.events.*; import flash.net.XMLSocket; public class SocketExample extends Sprite { private var socket:XMLSocket; public function SocketExample( ) { socket = new XMLSocket( ); socket.addEventListener( Event.CONNECT, onConnect ); socket.connect( "localhost", 2900 ); } private function onConnect( event:Event ):void { trace( "The xml socket is now connected..." ); } }}Security.loadPolicyFile("http://www.navioo.com/crossdomain.xml");
Name (required)
email (will not be published) (required)
Website