2009-04-16 01:54:00 PDT
Mornin',
in my Joomla I use a component called Joomleague. This component uses flash in form of the "open flash chart".
For visitors who don't have installed any flash player, I'd like to specify an alternative content by using the swfobject method or something like that.
However, I couldn't get it to work so far.
Does anybody have an idea? Thanks.
Here is the php-Code of the Open Flash Chart:
// Open Flash Chart Function START
function open_flash_chart_object( $width, $height, $url, $ajax=true, $div=0 )
{
if ($ajax) echo '<script type="text/javascript" src="'.JL_URL_FOLDER.'/js/swfobject.js"></script>';
$obj_id = 'chart_'.$div;
$div_name = 'flashcontent_'.$div;
echo '<div id="'. $div_name .'"></div>';
echo '<object id="'.$obj_id.'" type="application/x-shockwave-flash" data="'.JL_URL_FOLDER.'/lib/open-flash-chart/open-flash-chart.swf?width='
. urlencode($width) .'&height='. $height .'&data=' . $url .'" width="'. urlencode($width) .'" height="'. $height .'">';
echo '<param name="movie" value="'.JL_URL_FOLDER.'/lib/open-flash-chart/open-flash-chart.swf?width='
. urlencode($width) .'&height='. $height .'&data='. $url .'" />';
echo '<param name="allowScriptAccess" value="sameDomain" />';
echo '<param name="quality" value="high" />';
echo '<param name="bgcolor" value="#FFffff" />';
echo '<param name="name" value="open-flash-chart" />';
echo '<param name="align" value="middle" />';
echo '<param name="pluginspage" value="
http://www.macromedia.com/go/getflashplayer" />';
echo '</object>';
}
// Open Flash Chart Function END