Click here to Skip to main content
Email Password   helpLost your password?

Figure 1

Figure 1

Figure 2

Figure 2

Introduction

Flash Movie Field is a custom WSS field to render Flash movies and YouTube videos. It uses the excellent swfobject to render the HTML and JavaScript for maximum browser compatibility. In edit mode, authors specify the Url, Width, and Height of the Flash movie. Optional parameters can be added easily by modifying the attached source code.

Description

The Flash Movie Field is based on a new Field Type SPFieldFlashMovie. It has the following properties or column values:

Rendering is provided by a custom Field Control FlashMovieField with an associating Rendering Template QuestechFlashMovieFieldTemplate. All UI strings are localized and stored in resource files.

Feature QuestechFlashMovieColumns is required for the deployment. It is responsible for deploying the custom Field Type Definition in fldtypes_SPFieldFlashMovie.xml.

The sample Visual Studio 2008 solution includes all the support files you need to build and deploy the custom field, minus strong name key files (*.snk). It contains three projects: Deployment, Features, and SharePoint. The SharePoint project contains source code for the custom field. The Features project contains features to support the deployment. The Deployment project contains a pre-build script to aggregate all the files needed for deployment. It contains a Solution directory where a WSP file is generated and deployed by a post-build script.

This structure of Visual Studio solution and projects is designed to be scalable to full blown MOSS/WSS development and deployment. You could add additional projects like SharePoint.Publishing for MOSS Publishing development. Within your SharePoint or SharePoint.Publishing projects, you could have custom components like user controls, web controls, web parts, etc.

Installation

To deploy the custom field, follow the procedures below:

  1. Using stsadm, install solution file QuestechFlashMovie.wsp in \Deployments\Solution\
    stsadm -o addsolution -filename QuestechFlashMovie.wsp
  2. Open SharePoint 3.0 Central Administration, go to Operations/Global Configuration/Solution Management. Deploy QuestechFlashMovie.wsp to select web application(s).
  3. Go to the top site in the selected web application(s). Activate Site Collection feature Questech Systems Flash Movie Columns.

The custom Flash Movie Field should now be ready for use. You can go to the Site Columns gallery to verify. To use the custom field in your MOSS page layout, you would first need to add the custom site column to a content type by going to the Site content types gallery. In the gallery listing, select a content type and click Add from existing site columns.

In your page layout ASPX file, modify the code as follows:

...
<%@ Register Tagprefix="QuestechWebControls" 
    Namespace="QuestechSystems.SharePoint.WebControls"
    Assembly="QuestechSystems.SharePoint.FlashMovie, Version=1.0.0.0, 
    Culture=neutral, PublicKeyToken=f268fd4f0f42524c" %>

...
...
<QuestechWebControls:FlashMovieField FieldName="FlashMovieFile" runat="server" />
...

References

  1. Create custom field type in WSS V3 - Jim Yang
  2. SharePoint Resources, Types, Use and Deployment - Mikhail Dikov
  3. swfobject
  4. Features for SharePoint - MSDN Magazine
  5. SharePoint 2007 Features - Creating Site Columns and Content types - Share This Point
  6. Solution Deployment with SharePoint 2007 - MSDN Magazine

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralError: The given key was not present in the dictionary.
Jingmei Li
10:14 8 Feb '09  
I deployed the wsp from the download directly into my MOSS environment and it worked once. Later I removed it and now I would like to see it again, but kept getting error "The given key was not present in the dictionary. " when I tried to add the site column to the built-in Article Page site content type.

Have you seen this error before? Any ideas?

thanks
Jingmei
GeneralError when select the Flash Movie Filed button in WSS 3.0
oconnortj
4:12 18 Sep '08  
This field type cannot be edited from most client programs and might block the programs from saving documents to this library.

Any ideas?
TJ
GeneralRe: Error when select the Flash Movie Filed button in WSS 3.0
Stephen Huen
19:33 20 Sep '08  
Unless you will be editing the page in Office, which this custom field does not support, you can ignore this message.
QuestionModify what?
roryschmitz
7:37 15 Jul '08  
In your page layout aspx file, modify the code as follows:
...
<![CDATA[<%@ Register Tagprefix="QuestechWebControls"
Namespace="QuestechSystems.SharePoint.WebControls" Assembly="QuestechSystems.SharePoint, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=f1874fca2a9b1c17"
%>]]> ...
...
<questechwebcontrols:flashmoviefield fieldname="FlashMovieFile" runat="server" xmlns:questechwebcontrols="#unknown" /> ...




Is there an example of an original code, then the modified code? I'm confused. I try adding this code, but receive errors. Here is one error I am getting:

An error occurred during the processing of /Picture Library/Forms/Flash View.aspx. Only Content controls are allowed directly in a content page that contains Content controls.
Here is my code:

<![CDATA[<%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>]]>
<![CDATA[<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>]]> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<![CDATA[<%@ Register Tagprefix="QuestechWebControls"
Namespace="QuestechSystems.SharePoint.WebControls"
Assembly="QuestechSystems.SharePoint, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=f1874fca2a9b1c17" %>]]> <questechwebcontrols:flashmoviefield fieldname="FlashMovieFile" runat="server" xmlns:questechwebcontrols="#unknown" /> <asp:content contentplaceholderid="PlaceHolderPageTitle" runat="server" xmlns:asp="#unknown"> <sharepoint:listproperty property="Title" runat="server" xmlns:sharepoint="#unknown" /> <asp:content contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server" xmlns:asp="#unknown"> <sharepoint:listproperty property="Title" runat="server" xmlns:sharepoint="#unknown" /> <asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server" xmlns:asp="#unknown"> <sharepoint:rsslink runat="server" xmlns:sharepoint="#unknown" /> <asp:content contentplaceholderid="PlaceHolderSearchArea" runat="server" xmlns:asp="#unknown"> <sharepoint:delegatecontrol runat="server" xmlns:sharepoint="#unknown"> ControlId="SmallSearchInputBox"/>
<asp:content contentplaceholderid="PlaceHolderPageImage" runat="server" xmlns:asp="#unknown"> <sharepoint:viewicon width="145" height="54" runat="server" xmlns:sharepoint="#unknown" /> <asp:content contentplaceholderid="PlaceHolderMain" runat="server" xmlns:asp="#unknown"> <webpartpages:webpartzone runat="server" frametype="None" id="Main" title="loc:Main" xmlns:webpartpages="#unknown">

AnswerRe: Modify what?
Stephen Huen
12:12 16 Jul '08  
You can't insert content outside content placeholders, within but not outside.
GeneralRe: Modify what?
CurtisG
7:16 19 Aug '08  
Do you have and example of some modified code and the original code... I am having the same problem.
GeneralRe: Modify what?
Stephen Huen
9:35 27 Aug '08  
If you are modifying a page layout page, you would do something like:

<%@ Register Tagprefix="QuestechWebControls"
      Namespace="QuestechSystems.SharePoint.WebControls"
      Assembly="QuestechSystems.SharePoint, Version=1.0.0.0,
      Culture=neutral, PublicKeyToken=f1874fca2a9b1c17" %>
...

<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
...
     <QuestechWebControls:FlashMovieField FieldName="FlashMovieFile" runat="server" />
...
</asp:Content>
...
QuestionIt couldn't open in vs2005
vinoinfozone
19:47 18 Jun '08  
Hi Stephen,

I download the project and open it is vs 2005. It cant open it will show the error the project type not support by this installation. Do u installed any addon.


Thanks
Vinoth
AnswerRe: It couldn't open in vs2005
Stephen Huen
15:18 23 Jun '08  
Please make sure you have VS 2005 SP1. It makes use of the Web Application project type.
GeneralRe: It couldn't open in vs2005
Xmen
19:28 6 Dec '08  
Microsoft Visual Studio 2005
Version 8.0.50727.42  (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727 SP1

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41650 Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0000007-41650 Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-0000007-41650 Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77626-009-0000007-41650 Microsoft Visual J# 2005
Microsoft Visual Studio 2005 Tools for Applications 77626-009-0000007-41650 Microsoft Visual Studio 2005 Tools for Applications

Microsoft Visual Web Developer 2005 77626-009-0000007-41650 Microsoft Visual Web Developer 2005
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB925674)
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. \n
If you later install a more recent service pack, this Security Update will be uninstalled automatically. \n
For more information, visit http://support.microsoft.com/kb/925674
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB937060)
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this Security Update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/937060

No, couldn't open

TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can

GeneralRe: It couldn't open in vs2005
Stephen Huen
18:00 4 Jan '09  
I believe you have .Net SP1 but not Visual Studio 2005 SP1. Mine says

Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
GeneralFile not found error message
CheGueVerra
13:21 6 Jun '08  
When I select the radio for my custom field,
I get the message file not found.

Looking at the log, I had a SPRequest failure.

Obviously, there is something wrong, I followed
this blog sample

http://www.sharepointblogs.com/jimyang/archive/2006/07/10/create-custom-field-type-in-wss-v3.aspx[^]


With the exact same results.

Any tips as to what to look for?
GeneralCould I get some more details...
CurtisG
11:15 4 Jun '08  
this looks really neat...
My initial thought would be to have tutorial flash files linked to items in a list.
Users could watch any thay wanted based on the list item they clicked.
What content type would you suggest you add this custom site column too?
An example would be good.
Also... what should the url target file look like to play a flash file?
An example of this would be good.
I can't seem to get one to play.
GeneralDo I have to use MOSS
vincemus
6:57 4 May '08  
Hi There, thanks for a great article.
I wish to avoid having to use MOSS because of the massive MS Licencing costs. Do I have to use MOSS in order for this to work on my Sharepoint servers in my company?

Thanks
Rob
GeneralRe: Do I have to use MOSS
Stephen Huen
7:13 4 May '08  
No, WSS should work just fine.
GeneralRe: Do I have to use MOSS
vincemus
7:42 4 May '08  
Thank you Stephen, much appreciated! Smile


Last Updated 25 May 2009 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010