From 4db65a7bc6b0bc33a47695676da9d70fa8a8c89a Mon Sep 17 00:00:00 2001 From: mzp Date: Sun, 11 Oct 2009 10:31:55 +0900 Subject: [PATCH] Add swf-template generator for habc-link Template module genartes a template. Habc-link use it when generates swf file. --- link/OMakefile | 1 + link/template.ml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 link/template.ml diff --git a/link/OMakefile b/link/OMakefile index 6e32ec7..d746f19 100644 --- a/link/OMakefile +++ b/link/OMakefile @@ -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 index 0000000..8bdb30b --- /dev/null +++ b/link/template.ml @@ -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)] + ] +} + -- 2.11.0