Browse Source

disable resources with as3gen

Nicolas Cannasse 18 years ago
parent
commit
e0307a5d5f
3 changed files with 8 additions and 1 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 3 1
      std/Std.hx
  3. 4 0
      std/flash9/Boot.hx

+ 1 - 0
doc/CHANGES.txt

@@ -3,6 +3,7 @@
 	change with "untyped" : arguments types are checked (because of opt select)
 	change with "untyped" : arguments types are checked (because of opt select)
 	haxedoc : fixed type parameters display
 	haxedoc : fixed type parameters display
 	fix for JS and Flash9 XML parser : allow newlines in attributes
 	fix for JS and Flash9 XML parser : allow newlines in attributes
+	disable Flash9 resources with AS3Gen
 
 
 2007-07-25: 1.14
 2007-07-25: 1.14
 	fixed no error when invalid "catch" expression
 	fixed no error when invalid "catch" expression

+ 3 - 1
std/Std.hx

@@ -182,7 +182,9 @@ class Std {
 	**/
 	**/
 	public static function resource( name : String ) : String {
 	public static function resource( name : String ) : String {
 		return untyped
 		return untyped
-		#if flash9
+		#if as3gen
+		throw "Not supported in AS3";
+		#else flash9
 		flash.Boot.__res[name];
 		flash.Boot.__res[name];
 		#else flash
 		#else flash
 		flash.Boot.__res[name];
 		flash.Boot.__res[name];

+ 4 - 0
std/flash9/Boot.hx

@@ -7,7 +7,11 @@ class Boot extends flash.display.MovieClip {
 	static var init : Void -> Void;
 	static var init : Void -> Void;
 	static var tf : flash.text.TextField;
 	static var tf : flash.text.TextField;
 	static var lines : Array<String>;
 	static var lines : Array<String>;
+
+	#if !as3gen
 	static var __res : flash.utils.Dictionary;
 	static var __res : flash.utils.Dictionary;
+	#end
+
 	public static var skip_constructor = false;
 	public static var skip_constructor = false;
 
 
 	public function new(?mc:flash.display.MovieClip) {
 	public function new(?mc:flash.display.MovieClip) {