OSDN Git Service

Add swf-template generator for habc-link
authormzp <mzpppp@gmail.com>
Sun, 11 Oct 2009 01:31:55 +0000 (10:31 +0900)
committermzp <mzpppp@gmail.com>
Sun, 11 Oct 2009 01:31:55 +0000 (10:31 +0900)
Template module genartes a template. Habc-link use it when generates swf file.

link/OMakefile
link/template.ml [new file with mode: 0644]

index 6e32ec7..d746f19 100644 (file)
@@ -9,6 +9,7 @@ OCAMLPACKS[] =
 UseCamlp4(pa_oo pa_field)
 
 FILES[] =
+       template
        cmdOpt
        $(ROOT)/swflib
        $(ROOT)/config
diff --git a/link/template.ml b/link/template.ml
new file mode 100644 (file)
index 0000000..8bdb30b
--- /dev/null
@@ -0,0 +1,23 @@
+open Base
+open Swflib
+open Swflib.SwfType
+
+let make t abc : TagOut.t SwfType.t = {
+  version     = 9;
+  frame_count = 1;
+  frame_rate  = 24.;
+  frame_size  = {
+    left   = 0;
+    top    = 0;
+    right  = fst t#size;
+    bottom = snd t#size;
+  };
+  tags = [
+    `FileAttributes { TagOut.is_as3=true;  is_metadata=false; use_network=true };
+    `SetBackgroundColor t#color;
+    `FrameLabel (t#main_class,false);
+    `DoABC(true,"frame",abc);
+    `SymbolClass [(0, t#main_class)]
+  ]
+}
+