DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Embed a Flash Animation into a Content Editor Webpart in Sharepoint

Posted by PANVEGA on March 30, 2008

In this post I wanna show how easy it is to embed some nice Flash Animation to your SharePoint application. I wanna show in some steps to how bring the animation into a Content Editor Webpart. With this WP it is very easy to add your flash reference and presentation to the page. Using a Webpart, gives you a flexible way to show the flash animation.

1. First develope your Flash .swf file

2. Open the SP Designer create for instance a new folder called MyFlash in the Documents folder.

3. Copy your .wsf file into it

4. Copy the AC-RunActiveContent.js in the same folder. Otherwise you receive “This page requires AC Run Active Content. js

You’ll still need some JS to display your movie properly cross-browser. Your best bet however is to use SWFObject, and forget about the built-in methods.


When you publish an html file with Flash CS3, it incorporates the code of the ACRunActiveContent.js file into the html file as well as includes the ACRunActiveContent.js file in the folder that you published to. So all you should need to do is to upload that ACRunActiveContent.js file to wherever you are placing the html file.

5. Create a .txt with the folowing content and your object class. Replace the text with your custom code.

<script language=”javascript”>AC_FL_RunContent = 0;</script>
<script src=”/Documents/Final/AC_RunActiveContent.js” language=”javascript”></script>
<script language=”javascript”>
if (AC_FL_RunContent == 0) {
alert(“Diese Seite erfordert die Datei \”AC_RunActiveContent.js\”.”);
} else {
AC_FL_RunContent(‘codebase’, ‘,0,0,0&#8217;,
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”,0,0,0&#8243; width=”608″ height=”374″ id=”wt_new” align=”middle”>
<param name=”allowScriptAccess” value=”sameDomain” />
<param name=”allowFullScreen” value=”false” />
<param name=”movie” value=”butterflow” />
<param name=”quality” value=”high” />
<param name=”bgcolor” value=”#cccccc” />
<embed src=”butterflow” quality=”high” width=”180″ bgcolor=”#000000″ height=”600″ name=”butterflow” align=”middle” allowScriptAccess=”sameDomain” allowFullScreen=”false” type=”application/x-shockwave-flash” pluginspage=”; />

6. Copy the txt file to your MyFlash folder ,too.

7. Then add a content editor web part to your page

8.  go to Content Link in the Webpart. Copy the path to the new created txt file in the field.

e.g.  Documents/welcomeflash/wt_welcomescript.txt

9. That is it.  You now have a flash movie on your site.

More Information:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: