Friday, May 7, 2010

How to Display Flash(.swf) files and Banners in SharePoint

Using content Editor web part, We can display Flash files or flash banners in SharePoint. Just add a content editor web part, and place the following embed code to display flash content in SharePoint 2007:

<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="350" HEIGHT="250" id="Banner">
<PARAM NAME=movie VALUE="http://SharePoint.com/assets/Banner.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<param name="scale" value="exactfit">
<EMBED src="http://SharePoint.com/assets/Banner.swf" quality=high bgcolor=#FFFFFF WIDTH="350" HEIGHT="250"
NAME="Banner" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>

In another case, I've designed a Flash based menu for my SharePoint web site, and want to display that in all over the site, So edited the master page in SharePoint designer to add flash.
<object id="Menu" width="750px" height="26px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"> <param name="movie" 
value="http://YOURSITE/Support/Files/Menu.swf" /><param name="quality" value="high" /> <param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /> <param name="scale" value="noscale" /><param name="salign" value="LT" /><param name="menu" value="false" /> <embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" 
width="750px" height="26px" bgcolor="#000000" wmode="transparent" 
src="http://YOURSITE/support/Files/Menu.swf" quality="high" scale="noscale" menu="false" salign="LT" /> </object>

Display Flash in SharePoint 2010:
You can place this code in a Text file, Upload and then point it from a Content Editor Web Part (Or you can directly paste this code inside CEWP):
Note<param name="wmode" value="opaque"> is added explicitly to send Flash file behind the Menus!:
<object height="500" width="500" 
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="movie" value="http://sharepoint.yourcompany.com/banner/Circle.swf">
<param name="quality" value="high">
 <param name="wmode" value="opaque">
 <embed height="500" width="500" 
 src="http://sharepoint.yourcompany.com/banner/Circle.swf"
 quality="high" type="application/x-shockwave-flash" 
pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>

You may get: "Flash movie not loaded" error in SharePoint when the Flash File path is wrong! Change the SWF File path to appropriate path. Here is my Flash menu:

flash in sharepoint 2007

sharepoint 2010 add flash file
Same way, we can display flash banner in SharePoint 2007 or SharePoint 2010 also.

Flash for SharePoint 2010: Screen shot of Flash File in Content Editor in SharePoint 2010:
sharepoint 2010 embed flash swf
Getting "Save" Dialog box for Flash Files? Add to "AllowedInlineDownloadedMimeTypes" of the web application as in : Getting "Save" dialog box for Flash Files? Here is the fix



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

5 comments :

  1. This do not work with Sharepoint 2010

    ReplyDelete
    Replies
    1. Sajid,

      The same code will work in SharePoint 2010 also. I Just placed an Screenshot.

      Let me know what difficulty you are facing.

      Regards,
      Sal

      Delete
  2. I tried it out and I just get a blank web part. It doesn't render the flash file.

    ReplyDelete
    Replies
    1. Caramanica,

      Just make a HTML file with your code and see it renders flash file in your local system. In most cases, you would get blank web part, when the flash file path is wrong. check it once!

      Delete
  3. Sometimes flash content does not work in SharePoint 2010 because flash files are not enabled by default. To solve this problem, here is a solution – http://tech-turf.blogspot.com/2015/10/making-flash-content-swf-files-work-in.html

    ReplyDelete

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...