In my xslt I have a choose/when statement that displays different flash movies depending on node values. I'm just testing it at the moment with the basic embed object code for flash:
This is causing an xslt error, I'm guessing I need to escape some characters? I've had a bit of a search for this problem but no luck so I thought I'd see if anyone here knows an easy fix?
This leads me to my second question, not really xslt (or even umbraco) specific - but what is the best way to include flash in a web page? I know there is some javascript techniques to embed the object (swfobject etc), but all of the examples that I've found are from 2007 or earlier so I'm just wondering if anybody knows of any newer or current best practices?
I must have been som old examples you have seen. I think swfobject is still the best way to insert flash into pages and as you can see in the post mentioned it is also what is being used.
Tom - The technique you are using would it not cause an alert box in internet explorer where people will have to click "ok" before the flash content loads? Isn't that why different javascript techniques have become so popular for inserting flash? To avoid that situation?
Embed flash object in xslt
In my xslt I have a choose/when statement that displays different flash movies depending on node values. I'm just testing it at the moment with the basic embed object code for flash:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="659" height="201" id="home" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="home.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent"><param name="bgcolor" value="#ffffff" /><embed src="home.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="659" height="201" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
This is causing an xslt error, I'm guessing I need to escape some characters? I've had a bit of a search for this problem but no luck so I thought I'd see if anyone here knows an easy fix?
This leads me to my second question, not really xslt (or even umbraco) specific - but what is the best way to include flash in a web page? I know there is some javascript techniques to embed the object (swfobject etc), but all of the examples that I've found are from 2007 or earlier so I'm just wondering if anybody knows of any newer or current best practices?
Thanks.
Hi
DDRayne has made a good example on how to embed flash in this post http://our.umbraco.org/forum/using/ui-questions/2913-Inserting-flash-by-end-users and I think it answers your questions :)
I must have been som old examples you have seen. I think swfobject is still the best way to insert flash into pages and as you can see in the post mentioned it is also what is being used.
I hope this helps
/Jan
You could place your code between a CDATA section.
<xsl:text disable-output-escaping="yes"><![CDATA[
PLACE CODE HERE
]]>
</xsl:text>
We are using the same technique to embed a flash object and it works fine.
Tom - The technique you are using would it not cause an alert box in internet explorer where people will have to click "ok" before the flash content loads? Isn't that why different javascript techniques have become so popular for inserting flash? To avoid that situation?
/Jan
Thanks for both answers!
is working on a reply...