ソースを参照

opera / swfobject 2 support ?

Nicolas Cannasse 17 年 前
コミット
953a3fade0

+ 1 - 0
std/haxe/remoting/ExternalConnection.hx

@@ -70,6 +70,7 @@ class ExternalConnection implements Connection, implements Dynamic<Connection> {
 			data = flash.external.ExternalInterface.call("haxe.remoting.ExternalConnection.doCall",__data.name,__path.join("."),params);
 		#elseif js
 			var fobj : Dynamic = untyped window.document[__data.flash];
+			if( fobj == null ) fobj = untyped window.document.getElementById[__data.flash];
 			if( fobj == null ) throw "Could not find flash object '"+__data.flash+"'";
 			try	data = fobj.externalRemotingCall(__data.name,__path.join("."),params) catch( e : Dynamic ) {};
 		#end

+ 1 - 0
std/haxe/remoting/FlashJsConnection.hx

@@ -131,6 +131,7 @@ class FlashJsConnection #if flash implements AsyncConnection, implements Dynamic
 	static function flashCall( flashObj : String, name : String, path : String, params : String ) : String {
 		try {
 			var fobj : Dynamic = untyped window.document[flashObj];
+			if( fobj == null ) fobj = untyped window.document.getElementById[flashObj];
 			if( fobj == null ) throw "Could not find flash object '"+flashObj+"'";
 			var data = null;
 			try data = fobj.flashJsRemotingCall(name,path,params) catch( e : Dynamic ) {};