subject : how to insert .swf file to umbraco template.
[color=blue]Hi Friends,
Thanks in advance.
I am very new to umbraco. I have just started doing few things. I have one requirement where I need to show flash animation on page.
I have one .swf file which i need to display on the page. Please tell me step by step process in detail.
I seen few answers on the forum, but they are in too much details and I could not able to get anything out of that. If any video tutorial is available please share the link.
You can either add your embed swf code (probably something similar to this: <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
1. To either your template directly, or (2) you could create a macro (in the developer section) and have the XSLT for the macro contain your code. You could also create a parameter for your macro so that you can specify the location of the SWF and pass that to your XSLT. Then, you can add the macro in the rich text editor on whichever page (s) you want.
The easiest will be to add it to your template which will be in your settings section.
<xsl:templatematch="/"> <divid="container"><ahref="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div> <scripttype="text/javascript"src="/scripts/swfobject.js"></script> <script type="text/javascript"> <![CDATA[ // Previous JavaScript code var path ="]]><xsl:value-of select="$yourSwfFile" /><![CDATA["; var videowidth ="]]>500<![CDATA["; var videoheight ="]]>100<![CDATA["; // Rest of JavaScript code var s1 =newSWFObject(path,"Pindar SWF",videowidth,videoheight,"9","#FFFFFF"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("wmode","transparent"); s1.write("container"); ]]> </script>
If you don't want to do it with the option for uploading the .swf file to the document, which is using the .swf file you could also just hardcode it into your template instead. Then you would just need to write the following into your template.
<divid="container"><ahref="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div> <scripttype="text/javascript"src="/scripts/swfobject.js"></script> <script type="text/javascript"> // Previous JavaScript code var path ="]]>http://yourdomain.com/swf/yourswffile.swf<![CDATA["; var videowidth ="]]>500<![CDATA["; var videoheight ="]]>100<![CDATA["; // Rest of JavaScript code var s1 =newSWFObject(path,"Pindar SWF",videowidth,videoheight,"9","#FFFFFF"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("wmode","transparent"); s1.write("container"); </script>
How to insert .swf (flash file) to umbraco
subject : how to insert .swf file to umbraco template.
[color=blue]Hi Friends,
Thanks in advance.
I am very new to umbraco. I have just started doing few things.
I have one requirement where I need to show flash animation on page.
I have one .swf file which i need to display on the page.
Please tell me step by step process in detail.
I seen few answers on the forum, but they are in too much details and I could not able to get anything out of that.
If any video tutorial is available please share the link.
Hoping the realiest response.[/color]
Please tell us a bit more.
Have you checked out Warren's package (CWS), that holds a ton of examples how you can get things done. http://our.umbraco.org/projects/
Do you only have 1 swf-file?
Does the swf-file need to be editable by the end-users in the future?
You can either add your embed swf code (probably something similar to this: <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
<PARAM NAME=movie VALUE="Yourfilename.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="Yourfilename.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> )
1. To either your template directly, or (2) you could create a macro (in the developer section) and have the XSLT for the macro contain your code. You could also create a parameter for your macro so that you can specify the location of the SWF and pass that to your XSLT. Then, you can add the macro in the rich text editor on whichever page (s) you want.
The easiest will be to add it to your template which will be in your settings section.
Have a look at this -> http://our.umbraco.org/forum/using/ui-questions/2913-Inserting-flash-by-end-users
Hi Sniemuth,
Where do I need to paste the .swf file.
do I need to embed this <object tag> in <umbraco: macro> or any other tag.
Can you please paste the XSLT ... if I do need to create a macro.
I have copied the tag you metioned .. but it is not playing the file.
Hi Peter,
I have only one .swf file to be played without any user interaction.
Hi Amar
To make things easy I would do the following
1: Add an upload property to the document type (Which I imagine is maybe the one used for your frontpage?)
2: Upload your .swf in the content area on the specific document type
3: Create an XSLT macro, which looks like this (please notice that the code used is almost the same as the post ddrayne mentions above)
Remember that this requires the swfobject.js
Hope that this makes sense and solves your problem.
/Jan
If you don't want to do it with the option for uploading the .swf file to the document, which is using the .swf file you could also just hardcode it into your template instead. Then you would just need to write the following into your template.
/Jan
is working on a reply...