PHP Classes
elePHPant
Icontem

File: sample.fluent.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QSWFObject  >  sample.fluent.php  >  Download  
File: sample.fluent.php
Role: Example script
Content type: text/plain
Description: Same Sample but fluently designed
Class: QSWFObject
PHP Wrapper to load Flash movies
Author: By
Last change: elim. typo
Date: 6 years ago
Size: 1,243 bytes
 

Contents

Class file image Download
<HTML>
<BODY bgcolor="#FFFFFF"><?php
$library
= "openflash";
$library_charts = $library . "/";

$dim = array("w" => 640, "h" => 480);

// includes
include_once("../QSWFObject.fluent.interface.php");

// config
$config = array(
   
"width"=>$dim["w"],
   
"height"=>$dim["h"],
   
"path"=>"./",
   
"url" => "{path-to-php-script-which-renders-open-flash-data}",
);
// objects
$swfObject = new QSWFObject();
$swfObject->addConfig($config)
    ->
setParam(
        array
        (
       
"name"=>"movie",
       
"value"=> $config["path"].'/open-flash-chart.swf?width='. $config["width"] .'&height='. $config["height"] . '&data='. $config["url"]
        )
    )
    ->
setParam(array("name"=>"quality", "value"=>"high"))
    ->
setParam(array("name"=>"bgcolor", "value"=>"#ffffff"))
    ->
setEmbed(
        array
        (
       
"src"=> $config["path"].'/open-flash-chart.swf?width='. $config["width"] .'&height='. $config["height"] . '&data='. $config["url"],
       
"quality" => "high",
       
"bgcolor" => "#ffffff",
       
"width"=>$dim["h"],
       
"height"=>$dim["h"],
       
"name" => "charts",
       
"id" => "charts",
       
"swLiveConnect" => "true",
       
"type" => "application/x-shockwave-flash",
       
"pluginspage" => "http://www.macromedia.com/go/getflashplayer"
       
)
    )
    ->
render();
?></BODY>
</HTML>