image button link to .swf file in new web page/embed .swf file in XHTML file

Posted on 2006-03-24
Last Modified: 2013-12-16
I am trying to use an image button in my master page file that links to an XHTML page.  I have only been able to find the method of "embedding" ( <embed> ) which will not work with XHTML.  I have tried to incorporate FlashObject into the .htm page, but no luck.  Below is the portion of the master page with the image button:

<asp:ImageButton ID="imgFeatureTour" runat="server" ImageAlign="Bottom" ImageUrl="~/images/featuretour[1].gif" onclick="MM_openBrWindow('feature_tour.htm','','toolbar=0,location=0,directries=0,status=0,menubar=0,scrollbars=0,resizable=0,width=760,height=400,left=80,top=180')" />

Here is the MM_openBrWindow javascript (as provided to me) which is in the <head> of the .htm file:

<script language="JavaScript" type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features) { //v2.0,winName,features);

Here is the .htm file: (I'm not sure how to implement the javascript of if both should be in the <head>)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head><title>TeleVantage Feature Tour</title>
<script language="JavaScript" type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features) { //v2.0,winName,features);
<script type="text/javascript" src="/javascript/flashobject.js"></script>
        <div id="flashcontent">
                    The feature tour will begin shortly.  
            <script type="text/javascript">
             var fo = new FlashObject("/flash/feature_tour_partner.swf", "feature_tour", "760", "400", "6", "#336699");

When I try to compile the site, I get the following error:

'MM_openBrWindow' is not a member of 'ASP.site_muster'.

I appreciate any help that can be offered.
Question by:vbplayr2000
    LVL 14

    Accepted Solution

    You need to place the javascript function on your .aspx page and not on the htm page which you want to open. That should solve your problem.

    Author Comment

    I tried it on the masterpage and it did not work.  Should I just embed the flash in a content page within the masterpage?  The content page then would inherit the java from the master page.  I am still unclear how to accomplish this through .aspx and masterpages.  Is there anyone out there who has accomplished this already????


    Author Comment

    I found a work around and a new tool for VS2005 called FlashControl.  It can be found at:

    It allows a developer to drag the FlashControl from the Toolbox onto an .aspx page.  It does function well and is very easy to implement.  However, it still does not handle this specific problem of "embedding" a flash object.  

    This tool still uses an <embed> within the XHTML and that still will create a conflict with some browsers.

    I researched the Satay method to embed, but that requires the ability to edit the .swf root.  The .swf movie I am manipulating is not my own, so I cannot implement that method (unless someone out there knows something I don't :-)  )

    So, my site now does have flash capability on an .aspx content page that inherits my master page (I like this because it keeps the uniform look and lets the user know they are still with my company learning about another company's product).

    I am sure that in the near future, a more standard method will be developed.

    Thanks for your input.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
    The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now