From: <de...@de...> - 2008-03-24 19:23:16
|
Author: ArthurClemens Date: 2008-03-24 14:23:21 -0500 (Mon, 24 Mar 2008) New Revision: 16556 Trac url: http://develop.twiki.org/trac/changeset/16556 Modified: twiki/trunk/EmbedFlashPlugin/data/TWiki/EmbedFlashPlugin.txt twiki/trunk/EmbedFlashPlugin/lib/TWiki/Plugins/EmbedFlashPlugin.pm Log: Item5468: add flashvars attibute Modified: twiki/trunk/EmbedFlashPlugin/data/TWiki/EmbedFlashPlugin.txt =================================================================== --- twiki/trunk/EmbedFlashPlugin/data/TWiki/EmbedFlashPlugin.txt 2008-03-24 19:06:53 UTC (rev 16555) +++ twiki/trunk/EmbedFlashPlugin/data/TWiki/EmbedFlashPlugin.txt 2008-03-24 19:23:21 UTC (rev 16556) @@ -56,6 +56,7 @@ | =fullscreen= | Enabled scriptable fullscreen mode. An overlay dialog box will appear when the movie enters full-screen mode, instructing the user how to exit and return to normal mode. The dialog box appears for a few seconds and then fades out. | ="true"= or ="false"= | ="false"= | | =base= | Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files. | any directory URL, or empty string =""= | ="%<nop>ATTACHURL%/"= | | =swliveconnect= | Specifies whether the browser should start Java when loading the Flash Player for the first time. | ="true"= or ="false"= | =""= | +| =flashvars= | Variables to be passed to the Flash movie. Multiple variables are separated by =&=. | =flashvars="x=50&y=100&url=%<nop>ATTACHURL%/picture.jpg"= | =""= | Note that this plugin writes =object= and =embed= tags using Javascript to prevent annoying popup windows. %BR% @@ -139,8 +140,9 @@ ---++ Plugin Info | Plugin Author: | TWiki:Main.ArthurClemens | -| Plugin Version: | 25 Feb 2008 (v1.1) | +| Plugin Version: | 24 Mar 2008 (v1.2) | | Change History: | | +| 24 Mar 2008: | Version 1.2 - Added =flashvar= attributes. | | 25 Feb 2008: | Version 1.1 - Added attributes. Write HTML embed/object tags with Javascript to prevent popup windows. If no javascript is available the =noscript= tag is used. | | 02 Nov 2006: | Version 1.01 - Updated Flash sample, small changes to documentation. | | 28 Dec 2003: | Version 1.0 | Modified: twiki/trunk/EmbedFlashPlugin/lib/TWiki/Plugins/EmbedFlashPlugin.pm =================================================================== --- twiki/trunk/EmbedFlashPlugin/lib/TWiki/Plugins/EmbedFlashPlugin.pm 2008-03-24 19:06:53 UTC (rev 16555) +++ twiki/trunk/EmbedFlashPlugin/lib/TWiki/Plugins/EmbedFlashPlugin.pm 2008-03-24 19:23:21 UTC (rev 16556) @@ -10,7 +10,7 @@ # status of the plugin. It is used by the build automation tools, so # you should leave it alone. $VERSION = '$Rev$'; -$RELEASE = '1.1'; +$RELEASE = '1.2'; $pluginName = 'EmbedFlashPlugin'; @@ -34,7 +34,7 @@ sub _handleEmbedFlash { my ( $session, $params, $theTopic, $theWeb ) = @_; - my $flashFileName = $params->{"filename"} || $params->{_DEFAULT}; + my $flashFileName = $params->{"filepath"} || $params->{_DEFAULT}; my $movieId = $params->{"id"}; my $flashId; if ( !$movieId ) { @@ -61,6 +61,7 @@ my $flashAllowScriptAccess = $params->{"allowscriptaccess"} || "sameDomain"; my $flashBase = $params->{"base"} || "%ATTACHURL%/"; my $flashSwliveconnect = $params->{"swliveconnect"} || ""; + my $flashVars = $params->{"flashvars"} || undef; $objectEmbed = ""; my $itemSeparator = " "; @@ -88,6 +89,9 @@ $objectEmbed .= $itemSeparator . '<param name="movie" value="' . $flashId . '" />'; $objectEmbed .= + $itemSeparator . '<param name="FlashVars" value="' . $flashVars . '" />' + if defined $flashVars; + $objectEmbed .= $itemSeparator . '<param name="quality" value="' . $flashQuality . '" />'; $objectEmbed .= $itemSeparator @@ -101,6 +105,8 @@ . $flashSwliveconnect . '" />'; $objectEmbed .= $itemSeparator . '<embed'; $objectEmbed .= $itemSeparator . 'src="' . $flashFileName . '"'; + $objectEmbed .= $itemSeparator . 'FlashVars="' . $flashVars . '"' + if defined $flashVars; $objectEmbed .= $itemSeparator . 'quality="' . $flashQuality . '"'; $objectEmbed .= $itemSeparator . 'bgcolor="' . $flashBackground . '"'; $objectEmbed .= $itemSeparator . 'width="' . $flashWidth . '"'; |