<HTML>
<BODY bgcolor="#FFFFFF"><?php
$dim = array("w" => 400, "h" => 300);
$library_charts = $library . "/charts_library";
/**
* ATTENTION:
* This sample does only work in combination with QOpenFlash
* You have to provide the path to QOpenFlash class too.
* Look at the include and config section
*/
// includes
include_once("{path-to-QSWFObject}/QSWFObject.class.php");
// config
$config = array(
"width"=>$dim["w"],
"height"=>$dim["h"],
"path"=>"{path-to-ofc}/open_flash_chart",
"url"=>"sample_bar3d.php",
"id"=>"o".substr(md5(rand()),0,7),
"bgcolor" => "#ffffff"
);
// swf object
$swfObject = new SWFObject();
$swfObject->addConfig($config);
$swfObject->init();
$swfObject->setParam(array("name"=>"movie", "value"=> $config["path"].'/open-flash-chart.swf?width='. $config["width"] .'&height='. $config["height"] . '&data='. $config["url"]));
$swfObject->setParam(array("name"=>"quality", "value"=>"high"));
$swfObject->setParam(array("name"=>"bgcolor", "value"=>$config["bgcolor"]));
$swfObject->setEmbed(
array(
"src"=> $config["path"].'/open-flash-chart.swf?width='. $config["width"] .'&height='. $config["height"] . '&data='. $config["url"],
"quality" => "high",
"bgcolor" => "#".$config["bgcolor"],
"width"=>$dim["h"],
"height"=>$dim["h"],
"name" => "charts",
"id" => "charts",
"swLiveConnect" => "true",
"type" => "application/x-shockwave-flash",
"pluginspage" => "http://www.macromedia.com/go/getflashplayer"
)
);
$swfObject->render();
?></BODY>
</HTML>
|