Copied to clipboard

Flag this post as spam?

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


  • rajeshgut 29 posts 20 karma points
    May 05, 2009 @ 13:59
    rajeshgut
    0

    How to display flash in the site through umbraco

    Hi all,

    Can any one tell me how to call flash file(means for flash animation on my site).
    iam new to umbraco, could any tell me step by step procedure or suggest any video tutorial
    for that. can i store my flash file in the media section, if so how can i use flash file from media,means how can i write code in xslt file and creation of macro & again calling that macro in main template, iam confused in this process. pls tel me the brief procedure

    This is my main template of my site:








  • dandrayne 1138 posts 2262 karma points
    May 05, 2009 @ 14:04
    dandrayne
    0

    Hi there

    I use an xslt file/macro for this, as follows

    [code]

    ]>
    <>
    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">












    Get the Flash Player to see this player.


    <script type="text/javascript"><br />
    <![CDATA[<br />
    var path = "]]><xsl:value-of select="$videopath" /><![CDATA[";<br />
    var videowidth = "]]><xsl:value-of select="$videowidth" /><![CDATA[";<br />
    var videoheight = "]]><xsl:value-of select="$videoheight" /><![CDATA[";<br />
    var s1 = new SWFObject(path,"Pindar SWF",videowidth,videoheight,"9","#FFFFFF");<br />
    s1.addParam("allowfullscreen","true");<br />
    s1.addParam("allowscriptaccess","always");<br />
    s1.addParam("wmode","transparent");<br />
    s1.write("container");<br />
    ]]><br />
    </script>







    [/code]

    To use this I set up a media type of "swf" with datatypes for width and height, and included a macro parameter of mediacurrent that allows the user to pick the swf file using the insert macro link in the wysiwyg.

    This code also relied on swfobject.js

    Hope this helps,
    Dan

  • rajeshgut 29 posts 20 karma points
    May 05, 2009 @ 15:19
    rajeshgut
    0

    Hi Dan,

    Thanks for ur response, i changed the xslt file according ur code, but first where i have to store flash fies. means
    how to create media type and after creation of macro how i cal this macro in the Master template. please let me know the solution.

  • dandrayne 1138 posts 2262 karma points
    May 05, 2009 @ 15:59
    dandrayne
    0

    Hi there

    Media types are set up in the "settings" section of the backend and choose them using a macro parameter of "mediacurrent". Then when you click on the "insert macro" button within the template editor you will have an option to choose a flash file.

    Dan

  • rajeshgut 29 posts 20 karma points
    May 06, 2009 @ 07:49
    rajeshgut
    0

    hi dan,

    excuse for this, i can't understand your words(first reply) --"To use this I set up a media type of "swf" with datatypes for width and height,....."
    Pls don't mind help me in this.........
    Iam sending step by step procedure what iam doing... please tel me where iam doing mistake i can't get flashin in my site.

    1).Iam storing flash file "myflash.swf" in media( by creating one folder(MyFlash) and then browse flashfile(myflash.swf only and not myflash.fla file) into this folder).

    2).Then i create XSLT file(myflash.xslt) as


    ]>

    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" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">













    3).Then i create macro(MyFlashmacro) with parameters as :
    Alias:flashfile ,Name:Flash File, Type:Mediacurrent
    Alias:flashwidth, Name:Flash Width, Type:Number
    Alias:flashheight, Name:Flash Height, Type:Number

    4).Iam going to my Main template(iam already post this template) and trying to insert macro but it does not ask for any flash file it just inserted as :


    .................. This is the problem where iam doing mistake.please don't mind iam confused in learing it properly
    pls help me. what is the correct total procedure to insert flash into our site. Thanks in advance........

  • dandrayne 1138 posts 2262 karma points
    May 06, 2009 @ 10:30
    dandrayne
    0

    Whenever you insert the macro with mediacurrent it allow you to choose a file from the media library. Is this not happening?

Please Sign in or register to post replies

Write your reply to:

Draft