BCS MVC 4 With Flash Content

To include flash on you MVC 4 applications create a new folder “swf” under the Contents folder of the MVC 4 project tree.

Next add an existing item to the folder “swf”. Select the “swf” flash file you would like to incorporate into your web site now.

Go to the Views Shared subfolder of the solution explorer and open the SiteMaster file.

Place the object in the desired location on the SiteMaster. Make sure the path includes /Content/swf/swfname.swf in the object.

When you run the MVC 4 application your flash content will appear.

I am including the source of the SiteMaster file below.

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<!DOCTYPE html>
<html lang="en">
    <head runat="server">
        <meta charset="utf-8" />
        <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
        <link href="<%: Url.Content("~/favicon.ico") %>" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        <%: Styles.Render("~/Content/css") %>
        <%: Scripts.Render("~/bundles/modernizr") %>
    </head>
<body>
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <object
                    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
                    id="BCSHead"
                    width="470" height="51">
                    <param name="movie" value="BCSHead.swf">
                    <param name="bgcolor" value="#FFFFFF">
                    <param name="quality" value="high">
                    <param name="allowscriptaccess" value="samedomain">
                    <embed
                        type="application/x-shockwave-flash"
                        pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
                        name="BCSHead"
                        width="470" height="51"
                        src="/Content/swf/BCSHead.swf"
                        bgcolor="#FFFFFF"
                        quality="high"
                        allowscriptaccess="samedomain">
                        <noembed>
          </noembed>
                    </embed>
                </object>
 
                <p class="site-title"><%: Html.ActionLink("your logo here", "Index", "Home") %></p>
            </div>
            <div class="float-right">
                <section id="login">
                    <%: Html.Partial("_LoginPartial") %>
                </section>
                <nav>
                    <ul id="menu">
                        <li><%: Html.ActionLink("Home", "Index", "Home") %></li>
                        <li><%: Html.ActionLink("About", "About", "Home") %></li>
                        <li><%: Html.ActionLink("Contact", "Contact", "Home") %></li>
                    </ul>
                </nav>
            </div>
        </div>
    </header>
    <div id="body">
        <asp:ContentPlaceHolder ID="FeaturedContent" runat="server" />
        <section class="content-wrapper main-content clear-fix">
            <asp:ContentPlaceHolder ID="MainContent" runat="server" />
        </section>
    </div>
    <footer>
        <div class="content-wrapper">
            <div class="float-left">
                <p>&copy; <%: DateTime.Now.Year %> - My ASP.NET MVC Application</p>
            </div>
        </div>
    </footer>
 
    <%: Scripts.Render("~/bundles/jquery") %>
    <asp:ContentPlaceHolder ID="ScriptsSection" runat="server" />
</body>
</html>

Repeat this process for as many objects as you would like to incorporate into your site and enjoy.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.