Requirement: Embed a flash document inside a content page using a macro. The Swf file must be specified through a macro parameter.
What this does: Basically this will allow you to embed a flash file just like you would an image inside a content page.
Proposed XSLT: (More than happy to hear other ways of accomplishing this)Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="flashFile" select="/macro/flashFile" />
<xsl:template match="/">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="flashControl" align="middle">
<xsl:attribute name="width">
<xsl:value-of select="/macro/width" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="/macro/height" />
</xsl:attribute>
<param name="movie">
<xsl:attribute name="value">
<xsl:value-of select="$flashFile/node/data [@alias='umbracoFile']" />
</xsl:attribute>
</param>
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed quality="high" bgcolor="#ffffff" name="flashControl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
<xsl:attribute name="width">
<xsl:value-of select="/macro/width" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="/macro/height" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="$flashFile/node/data [@alias='umbracoFile']" />
</xsl:attribute>
</embed>
</object>
</xsl:template>
</xsl:stylesheet>