package WebGUI::Macro::Flash; # edit this line to match your own macro name

#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com                     info@plainblack.com
#-------------------------------------------------------------------

use strict;

#-------------------------------------------------------------------
sub process {
	my ($session, $path, $width, $height, $flashVers, $flashVars, $id) = @_;

	my $output = ""; # do some stuff
	
	# optional parameter $id
	$id = "" if (!defined($id));

	$output = qq{
<!--[if gte IE 6]>
<script language="javascript">
	document.write("<NOSCRIPT class=\\"clickfix\\"><OBJECT style=\\"display:none\\">");
</script>
<span style="display:none"><![endif]--></span>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=$flashVers" id="$id" align="middle" height="$height" width="$width">
<param name="FlashVars" value="$flashVars">
<param name="allowScriptAccess" value="sameDomain">
<param name="movie" value="$path">
<param name="quality" value="high">
<param name="scale" value="exactfit">
<param name="wmode" value="transparent">
<param name="bgcolor" value="#ffffff">
<embed flashvars="$flashVars" src="$path" quality="high" scale="exactfit" wmode="transparent" bgcolor="#ffffff" name="$id" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="center" height="$height" width="$width" swLiveConnect="true">
</object>
<!--[if gte IE 6]>
	</OBJECT></NOSCRIPT>
<![endif]-->	
	};

	return $output;
}

1;


