1

[SharePoint Designer 2007] I am creating a master detail form that on using a master item, according flash movie loads and displayed. I am using the following code to embed a flash object (which is generated by adobe captivate):

<div id="CaptivateContent">&nbsp;</div>
    <script type="text/javascript">
       var so = new SWFObject("Sample.swf", "Captivate", "1361", "800", "9", "#CCCCCC");
        so.addParam("quality", "high");
        so.addParam("name", "Captivate");
        so.addParam("id", "Captivate");
        so.addParam("wmode", "window");
        so.addParam("bgcolor","#f5f4f1");
        so.addParam("menu", "false");
        so.addVariable("variable1", "value1");
        so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
        so.write("CaptivateContent");
    </script>


    <script type="text/javascript">
        document.getElementById('Captivate').focus();
        document.Captivate.focus();
    </script>

How can I make it get the SWFObject parameter from database? Am I on the right path?

2
  • What database? You shouldn't connect to the SharePoint one directly. Is this a third party database? – Andy Burns May 25 '11 at 8:51
  • It is a SharePoint list, but I have problem with how to pass the parameter to the SWFObject. – Yasser Sobhdel May 25 '11 at 9:10
1

Firstly, what do you mean when you say Database, is it stored in a document library? If so you may want to use something like the DataViewWebPart with custom XSLT to insert the FileLeaf ref into the new SWFObject declaration.

If it is in a physical database, then you will need some code (or a BDC connection) to grab the location, or pull the blob to the accessible web file system, and then push this reference into the new SWFObject declaration.

4
  • I have problem with the part "push this reference into the new SWFObject declaration". Is this possible using SharePoint Designer? – Yasser Sobhdel May 25 '11 at 9:19
  • If using a BDC connection you can use DataViewWebPart; but you will need some method of writing the blob stored in the database to the filesystem. – Tim Ebenezer May 25 '11 at 9:23
  • The objects are stored on the server itself not in the database. I have problem passing name of the object to the declaration. I need a dynamic way of doing this. – Yasser Sobhdel May 25 '11 at 9:41
  • 1
    In which case, if the name of the file is stored in the database, then with the BDC connection use DataViewWebPart and in the XSL output the new SWFObject declaration using a combiniation of xsl:text and xsl:value-of tags. – Tim Ebenezer May 25 '11 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.