public function swf($path, $id, $width, $height, $options = array())
{
$options = array_merge(array('version' => 7, 'script' => 'admin/swfobject-2.2', 'noflash' => ' '), $options);
$version = $options['version'];
$script = $options['script'];
$noflash = $options['noflash'];
if (!preg_match('/\\.swf$/', $path)) {
$path .= '.swf';
}
if (is_array($path)) {
$path = $this->getUrl($path);
} elseif (strpos($path, '://') === false) {
if ($path[0] !== '/') {
$path = Configure::read('App.imageBaseUrl') . $path;
}
$path = $this->webroot($path);
}
$out = $this->js($script, true) . "\n";
$out = <<<END_FLASH
<div id="{$id}">{$noflash}</div>
<script type="text/javascript">
\tswfobject.embedSWF("{$path}", "{$id}", "{$width}", "{$height}", "{$version}");
</script>
END_FLASH;
echo $out;
}