<?php
include("sample_utils.php"); // provides some utils and using mk
$sc = new MKshape_container(); // the shape
$maxIteration = 30;
for($i = 0; $i < $maxIteration; $i++){
$x = $i * 20;
trace_var($y, "Y");
$sc->clear_fillStyle(); // prepare to draw
$sc->add_fillStyle_solid("#FF9900"); // fill color, orange
$sc->add_circle(9, $x, $y); // a circle with radius, x,y
$sc->select_fill(LEFT_FILL); // prepare to draw hole
$sc->add_circle(3, $x, $y); // a circle with radius, x,y
}
$sd = $sc->update_tagData(); // get shape tag
$po = $sc->update_place_tagData(); // get placing data
$swf = new MKswf("test_draw02.swf"); // start a fresh swf
$swf->set_swfDir(SERVER_MKTMP); // change default working dir
$swf->add_tagData($sd); // populate with shape
$swf->add_tagData($po); // place on stage
$swf->swf_output(); // save to disk
$swfHeader = $swf->fetch_assoc(); // get swf header info
$str = render_swf_box($swfHeader, $imgDir, false);
$str .= "<br/><strong>test_draw02.swf created in" .SERVER_MKTMP ."</strong>";
?>