SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Content Editor WebPart: Flash

In part 2 of Using the Content Editor WebPart I want to talk about how you can integrate a Flash file into your site.

We've all seen flash before and we all know that you can create some great animations.  If you look around the internet many websites use flash for animations.

Some companies such as the BBC and SkySport have streamed videos through flash and YouTube using flash videos to stream their videos. 

Many sites that have banner advertising, also user adverts that are now in SWF/flash format.

So lets add a flash file (.swf) to run on the front page of our SharePoint Site.

We first need to upload the swf file into a document library.

Create yourself a document library.  You might want to tell the document library to be hidden from the Quick Launch bar down the left hand side so visitors/members of your site can't easily find the library.

Go to Site Action - Create and under Libraries click on Document Library.

Give your Document Library a name.  I'm going to call mine SWF.  Under Navigation, click No which will hide the library from the left hand side navigation.

I'm now going to upload my SWF file into the library and anything else that might be required for the flash file to run.

At this point we need to find out the URL of the SWF file as we need it later.

Right click on your flash file.  You will see your standard Internet Explorer properties and we need to copy the URL.  Click on Copy Shortcut and it will add the URL to your clipboard.  Paste this into Notepad or Word for reference later on.

We now need to add the Content Editor Web Part to our site.

Go back to the top of your Site and click on Site Actions, Edit Page and then Add a Web Part.

Find the Content Editor Web Part and add it to your site.

Click Edit on the webpart and then into Modify Shared Web Part.

Click on Source Editor and paste the following code

<embed src = "http://www.website.com/site/SWF/flash.swf" width = "500" height = "375"></embed>

If we have a quick look at the code here you will see three main areas.

Src = the URL of the flash file
Width = the width of your flash file
Height = the height of your flash file

We now need to add the code to the content editor web part.

Before we click save and finish we need to tell the code where to pull the SWF file from.

We copied it earlier, so we'll now paste the URL of the SWF file in the code after src =.

Click Save and you'll have your flash running in the page.


Posted 10-06-2008 5:28 PM by apearce

Comments

oliviaharis wrote re: Content Editor WebPart: Flash
on 10-07-2008 1:59 AM

Our corporate IT minions have customized the content editor web part to disable the "edit source" button. I want to add a flash weather forecast to one of our portals to meet a real business need related to shipping, packing,and temperature control.Is there a way I can get a copy of the standard content editor DWP and import it to use on my collaboration space?

--------------------

oliviaharis

<a href="http://www.drivenwide.com"> seo</a>

apearce wrote re: Content Editor WebPart: Flash
on 10-07-2008 3:10 AM

Olivia,

If you open up the rich text editor there is an icon at the top that will allow you to open the HTML code.  I don't know if this is blocked as well but give it a go.

You have an icon that was '<>' and  a pencil in it.  This is the HTML code button.

I hope this helps.

MJP wrote re: Content Editor WebPart: Flash
on 10-07-2008 3:11 AM

This is a great post Alex, always wanted to document this to show staff here how to do this - you saved me some work!!

Keep up the good works

MJP

Links (10/8/2008) « Steve Pietrek - Everything SharePoint wrote Links (10/8/2008) &laquo; Steve Pietrek - Everything SharePoint
on 10-08-2008 7:26 PM

Pingback from  Links (10/8/2008) &laquo; Steve Pietrek - Everything SharePoint

neesha wrote re: Content Editor WebPart: Flash
on 10-16-2008 1:44 PM

Hi,

I have uploaded a newssticker kind of a program using desinger on my sharepoint website. I have flash file, pictures and an xml file in place for it to work. Now, the problem is I need the end user to edit the xml file to add pictures, every week and I dont him to use the designer to edit this XML. I created a doc lib and copied the flash file,the xml file, and pictures. However for some reason, my flash program is reading data from the root xml in the designer but not from the doc lib.I need a way to upload the xml file on my sharepoint, so that end user will update the xml file when needed and will not go into the desinger to do that.

Thank you for your help in advance

Stonecold wrote re: Content Editor WebPart: Flash
on 10-20-2008 9:20 AM

Hi,

I have uploaded a newssticker kind of a program using desinger on my sharepoint website. I have flash file, pictures and an xml file in place for it to work. Now, the problem is I need the end user to edit the xml file to add pictures, every week and I dont him to use the designer to edit this XML. I created a doc lib and copied the flash file,the xml file, and pictures. However for some reason, my flash program is reading data from the root xml in the designer but not from the doc lib.I need a way to upload the xml file on my sharepoint, so that end user will update the xml file when needed and will not go into the desinger to do that.

Thank you for your help in advance

------------------------------

In your flash actionscript that points to the xml file, change the url so that it points to the document libary that you copied the xml file into.

A Phillips wrote re: Content Editor WebPart: Flash
on 10-25-2008 8:02 PM

the background surrounding the flash is black, how can i change that?

apearce wrote re: Content Editor WebPart: Flash
on 10-26-2008 4:27 AM

this will be in the flash coding as there are no margins or anything in the html code above about any back ground

Jim wrote re: Content Editor WebPart: Flash
on 11-20-2008 9:19 AM

I'm attempting to embed a flash photo gallery the same as your example. i am using a parameter to pass in the location of an xml fiile. this will not work, in fact the only way i've been able to make this work is to hard code the path of the xml file into my swf. this is not an option. can anyone help? Here is my code which loads the swf but obviously can't find the xml file.

<embed src="whatever/.../Gallery.swf'whatever/.../images.xml'"

       width="400"

       height="400" />

Thanks in advance!

Jim

Jim wrote re: Content Editor WebPart: Flash
on 11-20-2008 9:30 AM

It seems i shouldn't have pasted the code that way. the problem is that it can't find the xml file because i'm passing it in as a query string.

movie="gallery.swf?rssPath=PathToMyFile"

Sven Miller wrote re: Content Editor WebPart: Flash
on 04-06-2009 2:45 AM

If you want true Flash integration in SharePoint, have a look at Yooba Studio. it let's you not only add Flash, but also create it from scratch within the browser. There is a Yooba Studio MOSS integration available.

Marc wrote re: Content Editor WebPart: Flash
on 06-16-2009 2:44 PM

Thanks for the info this is great stuff. Another question to take it to the next level. Is there away to add control buttons (for example: play, pause...)?

AndyL wrote re: Content Editor WebPart: Flash
on 06-18-2009 11:44 AM

Does this work on WSS 3.0. I did as you state in your example, but my CEWP is still blank. If i right click it say Movie not loaded (greyed out and About Adobe Flash Player 9. Is there something else thats need to be done?

AndyL wrote re: Content Editor WebPart: Flash
on 06-18-2009 12:33 PM

Soory my url was not correct, now i got it playing. Another question, how do i get the controls to appear(start, stop).

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.