Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jonok 297 posts 658 karma points
    Jul 15, 2009 @ 11:43
    jonok
    0

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 15, 2009 @ 11:49
    Jan Skovgaard
    1

    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

  • Tom 50 posts 100 karma points
    Jul 15, 2009 @ 11:49
    Tom
    100

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 15, 2009 @ 11:55
    Jan Skovgaard
    0

    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

  • jonok 297 posts 658 karma points
    Jul 15, 2009 @ 11:56
    jonok
    0

    Thanks for both answers!

Please Sign in or register to post replies

Write your reply to:

Draft