Browse Source

no stage by default, added -flash-use-stage

Nicolas Cannasse 19 years ago
parent
commit
dac5ef4a94
2 changed files with 8 additions and 0 deletions
  1. 7 0
      genswf8.ml
  2. 1 0
      main.ml

+ 7 - 0
genswf8.ml

@@ -1472,6 +1472,13 @@ let generate file ver header infile types hres =
 			let rec loop = function
 				| [] ->
 					failwith ("Frame 1 not found in " ^ file)
+				| { tdata = TUnknown (0x1A,_) } :: l  (*// PlaceObject2 *)
+				| { tdata = TUnknown (0x46,_) } :: l  (*// PlaceObject3 *)
+				| { tdata = TPlaceObject2 _ } :: l
+				| { tdata = TPlaceObject3 _ } :: l
+				| { tdata = TRemoveObject2 _ } :: l
+				| { tdata = TRemoveObject _ } :: l when not (Plugin.defined "flash_use_stage") ->
+					loop l
 				| ({ tdata = TSetBgColor _ } as t) :: l ->
 					(match tagbg with
 					| None -> t :: loop l

+ 1 - 0
main.ml

@@ -207,6 +207,7 @@ try
 		("--flash-strict", define "flash_strict", ": more type strict flash API");
 		("--no-flash-opt-args", define "no_flash_opt_args" , ": don't allow optional parameters for flash api");
 		("--no-traces", define "no_traces", ": don't compile trace calls in the program");
+		("--flash-use-stage", define "flash_use_stage", ": place objects found on the stage of the SWF lib");
 		("--next", Arg.Unit (fun() -> 
 			let p = !current in
 			current := Array.length argv;