topical media & game development
actionscript-socket-demo.mx
actionscript-socket-demo.mx
[swf]
flex
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script>
//import flash.net.*;
import mx.controls.*;
private var socket:actionscript_socket_CustomSocket;
public function init():void {
//Security.allowDomain("localhost");
//Security.loadPolicyFile("http://localhost" + "/crossdomain.xml");
Security.loadPolicyFile("xmlsocket://localhost:843");
socket = new actionscript_socket_CustomSocket(console, "localhost", 9001);
}
</mx:Script>
<mx:Button label="Load" click="socket.sendRequest();" />
<mx:TextArea id="console" width="100%" height="100%"/>
</mx:Application>
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.