Browse Source

flash9 remoting.

Nicolas Cannasse 19 years ago
parent
commit
6ec58e5730
2 changed files with 7 additions and 6 deletions
  1. 2 6
      std/haxe/ImportAll.hx
  2. 5 0
      std/haxe/remoting/AsyncConnection.hx

+ 2 - 6
std/haxe/ImportAll.hx

@@ -53,14 +53,12 @@ import haxe.Template;
 import haxe.Timer;
 import haxe.Unserializer;
 
-#if !flash9
-
 import haxe.remoting.AsyncConnection;
 import haxe.remoting.AsyncDebugConnection;
 import haxe.remoting.AsyncProxy;
 import haxe.remoting.Connection;
 import haxe.remoting.DelayedConnection;
-#if flash
+#if (flash && !flash9)
 import haxe.remoting.LocalConnection;
 #end
 import haxe.remoting.Proxy;
@@ -68,13 +66,11 @@ import haxe.remoting.Proxy;
 import haxe.remoting.Server;
 import haxe.remoting.SocketBuffer;
 #end
-#if js
+#if (js || flash9)
 #else true
 import haxe.remoting.SocketConnection;
 #end
 
-#end // flash9
-
 import haxe.xml.Check;
 import haxe.xml.Fast;
 

+ 5 - 0
std/haxe/remoting/AsyncConnection.hx

@@ -99,9 +99,14 @@ class AsyncConnection implements Dynamic<AsyncConnection> {
 
 	#if flash
 	public static function amfConnect( gatewayUrl : String ) {
+		#if flash9
+		var c = new flash.net.NetConnection();
+		c.connect(gatewayUrl);
+		#else true
 		var c = new flash.NetConnection();
 		if( !c.connect(gatewayUrl) )
 			throw "Could not connected to gateway url "+gatewayUrl;
+		#end
 		return new AsyncConnection(c,[]);
 	}
 	#end