Esempio n. 1
0
        $totalSWFObjects++;
    }
    foreach ($svg->rect as $rect) {
        $rectfillColor = rgbConvert($rect['fill']);
        $rectlineColor = rgbConvert($rect['stroke']);
        $CharacterInfo = $swf->DefineRectangleSolid($rect['x'] * 20, $height * 20 - $rect['y'] * 20, $rect['x'] * 20 + $rect['width'] * 20, $height * 20 - ($rect['y'] * 20 + $rect['height'] * 20), $rect['stroke-width'] * 20, false, true, $rectlineColor[0], $rectlineColor[1], $rectlineColor[2], 255, true, $rectfillColor[0], $rectfillColor[1], $rectfillColor[2], 255);
        $CharacterDepth = $swf->EasyPlaceObject($CharacterInfo["CharacterID"]);
        $charid[$totalSWFObjects] = $CharacterInfo["CharacterID"];
        $chardepth[$totalSWFObjects] = $CharacterDepth;
        $totalSWFObjects++;
    }
    foreach ($svg->ellipse as $ellipse) {
        $ellipsefillColor = rgbConvert($rect['fill']);
        $ellipselineColor = rgbConvert($rect['stroke']);
        //Problem: Freemovie supports CIRCLES, I use ellipses, so i'll try simply using the y radius
        $CharacterInfo = $swf->DefineCircleSolid(17, $ellipse['cx'] * 20, $height * 20 - $ellipse['cy'] * 20, $ellipse['ry'] * 20, $ellipse['stroke-width'] * 20, false, true, $rectlineColor[0], $ellipselineColor[1], $ellipselineColor[2], 255, true, $ellipsefillColor[0], $ellipsefillColor[1], $ellipsefillColor[2], 255);
        $CharacterDepth = $swf->EasyPlaceObject($CharacterInfo["CharacterID"]);
        $charid[$totalSWFObjects] = $CharacterInfo["CharacterID"];
        $chardepth[$totalSWFObjects] = $CharacterDepth;
        $totalSWFObjects++;
    }
    $swf->EndFrame();
}
$swf->EndMovie();
$type = $_REQUEST['type'];
if ($type == "export") {
    $fileDir = "files";
    if ($_REQUEST['filename'] != null) {
        $SWFFileName = $_REQUEST['filename'];
    } else {
        $SWFFileName = "file-{$zhash}";