Sample #06
creating new swf file
  1. <?php
  2. include("sample_utils.php"); // provides some utils and using mk
  3.  
  4. $swf = new MKswf();
  5. $swf->set_swfDir(SERVER_MKTMP);
  6. $swf->set_backgroundColor("#FF6600");
  7. $swf->swf_output();
  8. $swfHeader = $swf->fetch_assoc();
  9.  
  10. trace_array_assoc($swfHeader, "<strong>swfHeader</strong>");
  11.  
  12. $str = "<br />" .render_swf_box($swfHeader, $imgDir, false);
  13. $str .= "<br/><strong>";
  14. $str .= $swf->get_swfFileName() ." created in " .SERVER_MKTMP ."</strong>";
  15.  
  16. $content = trace_var($str, "", true, true, true);
  17. echo show_content($content, basename(__FILE__));
  18. ?>
creating new swf file is very simple. All framework uses default values or you can specify when instantiating MKswf or later, see the api reference. In this example it will result an empty swf file with #FF6600 background color (default is #FFFFFF - white). mikrokosmos