<?php
include("sample_utils.php"); // need to include this to use mk
$swfFN = "sample02.swf";
$si = new MKswf_inspector($swfFN);
$mt = $si->fetch_assoc();
$fl = $si->get_frameList();
$sca = new MKswf_serializer($mt, $fl);
$im = new MKswf_item_grabber($swfFN, 1, IMAGE_ITEM);
$bmList = $im->get_itemList();
$str = "";
foreach($bmList as $bm){
$imgFN = $bm->get_imageFileName();
$bm->save_image();
$sHtml = "<img src=\"" .$imgDir;
$sHtml .= $imgFN ."\" width=\"";
$sHtml .= $bm->get_imageWidth() ."\" height=\"";
$sHtml .= $bm->get_imageHeight() ."\" />";
$str .= trace_var($sHtml, "saved image: " .$imgFN, false, false, true);
}
$str .= trace_var(SERVER_MKTMP, "images saved, please look in", false, false, true);
?>
saving images is quite easy, mk has to save some data before proceed, this is what