flash (swf) in header

Oct 1, 2008 at 2:58 AM
I'm trying to include a Flash (*.swf) file into header instead of image. Is it possible ?
Oct 1, 2008 at 9:05 AM
I would change the Skin.skin file in your "App_Themes" folder.
If you look there you will find a div with an id called "head".
In the "PageLayout.css" the background image of this div is set to a specific image. For instance "background: #FFFFFF url(_images/img_header.jpg) no-repeat top left;".
If you remove this part from the "PageLayout.css" file and add a flash object in the Skin.skin file, you're done.
Example: 

<ContentTemplate>
            <div id="wrapper">
                <div id="head">    
                     <object width="792" height="282">
                       <param name="movie" value="_images/somefilename.swf">
                       <embed src="_images/somefilename.swf" width="792" height="282"></embed>
                     </object>
                    <div id="websiteTitle"><cc1:WebSiteTitle ID="WebSiteTitle1" runat="server"></cc1:WebSiteTitle></div>
                    <div id="utilities"><cc1:LoginStatus  runat="Server" id="LoginStatus1" />&nbsp;&nbsp;&nbsp;<cc1:SearchLink runat="Server" id="SearchLink1" /></div>
                </div>
                <table id="mainTable" cellpadding="0" cellspacing="0" border="0">
                etc.
Oct 1, 2008 at 6:14 PM
As per your instruction movie is not loaded


in skin


<%@ Register TagPrefix="cc1" Namespace="MyWebPagesStarterKit.Controls" %>
<%@ Register TagPrefix="RJS" Namespace="RJS.Web.WebControl" Assembly="RJS.Web.WebControl.PopCalendar" %>
<cc1:TemplatedContent runat="server" SkinID="Top">
    <ContentTemplate>
            <div id="wrapper">
                <div id="head">
                       <object width="780" height="300">
                       <param name="movie" value="_images/js37_2.swf">
                       <embed src="_images/js37_2.swf" width="780" height="300"></embed>
                     </object>
                    <div id="websiteTitle"><cc1:WebSiteTitle ID="WebSiteTitle1" runat="server"></cc1:WebSiteTitle></div>
                    <div id="utilities"><cc1:LoginStatus  runat="Server" id="LoginStatus1" />&nbsp;&nbsp;&nbsp;<cc1:SearchLink runat="Server" id="SearchLink1" /></div>
                </div>
                <table id="mainTable" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td id="left">
                            <div id="navigation">
                                <asp:Menu ID="Menu1"
                                    runat="server"
                                    DataSourceID="menuDataSource"
                                    DynamicHorizontalOffset="0"
                                    DynamicVerticalOffset="1"
                                    StaticEnableDefaultPopOutImage="false"
                                    DynamicEnableDefaultPopOutImage="false"
                                    ItemWrap="false"
                                >
                                    <StaticMenuItemStyle CssClass="nav" Width="192px" />
                                    <StaticSelectedStyle CssClass="nav_selected" Width="192px" />
                                    <DynamicMenuItemStyle CssClass="sublevel" />
                                    <DynamicSelectedStyle CssClass="sublevel_selected" />
                                    <DynamicMenuStyle CssClass="sublevel" />
                                </asp:Menu>
                                <asp:SiteMapDataSource runat="server" ID="menuDataSource" ShowStartingNode="false" />
                            </div>
                            <cc1:SidebarControl runat="server" ID="SidebarControl1"/>
                        </td>
                        <td id="right">
                            <div id="breadcrumbs">
                                <asp:SiteMapPath runat="server" ID="sitemapPath" ShowToolTips="false">
                                    <RootNodeTemplate></RootNodeTemplate>
                                    <CurrentNodeStyle CssClass="currentNode" />
                                    <NodeStyle CssClass="node" />
                                    <PathSeparatorStyle CssClass="separator" />
                                    <PathSeparatorTemplate>&gt;</PathSeparatorTemplate>
                                </asp:SiteMapPath>
                            </div>
                             <div id="contentContainer"></ContentTemplate>
</cc1:TemplatedContent>
<cc1:TemplatedContent runat="server" SkinID="Bottom">
    <ContentTemplate>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><div id="footer"><cc1:WebSiteFooter runat="server" ID="WebSiteFooter1" /></div></td>
                    </tr>
                </table>
            </div>
    </ContentTemplate>
</cc1:TemplatedContent>

<cc1:Pager
    runat="server"
    PageSize="20"
    FirstImageUrl="_images/icon_to_start.gif"
    PreviousImageUrl="_images/icon_back.gif"
    NextImageUrl="_images/icon_next.gif"
    LastImageUrl="_images/icon_to_end.gif"
    Mode="FirstPreviousNextLast"
    CssClass="pager"
/>

<RJS:PopCalendar
    runat="server"
    MessageAlignment="RightCalendarControl"
    RequiredDate="True"
    SelectHoliday="True"
    SelectWeekend="True"
    ShowHolidays="False"
    ShowSpecialDay="False"
    ShowWeekend="True"
    ShowWeekNumber="True"
/>

<asp:TextBox runat="server" CssClass="textbox"/>
<asp:TextBox runat="server" CssClass="textbox" Width="100px" SkinID="datepicker"/>
<asp:TextBox runat="server" CssClass="textbox" SkinID="timepicker" />
<asp:TextBox runat="server" CssClass="textboxAdmin" SkinID="admin"/>
<asp:TextBox runat="server" CssClass="textboxBlog" SkinID="blog"/>

<asp:Calendar runat="server" SkinID="blogCalendar" 
    DayNameFormat="FirstTwoLetters"
    CellPadding="3"
    CellSpacing="0"
    CssClass="calendarStyle"
    TitleStyle-CssClass="calendarTitle"
    TitleStyle-BackColor="Transparent"
    DayHeaderStyle-CssClass="calendarHeader"
    DayStyle-CssClass="calendarDay"
    SelectedDayStyle-BackColor="White"
    SelectedDayStyle-Font-Bold="true"
    SelectedDayStyle-ForeColor="black" />
   
<asp:FileUpload runat="server" CssClass="textbox" />

<asp:GridView runat="server" AllowPaging="false" AllowSorting="false" BorderStyle="none" BorderWidth="0px" Width="100%" GridLines="none"></asp:GridView>

<%-- Buttons --%>
<asp:Button runat="server" CssClass="button" />
<asp:LinkButton runat="server" CssClass="btnRight" SkinID="Right"></asp:LinkButton>
<asp:LinkButton runat="server" CssClass="btnLeft" SkinID="Left"></asp:LinkButton>
<asp:LinkButton runat="server" CssClass="btnUp" SkinID="Up"></asp:LinkButton>
<asp:LinkButton runat="server" CssClass="btnDown" SkinID="Down"></asp:LinkButton>
<asp:LinkButton runat="server" CssClass="btnEdit" SkinID="Edit"></asp:LinkButton>
<asp:LinkButton runat="server" CssClass="btnDelete" SkinID="Delete"></asp:LinkButton>

<%-- Gallery --%>
<asp:DataList runat="server" SkinID="gallery" RepeatDirection="Horizontal" RepeatColumns="4">
    <ItemStyle CssClass="gallerycell" />
</asp:DataList>
<asp:DataList runat="server" SkinID="galleryEdit" RepeatDirection="Horizontal" RepeatColumns="4">
    <ItemStyle CssClass="gallerycell" />
</asp:DataList>

<%-- BLOG --%>
<asp:DataList runat="server" SkinID="blog" RepeatDirection="Vertical">
    <ItemStyle CssClass="blogcell" />
</asp:DataList>
<asp:DataList runat="server" SkinID="blogEdit" RepeatDirection="Vertical">
    <ItemStyle CssClass="blogcell" />
</asp:DataList>
<asp:DataList runat="server" SkinID="comments" RepeatDirection="Vertical">
    <ItemStyle CssClass="commentcell" />
</asp:DataList>

<cc1:Pager
    Width="100%"
    runat="server"
    SkinID="gallery"
    PageSize="8"
    FirstImageUrl="_images/icon_to_start.gif"
    PreviousImageUrl="_images/icon_back.gif"
    NextImageUrl="_images/icon_next.gif"
    LastImageUrl="_images/icon_to_end.gif"
    Mode="FirstPreviousNextLast"
    CssClass="pager"
/>
  
<cc1:ResizedImage runat="server" SkinID="galleryThumbnail" MaxWidth="101" MaxHeight="101" ImageAlign="Middle"/>
<cc1:ResizedImage runat="server" SkinID="galleryBigView" MaxWidth="442" MaxHeight="442" ImageAlign="top"/>

<%-- Validators --%>
<asp:CompareValidator runat="server" CssClass="error" />
<asp:CustomValidator runat="server" CssClass="error" />
<asp:RangeValidator runat="server" CssClass="error" />
<asp:RegularExpressionValidator runat="server" CssClass="error" />
<asp:RequiredFieldValidator runat="server" CssClass="error" />


pagelayout.css


div#head
{
    position: relative;
    top: 0;
    left: 0;
    height: 282px;
    width: 792px;
    margin-bottom: 0px;
  
}
http://mahavirinternationalchennai.com/default.aspx


Oct 2, 2008 at 3:05 AM
The problem your having is because the the skin file can not find the Flash File so try this:

<

 

object width="780" height="300">

 

 

<param name="movie" value="App_Themes/YOUR THEME/images/js37_2.swf">

 

 

<embed src="App_Themes/YOUR THEME/_images/images/js37_2.swf" width="780" height="300"></embed>

 

 

</object>

This should play the Flash file fine

THEFAV

 

Oct 7, 2008 at 3:42 PM
Edited Oct 7, 2008 at 3:43 PM
Thefav's suggestion is right.
Please see a live demo of
http://www.myChensBistro.com
There are serveral new things. Some customized section, such as food menu, map, flash header.


You can also have two flashs.one put into the home page template, the other put into the subpage template.
 <cc1:HomepageContent runat="server">
                       <HomepageTemplate>
                                <div id=flash>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="800" height="417" id="GoldenSushi" align="" VIEWASTEXT>
    <param name="movie" value="App_Themes/BeachOrange2/Flash/HeadFlash1.swf">
    <param name="quality" value="high">
    <embed src="App_Themes/BeachOrange2/Flash/HeadFlash1.swf" quality="high" width="800" height="417" name="GoldenSushi" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed>
   </object>  </div>
                      
                        </HomepageTemplate>
                        <SubpageTemplate>
                                        <div id=flash>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="800" height="200" id="GoldenSushi" align="" VIEWASTEXT>
    <param name="movie" value="App_Themes/BeachOrange2/Flash/HeadFlash.2swf">
    <param name="quality" value="high">
    <embed src="App_Themes/BeachOrange2/Flash/HeadFlash2.swf" quality="high" width="800" height="200" name="GoldenSushi" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed>
   </object>  </div>
                      
                        </SubpageTemplate> </cc1:HomepageContent>


Oct 31, 2009 at 2:41 PM

When I do this , it works, I get the images, but in VisStudio I get a popup "Microsft Jscript runtime Error: Object required" then it opens a page title Jscript - script block [dynamic] with the following (highlited in red bold for clarity but actually highlighted in yellow on the page) : and when I click ignore the website opens normally.

}

function__flash__removeCallback(instance, name) {

instance[name] =null;

<font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2" color="#0000ff"><font face="Consolas" size="2" color="#0000ff"><font face="Consolas" size="2" color="#0000ff">

}

</font></font></font></font></font></font></font>
<font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2" color="#0000ff"><font face="Consolas" size="2" color="#0000ff">

 

</font></font></font></font></font></font>
<font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2" color="#0000ff">

 

</font></font></font></font></font>
<font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2">

 

</font></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2">

 

</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">

 

</font></font><font face="Consolas" size="2">

 

</font>

 

;<font face="Consolas" size="2"><font face="Consolas" size="2">

 

</font></font><font face="Consolas" size="2">

 

</font>

 

 

 

 

Oct 31, 2009 at 6:16 PM

Please ignore everything after the red text. Not sure what happened with the pasting. Apologies

Feb 6, 2010 at 8:29 PM

hansdu, nice integration of flash! ..and thanks for sharing your code!

- Joe

Mar 31, 2010 at 8:08 PM
Edited Mar 31, 2010 at 8:10 PM
hansdu wrote:
Thefav's suggestion is right.
Please see a live demo of
http://www.myChensBistro.com
There are serveral new things. Some customized section, such as food menu, map, flash header.


You can also have two flashs.one put into the home page template, the other put into the subpage template.
 <cc1:HomepageContent runat="server">
                       <HomepageTemplate>
                                <div id=flash>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="800" height="417" id="GoldenSushi" align="" VIEWASTEXT>
    <param name="movie" value="App_Themes/BeachOrange2/Flash/HeadFlash1.swf">
    <param name="quality" value="high">
    <embed src="App_Themes/BeachOrange2/Flash/HeadFlash1.swf" quality="high" width="800" height="417" name="GoldenSushi" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed>
   </object>  </div>
                      
                        </HomepageTemplate>
                        <SubpageTemplate>
                                        <div id=flash>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="800" height="200" id="GoldenSushi" align="" VIEWASTEXT>
    <param name="movie" value="App_Themes/BeachOrange2/Flash/HeadFlash.2swf">
    <param name="quality" value="high">
    <embed src="App_Themes/BeachOrange2/Flash/HeadFlash2.swf" quality="high" width="800" height="200" name="GoldenSushi" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed>
   </object>  </div>
                      
                        </SubpageTemplate> </cc1:HomepageContent>


 Guys I am an amatuer to all of this so forgive me if I am asking a dumb question, but where exactly am I supposed to place this code.  Currently this is what my files look like.

From PageLayout.css, Am I supposed to delete the background information from both of these sections?

div#head
{
position: relative;
top: 0;
left: 0;
height: 165px;
width: 100%;
margin-bottom: 26px;
border-bottom: solid 1px #663200;
background: url(_images/header_bg.png) repeat-x top left;
}

div.titleBG
{ 
background: url(_images/Header_tableheader.png) no-repeat top left;
height: 165px;
width: 100%;
}

From skin.skin

<%@ Register TagPrefix="cc1" Namespace="MyWebPagesStarterKit.Controls" %>
<%@ Register TagPrefix="RJS" Namespace="RJS.Web.WebControl" Assembly="RJS.Web.WebControl.PopCalendar" %>

<cc1:TemplatedContent runat="server" SkinID="Top">
     <ContentTemplate>
            
<div id="head">
                   

<div class="titleBG">&nbsp;<div id="websiteTitle"><cc1:WebSiteTitle ID="WebSiteTitle1" runat="server"></cc1:WebSiteTitle></div></div>
                    
<div id="utilities"><cc1:LoginStatus runat="Server" id="LoginStatus1" />&nbsp;&nbsp;&nbsp;<cc1:SearchLink runat="Server" id="SearchLink1" /></div> </div>

If you could tell me exactly what needs to be deleted from either of these files and what needs to replace it I would be very appreciative.  Thanks in advance.