Source for file SWFObject.class.php
Documentation is available at SWFObject.class.php
include_once CLASSPATH. "html/JavaScript.class.php";
include_once CLASSPATH. "html/HTMLLayer.class.php";
* @author Daniel Plücken <daniel@debakel.net>
* @license http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
* @copyright Copyright (C) 2006 Daniel Plücken <daniel@debakel.net>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* The path to the swf object.
* The path to the swf object.
* @var string $flash_version
* Stores the parameters that should put into the swf.
* Stores the variables that should put into the swf.
* @var array $variable_arr
* Stores the delay to write the object in the html-container.
* @author Daniel Plücken <daniel@debakel.net>
* @param $id The value of the name- and id-attribute of this layer.
function SWFObject( $path, $id = "flashcontent" )
* Sets a delay for writing the object into the html-container. This can be
* used if a browser have problems with the display on a site refresh.
* @author Daniel Plücken <daniel@debakel.net>
* This function sets the required version of the flash player.
* @author Daniel Plücken <daniel@debakel.net>
* This function sets the required version of the flash player. This
* method is an alias for setVersion( $int ).
* @author Daniel Plücken <daniel@debakel.net>
* This function is an alias for setBody.
* @author Daniel Plücken <daniel@debakel.net>
* Adds an parameter to this swf object.
* @author Daniel Plücken <daniel@debakel.net>
* Adds an variable to this swf object.
* @author Daniel Plücken <daniel@debakel.net>
* Returns a javascript to generate a swf object.
* @author Daniel Plücken <daniel@debakel.net>
static $alreadyReturned = false;
$out = " <script type=\"text/javascript\" "
. "src=\"". CLASSPATH. "jslib/swfobject.js\">"
* Returns a generated string based on the attributes of this HTML-Object.
* @author Daniel Plücken <daniel@debakel.net>
$str_parent = parent::get();
$str_tmp .= " ". $this->id. ".addParam( '". $key. "', '". $val. "' );\r\n";
$str_tmp .= " ". $this->id. ".addVariable( '". $key. "', '". $val. "' );\r\n";
"var ". $this->id. " = new SWFObject( '". $this->path. "', "
? $this->id. ".write( '". $this->id. "' );\r\n"
: "window.setTimeout( \"". $this->id. ".write( '". $this->id. "' )\", ". $this->delay. " );\r\n"
|