Browse Source

minor f9 fixes

Nicolas Cannasse 17 years ago
parent
commit
1df7db1995
2 changed files with 7 additions and 3 deletions
  1. 6 2
      std/flash9/Boot.hx
  2. 1 1
      std/haxe/remoting/Connection.hx

+ 6 - 2
std/flash9/Boot.hx

@@ -61,8 +61,12 @@ class Boot extends flash.display.MovieClip {
 		lines = new Array();
 		var c = if( mc == null ) this else mc;
 		flash.Lib.current = c;
-		untyped if( c.stage != null && c.stage.align == "" )
-			c.stage.align = "TOP_LEFT";
+		try {
+			untyped if( c.stage != null && c.stage.align == "" )
+				c.stage.align = "TOP_LEFT";
+		} catch( e : Dynamic ) {
+			// security error when loading from different domain
+		}
 		if( init != null )
 			init();
 	}

+ 1 - 1
std/haxe/remoting/Connection.hx

@@ -145,7 +145,7 @@ class Connection implements Dynamic<Connection> {
 	static function __init__() {
 	#end
 		#if flash9
-		function() { try flash.external.ExternalInterface.addCallback("remotingCall",doCall) catch( e : Dynamic ) {} }();
+		var _ = function() { try flash.external.ExternalInterface.addCallback("remotingCall",doCall) catch( e : Dynamic ) {} }();
 		#else flash8
 		flash.external.ExternalInterface.addCallback("remotingCall",null,doCall);
 		#end