in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Alex Pearce's SharePoint Blog

Alex Pearce

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.

Comments

 

oliviaharis said:

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>

October 7, 2008 1:59 AM
 

apearce said:

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.

October 7, 2008 3:10 AM
 

MJP said:

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

October 7, 2008 3:11 AM
 

Links (10/8/2008) « Steve Pietrek - Everything SharePoint said:

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

October 8, 2008 7:26 PM
 

neesha said:

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

October 16, 2008 1:44 PM
 

Stonecold said:

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.

October 20, 2008 9:20 AM
 

A Phillips said:

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

October 25, 2008 8:02 PM
 

apearce said:

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

October 26, 2008 4:27 AM
 

Jim said:

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

November 20, 2008 9:19 AM
 

Jim said:

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"

November 20, 2008 9:30 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

About apearce

My name is Alex Pearce and I live in Birmingham, UK. I am the Learning Environment and ICT Manager at the largest school in the UK. I am implementing the Microsoft Learning Gateway into my 12th school and planning on hosting 60 primary (elementary) school in the same environment. SharePoint is the portal layer to the Microsoft Learning Gateway and I first started using SPS2003 before moving onto MOSS 2007 when it was released in late 2006. I am hoping to share my knowledge with you all. Why I hear you ask!!?! I work for an education organization and the reason I enjoy my job so much is because I want to help pupils/students achieve what they want in life. Why should I hide my secrets? Why not help other schools implement the Microsoft Learning Gateway/SharePoint solution to improve learning in their school. I hope you find my blog useful . www.sharepointblogs.com/ajp

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts