More in this section

Forums / Developing with Sitefinity / Embedding Flash Content

Embedding Flash Content

2 posts, 0 answered
  1. Falcon325
    Falcon325 avatar
    9 posts
    Registered:
    18 Sep 2006
    29 Nov 2007
    Link to this post
    Hi, up till now everything has been great, but I've run into something I haven't figured out yet (lack of time), if you could possibly give me a hint as to what to do I'll be sure to do the rest. Problem: I've been able to embed a flash .swf file into the master template file, but when I create a news list page and then a single news page, I lose the flash file embedded previously. The Flash file requires a java script file to embed the FlashObject and set various parameters. Any suggestions. The js script file can be downloaded at this web site http://blog.deconcept.com/swfobject/ , also, just something that came to mind, the swf file along with the js file needs to be in the root directory of teh project, do you think if I put the two files in the directory where the News ascx files are located for News ans Single News Just  a thought.
    Thanks in advance
  2. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    29 Nov 2007
    Link to this post
     

    Try changing the following property to true in the Sitefinity/Admin/ControlTemplates/EditorConfigFile.xml file:

    <property name="AllowScripts">true</property>


    And then in your news item

    <div id="flashContent">     
         <b>    
         What no Flash player?      
         </b>    
         <br/>    
         <br/>    
         We're sorry to tell you that the amazing Flash content, developed by a professional graphic design firm, and programmed by      
          <title="Alighten, advanced web site programming for graphic designers" href="/">     
         Alighten     
         </a>      
         cannot be displayed because you don't have the Flash player. Please      
         <title="Get the Flash player to see scripted Flash content programmed by Alighten for graphic designers" href="http://www.adobe.com/products/flashplayer/">     
         get the Flash player     
         </a> to view this visually stunning Flash content.     
    </div>    
    <script src="/files/scripts/swfobject.js" type="text/javascript"></script>    
    <script type="text/javascript">     
         var so = new SWFObject("/Files/blogs/bnye/banner.swf", "mymovie", "200", "100", "9", "#ffffff");     
         so.write("flashContent");     
    </script>    
     


    We wrote a short blog post on this at:

    http://www.alighten.com/designerBlogs/alighten/blogItem/07-09-07/flash_embedding_vs_flash_scripting_part_2.aspx

    Keep in mind if you are using ActionScript that you may need to prevent any onload AS events from fireing immediately by using the following script:

    </script><script src="/files/scripts/swfformfix2.js" type="text/javascript"></script> 

    Which you can learn more about at:

    http://www.teratechnologies.net/stevekamerman/index.php?entry=entry070101-033933

    It's a pretty handy addition to swfobject.js.

    I hope that helps you.

    Sincerely,

    Ben



    Sincerely,

    Ben

2 posts, 0 answered